{"version":3,"sources":["config/Config.tsx","factories/mapComponent/EsriMap.tsx","factories/mapComponent/helpers/FeatureInfoFinder.tsx","factories/mapComponent/helpers/GetFeatureInfo.tsx","factories/mapComponent/mapTypes/MapLegendElementTemplate.tsx","factories/mapComponent/EsriMapLegend.tsx","images/WMMS_logo.png","interfaces/IBaseModel.tsx","models/ModelDownload.tsx","components/toolTipModal/toolTipModal.tsx","components/Downloads/DownloadSubComponent/downloadSubComponent.tsx","components/Downloads/DownloadLspc/downloadLspc.tsx","components/Downloads/DownloadSustain/downloadSustain.tsx","components/Downloads/DownloadSpatial/downloadSpatial.tsx","images/wmms_repo_diagram.png","components/Downloads/DownloadDocument/downloadDocument.tsx","components/Downloads/downloads.tsx","images/WMMS_Utility_Diagram_ForWeb.png","components/Utilities/Utilities.tsx","models/networktimeseries.tsx","models/networkdownload.tsx","images/WMMS_logo_full.png","components/Optimization/D3/chart/chartPieces/AxisLeft.tsx","components/Optimization/D3/chart/chartPieces/AxisBottomTimeFormat.tsx","components/Optimization/D3/chart/chartPieces/Path.tsx","components/Optimization/D3/chart/chartPieces/AreaStartEnd.tsx","components/Optimization/D3/chart/chartPieces/LabelBottom.tsx","components/Optimization/D3/chart/chartPieces/LabelLeft.tsx","components/Optimization/D3/chart/chartPieces/Callout.tsx","components/Optimization/D3/chart/TimeseriesSVG.tsx","components/Optimization/D3/TimeseriesLineChart.tsx","components/DOMObjects/IDropdownProps.tsx","components/Optimization/D3/chart/chartPieces/AxisLeftTicks.tsx","components/Optimization/D3/chart/chartPieces/PathsInverse.tsx","components/Optimization/D3/chart/PrecipTimeseriesSVG.tsx","components/Optimization/D3/PrecipTimeseriesChart.tsx","components/DOMObjects/Dropdown.tsx","core/hrefLink/hrefLink.tsx","components/Network/NetworkSidePanel/networkSidePanel.tsx","components/Network/NetworkBottomPanel/networkBottomPanel.tsx","factories/mapComponent/mapTypes/MapConfig.tsx","models/networkAP.tsx","models/alertPropsModel.tsx","components/Network/network.tsx","models/optimizationsummary.tsx","core/colorPickerModal/colorPickerModal.tsx","components/Optimization/ScenarioViewer/optimizationTable.tsx","models/optimizationimplementationplan.tsx","models/sustainToLSPCbatch.tsx","components/Optimization/D3/chart/chartPieces/AxisRightMillionFormat.tsx","components/Optimization/D3/chart/chartPieces/AxisBottom.tsx","components/Optimization/D3/chart/chartPieces/Area.tsx","components/Optimization/D3/chart/chartPieces/Areas.tsx","components/Optimization/D3/chart/chartPieces/Circle.tsx","components/Optimization/D3/chart/chartPieces/LabelRight.tsx","components/Optimization/D3/chart/chartPieces/Line.tsx","components/Optimization/D3/chart/OptimizationSVG.tsx","components/AlertComponent/alertComponent.tsx","models/optimizationdeliveryratio.tsx","models/optimizationassessmentpointdata.tsx","components/Optimization/ScenarioViewer/scenarioViewer.tsx","models/optimizationupload.tsx","components/Optimization/ComparisonTable/comparisonTable.tsx","core/downloadLink/downloadLink.tsx","core/fileDragAndDrop/FileDragAndDrop.tsx","components/Optimization/optimization.tsx","images/wmms-opt.png","components/Links/links.tsx","models/ftable.tsx","models/processviewmodel.tsx","components/Utilities/FTable/ftableutil.tsx","models/weather.tsx","components/Utilities/Weather/weatherutil.tsx","models/bmpopportunity.tsx","components/Utilities/BmpOpportunity/bmpopportunityutil.tsx","models/wramps.tsx","components/Utilities/Wramps/wrampsutil.tsx","models/inclusivebestsolutions.tsx","components/Utilities/InclusiveBestSolutions/inclusivebestsolutionsutil.tsx","models/tier2.tsx","components/Utilities/Tier2/tier2util.tsx","models/mjrsolutions.tsx","components/Utilities/MjrBMPSolutions/mjrbmpsolutions.tsx","models/climatechange.tsx","components/Utilities/ClimateChange/climatechangeutil.tsx","UtilitiesMenu.tsx","core/tootipFactory.tsx","images/wmms_map.png","images/wmms_curve.png","components/About/about.tsx","images/WMMS_Utility_Diagram_ForPW.png","components/Utilities-PW/UtilitiesPW.tsx","components/Mobile/mobile.tsx","models/ClimateChange/climateUpload.tsx","models/ClimateChange/climateSummary.tsx","models/ClimateChange/climateCsv.tsx","components/ClimateChangeViewer/NivoBarChart/myResponsiveBar.tsx","core/buttonGroup/ButtonGroup.tsx","components/ClimateChangeViewer/NivoLineChart/myResponsiveLine.tsx","components/ClimateChangeViewer/NivoBullet/myResponsiveBullet.tsx","core/HelperFx.tsx","components/ClimateChangeViewer/DetailItem/detailItem.tsx","components/ClimateChangeViewer/PerformanceSummary/performanceSummary.tsx","components/ClimateChangeViewer/DataTable/dataTable.tsx","components/ClimateChangeViewer/NivoDivergingBar/DivergingBar.tsx","core/watermark/watermark.tsx","images/wmms-climate.png","components/ClimateChangeViewer/ClimateViewer.tsx","App.tsx","serviceWorker.ts","index.tsx"],"names":["Config","EsriMapState","map","EsriMap","props","legendState","mapRef","view","featureInfoFinder","hoverLayers","wmsClass","geoJSONClass","mercatorUtils","spatialRef","popupFeature","state","layerCount","updateMap","mapContext","this","setTimeout","newExtent","extent","xmin","getLegendLayersState","legendStateArray","key","push","value","popup","close","layers","items","forEach","layer","ls","id","popupEnabled","getHoverLayers","layerInfos","i","layerType","queryFeatures","shortName","handleHoverHit","hitResult","graphic","attributes","OBJECTID","open","location","geomtry","features","createMapLayers","context","t","type","l","functionName","toUpperCase","eval","addWMSLayers","info","wmsLayer","url","mapServiceURL","title","name","sublayers","imageFormat","version","opacity","visible","spatialReferences","add","addGEOJSONLayers","console","log","template","overwriteActions","renderer","symbol","appUrl","width","height","angle","geoLayer","popupTemplate","React","createRef","setDefaultOptions","loadModules","css","then","ArcGISMap","MapView","WMSLayer","webMercatorUtils","Point","SpatialReference","geoJSONLayer","basemap","basemapType","statecopy","Object","assign","setState","container","current","center","startingCoords","zoom","startingZoom","spatialReference","FeatureInfoFinder","on","event","sp","x","y","hitTest","r","results","rr","h","classContext","eventListenerFunction","buildQueryString","mapPoint","latitude","longitude","GetFeatureInfo","axiosGet","data","catch","dockEnabled","dockOptions","buttonEnabled","evt","geo","zm","goTo","target","mapLegendProps","baseMap","baseMapType","mapLayers","getState","legendOpenByDefault","optionalLegendCallBack","style","position","className","ref","Component","baseURL","mapView","olTileSource","layerString","index","length","singlePoint","clickCenter","geographicToWebMercator","TileWMS","params","serverType","viewResolution","resolution","getFeatureInfoUrl","GetBaseModel","strEndPoint","endpoint","axiosBaseInstance","makeBaseAxiosInstance","axios","create","api_endpoint","headers","makeBaseAxiosFileInstance","method","MapLegendElementTemplate","displayName","color","EsriMapLegendState","basemapswap","legendExpanded","EsriMapLegend","initializeMapLegend","createElementTemplateArray","updateLayerVisibility","templateArray","newTemplate","legendDisplayName","setLegendState","callback","stateCopy","handleLayerToggle","newState","handleLegendSizeToggle","collapseLegend","undefined","findLayerById","fadeLayerIn","fadeLayerOut","toggleBasemapType","legendContext","satellite","getMapLegendItems","List","Item","Content","whiteSpace","Checkbox","onClick","checked","toggle","marginLeft","paddingLeft","overFlow","legendHeight","window","innerHeight","Grid","centered","zIndex","right","top","backgroundColor","padding","borderRadius","border","maxHeight","overflowY","overflowX","Row","paddingTop","Icon","Group","size","marginRight","corner","paddingRight","display","flexDirection","justifyContent","alignItems","textAlign","Header","as","fontSize","Divider","divided","verticalalign","BaseModel","axiosBaseFileInstance","axiosBaseZipInstance","queryString","Date","valueOf","toString","String","axiosPostUpload","formData","axiosGetAll","axiosGetBlob","responseType","axiosGetBlobById","axiosPostImage","MultiRequest","requests","all","ModelDownloads","filePath","fileName","description","downloadType","mimeType","archived","tooltipName","displayWeight","TooltipModal","modal","isOpen","handleOpen","handleClose","getHeaderText","__html","header","getBodyText","bodyText","replace","client_endpoint","Modal","modalSize","onClose","trigger","iconClassName","icon","dangerouslySetInnerHTML","scrolling","Actions","Button","DownloadSubComponentState","modelData","loading","downloadProgress","Array","DownloadSubComponent","makeJSX","d","Table","Cell","verticalAlign","downloadModelFile","includes","tooltipsReady","tooltipFactory","tooltipData","body","modelFormatter","file","modelDownload","lspcModelFormatter","onUploadModalClose","timeSeriesData","lspcOnUploadModalClose","lspcData","modelDownloadId","filename","compState","bloboBaggins","Blob","removeFromDownloadProgress","navigator","msSaveOrOpenBlob","link","document","createElement","href","URL","createObjectURL","setAttribute","appendChild","click","revokeObjectURL","removeChild","filter","getModelData","datafilter","stateProp","sort","a","b","sectionName","celled","striped","HeaderCell","colSpan","componentTitle","Body","Loader","active","DownloadLspcState","DownloadLspc","displayDisclaimer","DownloadSustainState","DownloadSustain","sustainData","DownloadSpatialState","DownloadSpatial","DownloadDocumentState","DownloadDocument","DownloadsState","activeTab","Downloads","getElementsByClassName","scrollTop","disclaimerAgree","src","repoGraphic","alt","clickTab","UtilitiesState","processing","selection","utilComponentIsOpen","showCards","Utilities","interval","handleFirstRender","desiredUrl","desiredRoute","split","history","handleItemClick","beginInterval","intvl","stopInterval","clearInterval","setUtilityRoute","getUtilityRouteJSX","utilities","card","path","internalName","render","component","cardTitle","cardDescription","cardIcon","wmmsColor","cardSubtitle","helpDoc","templateDoc","Logo","Card","circular","inverted","Description","disabled","networktimeseries","networkdownload","AxisLeft","d3","call","scale","transition","AxisBottom","ticks","class","transform","Path","yScale","xScale","line","attr","fill","strokeWidth","stroke","strokeLinejoin","strokeLinecap","AreaStartEndState","AreaStartEnd","y0","y1","addCircle","LabelBottom","append","margin","bottom","text","selectAll","remove","LabelLeft","left","Callout","yvalue","xvalue","xCoord","yCoord","label","callout","join","_","node","getBBox","w","TimeseriesSVGState","mouseDate","mouseValue","calloutX","calloutY","mouseDownDate","mouseUpDate","listenersApplied","TimeseriesSVG","myBisect","mouseEventOffset","bisect","mx","date","invert","componentDidUpdate","applyD3Listeners","svgWidth","svgHeight","z","mouseCoords","res","xcoord","ycoord","toFixed","units","toLocaleDateString","year","month","day","hour","minute","zoomHandler","startDate","clickHandler","mouseEvent","clientX","mouseLeave","mouseClickStart","mouseClickEnd","domain","range","axisBottomProps","axisLeftProps","pathProps","areaStartEndProps","zoomStart","zoomEnd","calloutProps","labelBottomProps","labelLeftProps","Segment","content","pointerEvents","TimeseriesLineChartState","TimeseriesLineChart","DropdownOption","optionText","optionValue","AxisLeftTicks","PathsInverse","computeSegments","lineData","segments","item","segment","seg","segData","select","enter","PrecipTimeseriesSVGState","PrecipTimeSeriesData","getTime","PrecipTimeseriesSVG","pathsInverseProps","noData","precipMsg","PrecipTimeseriesChartState","PrecipTimeseriesChart","DropdownH2O","componentDidMount","dropdownItems","onUpdate","manageChangeOnSingle","onSelect","manageChangeOnMultiple","createOptions","o","isMultiselect","dropdownTitle","options","onChange","multiple","HrefLinkState","HrefLink","hrefClick","newTab","endpointUrl","bold","linkText","NetworkSidePanelState","viewToShow","firstDropdownSelection","secondDropdownSelection","thirdDropdownSelection","thirdDropDownOptions","thirdDropdownIndex","timeseriesData","preciptimeseriesData","outData","preData","selAP","timeseriesStats","TimeseriesStats","endDate","zoomed","zoomingStartDate","zoomingEndDate","numFadeOut","dataUnits","downloadFileSpinner","statRound","min","max","average","perc5","perc10","perc25","perc50","perc75","perc90","perc95","stdev","variationCoeff","NetworkSidePanel","constituentMapping","constituent","handleDateChange","downClick","upClick","buildTimeseriesData","zoomingHandler","resetZoom","parse","coordinates","values","group","Math","round","coordinatesGroup","groupCnt","maxItem","padTimeseriesData","updateLoadingFunction","networkContext","buildTimeseriesStats","msg","padPrecipTimeseriesData","splice","stats","dataArr","reduce","quartile","n","mean","sqrt","pow","rounding","q","pos","base","floor","rest","setDropDowns","distinctSimulations","apData","simulation","self","indexOf","selSimulation","eventOptions","selEvent","getAssessmentPointData","updateDropdownOne","updateDropdownTwo","updateDropdownThree","m","downloadFile","dataPath","outFile","blob","prePath","preFile","thirdOptions","dropdownFuctionOne","getFirstDropdownOptions","option","dropOption","dropdownFunctionTwo","getSecondDropdownOptions","dropdownFunctionThree","thisIndex","getThirdDropdownOptions","assessmentPointId","graphWidth","innerWidth","chartprops","linetype","precipchartprops","dropDownTwo","dropDownThree","logo","e","renderSidePanelView","renderMainView","childEsriMapRef","ZoomTo","selectable","tableLayout","TableHeader","TableRow","TableBody","NetworkBottomPanelState","NetworkBottomPanel","apInfo","Watershed","Type","SWS_ID","PreFile_ID","SWS_Cnt","Jurished_Cnt","Gage_Cnt","US_Area","US_Length","Perc_Imp","WS_Slope","MapConfig","optionalCallback","networkviewer","alertPropsModel","closeBtn","setTimeOut","timeOutTime","NetworkState","mainViewToShow","sidePlanelView","showBottomPanel","mapDataLoaded","geoJsonDataLoaded","firstDropdownArray","apAttrib","AssessmentPointAttributes","flagAngle","alertIsOpen","alertConfguration","Jurished_ID","PreFiles","Watershed_ID","PrecipNode","AllUS_SWS","AllUS_Pre","Network","getMapLayers","legendOrder","imgSrc","getLegendCollapseFunction","featureInfos","networkClassContext","resData","apId","gageId","populateAPDescription","alertProps","screenPoint","featureInfo","needUpdate","esriMapConfig","map_connection_url","updateAssessmentPoint","updateAssessmentPointData","optimizationsummary","ColorPickerModalState","selColor","ColorPickerModal","startColor","bmpName","colorPicked","hex","colorCancel","onChangeComplete","disableAlpha","presetColors","OptimizationTableState","backupColors","editTitle","tableTitle","editPercent","tablePercent","OptimizationTable","bmpGroups","colors","updateColorFunction","bmPs","find","lbl","getElementById","classList","onTitleUpdate","percent","maxPct","onPercentUpdate","isSample","OptimizationViwer8","Input","defaultValue","updateTitle","onKeyPress","saveTitleChanges","factor","updatePercent","savePercentChanges","cost","createBmpRows","isGeneratingPlan","generatePlan","labelPosition","GeneratePlan","isGeneratingAPData","generateAPData","APData","isGeneratingBatch","generateBatch","LSPC","optimizationimplementationplan","sustainToLSPCbatch","AxisRightMillionFormat","tickFormat","Area","AreasState","Areas","crcData","yScaleLeft","yScaleRight","bmpGroupInfo","allProps","areaProps","groupName","maxY","areas","Circle","radius","cx","cy","defaultcx","defaultcy","LabelRight","Line","defaultx","OptimizationSVGState","mouseXvalue","mouseYvalue","selectedPct","selectedCost","OptimizationSVG","uniqueID","forceResetCircle","componentWillMount","getUniqueId","toLocaleString","setPointOnClick","random","reduction","reductionData","xValue","yValue","prevProps","defaultCirclePct","maxCapacity","maxReduction","circleCoords","lineY","matchingYs","keys","match","axisRightProps","labelRightProps","circleProps","lineProps","AlertComponentState","AlertComponent","closeAlert","startTimeOut","optimizationdeliveryratio","optimizationassessmentpointdata","ScenarioViewerState","scenario","assessmentpoint","factorNumber","scenIndexToLookAt","apIndexToLookAt","facIndexToLookAt","reductionCoordinateData","bmpCoordinateData","currentCRC","tableData","tableBmps","tableFactor","tableMaxPct","tableTitleIsCustom","isUpdating","updateMsg","currentCiclePct","scenOptions","apsOptions","facOptions","toggleFetchData","chartColors","isGeneratingRatio","ScenarioViewer","child","curveGraphWidth","clientWidth","onStateUpdate","onTableTitleUpdate","pct","onTablePercentUpdate","closest","responses","prev","curr","abs","matchingData","handlePctReductionSelection","pctRed","matchingCRCitem","tablePct","updateDropdownScenario","dropdownScenario","generateAPsDropdownOptions","updateDropdownAPs","dropdownAPs","updateDropdownFactor","dropdownFactor","factorNummber","generateSenarioDropdownOptions","scens","scenariodata","scenarios","factorName","mjrEffect","from","Set","APs","sortedAPs","assessmentPoint","matchApId","city","generateFactorDropdownOptions","factors","formattedFactors","fact","findChildElement","elem","childClassName","children","contains","updateColor","currentColors","matchingScenario","factorname","FormData","guid","JSON","stringify","generateDeliveryRatios","generateImplementationPlan","ReactDOM","findDOMNode","svgElem","scrollTo","newCanvas","ctx","getContext","Canvg","outerHTML","ignoreClear","canvg","start","ready","getImageData","compositeOperation","globalCompositeOperation","fillStyle","fillRect","imgData","toDataURL","clearRect","putImageData","stop","error","getBatchData","setBatchData","indexValue","getSustainToLSPCBath","defaultScenario","sortedBmpGroups","reductionValues","defaultCRC","lastCRC","middle","tableBmpGroups","defaultTableData","extendColors","handleReductionLineData","handleCapacityAreasData","errors","defaultcrc","bmpgroups","dynamicColors","c","crc","reverseBmpArray","bmpData","datum","capacity","totalCapacity","bmp","reverse","prevbmp","j","newY","currentCirclePct","textSize","tableprops","generateRatio","mrcAvailable","dropDownOne","Column","stretched","mobile","tablet","computer","largeScreen","widescreen","OptimizationViwer3","OptimizationViwer4","OptimizationViwer5","updateViewer","optimizationupload","ComparisonTable","loadingPlan","loadingBatch","getPlan","getBatch","alert","createHeader","createBody","DownloadLinkState","downloading","DownloadLink","recordId","mimetype","FileDragAndDrop","drop","useRef","drag","useState","setDragging","status","setStatus","useEffect","addEventListener","handleDragOver","handleDrop","handleDragEnter","handleDragLeave","removeEventListener","preventDefault","stopPropagation","files","dataTransfer","count","formats","some","format","toLowerCase","endsWith","showMessage","onUpload","timeout","OptimizationState","scenarioCount","zipfilename","zipfile","isLoadingScenario","compareTableData","isComparing","batchData","planData","Optimization","fileDragDropUpload","addScenarioClick","handleCompareBtnClick","splitId","btnId","updateScenarioStates","currentState","didUpdate","scen","childState","arr","getScenarioJSX","removeScenario","setPlanData","array","slice","addSample","typestr","form","cnt","scrollIntoView","behavior","scenToRemove","compareScens","OptimizationViwer9","htmlFor","Label","basic","accept","handleItemUpdate","animated","hidden","OptimizationViwer1","compareScenarios","OptimizationViwer2","closeCompare","handleClicks","Links","ftable","processviewmodel","FTableUtilState","pageObj","FTableUtil","list","handleErrors","table","fileblob","filetype","queueId","setInterval","getResult","resultId","message","err","msgs","firstChild","smallArr","dv","columns","Message","onDismiss","uploadFile","weather","WeatherUtilState","gagefilename","gagefile","prismfilename","prismfile","nldasfilename","nldasfile","evapfilename","evapfile","email","processStatus","processMessage","WeatherUtil","validateEmail","setStatusMessage","test","placeholder","handleTextUpdate","bmpopportunity","BmpOpportunityUtilState","BmpOpportunityUtil","bmpopp","wramps","WrampsUtilState","wmg","watershedGroups","wsgOptions","WrampsUtil","wrampsutil","watershedGroupName","inclusivebestsolutions","InclusiveBestSolutionsUtilState","wmmsfilename","wmmsfile","InclusiveBestSolutionsUtil","handleReductionUpdate","tier2","Tier2UtilState","scenariofilename","scenariofile","mrcfilename","mrcfile","mjrbmp","Tier2Util","handleToggleUpdate","mjrbmpstring","mjrsolutions","MjrBMPSolutionsState","MjrBMPSolutions","climatechange","ClimateChangeUtilState","filenameXls","fileXls","filenameInp","fileInp","filenameCsv","fileCsv","filenameCConfig","fileCConfig","filenameCcf","fileCcf","basePath","numBatch","ClimateChangeUtil","lblName","stateName","stateObj","UtilityMenu","utils","setTooltipDataLoaded","baseInstance","tooltipDataLoaded","getTooltipJSON","populateTooltipData","About","padded","GridRow","GridColumn","wmmsMap","wmmsCurve","UtilitiesStatePW","UtilitiesPW","Mobile","climateUpload","ClimateSummary","ClimateCsv","MyResponsiveBar","indexBy","myKeys","myColors","groupMode","tickRotation","itemHeight","markerVal","markerTxt","extraNameSpace","setExtraNameSpace","needSpace","animate","motionConfig","valueScale","indexScale","enableLabel","valueFormat","v","labelTextColor","modifiers","axisBottom","renderTick","val","animatedProps","g","x1","x2","y2","dy","fontWeight","textAnchor","CustomBottomTick","axisLeft","dx","dominantBaseline","CustomLeftTick","markers","axis","lineStyle","strokeDasharray","legend","legendOrientation","legendPosition","legends","dataFrom","anchor","direction","justify","translateX","translateY","itemsSpacing","itemWidth","itemDirection","itemOpacity","symbolSize","theme","ButtonGroup","groupOptions","idx","Fragment","addOr","Or","labelText","currentSelect","setSelection","activeColor","pointing","MyResponsiveLine","xAxisName","yAxisName","selScenXVal","lineLegendClick","seriesClick","xAxisUnit","yAxisUnit","stacked","axisTop","axisRight","tickSize","tickPadding","legendOffset","CustomRightTick","pointSize","pointLabelYOffset","useMesh","serieId","symbolShape","symbolBorderColor","effects","itemBackground","MyResponsiveBullet","avgs","markerClick","minValue","maxValue","layout","spacing","titleAlign","titleOffsetY","rangeBorderColor","rangeBorderWidth","measureSize","markerSize","rangeColors","markerColors","measureColors","rangeComponent","borderColor","borderWidth","onMouseEnter","onMouseMove","onMouseLeave","result","in","stdDeviation","in2","mode","rect","rx","ry","to","v0","v1","ev","MouseEvent","clientY","measureComponent","markerComponent","circle","formatNumber","numDecimal","edgleyRound","num","DetailItem","toggleVisible","visibleArray","YAxisSel","hideui","itemIdx","setItemIdx","itemList","fullModelName","model","eventLabel","rcp","PerformanceSummaryItem","basemodelName","modelName","capture","goal","incdec","defexc","PerformanceSummary","barData","performanceItems","setPerformanceItems","historic","newPerformanceItems","newItem","newArray","makeAllVisible","SummaryText","DataTable","columnArr","headerNames","headerBackgroundColor","headerTextColor","sortable","fixed","columnSortType","valuePostpend","numberRoundLength","useReducer","action","column","newData","sortType","Error","sortTable","dispatch","headerArr","setHeaderArr","setDataArr","columnNames","prop","prototype","hasOwnProperty","hdrNames","formatData","dataName","sorted","DivergingBar","legendNames","capturePropName","graphData","setGraphData","ymin","setYMin","ymax","setYMax","maxBottomPad","setMaxBottomPad","setMyColors","setMyKeys","showsDeficit","setShowsDeficit","setMarkers","excess","deficit","newDivergeBarData","newDivKeys","newDivColors","newMarkers","divMin","divMax","diff","Runoff","newDivItem","Capture","textStyle","strokeOpacity","newPad","Watermark","watermark_text","ClimateViewerState","summary","origData","isLoadingData","isGeneratingCsv","barsBy","selScenarioId","selScenarioVal","evalIdx","evalName","evalNames","lineXName","lineXNames","lineXUnit","lineYName","lineYNames","lineYUnit","selGraphNumberSolutions","statsBarOptions","selStatsBarOption","performanceGraphData","filteredGraphs","costGroups","modelGroups","eventGroups","scenarioGroups","scenSelOptions","singleNames","bulletData","bulletMin","bulletMax","bulletAvgs","showDetails","detailItem","divergingData","divergingLegend","divKeys","divKeysMean","divColorsMean","divColors","divYMinMean","divYMaxMean","divYMin","divYMax","ClimateViewer","clearChildrenRecursive","tagName","nodeValue","track","is","any","dataPrep","dataCopy","subsetNum","Number","parseInt","newScenariosIds","scenarioId","selScenarioIds","shift","pop","selectedScenarioId","itemsNeededRemain","averageNum","numAgg","newCosts","newEvents","newScenarios","newModels","newEvalNames","newScenOpt","scenCap","scenarioCapacity","scenarioFootprint","scenId","dataUpdate","initEval","postDev","percentReduction","tier2Reduction","modelDescription","newFullModelNames","yName","selScenVal","selitm","lineItem","modelItems","newBoxData","boxMin","boxMax","newAvgs","newSingleNames","newPerformanceBarData","scenarioItems","p","pct10","historicalLines","eventName","getItmName","buildBoxSingle","buildPerformanceBar","buildBoxStats","measures","weight","ranges","itm","findItmByNumber","searchResult","findItmByFullModelName","fullName","runoff","remainingFlow","itemValsRunoffSort","itemValsCaptureSort","itemValsRemainFlowSort","quantile","modelStartDate","buildBoxTitle","itemValsSort","sum","filterArr","startsWith","unfilteredId","substr","bulletMarkerClick","parentElement","innerHTML","handleIdxChange","newName","newIdx","handleSolNumberChange","newNumber","handleAllAlertClick","handleStatsBarChange","handleLineXIdxChange","newUnitName","handleLineYIdxChange","handleScenChange","handleBarsButtonClick","sel","generateCsv","navigation","toggleDetails","toggleUI","inline","HistoricalForecasted","YAxis","CurrentBmp","minHeight","Transition","animation","duration","Container","MitigationCharts","minWidth","Lines","Bars","App","activeItem","isMobile","tooltipLoaded","dataLoaded","handleComponentChange","routeUrl","checkScreen","parentRoute","getActiveComponent","getMenu","TooltipFactory","Sticky","Menu","stackable","exact","Boolean","hostname","serviceWorker","registration","unregister"],"mappings":"2GACA,kCAAO,IAAIA,EAAS,CAChB,mBAAsB,4FAStB,aAAgB,yDAChB,gBAAmB,SACnB,OAAU,4CACV,SAAY,UAUDA,O,woECVTC,a,0RACFC,IAAW,QAGFC,QAAb,sTAyBI,iBAAYC,OAAQ,IAAD,4JACf,uBAAMA,OADS,MAvBnBC,YAAqB,GAuBF,MArBnBC,OAAc,KAqBK,MApBnBC,KAAY,KAoBO,MAnBnBC,uBAmBmB,QAhBnBC,YAAwB,GAgBL,MAZnBC,SAAgB,KAYG,MAXnBC,aAAoB,KAWD,MAVnBC,cAAqB,KAUF,MATnBC,WAAkB,KASC,MANnBC,aAAoB,KAMD,MAJnBC,MAAQ,IAAId,aAIO,MAFnBe,WAAa,EAEM,MAqInBC,UAAY,WACR,IAAIC,EAAaC,KACjBC,YAAW,WACP,IAAIC,EAAYH,EAAWX,KAAKe,OACd,OAAdD,GACAA,EAAUE,MAAQ,KAClBL,EAAWX,KAAKe,OAASD,GAEzBH,EAAWD,cAEhB,MA/IY,MAoJnBO,qBAAuB,SAACT,GAEpB,IAAIU,EAAmB,GACvB,IAAK,IAAIC,KAAOX,EACZU,EAAiBE,KAAK,CAClBD,IAAKA,EACLE,MAAOb,EAAMW,KAIrB,MAAKrB,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S7vB,MACvB,2D,qBCVN6F,IAAS1hB,OAAO,cAAC,KAAD,UAAe,cAAC,IAAD,CAAOC,UAAWwqC,GAAK3qC,KAAK,QAAuBnE,SAASob,eAAe,SDiIpG,kBAAmBvb,WACrBA,UAAUmwC,cAAcrpB,MAAM/1B,MAAK,SAAAq/C,GACjCA,EAAaC,kB","file":"static/js/main.4119628c.chunk.js","sourcesContent":["\r\nexport let Config = {\r\n \"map_connection_url\": \"http://gis.wramps.org/cgi-bin/qgis_mapserv.fcgi?MAP=/home/ubuntu/wmms/dev1.2/wmms_1_9.qgs\",\r\n\r\n // For localhost\r\n // \"api_endpoint\": \"https://localhost:44381/api/\",\r\n // \"client_endpoint\": \"http://localhost:3000/\",\r\n // \"appUrl\": 'http://localhost:3000/',\r\n // \"routeUrl\": '/'\r\n\r\n //For Production \r\n \"api_endpoint\": \"https://portal.safecleanwaterla.org/wmms-util-API/api/\",\r\n \"client_endpoint\": \"/wmms/\",\r\n \"appUrl\": 'https://portal.safecleanwaterla.org/wmms/',\r\n \"routeUrl\": '/wmms/'\r\n\r\n\r\n // For Deployed QA version\r\n //\"api_endpoint\": \"https://portal.safecleanwaterla.org/wmms-util-API_QA/api/\",\r\n //\"client_endpoint\": \"/wmms-qa/\",\r\n //\"appUrl\": 'https://portal.safecleanwaterla.org/wmms-qa/',\r\n //\"routeUrl\": '/wmms-qa/'\r\n}\r\n\r\nexport default Config;","import React, { Component } from 'react';\r\nimport { loadModules, setDefaultOptions } from 'esri-loader';\r\nimport './EsriMap.css';\r\nimport { IMapProps } from './mapTypes/IMapProps';\r\nimport { LayerInfo, LayerType } from './mapTypes/LayerInfo';\r\nimport { EsriMapLegend } from './EsriMapLegend';\r\nimport { FeatureInfoFinder } from './helpers/FeatureInfoFinder';\r\nimport { GetFeatureInfo } from './helpers/GetFeatureInfo';\r\nimport Axios, { AxiosResponse } from 'axios';\r\nimport Config from '../../config/Config';\r\nimport { FeatureInfoResult } from './helpers/FeatureInfoResult';\r\nimport { MapLegendElementTemplate } from './mapTypes/MapLegendElementTemplate';\r\n\r\n\r\nclass EsriMapState {\r\n map: any = null;\r\n}\r\n\r\nexport class EsriMap extends Component {\r\n \r\n legendState: any[] = [];\r\n\r\n mapRef: any = null;\r\n view: any = null;\r\n featureInfoFinder: FeatureInfoFinder;\r\n\r\n // used to hold dynamically selected layers for hover interaction\r\n hoverLayers: string[] = [];\r\n\r\n\r\n // classes needed in memory\r\n wmsClass: any = null;\r\n geoJSONClass: any = null;\r\n mercatorUtils: any = null;\r\n spatialRef: any = null;\r\n\r\n // holds obj ID of popup feature\r\n popupFeature: any = null;\r\n\r\n state = new EsriMapState();\r\n\r\n layerCount = 0;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.mapRef = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n setDefaultOptions({ version: '4.13' }); // starting 4.14 the geojson click event fails - the attributes only include objectId, not sure why or how to resolve rb 1-12-22\r\n // lazy load the required ArcGIS API for JavaScript modules and CSS\r\n loadModules(['esri/Map', 'esri/views/MapView', 'esri/layers/WMSLayer', 'esri/geometry/support/webMercatorUtils', 'esri/geometry/Point', 'esri/geometry/SpatialReference', 'esri/layers/GeoJSONLayer', 'esri/core/watchUtils'], { css: true })\r\n .then(([ArcGISMap, MapView, WMSLayer, webMercatorUtils, Point, SpatialReference, geoJSONLayer, watchUtils]) => {\r\n\r\n this.wmsClass = WMSLayer;\r\n this.geoJSONClass = geoJSONLayer;\r\n this.mercatorUtils = webMercatorUtils;\r\n this.spatialRef = SpatialReference;\r\n\r\n \r\n\r\n let map = new ArcGISMap({\r\n basemap: this.props.basemapType\r\n });\r\n\r\n let statecopy = Object.assign({}, this.state);\r\n statecopy[\"map\"] = map;\r\n\r\n this.getHoverLayers(this.props.layerInfos);\r\n\r\n this.setState(statecopy, () => {\r\n\r\n this.view = new MapView({\r\n container: this.mapRef.current,\r\n map: this.state.map,\r\n center: this.props.startingCoords,\r\n zoom: this.props.startingZoom,\r\n spatialReference: new SpatialReference({\"wkid\": 3857})\r\n });\r\n\r\n\r\n this.createMapLayers(this.props.layerInfos); \r\n this.featureInfoFinder = new FeatureInfoFinder(this.props.mapServiceURL, webMercatorUtils, Point, this.view);\r\n\r\n // this handles over events\r\n this.view.on(\"pointer-move\", (event) => {\r\n let sp = {\r\n x: event.x,\r\n y: event.y\r\n };\r\n\r\n this.view.hitTest(sp).then((r) => {\r\n let apWasFound = false;\r\n r.results.forEach(rr => {\r\n this.hoverLayers.forEach(h => {\r\n if (rr.graphic.layer.id == h) {\r\n //console.log(this.legendState);\r\n this.legendState.forEach((l) => {\r\n //console.log(\"l\", l.key)\r\n //console.log(\"h\", h)\r\n if (l.key == h) {\r\n if (l.value) {\r\n this.handleHoverHit(rr);\r\n apWasFound = true;\r\n };\r\n };\r\n });\r\n };\r\n });\r\n }); \r\n // if (apWasFound == false) {\r\n // // console.log('things');\r\n // this.popupFeature = \"\";\r\n // this.view.popup.close();\r\n // } \r\n });\r\n });\r\n \r\n\r\n // this handles click events.\r\n this.view.on(\"click\",(event) => {\r\n this.view.hitTest(event).then((r) => {\r\n r.results.forEach((rr) => {\r\n this.hoverLayers.forEach((h) => {\r\n if (h == rr.graphic.layer.id) {\r\n this.legendState.forEach((l) => {\r\n if (l.key == h) {\r\n if (l.value) {\r\n this.props.classContext.eventListenerFunction(event, r, this.props.classContext);\r\n };\r\n };\r\n });\r\n };\r\n });\r\n });\r\n });\r\n\r\n // TODO: build axios request to hit GIS server into featureInfoFinderClass.\r\n let url: string = this.featureInfoFinder.buildQueryString(this.props.layerInfos, event.mapPoint.latitude, event.mapPoint.longitude);\r\n \r\n // url is returned null if no WMS layers are queryable. \r\n if (url) {\r\n GetFeatureInfo.axiosGet({url: url})\r\n .then((r: AxiosResponse) => {\r\n if (r.data != null) {\r\n //console.log(\"results\", r.data);\r\n this.props.classContext.eventListenerFunction(event, r.data, this.props.classContext);\r\n };\r\n\r\n }).catch((r: AxiosResponse) => {\r\n console.log(\"error retreiving feature info\");\r\n });\r\n };\r\n\r\n // need to check geojson layers for click popups.\r\n\r\n });\r\n\r\n this.view.popup = {\r\n dockEnabled: false, dockOptions: {buttonEnabled: false} };\r\n \r\n // TODO: find better solution that uses esri watch functions\r\n this.updateMap();\r\n });\r\n });\r\n\r\n\r\n }\r\n\r\n componentWillUnmount() {\r\n if (this.view) {\r\n // destroy the map view\r\n this.view.container = null;\r\n }\r\n }\r\n\r\n updateMap = function () {\r\n let mapContext = this;\r\n setTimeout(function() {\r\n let newExtent = mapContext.view.extent;\r\n if (newExtent !== null) {\r\n newExtent.xmin -= .0001;\r\n mapContext.view.extent = newExtent;\r\n } else {\r\n mapContext.updateMap();\r\n }\r\n }, 2000)\r\n };\r\n\r\n\r\n // get legend state so we can sync hover and click event with it\r\n getLegendLayersState = (state) => {\r\n\r\n let legendStateArray = [];\r\n for (let key in state) {\r\n legendStateArray.push({\r\n key: key,\r\n value: state[key]\r\n });\r\n };\r\n\r\n this.legendState = legendStateArray;\r\n\r\n if (this.view) {\r\n this.view.popup.close();\r\n };\r\n\r\n if (this.state.map) {\r\n this.state.map.layers.items.forEach((layer) => {\r\n this.legendState.forEach((ls) => {\r\n if (ls.key == layer.id) {\r\n if (ls.value == true) {\r\n layer.popupEnabled = true;\r\n } else {\r\n layer.popupEnabled = false;\r\n\r\n }\r\n };\r\n });\r\n });\r\n };\r\n };\r\n\r\n\r\n ZoomTo(evt?: any) {\r\n \r\n if (evt) {\r\n var geo = this.view.center;\r\n geo.x = evt.mapPoint.x;\r\n geo.y = evt.mapPoint.y;\r\n let zm = this.view.zoom;\r\n this.view.goTo({\r\n target: geo,\r\n zoom: zm\r\n });\r\n } else {\r\n var geo = this.view.center;\r\n geo.x = -13157963.81;\r\n geo.y = 4055688.86;\r\n let zm = 10;\r\n this.view.goTo({\r\n target: geo,\r\n zoom: zm\r\n });\r\n };\r\n\r\n }\r\n\r\n\r\n // pushes the name property of the LayerInfo into an array if it is geojson and queryable.\r\n getHoverLayers = (layerInfos: LayerInfo[]) => {\r\n layerInfos.forEach(i => {\r\n if (i.layerType == 'geojson' && i.queryFeatures) {\r\n this.hoverLayers.push(i.shortName);\r\n }\r\n });\r\n };\r\n\r\n // this takes the result object from the view.hitTest function\r\n handleHoverHit = (hitResult: any) => {\r\n\r\n\r\n if (this.popupFeature !== hitResult.graphic.attributes.OBJECTID) {\r\n \r\n this.view.popup.close();\r\n this.popupFeature = hitResult.graphic.attributes.OBJECTID;\r\n this.view.popup.open({\r\n location: hitResult.graphic.geomtry,\r\n features: [hitResult.graphic]\r\n });\r\n } \r\n\r\n }\r\n\r\n // add more layer types to the beggining array as needed.\r\n // function name must match pattern of existing function names\r\n // add + layer type in all caps ex: WMS + Layers\r\n\r\n createMapLayers = (layerInfos: LayerInfo[]) => {\r\n let context: EsriMap = this;\r\n ['wms', 'geojson'].map((t: LayerType) => { return { type: t, layers: [] } }).map((t) => {\r\n layerInfos.forEach((l: LayerInfo) => {\r\n if (l.layerType == t.type) {\r\n t.layers.push(l);\r\n };\r\n });\r\n return t;\r\n }).forEach((t) => {\r\n let functionName = \"context.add\" + t.type.toUpperCase() + \"Layers(t.layers)\";\r\n eval(functionName);\r\n });\r\n\r\n };\r\n\r\n // order of arguements matter dynamically buidling new layer options\r\n addWMSLayers = (layerInfos: LayerInfo[]) => {\r\n layerInfos.forEach((info: LayerInfo) => {\r\n let wmsLayer = new this.wmsClass({\r\n url: this.props.mapServiceURL,\r\n title: info.shortName,\r\n id: info.shortName,\r\n name: info.shortName,\r\n sublayers:[{name: info.name}],\r\n imageFormat: \"PNG\",\r\n version: \"1.3.0\",\r\n opacity: info.visible ? 1 : 0,\r\n spatialReferences: [3857, 4326]\r\n })\r\n this.state.map.add(wmsLayer);\r\n });\r\n };\r\n\r\n addGEOJSONLayers = (layerInfos: LayerInfo[]) => {\r\n console.log('add geojson');\r\n const template = {\r\n title: \"

{Name}

\",\r\n //content: \"{Name} Assessment Point\",\r\n //dockOptions: {buttonEnabled: false},\r\n overwriteActions: true\r\n };\r\n\r\n const renderer = {\r\n type: \"simple\",\r\n //symbol: {\r\n // type: \"simple-marker\",\r\n // color: \"rgb(227, 49, 81)\",\r\n // size: \"12px\",\r\n // outline: {\r\n // color: \"white\"\r\n // }\r\n //}\r\n symbol: {\r\n type: \"picture-marker\", // autocasts as new PictureMarkerSymbol()\r\n url: Config.appUrl + \"apSymbol_red.png\",\r\n width: \"24px\",\r\n height: \"24px\",\r\n angle: this.props.angle\r\n }\r\n };\r\n\r\n layerInfos.forEach((info: LayerInfo) => {\r\n\r\n let geoLayer = new this.geoJSONClass({\r\n url: Config.appUrl + 'geojson/' + info.name + \".json\",\r\n popupTemplate: template,\r\n renderer: renderer,\r\n id: info.shortName,\r\n title: info.shortName,\r\n name: info.shortName,\r\n opacity: info.visible ? 1 : 0,\r\n });\r\n\r\n //for (var i = 0; i < this.state.map)\r\n console.log('map',this.state.map);\r\n\r\n this.state.map.add(geoLayer);\r\n\r\n });\r\n\r\n }\r\n\r\n\r\n render() {\r\n\r\n const mapLegendProps = {\r\n baseMap: this.state.map,\r\n baseMapType: this.props.basemapType,\r\n mapLayers: this.props.layerInfos,\r\n getState: this.getLegendLayersState,\r\n legendOpenByDefault: this.props.legendOpenByDefault,\r\n optionalLegendCallBack: this.props.optionalLegendCallBack\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import { LayerInfo } from '../mapTypes/LayerInfo';\r\nimport { TileWMS } from 'ol/source';\r\n\r\n// --- qgis server queries helper class ----\r\n// QGIS server docs on formatting requirements below:\r\n// https://docs.qgis.org/testing/en/docs/user_manual/working_with_ogc/server/services.html#getfeatureinfo\r\n\r\nexport class FeatureInfoFinder {\r\n\r\n // baseURL is the url that comes from the featureInfoUrl property of an ESRI WMS layer. \r\n constructor(baseURL: string, webMercatorUtils: any, Point: any, mapView: any) {\r\n this.baseURL = baseURL;\r\n this.webMercatorUtils = webMercatorUtils;\r\n this.Point = Point;\r\n this.mapView = mapView\r\n };\r\n\r\n mapView: any;\r\n baseURL: string;\r\n webMercatorUtils: any;\r\n Point: any;\r\n olTileSource: any = null;\r\n\r\n buildQueryString = (layerInfos: LayerInfo[], latitude: number, longitude: number): string => {\r\n\r\n let layerString = \"\";\r\n\r\n layerInfos.forEach((l: LayerInfo, index: number) => {\r\n if (l.queryFeatures && l.layerType == 'wms') {\r\n layerString += l.name;\r\n if (index !== (layerInfos.length - 1)) {\r\n layerString += \",\";\r\n };\r\n };\r\n });\r\n\r\n if (layerString == \"\") {\r\n return null;\r\n }\r\n\r\n let service = \"SERVICE=WMS\";\r\n let version = \"VERSION=1.1.0\";\r\n let request = \"REQUEST=GetFeatureInfo\";\r\n let format = \"FORMAT=image.png\";\r\n let transparent = \"TRANSPARENT=true\";\r\n let queryLayers = \"QUERY_LAYERS=\" + layerString;\r\n let layers = \"LAYERS=\" + layerString;\r\n let height = \"HEIGHT=256\";\r\n let width = \"WIDTH=256\";\r\n let crs = \"CRS=EPSG:3857\";\r\n let infoFormat = \"INFO_FORMAT=text/xml\";\r\n \r\n let iParam = \"I=256\";\r\n let jParam = \"J=256\";\r\n \r\n \r\n // let topPoint = new this.Point({\r\n // latitude: ( latitude + .5 ),\r\n // longitude: ( longitude - .5 )\r\n // });\r\n \r\n // let bottomPoint = new this.Point({\r\n // latitude: ( latitude - .5 ),\r\n // longitude: ( longitude + .5 )\r\n // });\r\n \r\n // let webTop = this.webMercatorUtils.geographicToWebMercator(topPoint);\r\n // let webBottom = this.webMercatorUtils.geographicToWebMercator(bottomPoint);\r\n\r\n \r\n // ------------------- alternative using open layers ot generate info URL --------------------------\r\n let singlePoint = new this.Point({\r\n latitude: ( latitude ),\r\n longitude: ( longitude )\r\n });\r\n let clickCenter = this.webMercatorUtils.geographicToWebMercator(singlePoint);\r\n\r\n if (this.olTileSource == null) {\r\n this.olTileSource = new TileWMS(({\r\n url: this.baseURL,\r\n params: {\r\n 'LAYERS': layerString, 'TILED': true, 'VERSION': '1.3.0',\r\n 'FORMAT': 'image/png', 'WIDTH': 256, 'HEIGHT': 256, 'CRS': 'EPSG:3857'\r\n },\r\n serverType: 'geoserver'\r\n }));\r\n }\r\n \r\n \r\n let viewResolution = this.mapView.resolution; //this.map.getView().getResolution();\r\n let url = this.olTileSource.getFeatureInfoUrl(\r\n [clickCenter.x, clickCenter.y], viewResolution, 'EPSG:3857',\r\n { 'INFO_FORMAT': 'text/xml' });\r\n \r\n \r\n // -------------------------------------------------------------------------- \r\n\r\n\r\n // let bottomPoint = new this.Point({\r\n // latitude: ( latitude ),\r\n // longitude: ( longitude )\r\n // });\r\n \r\n \r\n\r\n // // -13209541.4801,3960355.3095,-13079598.5320,4066144.1567\r\n \r\n // let x1 = -13209541.4801;\r\n // let y1 = 3960355.3095;\r\n // let x2 = -13079598.5320;\r\n // let y2 = 4066144.1567;\r\n\r\n \r\n // let bbox = \"BBOX=\" + String(webBottom.y) + \",\" + String(webBottom.x) + \",\" + String(webTop.y) + \",\" + String(webTop.x);\r\n // let bbox = \"BBOX=\" + String(webBottom.x) + \",\" + String(webTop.x);\r\n // let bbox = \"BBOX=\" + String(webBottom.x) + \",\" + String(webBottom.y) + \",\" + String(webTop.x) + \",\" + String(webTop.y);\r\n\r\n // let fullQuery = this.baseURL + \"&\" + service + \"&\" + version + \"&\" + request + \"&\" + format + \"&\"+ transparent + \"&\" + queryLayers + \"&\" + layers + \"&\" + height + \"&\" + width + \"&\" + crs + \"&\" + infoFormat + \"&\" + \"TILED=true\" + \"&\" + bbox + \"&\" + iParam + \"&\" + jParam\r\n\r\n // let encodedURI = encodeURI(fullQuery);\r\n\r\n //console.log(encodedURI, \"query URI\");\r\n\r\n\r\n return url;\r\n };\r\n\r\n\r\n};","import axios, { AxiosResponse, AxiosPromise, AxiosRequestConfig, AxiosInstance } from 'axios';\r\nimport Config from '../../../config/Config'; //'../config/Config';\r\n\r\nexport class GetBaseModel {\r\n\r\n // thisType: new () => any; //this is populated by the constructor and is the constructor of the child class. This is used to create new instances from the base\r\n\r\n /**\r\n * This\r\n * @param strEndPoint\r\n * @param type - just pass the actual class in, more example if the endpoint is BMPType and the model is BMPType, \r\n * pass in BMPType as in the class, not in a string. This is used to create new instances of the object\r\n */\r\n endpoint: string;\r\n\r\n constructor(strEndPoint: string) {//, type: new () => any ) {\r\n this.endpoint = strEndPoint;\r\n // this.thisType = type;\r\n this.axiosBaseInstance = this.makeBaseAxiosInstance();\r\n }\r\n\r\n axiosBaseInstance: AxiosInstance;\r\n\r\n // ----- Axios config Functions ----- //\r\n\r\n private makeBaseAxiosInstance = function (): AxiosInstance {\r\n let context: GetBaseModel = this;\r\n let token: string = '';\r\n\r\n\r\n return axios.create({\r\n baseURL: Config.api_endpoint,\r\n headers: {\r\n \"Access-Control-Allow-Origin\": '*',\r\n \"Content-Type\": 'application/json;charset=UTF-8'\r\n }\r\n });\r\n\r\n };\r\n\r\n private makeBaseAxiosFileInstance = function (): AxiosInstance {\r\n let context: GetBaseModel = this;\r\n let token: string = '';\r\n\r\n return axios.create({\r\n baseURL: Config.api_endpoint,\r\n headers: {\r\n \"Access-Control-Allow-Origin\": '*',\r\n \"Content-Type\": 'multipart/form-data'\r\n }\r\n });\r\n\r\n };\r\n\r\n static axiosGet = function (data?): AxiosPromise {\r\n //console.log(\"axios data: \" + data)\r\n let t: GetBaseModel = new this();\r\n return t.axiosBaseInstance({\r\n method: \"GET\",\r\n url: t.endpoint,\r\n params: data\r\n })\r\n };\r\n\r\n}\r\n\r\nexport class GetFeatureInfo extends GetBaseModel {\r\n\r\n \"data\": string;\r\n constructor() {\r\n super('getfeatureinfo');\r\n }\r\n} \r\n\r\n","// {\r\n// layer: \"projects\",\r\n// displayName: \"GI Projects\",\r\n// color: \"rgba(66, 134, 244, .9)\",\r\n// },\r\n// {\r\n// layer: \"basemapswap\",\r\n// displayName: \"Streets / Satellite\",\r\n// color: \"rgb(43, 107, 54, .9)\" \r\n// }\r\nexport class MapLegendElementTemplate {\r\n layer: string;\r\n displayName: string;\r\n color: string;\r\n}","import React, { Component } from 'react';\r\nimport './EsriMap.css';\r\nimport { MapLegendElementTemplate } from './mapTypes/MapLegendElementTemplate';\r\nimport { IMapLegendProps } from './mapTypes/IMapLegendProps';\r\nimport { List, Checkbox, Grid, Icon, Header, Divider } from 'semantic-ui-react';\r\nimport { LayerInfo } from './mapTypes/LayerInfo';\r\n\r\nexport class EsriMapLegendState {\r\n basemapswap: boolean = true;\r\n legendExpanded: boolean = false;\r\n mapLayers: MapLegendElementTemplate [] = [];\r\n // legendHeight: string;\r\n\r\n};\r\n\r\nexport class EsriMapLegend extends Component {\r\n\r\n state = new EsriMapLegendState();\r\n \r\n componentDidMount() {\r\n this.setLegendState(this.initializeMapLegend);\r\n if (this.props.optionalLegendCallBack) {\r\n this.props.optionalLegendCallBack(this);\r\n };\r\n\r\n // let legendHeight: any = window.innerHeight - 100;\r\n // this.setState({ legendHeight: legendHeight});\r\n\r\n // console.log(legendHeight, 'legendHeight');\r\n }\r\n\r\n componentDidUpdate() {\r\n this.props.getState(this.state);\r\n }\r\n\r\n // used as call back to create legend elements after setting legend state\r\n initializeMapLegend = () => {\r\n this.state.mapLayers = this.createElementTemplateArray();\r\n this.updateLayerVisibility();\r\n }\r\n\r\n // create an array of lightweight types to build legend from. \r\n createElementTemplateArray = (): MapLegendElementTemplate[] => {\r\n\r\n let templateArray = this.props.mapLayers.map((l: LayerInfo) => {\r\n let newTemplate = new MapLegendElementTemplate();\r\n\r\n newTemplate.displayName = l.legendDisplayName;\r\n newTemplate.layer = l.shortName;\r\n\r\n // tie this in later by adding color as a property to LayerInfos and requiring a color argument per layer when creating map.\r\n // write code to dyanmically create color rule for toggle based of this color. could be done inside get legend items function.\r\n newTemplate.color = \"\";\r\n\r\n return newTemplate;\r\n });\r\n\r\n templateArray.push({layer: \"basemapswap\", displayName: \"Streets / Satellite\", color: \"\"});\r\n\r\n return templateArray;\r\n }\r\n\r\n // loops over map layers to set legend layers and their starting visibility to state\r\n setLegendState = (callback: () => void) => {\r\n\r\n let stateCopy = Object.assign({}, this.state);\r\n\r\n this.props.mapLayers.forEach((l: LayerInfo) => {\r\n stateCopy[l.shortName] = l.visible;\r\n });\r\n\r\n stateCopy[\"basemapswap\"] = false;\r\n stateCopy[\"legendExpanded\"] = this.props.legendOpenByDefault;\r\n\r\n this.setState(stateCopy, () => {\r\n callback();\r\n });\r\n\r\n }\r\n\r\n handleLayerToggle = (evt, data) => {\r\n\r\n let newState: EsriMapLegendState = Object.assign({}, this.state);\r\n\r\n if (this.state[data.id] == true) {\r\n newState[data.id] = false;\r\n } else if (this.state[data.id] == false) {\r\n newState[data.id] = true;\r\n };\r\n\r\n this.setState(newState, () => {\r\n this.updateLayerVisibility();\r\n });\r\n };\r\n\r\n handleLegendSizeToggle = () => {\r\n if (this.state.legendExpanded) {\r\n this.setState({legendExpanded: false});\r\n } else if (!this.state.legendExpanded) {\r\n this.setState({legendExpanded: true});\r\n };\r\n };\r\n\r\n collapseLegend = () => {\r\n if (this.state.legendExpanded) {\r\n this.setState({legendExpanded: false});\r\n };\r\n };\r\n\r\n updateLayerVisibility = () => {\r\n if (this.props.baseMap !== undefined && this.props.baseMap !== null) {\r\n this.state.mapLayers.forEach((l: MapLegendElementTemplate) => {\r\n let layer = this.props.baseMap.findLayerById(l.layer);\r\n if (layer !== null && layer !== undefined) {\r\n if (this.state[l.layer] == true) {\r\n this.fadeLayerIn(layer);\r\n } else if (this.state[l.layer] == false) {\r\n this.fadeLayerOut(layer)\r\n };\r\n } else {\r\n if (this.state[l.layer] == true) {\r\n if (l.layer == 'basemapswap') {\r\n this.toggleBasemapType(true);\r\n };\r\n } else if (this.state[l.layer] == false) {\r\n if (l.layer == 'basemapswap') {\r\n this.toggleBasemapType(false);\r\n };\r\n };\r\n };\r\n });\r\n }\r\n };\r\n\r\n fadeLayerIn = (layer) => {\r\n let legendContext = this;\r\n setTimeout(function() {\r\n if (layer.opacity < 1) {\r\n layer.opacity = layer.opacity + .081;\r\n legendContext.fadeLayerIn(layer)\r\n };\r\n }, 10);\r\n \r\n }\r\n\r\n fadeLayerOut = (layer) => {\r\n let legendContext = this;\r\n setTimeout(function() {\r\n if (layer.opacity > 0) {\r\n layer.opacity = layer.opacity - .081;\r\n legendContext.fadeLayerOut(layer)\r\n };\r\n }, 10);\r\n }\r\n\r\n toggleBasemapType = (satellite: boolean) => {\r\n\r\n if (satellite) {\r\n this.props.baseMap.basemap = \"satellite\";\r\n } else if (!satellite) {\r\n this.props.baseMap.basemap = this.props.baseMapType;\r\n }\r\n\r\n };\r\n\r\n getMapLegendItems = (): JSX.Element[] => {\r\n return this.state.mapLayers.map((layer: MapLegendElementTemplate, index: number) => {\r\n //console.log(layer.layer);\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n {`${layer.displayName}`}\r\n
\r\n
\r\n
\r\n
)\r\n });\r\n };\r\n\r\n render() {\r\n let height = 320;\r\n let width = 200;\r\n\r\n if (!this.state.legendExpanded) {\r\n height = 47;\r\n width = 47;\r\n }\r\n\r\n let overFlow: any = this.state.legendExpanded ? 'auto' : 'hidden';\r\n let legendHeight: any = window.innerHeight - 100;\r\n return(\r\n \r\n\r\n {\r\n !this.state.legendExpanded &&\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n // \r\n // \r\n }\r\n {\r\n this.state.legendExpanded &&\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n Map Legend\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n {\r\n this.getMapLegendItems()\r\n }\r\n \r\n
\r\n
\r\n
\r\n }\r\n\r\n
);\r\n }\r\n \r\n};","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA3wAAADfCAYAAACtdNH/AAAACXBIWXMAAC4jAAAuIwF4pT92AAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUc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AAABB8AAACCDwAAAMEHAACA4AMAAGADVc45mwEAYrm4vApxHSfHh24mwDPcAwAA//8DACBmBEg379gmAAAAAElFTkSuQmCC\"","import axios, { AxiosResponse, AxiosPromise, AxiosRequestConfig, AxiosInstance } from 'axios';\r\nimport Config from '../config/Config';\r\n\r\nexport class BaseModel {\r\n\r\n // thisType: new () => any; //this is populated by the constructor and is the constructor of the child class. This is used to create new instances from the base\r\n\r\n /**\r\n * This\r\n * @param strEndPoint\r\n * @param type - just pass the actual class in, more example if the endpoint is BMPType and the model is BMPType, \r\n * pass in BMPType as in the class, not in a string. This is used to create new instances of the object\r\n */\r\n endpoint: string;\r\n\r\n constructor(strEndPoint: string) {//, type: new () => any ) {\r\n this.endpoint = strEndPoint;\r\n // this.thisType = type;\r\n this.axiosBaseInstance = this.makeBaseAxiosInstance();\r\n this.axiosBaseFileInstance = this.makeBaseAxiosFileInstance();\r\n }\r\n\r\n axiosBaseInstance: AxiosInstance;\r\n axiosBaseFileInstance: AxiosInstance;\r\n axiosBaseZipInstance: AxiosInstance;\r\n\r\n // ----- Axios config Functions ----- //\r\n\r\n private makeBaseAxiosInstance = function (): AxiosInstance {\r\n let context: BaseModel = this;\r\n let token: string = '';\r\n\r\n\r\n return axios.create({\r\n baseURL: Config.api_endpoint,\r\n headers: {\r\n \"Access-Control-Allow-Origin\": '*',\r\n \"Content-Type\": 'application/json;charset=UTF-8'\r\n }\r\n });\r\n\r\n };\r\n\r\n private makeBaseAxiosFileInstance = function (): AxiosInstance {\r\n let context: BaseModel = this;\r\n let token: string = '';\r\n\r\n return axios.create({\r\n baseURL: Config.api_endpoint,\r\n headers: {\r\n \"Access-Control-Allow-Origin\": '*',\r\n \"Content-Type\": 'multipart/form-data'\r\n }\r\n });\r\n\r\n };\r\n\r\n static axiosGet = function (id: number): AxiosPromise {\r\n let t: BaseModel = new this(); //new (this)();\r\n let d = new Date();\r\n let queryString = d.valueOf().toString();\r\n let endpoint = String(t.endpoint + \"/\" + id + \"?\" + queryString);\r\n\r\n return t.axiosBaseFileInstance({\r\n method: 'GET',\r\n url: endpoint\r\n });\r\n };\r\n\r\n static axiosPostUpload = function (formData: FormData): AxiosPromise {\r\n let t: BaseModel = new this(); //new (this)();\r\n let endpoint = String(t.endpoint + \"/upload\");\r\n\r\n return t.axiosBaseFileInstance({\r\n method: 'POST',\r\n url: endpoint,\r\n data: formData\r\n });\r\n };\r\n\r\n static axiosGetAll = function (data?): AxiosPromise {\r\n //console.log(\"axios data: \" + data)\r\n let t: BaseModel = new this();\r\n return t.axiosBaseInstance({\r\n method: \"GET\",\r\n url: t.endpoint,\r\n params: data\r\n })\r\n };\r\n\r\n static axiosGetBlob = function (data?) {\r\n //let t: BaseModel = new (this)();\r\n let t: BaseModel = new this();\r\n let endpoint = String(t.endpoint);\r\n\r\n return t.axiosBaseFileInstance({\r\n method: 'GET',\r\n url: endpoint,\r\n params: data,\r\n responseType: 'blob'\r\n });\r\n };\r\n\r\n static axiosGetBlobById = function (id: number) {\r\n //let t: BaseModel = new (this)();\r\n let t: BaseModel = new this();\r\n let endpoint = String(t.endpoint + \"/download/\" + String(id));\r\n\r\n return t.axiosBaseFileInstance({\r\n method: 'GET',\r\n url: endpoint,\r\n responseType: 'blob'\r\n });\r\n };\r\n\r\n static axiosPostImage = function (data?) {\r\n //let t: BaseModel = new (this)();\r\n let t: BaseModel = new this();\r\n let endpoint = String(t.endpoint);\r\n\r\n return t.axiosBaseFileInstance({\r\n method: 'POST',\r\n url: endpoint,\r\n data: data,\r\n responseType: 'blob'\r\n });\r\n };\r\n\r\n static MultiRequest = function (requests: AxiosPromise[]) {\r\n return axios.all(requests);\r\n }; \r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport default class ModelDownloads extends BaseModel {\r\n\r\n id: number;\r\n filePath: string;\r\n fileName: string;\r\n displayName?: string;\r\n description?: string;\r\n downloadType: string;\r\n mimeType: string;\r\n archived: boolean;\r\n tooltipName?: string;\r\n displayWeight: number;\r\n\r\n\r\n constructor () {\r\n super(\"ModelDownloads\")\r\n }\r\n \r\n}","import React, { Component } from \"react\";\r\nimport './toolTipModal.css';\r\nimport Config from '../../config/Config';\r\nimport { Icon, Modal, Button } from 'semantic-ui-react';\r\n// import { Dropdown, Button, FormGroup, Label, Input, Grid, Table, Icon } from \"semantic-ui-react\";\r\n\r\nexport class TooltipModal extends React.Component<{ icon: any, iconClassName: any, className: string, modalSize: any, header: any, bodyText: any, alertColors?: any, isOpen?: boolean, textInstead?: string}> {\r\n constructor(props) {\r\n super(props);\r\n\r\n }\r\n \r\n state = {\r\n modal: this.props.isOpen\r\n }\r\n \r\n handleOpen = () => this.setState({ modal: true })\r\n\r\n handleClose = () => this.setState({ modal: false })\r\n\r\n getHeaderText = () => {\r\n let htmlDoc = {__html: this.props.header};\r\n return htmlDoc;\r\n }\r\n\r\n getBodyText = () => {\r\n let htmlDoc = { __html: this.props.bodyText.replace(\"DeployURLSwapTooltip\", Config.client_endpoint)};\r\n return htmlDoc;\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n }>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\nimport './downloadSubComponent.css';\r\nimport { Grid, Button, Table, Icon, Dimmer, Loader } from \"semantic-ui-react\";\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport UploadModal from \"../../DOMObjects/UploadModal/UploadModal\";\r\nimport IUploadModal from \"../../DOMObjects/UploadModal/IUploadModal\";\r\nimport { BaseModel } from \"../../../interfaces/IBaseModel\";\r\nimport ModelDownloads from \"../../../models/ModelDownload\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { TooltipModal } from \"../../toolTipModal/toolTipModal\";\r\nimport { IDownloadSubComponentProps } from \"../../../interfaces/IDownloadSubComponentProps\";\r\n\r\nexport class DownloadSubComponentState {\r\n\r\n modelData: ModelDownloads[] = [];\r\n loading: boolean = true;\r\n downloadProgress: number[] = new Array();\r\n}\r\n\r\nexport default class DownloadSubComponent extends Component {\r\n\r\n state = new DownloadSubComponentState();\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n let classContext: DownloadSubComponent = this;\r\n classContext.setState({ loading: true });\r\n classContext.getModelData(classContext.props.downloadType, \"modelData\");\r\n }\r\n\r\n getModelData(datafilter: string, stateProp: string) {\r\n let classContext: DownloadSubComponent = this;\r\n ModelDownloads.axiosGetAll({ \"DownloadType\": datafilter, \"Archived\": \"false\" })\r\n .then((r: AxiosResponse) => {\r\n let modelData: ModelDownloads[] = r.data;\r\n let compState = Object.assign({}, classContext.state);\r\n compState[stateProp] = modelData.sort((a: ModelDownloads, b: ModelDownloads) => { return a.displayWeight - b.displayWeight });\r\n compState.loading = false;\r\n classContext.setState(compState);\r\n })\r\n .catch((r: AxiosResponse) => {\r\n console.log(\"error fetching data: \" + datafilter);\r\n });\r\n }\r\n\r\n makeJSX = (data: ModelDownloads[]) => {\r\n return data.map((d) => {\r\n return (\r\n \r\n {d.displayName}\r\n \r\n \r\n \r\n \r\n \r\n

\r\n {\r\n d.tooltipName != null && d.tooltipName.length > 0 &&\r\n \r\n }\r\n
\r\n
\r\n );\r\n });\r\n };\r\n\r\n modelFormatter = (file: File): BaseModel => {\r\n\r\n let modelDownload = new ModelDownloads();\r\n\r\n modelDownload.archived = false;\r\n modelDownload.fileName = file.name;\r\n modelDownload.mimeType = file.type;\r\n modelDownload.downloadType = 'timeseries';\r\n\r\n return modelDownload;\r\n };\r\n\r\n lspcModelFormatter = (file: File): BaseModel => {\r\n\r\n let modelDownload = new ModelDownloads();\r\n\r\n modelDownload.archived = false;\r\n modelDownload.fileName = file.name;\r\n modelDownload.mimeType = file.type;\r\n modelDownload.downloadType = 'lspc';\r\n\r\n return modelDownload;\r\n };\r\n\r\n onUploadModalClose = () => {\r\n ModelDownloads.axiosGetAll({ \"DownloadType\": \"timeseries\" })\r\n .then((r: AxiosResponse) => {\r\n this.setState({ timeSeriesData: r.data });\r\n })\r\n .catch((r: AxiosResponse) => {\r\n console.log(\"error fetching data\");\r\n });\r\n\r\n };\r\n\r\n lspcOnUploadModalClose = () => {\r\n ModelDownloads.axiosGetAll({ \"DownloadType\": \"lspc\" })\r\n .then((r: AxiosResponse) => {\r\n this.setState({ lspcData: r.data });\r\n })\r\n .catch((r: AxiosResponse) => {\r\n console.log(\"error fetching data\");\r\n });\r\n };\r\n\r\n downloadModelFile = (modelDownloadId: number, mimeType: string, filename: string) => {\r\n let classContext: DownloadSubComponent = this;\r\n let compState = Object.assign({}, classContext.state);\r\n compState[\"downloadProgress\"].push(modelDownloadId)\r\n compState[\"downloadProgress\"] = compState[\"downloadProgress\"];\r\n classContext.setState(compState, () => {\r\n ModelDownloads.axiosGetBlobById(modelDownloadId)\r\n .then((r: AxiosResponse) => {\r\n const bloboBaggins = new Blob([r.data], { type: mimeType });\r\n classContext.removeFromDownloadProgress(modelDownloadId);\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(bloboBaggins, filename);\r\n } else {\r\n const bloboBaggins = new Blob([r.data], { type: mimeType });\r\n var link = document.createElement('a');\r\n var href = window.URL.createObjectURL(bloboBaggins);\r\n link.setAttribute('href', href);\r\n link.setAttribute('download', filename);\r\n document.body.appendChild(link);\r\n link.click();\r\n setTimeout(() => {\r\n window.URL.revokeObjectURL(href);\r\n document.body.removeChild(link);\r\n }, 0)\r\n };\r\n })\r\n .catch((r: AxiosResponse) => {\r\n classContext.removeFromDownloadProgress(modelDownloadId);\r\n console.log(\"error downloading file\")\r\n });\r\n });\r\n };\r\n\r\n removeFromDownloadProgress = (id: number) => {\r\n let classContext: DownloadSubComponent = this;\r\n let compState = Object.assign({}, classContext.state);\r\n compState[\"downloadProgress\"] = compState[\"downloadProgress\"].filter(i => i !== id);\r\n classContext.setState(compState);\r\n }\r\n\r\n render() {\r\n\r\n let classContext: DownloadSubComponent = this;\r\n\r\n return (\r\n\r\n\r\n \r\n \r\n \r\n \r\n {classContext.props.componentTitle}\r\n \r\n \r\n \r\n \r\n {\r\n classContext.state.modelData.length > 0 && classContext.state.loading == false && \r\n classContext.makeJSX(classContext.state.modelData)\r\n }\r\n {classContext.state.modelData.length == 0 && classContext.state.loading == false && \r\n \r\n None available\r\n \r\n \r\n }\r\n {\r\n classContext.state.loading == true && \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n
\r\n
\r\n \r\n\r\n );\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport './downloadLspc.css';\r\nimport { Grid, Button, Table, Icon } from \"semantic-ui-react\";\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport UploadModal from \"../../DOMObjects/UploadModal/UploadModal\";\r\nimport IUploadModal from \"../../DOMObjects/UploadModal/IUploadModal\";\r\nimport { BaseModel } from \"../../../interfaces/IBaseModel\";\r\nimport ModelDownloads from \"../../../models/ModelDownload\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { TooltipModal } from \"../../toolTipModal/toolTipModal\";\r\nimport DownloadSubComponent from \"../DownloadSubComponent/downloadSubComponent\";\r\n\r\nexport class DownloadLspcState {\r\n // TODO this is a placeholder for real data that will be obtained from the API\r\n //data: any = [\r\n // {Name: \"Flood Storms - 10 year\", Description: \"You see, the refried beans are really just the adhesive necessary to apply the soft tortilla to the hard taco shell.\"},\r\n // {Name: \"Long Term - Daily\", Description: \"Um, Tabasco? No thanks, do you have any Cholula?\"},\r\n // {Name: \"Water Quality Critical Condition - 85%ile Storm\", Description: \"Yeah, apparently the taco shack was robbed. They left the money but took the tacos.\"}\r\n //];\r\n\r\n}\r\n\r\nexport default class DownloadLspc extends Component {\r\n\r\n state = new DownloadLspcState();\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n }\r\n\r\n\r\n\r\n disclaimerAgree() {\r\n let classContext: DownloadLspc = this;\r\n classContext.setState({ displayDisclaimer: false });\r\n }\r\n\r\n // TODO can be used to dynamically create rows of file names each with its own download button if needed\r\n // createTextRows() {\r\n // let classContext: DownloadLspc = this; \r\n // let rows = classContext.state.data.map(datum => {\r\n // return (\r\n // \r\n // {datum.Name} 🌮\r\n // \r\n // \r\n // );\r\n // });\r\n // return rows;\r\n // }\r\n\r\n // TODO can be used to dynamically create rows of table data if needed\r\n //createTableRows() { let classContext: DownloadLspc = this; \r\n // let rows = classContext.state.data.map(datum => {\r\n // return (\r\n // \r\n // \r\n // {datum.Name}\r\n // \r\n // \r\n // \r\n // \r\n // \r\n // {datum.Description}\r\n // \r\n // \r\n // );\r\n // });\r\n // return rows;\r\n //};\r\n\r\n\r\n modelFormatter = (file: File): BaseModel => {\r\n\r\n let modelDownload = new ModelDownloads();\r\n\r\n modelDownload.archived = false;\r\n modelDownload.fileName = file.name;\r\n modelDownload.mimeType = file.type;\r\n modelDownload.downloadType = 'timeseries';\r\n\r\n return modelDownload;\r\n };\r\n\r\n lspcModelFormatter = (file: File): BaseModel => {\r\n\r\n let modelDownload = new ModelDownloads();\r\n\r\n modelDownload.archived = false;\r\n modelDownload.fileName = file.name;\r\n modelDownload.mimeType = file.type;\r\n modelDownload.downloadType = 'lspc';\r\n\r\n return modelDownload;\r\n };\r\n\r\n onUploadModalClose = () => {\r\n ModelDownloads.axiosGetAll({\"DownloadType\": \"timeseries\"})\r\n .then((r: AxiosResponse) => {\r\n this.setState({timeSeriesData: r.data});\r\n })\r\n .catch((r: AxiosResponse) => {\r\n console.log(\"error fetching data\");\r\n });\r\n\r\n };\r\n\r\n lspcOnUploadModalClose = () => {\r\n ModelDownloads.axiosGetAll({\"DownloadType\": \"lspc\"})\r\n .then((r: AxiosResponse) => {\r\n this.setState({lspcData: r.data});\r\n })\r\n .catch((r: AxiosResponse) => {\r\n console.log(\"error fetching data\");\r\n });\r\n };\r\n\r\n render() {\r\n\r\n let classContext: DownloadLspc = this;\r\n\r\n const lspcModalProps: IUploadModal = {\r\n triggerText: \"Upload\",\r\n headerText: \"Upload LSPC Data and Executables\",\r\n dropZoneHeight: 250,\r\n modelFormatter: this.lspcModelFormatter,\r\n validationFields: ['description', 'displayName'],\r\n onModalClose: this.lspcOnUploadModalClose\r\n };\r\n\r\n const modalProps: IUploadModal = {\r\n triggerText: \"Upload\",\r\n headerText: \"Upload Timeseries Data\",\r\n dropZoneHeight: 250,\r\n modelFormatter: this.modelFormatter,\r\n validationFields: ['description', 'displayName'],\r\n onModalClose: this.onUploadModalClose\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n
\r\n

\r\n \r\n Disclaimer\r\n

\r\n

\r\n Entries in the LSPC panel of the Repository contain a mix of model files to support the use of the LSPC (Loading Simulation C++ Program) model developed for the Los Angeles region. Downloads include model database files, critical condition boundary conditions (e.g., 85th percentile storm), and continuous simulation boundary conditions (e.g., 10-year calibration timeseries). For a full description on how these datasets were created and how they should be used, reference the appropriate user documentation.\r\n

\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport './downloadSustain.css';\r\nimport { Grid, Button, Table, Icon } from \"semantic-ui-react\";\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport UploadModal from \"../../DOMObjects/UploadModal/UploadModal\";\r\nimport IUploadModal from \"../../DOMObjects/UploadModal/IUploadModal\";\r\nimport { AxiosPromise, AxiosResponse } from \"axios\";\r\nimport ModelDownloads from \"../../../models/ModelDownload\";\r\nimport { BaseModel } from \"../../../interfaces/IBaseModel\";\r\nimport { TooltipModal } from \"../../toolTipModal/toolTipModal\";\r\nimport DownloadSubComponent from \"../DownloadSubComponent/downloadSubComponent\";\r\n\r\nexport class DownloadSustainState {\r\n // TODO this is a placeholder for real data that will be obtained from the API\r\n // data: any = [\r\n // {Name: \"adobada\"},\r\n // {Name: \"lengua\"},\r\n // {Name: \"carne asada\"}\r\n // ];\r\n\r\n}\r\n\r\nexport default class DownloadSustain extends Component {\r\n\r\n state = new DownloadSustainState();\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n\r\n };\r\n\r\n disclaimerAgree() {\r\n let classContext: DownloadSustain = this;\r\n classContext.setState({ displayDisclaimer: false });\r\n };\r\n \r\n // TODO can be used to dynamically create rows of file names each with its own download button if needed\r\n // createRows() {\r\n // let classContext: DownloadSustain = this; \r\n // let rows = classContext.state.data.map(datum => {\r\n // return (\r\n // \r\n // {datum.Name} 🌮\r\n // \r\n // \r\n // );\r\n // });\r\n // return rows;\r\n // }\r\n\r\n modelFormatter = (file: File): BaseModel => {\r\n\r\n let modelDownload = new ModelDownloads();\r\n\r\n modelDownload.archived = false;\r\n modelDownload.fileName = file.name;\r\n modelDownload.mimeType = file.type;\r\n modelDownload.downloadType = 'sustain';\r\n\r\n\r\n return modelDownload;\r\n };\r\n\r\n onUploadModalClose = () => {\r\n ModelDownloads.axiosGetAll({\"DownloadType\": \"sustain\"})\r\n .then((r: AxiosResponse) => {\r\n this.setState({sustainData: r.data});\r\n })\r\n .catch((r: AxiosResponse) => {\r\n console.log(\"error fetching data\")\r\n });\r\n };\r\n\r\n\r\n render() {\r\n let classContext: DownloadSustain = this;\r\n\r\n const modalProps: IUploadModal = {\r\n triggerText: \"Upload\",\r\n headerText: \"Upload Sustain Data and Executables\",\r\n dropZoneHeight: 250,\r\n modelFormatter: this.modelFormatter,\r\n validationFields: ['description', 'displayName'],\r\n onModalClose: this.onUploadModalClose\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n
\r\n

\r\n \r\n Disclaimer\r\n

\r\n

\r\n Entries in the SUSTAIN panel of the Repository contain two files to support the use of the SUSTAIN (System for Urban Stormwater Treatment and Analysis INtegration) model developed for the Los Angeles region. For a full description on how these files were created and how they should be used, reference the appropriate user documentation.\r\n

\r\n
\r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport './downloadSpatial.css';\r\nimport { Grid, Button, Table, Icon } from \"semantic-ui-react\";\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport UploadModal from \"../../DOMObjects/UploadModal/UploadModal\";\r\nimport IUploadModal from \"../../DOMObjects/UploadModal/IUploadModal\";\r\nimport { AxiosPromise, AxiosResponse } from \"axios\";\r\nimport ModelDownloads from \"../../../models/ModelDownload\";\r\nimport { BaseModel } from \"../../../interfaces/IBaseModel\";\r\nimport { TooltipModal } from \"../../toolTipModal/toolTipModal\";\r\nimport DownloadSubComponent from \"../DownloadSubComponent/downloadSubComponent\";\r\n\r\nexport class DownloadSpatialState {\r\n // TODO this is a placeholder for real data that will be obtained from the API\r\n // data: any = [\r\n // {Name: \"adobada\"},\r\n // {Name: \"lengua\"},\r\n // {Name: \"carne asada\"}\r\n // ];\r\n}\r\n\r\nexport default class DownloadSpatial extends Component {\r\n\r\n state = new DownloadSpatialState();\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n\r\n };\r\n\r\n disclaimerAgree() {\r\n let classContext: DownloadSpatial = this;\r\n classContext.setState({ displayDisclaimer: false });\r\n };\r\n\r\n // TODO can be used to dynamically create rows of file names each with its own download button if needed\r\n // createRows() {\r\n // let classContext: DownloadSustain = this; \r\n // let rows = classContext.state.data.map(datum => {\r\n // return (\r\n // \r\n // {datum.Name} ??\r\n // \r\n // \r\n // );\r\n // });\r\n // return rows;\r\n // }\r\n\r\n modelFormatter = (file: File): BaseModel => {\r\n\r\n let modelDownload = new ModelDownloads();\r\n\r\n modelDownload.archived = false;\r\n modelDownload.fileName = file.name;\r\n modelDownload.mimeType = file.type;\r\n modelDownload.downloadType = 'sustain';\r\n\r\n\r\n return modelDownload;\r\n };\r\n\r\n onUploadModalClose = () => {\r\n ModelDownloads.axiosGetAll({ \"DownloadType\": \"spatial\" })\r\n .then((r: AxiosResponse) => {\r\n this.setState({ sustainData: r.data });\r\n })\r\n .catch((r: AxiosResponse) => {\r\n console.log(\"error fetching data\")\r\n });\r\n };\r\n\r\n\r\n render() {\r\n let classContext: DownloadSpatial = this;\r\n\r\n const modalProps: IUploadModal = {\r\n triggerText: \"Upload\",\r\n headerText: \"Upload Sustain Data and Executables\",\r\n dropZoneHeight: 250,\r\n modelFormatter: this.modelFormatter,\r\n validationFields: ['description', 'displayName'],\r\n onModalClose: this.onUploadModalClose\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n
\r\n

\r\n \r\n Disclaimer\r\n

\r\n

\r\n Entries in the Spatial Data panel of the Repository contain a mix of GIS data to visualize georeferenced datasets which support the use of the WMMS 2.0 Utilities. For a full description on how these datasets were created and how they should be used, reference the appropriate user documentation.\r\n

\r\n
\r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}","export default __webpack_public_path__ + \"static/media/wmms_repo_diagram.51015ebf.png\";","import React, { Component } from \"react\";\r\nimport './downloadDocument.css';\r\nimport { Grid, Button, Table, Icon } from \"semantic-ui-react\";\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport UploadModal from \"../../DOMObjects/UploadModal/UploadModal\";\r\nimport IUploadModal from \"../../DOMObjects/UploadModal/IUploadModal\";\r\nimport { AxiosPromise, AxiosResponse } from \"axios\";\r\nimport ModelDownloads from \"../../../models/ModelDownload\";\r\nimport { BaseModel } from \"../../../interfaces/IBaseModel\";\r\nimport { TooltipModal } from \"../../toolTipModal/toolTipModal\";\r\nimport DownloadSubComponent from \"../DownloadSubComponent/downloadSubComponent\";\r\n\r\nexport class DownloadDocumentState {\r\n // TODO this is a placeholder for real data that will be obtained from the API\r\n // data: any = [\r\n // {Name: \"adobada\"},\r\n // {Name: \"lengua\"},\r\n // {Name: \"carne asada\"}\r\n // ];\r\n\r\n\r\n}\r\n\r\nexport default class DownloadDocument extends Component {\r\n\r\n state = new DownloadDocumentState();\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n\r\n };\r\n\r\n disclaimerAgree() {\r\n let classContext: DownloadDocument = this;\r\n classContext.setState({ displayDisclaimer: false });\r\n };\r\n\r\n\r\n modelFormatter = (file: File): BaseModel => {\r\n\r\n let modelDownload = new ModelDownloads();\r\n\r\n modelDownload.archived = false;\r\n modelDownload.fileName = file.name;\r\n modelDownload.mimeType = file.type;\r\n modelDownload.downloadType = 'document';\r\n\r\n\r\n return modelDownload;\r\n };\r\n\r\n onUploadModalClose = () => {\r\n ModelDownloads.axiosGetAll({ \"DownloadType\": \"document\" })\r\n .then((r: AxiosResponse) => {\r\n this.setState({ sustainData: r.data });\r\n })\r\n .catch((r: AxiosResponse) => {\r\n console.log(\"error fetching data\")\r\n });\r\n };\r\n\r\n\r\n render() {\r\n let classContext: DownloadDocument = this;\r\n\r\n const modalProps: IUploadModal = {\r\n triggerText: \"Upload\",\r\n headerText: \"Upload Sustain Data and Executables\",\r\n dropZoneHeight: 250,\r\n modelFormatter: this.modelFormatter,\r\n validationFields: ['description', 'displayName'],\r\n onModalClose: this.onUploadModalClose\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n\r\n
\r\n

\r\n \r\n Disclaimer\r\n

\r\n

\r\n Entries in the Document panel of the Repository contain a mix of user documents and spreadsheets to support use of the WMMS 2.0 Utilities and report documents (Phase I and Phase II) to describe the characterization and development of the Loading Simulation C++ Program (LSPC) and System for Urban Stormwater Treatment and Analysis INtegration (SUSTAIN) models.\r\n

\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport './downloads.css';\r\nimport { INavHistory } from \"../../interfaces/INavHistory\";\r\nimport { Button, Accordion } from \"semantic-ui-react\";\r\nimport DownloadLspc from \"./DownloadLspc/downloadLspc\";\r\nimport DownloadSustain from \"./DownloadSustain/downloadSustain\";\r\nimport DownloadSpatial from \"./DownloadSpatial/downloadSpatial\";\r\nimport repoGraphic from '../../images/wmms_repo_diagram.png';\r\nimport DownloadDocument from \"./DownloadDocument/downloadDocument\";\r\n\r\nexport class DownloadsState {\r\n displayDisclaimer: boolean = true;\r\n activeTab: string = \"DOCUMENTS\";\r\n}\r\n\r\nexport default class Downloads extends Component {\r\n\r\n state = new DownloadsState();\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n\r\n }\r\n\r\n disclaimerAgree(){\r\n let classContext: Downloads = this;\r\n var myDiv = document.getElementsByClassName(\"downloads-inner-container\")[0];\r\n myDiv.scrollTop = 0;\r\n classContext.setState({ displayDisclaimer: false }, () => {\r\n\r\n });\r\n }\r\n\r\n clickTab(name: string) {\r\n let classContext: Downloads = this;\r\n classContext.setState({ activeTab: name }, () => {\r\n // document.getElementById(`downloadTop`).scrollIntoView();\r\n });\r\n \r\n }\r\n\r\n\r\n render() {\r\n\r\n let classContext: Downloads = this;\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Documents, Data & Downloads\r\n
\r\n
\r\n
\r\n {classContext.state.displayDisclaimer == true && \r\n
\r\n
\r\n

\r\n TERMS AND CONDITIONS\r\n

\r\n

This is the Los Angeles County Watershed Management Modeling System (WMMS) License Agreement.

\r\n

1. INTRODUCTION

\r\n

The Los Angeles County Watershed Management Modeling System (referred to in this License Agreement as the \"WMMS\" and specifically including the MapWindow software, Loading Simulation Program in C++ plug-in(referred to as LSPC), Regional Optimization plug-in, all associated GIS files, spreadsheets, and databases used in association with WMMS and User Manual for WMMS) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and the Los Angeles County Flood Control District (\"LACFCD\") in relation to your use of the WMMS.

\r\n

2. ACCEPTING THIS LICENSE AGREEMENT

\r\n

In order to use the WMMS, you must first agree to this License Agreement. You may not use the WMMS if you do not accept this License Agreement. You can accept this License Agreement by (A) clicking to accept or agree to this License Agreement, where this option is made available to you; or (B) by actually downloading and/or using the WMMS, in which case you agree that use of the WMMS constitutes acceptance of the Licensing Agreement from that point onwards. If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the Licensing Agreement or use the WMMS on behalf of your employer or other entity.

\r\n

3. WMMS LICENSE FROM LACFCD

\r\n

Subject to the terms of this License Agreement, LACFCD grants you a limited, royalty-free, non-assignable and non-exclusive license to use the WMMS for stormwater management. You agree that LACFCD owns all legal right, title and interest in and to the WMMS, including any Intellectual Property Rights, if any, that subsist in the WMMS. \"Intellectual Property Rights\" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. No license, express or implied, by estoppel or otherwise, to any Intellectual Property Rights is granted by this document. LACFCD reserves all rights not expressly granted to you. LACFCD may make changes to WMMS and the associated User Manual at any time, without notice.\r\n\r\n You may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the WMMS or any part of the WMMS without LACFCD's written consent.\r\n\r\n You agree that the form and nature of the WMMS and the associated User Manual that LACFCD makes available to the public may change without prior notice to you and that future versions of the WMMS may be incompatible with your use or on your computer system. You agree that LACFCD may stop (permanently or temporarily) providing the WMMS (or any features within the WMMS) to you or to users generally at LACFCD's sole discretion, without prior notice to you.\r\n\r\n Nothing in this License Agreement gives you a right to use any of LACFCD's trade names, trademarks, service marks, logos, domain names, or other distinctive features, including for the names Los Angeles County Watershed Management Modeling System, WMMS, Los Angeles County Flood Control District, and LACFCD.\r\n\r\n You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the WMMS or the accompanying User Manual.

\r\n

4. USE OF THE WMMS BY YOU

\r\n

You agree that you will not engage in any activity with the WMMS, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, the LACFCD.\r\n\r\n You agree that you are solely responsible for (and that LACFCD has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through WMMS, any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which LACFCD or any third party may suffer) of any such actions or breach.

\r\n

5. TERMINATING THIS LICENSE AGREEMENT

\r\n

This License Agreement will continue to apply until terminated by either you or LACFCD. If you want to terminate this License Agreement, you may do so by ceasing your use of the WMMS. LACFCD may at any time, terminate this License Agreement with you if: (A) you have breached any provision of this License Agreement; or (B) LACFCD is required to do so by law; or (C) LACFCD decides to no longer provide, in it's sole discretion, the WMMS or certain parts of the WMMS to users. When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and LACFCD have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of Sections 6, 7, 8 and 10 shall continue to apply to such rights, obligations and liabilities indefinitely.

\r\n

6. DISCLAIMER OF WARRANTIES

\r\n

YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE WMMS IS AT YOUR SOLE RISK AND THAT THE WMMS IS PROVIDED \"AS IS\" AND \"AS AVAILABLE\" WITHOUT WARRANTY OF ANY KIND FROM LACFCD.\r\n\r\n YOUR USE OF THE WMMS AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE WMMS IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.\r\n\r\n LACFCD FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.

\r\n

7. LIMITATION OF LIABILITY

\r\n

YOU EXPRESSLY UNDERSTAND AND AGREE THAT LACFCD, THE COUNTY OF LOS ANGELES, AND THEIR RESPECTIVE BOARDS, OFFICERS, EMPLOYEES, AGENTS, SUBSIDIARIES, SUCCESSORS, ASSIGNS AND SUB-CONTRACTORS, SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING FOR ANY LOSS OF DATA, DAMAGE TO YOUR COMPUTER OR COMPUTER SYSTEM, FAILURE TO MEET ANY STATE OR FEDERAL REQUIREMENTS UNDER ANY FEDERAL OR STATE LAW, INCLUDING, BUT NOT LIMITED TO THE CLEAN WATER ACT AND THE PORTER-COLOGNE WATER QUALITY CONTROL ACT, OR FOR ANY DAMAGE RESULTING FROM ANY ASSISTANCE LACFCD AND/OR COUNTY OF LOS ANGELES EMPLOYEES MAY PROVIDE YOU ON WMMS.

\r\n

8. INDEMNIFICATION

\r\n

To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless LACFCD, Los Angeles County, and their respective boards, officers, employees, agents, subsidiaries, successors, assigns and sub-contractors, from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the WMMS, (b) the User Manual for WMMS, and (c) any non-compliance by you with this License Agreement.

\r\n

9. CHANGES TO THE LICENSE AGREEMENT

\r\n

LACFCD may make changes to the License Agreement as it distributes new versions of the WMMS. When these changes are made, LACFCD will make a new version of the License Agreement available on the website where the WMMS and the User Manual is made available.

\r\n

10. GENERAL LEGAL TERMS

\r\n

This License Agreement constitutes the whole legal agreement between you and LACFCD and govern your use of the WMMS, the User Manual for WMMS, any assistance you may receive from LACFCD and/or Los Angeles County employees in using WMMS, and completely replaces any prior agreements, if any, between you and LACFCD in relation to the WMMS.\r\n\r\n You agree that if LACFCD does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which LACFCD has the benefit of under any applicable law), this will not be taken to be a formal waiver of LACFCD's rights and that those rights or remedies will still be available to LACFCD.\r\n\r\n If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable.\r\n\r\n The rights granted in this License Agreement may not be assigned or transferred by either you or LACFCD without the prior written approval of the other party. Neither you nor LACFCD shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party.\r\n\r\n This License Agreement, and your relationship with LACFCD under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and LACFCD agree to submit to the exclusive jurisdiction of the courts located within the county of Los Angeles, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that LACFCD shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.

\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n }\r\n\r\n {classContext.state.displayDisclaimer == false &&\r\n
\r\n
\r\n

WELCOME to the WMMS 2.0 Model and Timeseries Repository. Contained below in the four available panels (Documents, Spatial Data, LSPC, SUSTAIN) are a number of files necessary to execute the WMMS 2.0 Model Framework.

\r\n

Throughout the WMMS 2.0 web interface, user documents, land use datasets, precipitation boundary conditions, and other files are intentionally made available for download to support key functionality. This Model and Timeseries Repository was developed to contain all of this broadly provided data in a convenient singular download location. Click any of the colored panel headers below to navigate the Repository.

\r\n
\r\n
\r\n
\r\n \"wmms\r\n
\r\n
\r\n \r\n
\r\n }\r\n
\r\n
\r\n );\r\n\r\n }\r\n}","export default __webpack_public_path__ + \"static/media/WMMS_Utility_Diagram_ForWeb.6852d52b.png\";","import React, { Component } from \"react\";\r\nimport './utilities.css';\r\nimport { Card, Icon, Button, Confirm, Divider } from \"semantic-ui-react\";\r\nimport { IUtilityPage } from \"../../interfaces/IUtilityPage\";\r\nimport { IUtilityCard } from \"../../interfaces/IUtilityCard\";\r\nimport { clearInterval } from \"timers\";\r\nimport Logo from \"../../images/WMMS_Utility_Diagram_ForWeb.png\";\r\nimport { Route } from 'react-router-dom';\r\nimport Config from \"../../config/Config\";\r\n\r\n\r\nexport class UtilitiesState {\r\n processing: boolean = false;\r\n selection: string = \"\";\r\n utilComponentIsOpen: boolean = false;\r\n showCards: boolean = false;\r\n}\r\n\r\nexport default class Utilities extends Component {\r\n\r\n state = new UtilitiesState;\r\n\r\n constructor(props) {\r\n super(props);\r\n };\r\n\r\n // track intervals here so we can check on 'back' click;\r\n interval: any;\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n\r\n \r\n \r\n // this.handleFirstRender();\r\n\r\n }\r\n\r\n handleFirstRender = () => {\r\n\r\n let desiredUrl: string = window.location.href;\r\n\r\n if (Config.client_endpoint + \"utilities\" !== desiredUrl) {\r\n let desiredRoute = desiredUrl.split(Config.client_endpoint + \"utilities/\")[1];\r\n this.props.history.push(\"/utilities/\" + desiredRoute);\r\n this.setState({selection: desiredRoute})\r\n } \r\n\r\n }\r\n\r\n handleItemClick = (name) => {\r\n this.setState({ \r\n showCards: !this.state.showCards,\r\n utilComponentIsOpen: !this.state.utilComponentIsOpen\r\n });\r\n\r\n setTimeout(() => {\r\n this.setState({ selection: name }, () => {\r\n // this.setUtilityRoute(name);\r\n\r\n \r\n })\r\n }, 500);\r\n }\r\n\r\n beginInterval = (intvl: any) => {\r\n let classContext: Utilities = this;\r\n classContext.interval = intvl;\r\n classContext.setState({processing: true})\r\n }\r\n\r\n stopInterval = () => {\r\n let classContext: Utilities = this;\r\n if (classContext.interval != null) {\r\n clearInterval(classContext.interval);\r\n classContext.interval = null;\r\n classContext.setState({ processing: false })\r\n }\r\n }\r\n\r\n setUtilityRoute = (name) => {\r\n this.props.history.push(\"/utilities/\" + name);\r\n }\r\n\r\n getUtilityRouteJSX = () => {\r\n\r\n let classContext = this;\r\n\r\n return classContext.props.utilities.map((card: IUtilityCard, index: number) => {\r\n return {return < card.component \r\n key={card.internalName}\r\n cardTitle={card.cardTitle}\r\n cardDescription={card.cardDescription}\r\n component={card.component}\r\n cardIcon={card.cardIcon}\r\n visible={card.visible}\r\n active={card.active}\r\n wmmsColor={card.wmmsColor}\r\n internalName={card.internalName}\r\n cardSubtitle={card.cardSubtitle}\r\n helpDoc={card.helpDoc}\r\n templateDoc={card.templateDoc}\r\n beginInterval={this.beginInterval}\r\n stopInterval={this.stopInterval}\r\n utilComponentIsOpen={this.state.utilComponentIsOpen}\r\n {...props}\r\n /> }} key={index} />\r\n\r\n });\r\n\r\n }\r\n\r\n\r\n\r\n\r\n render() {\r\n\r\n let classContext: Utilities = this;\r\n \r\n return (\r\n
\r\n
\r\n {/*
Utilities
*/}\r\n { classContext.state.selection.length == 0 &&\r\n
\r\n
\r\n
\r\n \"wmms \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n {classContext.props.utilities.map((card: IUtilityCard) => {\r\n if (card.internalName != 'ftableutil' && card.internalName != 'weatherutil') {\r\n\r\n return (card.visible == false ? \"\" : card.active ? classContext.handleItemClick(card.internalName)} className={'ulit-card wmms-' + card.wmmsColor}>\r\n \r\n \r\n {card.cardTitle}\r\n {/*\r\n {card.cardSubtitle}\r\n */}\r\n \r\n {card.cardDescription}\r\n \r\n \r\n : \r\n \r\n \r\n {card.cardTitle}\r\n {/*\r\n {card.cardSubtitle}\r\n */}\r\n \r\n {card.cardDescription}\r\n \r\n \r\n )\r\n }\r\n })}\r\n\r\n
\r\n
\r\n
\r\n
\r\n }\r\n { classContext.state.selection.length > 0 &&\r\n
\r\n \r\n
\r\n {\r\n classContext.handleItemClick(\"\");\r\n classContext.stopInterval();\r\n }} >\r\n Back to Main Utility Page \r\n
\r\n {/* \r\n {this.getUtilityRouteJSX()}\r\n */}\r\n \r\n {classContext.props.utilities.map((card: IUtilityCard) => {\r\n if (card.internalName == classContext.state.selection) {\r\n return (\r\n < card.component \r\n key={card.internalName}\r\n cardTitle={card.cardTitle}\r\n cardDescription={card.cardDescription}\r\n component={card.component}\r\n cardIcon={card.cardIcon}\r\n visible={card.visible}\r\n active={card.active}\r\n wmmsColor={card.wmmsColor}\r\n internalName={card.internalName}\r\n cardSubtitle={card.cardSubtitle}\r\n helpDoc={card.helpDoc}\r\n templateDoc={card.templateDoc}\r\n beginInterval={this.beginInterval}\r\n stopInterval={this.stopInterval}\r\n utilComponentIsOpen={this.state.utilComponentIsOpen}\r\n /> \r\n )\r\n }\r\n })\r\n }\r\n\r\n
\r\n }\r\n
\r\n
\r\n );\r\n\r\n }\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class networktimeseries extends BaseModel {\r\n\r\n \"path\": string;\r\n \"data\": Array;\r\n\r\n constructor() {\r\n super('networkviewer/data');\r\n\r\n this.data = new Array();\r\n }\r\n}\r\n\r\nexport class networktimeseriesitem {\r\n \"date\": Date;\r\n \"values\": Array;\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class networkdownload extends BaseModel {\r\n\r\n constructor() {\r\n super('networkviewer/download');\r\n }\r\n}\r\n\r\n","export default __webpack_public_path__ + \"static/media/WMMS_logo_full.bfa6a323.png\";","import React, { Component } from \"react\";\r\nimport IAxisLeftProps from '../interfaces/IAxisLeftProps';\r\nimport * as d3 from 'd3';\r\n\r\nexport default class AxisLeft extends Component {\r\n ref: React.RefObject;\r\n\r\n constructor(props: IAxisLeftProps) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n \r\n componentDidMount() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current)\r\n .call(d3.axisLeft(this.props.scale));\r\n }\r\n }\r\n \r\n componentDidUpdate() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current)\r\n .transition()\r\n .call(d3.axisLeft(this.props.scale));\r\n }\r\n }\r\n \r\n render() {\r\n // className={this.props.class != null ? this.props.class : null}\r\n return ;\r\n \r\n }\r\n}","import React, { Component } from \"react\";\r\nimport IAxisBottomProps from '../interfaces/IAxisBottomProps';\r\nimport * as d3 from 'd3';\r\n\r\nexport default class AxisBottom extends Component {\r\n ref: React.RefObject;\r\n\r\n constructor(props: IAxisBottomProps) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current)\r\n .call(d3.axisBottom(this.props.scale).ticks(6, d3.timeFormat(\"%m/%d/%Y %H:%M\")));\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current)\r\n .transition()\r\n .call(d3.axisBottom(this.props.scale).ticks(6, d3.timeFormat(\"%m/%d/%Y %H:%M\")));\r\n }\r\n }\r\n\r\n render() {\r\n return ;\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport IPathProps from \"../interfaces/IPathProps\";\r\nimport * as d3 from 'd3';\r\n\r\nexport default class Path extends Component {\r\n ref: React.RefObject;\r\n\r\n constructor(props: IPathProps) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n\r\n componentDidUpdate() {\r\n const { data, yScale, xScale, height } = this.props;\r\n\r\n if (data !== undefined) {\r\n var line = d3.line(data)\r\n .x(function (d) { return xScale(d.x); })\r\n .y(function (d) { return yScale(d.y); });\r\n\r\n d3.select(this.ref.current)\r\n .attr(\"class\", \"path\")\r\n .attr(\"d\", line(data))\r\n .transition();\r\n }\r\n }\r\n\r\n render() {\r\n const { fill, color, strokeWidth } = this.props;\r\n\r\n return (\r\n \r\n \r\n );\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport IAreaProps from \"../interfaces/IAreaProps\";\r\nimport * as d3 from 'd3';\r\n\r\nexport class AreaStartEndState {\r\n\r\n}\r\n\r\nexport default class AreaStartEnd extends Component {\r\n\r\n state = new AreaStartEndState();\r\n\r\n ref: React.RefObject;\r\n\r\n constructor(props: IAreaProps) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n // const { data, yScale, xScale } = this.props;\r\n // console.log(data);\r\n\r\n // data is undefined at this point, so can just leave this empty and use componentDidUpdate instead\r\n }\r\n\r\n addCircle() {\r\n }\r\n\r\n componentDidUpdate() {\r\n const { data, yScale, xScale, height } = this.props;\r\n\r\n var line = d3.area(data)\r\n .x(function (d) { return xScale(d.x); })\r\n .y0(0)\r\n .y1(height);\r\n\r\n d3.select(this.ref.current)\r\n .attr(\"class\", \"path\")\r\n .attr(\"d\", line(data))\r\n .on(\"mousemove\", this.addCircle())\r\n // .append(\"circle\").attr(\"r\", 5).attr(\"fill\", \"blue\").attr(\"cx\", 100)\r\n .transition();\r\n\r\n }\r\n\r\n render() {\r\n const { fill, color } = this.props;\r\n const attributes = {\r\n /* TODO is this needed at all? from san mateo example*/\r\n };\r\n\r\n /*\r\n .attr(\"stroke-width\", 1.5)\r\n .attr(\"stroke-linejoin\", \"round\")\r\n .attr(\"stroke-linecap\", \"round\")\r\n */\r\n\r\n return ;\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport * as d3 from 'd3';\r\nimport IAxisBottomProps from '../interfaces/IAxisBottomProps';\r\nimport ILabel from \"../interfaces/ILabel\";\r\n\r\nexport default class LabelBottom extends Component {\r\n ref: React.RefObject;\r\n\r\n constructor(props: ILabel) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current).append(\"text\")\r\n .attr(\"transform\", \"translate(\" + (this.props.width / 2) + \" ,\" + (this.props.height + this.props.margin.bottom) + \")\")\r\n .attr(\"text-anchor\", \"middle\")\r\n .attr(\"font-size\", this.props.fontSize)\r\n .attr(\"font-family\", \"sans-serif\")\r\n .attr(\"font-weight\", \"bold\")\r\n .attr(\"letter-spacing\", \"0.1em\")\r\n .text(this.props.text);\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current).selectAll(\"text\").remove();\r\n\r\n d3.select(this.ref.current).append(\"text\")\r\n .attr(\"transform\", \"translate(\" + (this.props.width / 2) + \" ,\" + (this.props.height + this.props.margin.bottom - 15) + \")\") \r\n .attr(\"text-anchor\", \"middle\")\r\n .attr(\"font-size\", this.props.fontSize)\r\n .attr(\"font-family\", \"sans-serif\")\r\n .attr(\"font-weight\", \"bold\")\r\n .attr(\"letter-spacing\", \"0.1em\")\r\n .text(this.props.text);\r\n }\r\n }\r\n\r\n render() {\r\n return ;\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport * as d3 from 'd3';\r\nimport IAxisBottomProps from '../interfaces/IAxisBottomProps';\r\nimport ILabel from \"../interfaces/ILabel\";\r\n\r\nexport default class LabelLeft extends Component {\r\n ref: React.RefObject;\r\n\r\n constructor(props: ILabel) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current).append(\"text\")\r\n .attr(\"transform\", \"rotate(-90)\")\r\n .attr(\"y\", 0 - this.props.margin.left + 5)\r\n .attr(\"x\", 0 - (this.props.height / 2))\r\n .attr(\"dy\", \"1em\")\r\n .attr(\"text-anchor\", \"middle\")\r\n .attr(\"font-size\", this.props.fontSize)\r\n .attr(\"font-family\", \"sans-serif\")\r\n .attr(\"font-weight\", \"bold\")\r\n .attr(\"letter-spacing\", \"0.1em\")\r\n .text(this.props.text);\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current).selectAll(\"text\").remove();\r\n\r\n d3.select(this.ref.current).append(\"text\")\r\n .attr(\"transform\", \"rotate(-90)\")\r\n .attr(\"y\", 0 - this.props.margin.left + 5)\r\n .attr(\"x\", 0 - (this.props.height / 2))\r\n .attr(\"dy\", \"1em\")\r\n .attr(\"text-anchor\", \"middle\")\r\n .attr(\"font-size\", this.props.fontSize)\r\n .attr(\"font-family\", \"sans-serif\")\r\n .attr(\"font-weight\", \"bold\")\r\n .attr(\"letter-spacing\", \"0.1em\")\r\n .text(this.props.text);\r\n }\r\n }\r\n\r\n render() {\r\n return ;\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport * as d3 from 'd3';\r\nimport ICalloutProps from \"../interfaces/ICalloutProps\";\r\n\r\nexport default class Callout extends Component {\r\n ref: React.RefObject;\r\n\r\n constructor(props: ICalloutProps) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n\r\n componentDidUpdate() {\r\n const { xvalue, yvalue, xCoord, yCoord, label } = this.props;\r\n\r\n let callout = d3.select(this.ref.current);\r\n let svg = d3.select(\"svg\");\r\n if (!yvalue) return callout.style(\"display\", \"none\");\r\n\r\n callout\r\n .attr(\"transform\", `translate(${xCoord},${yCoord})`)\r\n .style(\"display\", null)\r\n .style(\"pointer-events\", \"none\")\r\n .style(\"font\", \"12px sans-serif\");\r\n\r\n const path = callout.selectAll(\"path\")\r\n .data([null])\r\n .join(\"path\")\r\n .attr(\"fill\", \"white\")\r\n .attr(\"stroke\", \"black\");\r\n\r\n const text = callout.selectAll(\"text\")\r\n .data([null])\r\n .join(\"text\")\r\n .call(text => text\r\n .selectAll(\"tspan\")\r\n .data((label + \"\").split(/\\n/))\r\n .join(\"tspan\")\r\n .attr(\"x\", 0)\r\n .attr(\"y\", (d, i) => `${i * 1.1}em`)\r\n .style(\"font-weight\", (_, i) => i ? null : \"bold\")\r\n .text(d => d));\r\n\r\n const { x, y, width: w, height: h } = text.node().getBBox();\r\n\r\n text.attr(\"transform\", `translate(${-w / 2},${8 - y})`);\r\n path.attr(\"d\", `M${-w / 2 - 5},3H-3l3,-3l3,3H${w / 2 + 5}v${h + 10}h-${w + 10}z`);\r\n }\r\n\r\n render() {\r\n return ;\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport ITimseriesSVGProps from \"./interfaces/ITimeseriesSVGProps\";\r\nimport * as d3 from 'd3';\r\nimport AxisLeft from \"./chartPieces/AxisLeft\";\r\nimport AxisBottomTimeFormat from \"./chartPieces/AxisBottomTimeFormat\";\r\nimport Path from \"./chartPieces/Path\";\r\nimport AreaStartEnd from \"./chartPieces/AreaStartEnd\";\r\nimport LabelBottom from \"./chartPieces/LabelBottom\";\r\nimport LabelLeft from \"./chartPieces/LabelLeft\";\r\nimport Callout from \"./chartPieces/Callout\";\r\nimport IDataXY from \"./interfaces/IDataXY\";\r\nimport { Loader, Segment } from \"semantic-ui-react\";\r\n\r\nexport class TimeseriesSVGState {\r\n mouseDate: Date = null;\r\n mouseValue: number = null;\r\n calloutX: number = null;\r\n calloutY: number = null;\r\n label: string = \"\";\r\n mouseDownDate: Date = null;\r\n mouseUpDate: Date = null;\r\n listenersApplied: boolean = false;\r\n}\r\n\r\n\r\nexport default class TimeseriesSVG extends Component {\r\n state = new TimeseriesSVGState();\r\n xScale: any;\r\n yScale: any;\r\n myBisect: any;\r\n\r\n mouseEventOffset: number = 70;\r\n\r\n bisect = (mx: any): IDataXY => {\r\n //console.log('bisect in', mx);\r\n let date = this.xScale.invert(mx);\r\n //console.log('bisect date', date);\r\n let index = this.myBisect(this.props.data, date, 1);\r\n //console.log('bisect index', index);\r\n let a = this.props.data[index - 1];\r\n let b = this.props.data[index];\r\n if (a == null && b != null) { return b; }\r\n if (a != null && b == null) { return a; }\r\n if (a == null && b == null) { return { x: null, y: null };}\r\n return date - a.x > b.x - date ? b : a;\r\n \r\n }\r\n\r\n componentDidUpdate = () => {\r\n if (!this.props.loading) {\r\n if (!this.state.listenersApplied) {\r\n this.applyD3Listeners();\r\n this.setState({listenersApplied: true});\r\n };\r\n };\r\n };\r\n\r\n\r\n applyD3Listeners = () => {\r\n const classContext: TimeseriesSVG = this;\r\n d3.select(\"#timeG\").append('rect')\r\n .attr('width', this.props.svgWidth)\r\n .attr('height', this.props.svgHeight)\r\n .attr('fill', 'none')\r\n .attr('pointer-events', 'all')\r\n .on(\"mousemove\", function (x, y, z) {\r\n let mouseCoords = d3.mouse(z[0]);\r\n let res = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n let xcoord = classContext.xScale(res.x);\r\n let ycoord = classContext.yScale(res.y);\r\n let label = res.y.toFixed(4) + \" \" + classContext.props.units + \"\\n\" + new Date(res.x).toLocaleDateString(\"en-US\", {year: \"numeric\", month: \"2-digit\", day: \"2-digit\", hour: \"2-digit\", minute: \"2-digit\"})\r\n //classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n if (classContext.state.mouseDownDate != null) {\r\n //console.log('dragging', res.x);\r\n classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, mouseUpDate: res.x, label: label });\r\n classContext.props.zoomHandler(classContext.state.mouseDownDate, res.x);\r\n } else {\r\n classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n }\r\n\r\n })\r\n .on(\"touchmove\", function (x, y, z) {\r\n let mouseCoords = d3.touch(z[0]);\r\n let res = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n let xcoord = classContext.xScale(res.x);\r\n let ycoord = classContext.yScale(res.y);\r\n let label = res.y.toFixed(4) + \" \" + classContext.props.units + \"\\n\" + new Date(res.x).toLocaleDateString(\"en-US\", {year: \"numeric\", month: \"2-digit\", day: \"2-digit\", hour: \"2-digit\", minute: \"2-digit\"})\r\n //classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n if (classContext.state.mouseDownDate != null) {\r\n //console.log('dragging', res.x);\r\n classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, mouseUpDate: res.x, label: label });\r\n classContext.props.zoomHandler(classContext.state.mouseDownDate, res.x);\r\n } else {\r\n classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n }\r\n\r\n })\r\n .on(\"mouseup\", function (x,y,z) {\r\n let mouseCoords = d3.mouse(z[0]);\r\n\r\n let res = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n let startDate = classContext.state.mouseDownDate;\r\n classContext.setState({ mouseUpDate: null, mouseDownDate: null }, () => {\r\n if (startDate != new Date(res.x)) { // only zoom if not focused on a single date\r\n classContext.props.clickHandler(startDate, res.x);\r\n }\r\n });\r\n\r\n })\r\n .on(\"mousedown\", function (x, y, z) {\r\n let mouseCoords = d3.mouse(z[0]);\r\n let res = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n //console.log('downdate', res.x);\r\n classContext.setState({ mouseDownDate: res.x, mouseUpDate: res.x });\r\n });\r\n \r\n d3.select(\"#timeSVG\")\r\n .on(\"mouseout\", function () {\r\n classContext.setState({ mouseDate: null, mouseValue: null, calloutX: 0, calloutY: 0 });\r\n })\r\n .on(\"touchend\", function () {\r\n classContext.setState({ mouseDate: null, mouseValue: null, calloutX: 0, calloutY: 0 });\r\n });\r\n\r\n // d3.select(\"#timeG\")\r\n // .on(\"mouseover\", function (x, y, z) {\r\n // let mouseCoords = d3.mouse(z[0]);\r\n // let res = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n // let xcoord = classContext.xScale(res.x);\r\n // let ycoord = classContext.yScale(res.y);\r\n // let label = res.y.toFixed(4) + \" \" + classContext.props.units + \"\\n\" + new Date(res.x).toLocaleDateString(\"en-US\", {year: \"numeric\", month: \"2-digit\", day: \"2-digit\", hour: \"2-digit\", minute: \"2-digit\"})\r\n // //classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n // if (classContext.state.mouseDownDate != null) {\r\n // //console.log('dragging', res.x);\r\n // classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, mouseUpDate: res.x, label: label });\r\n // classContext.props.zoomHandler(classContext.state.mouseDownDate, res.x);\r\n // } else {\r\n // classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n // }\r\n\r\n // })\r\n // .on(\"touchmove\", function (x, y, z) {\r\n // let mouseCoords = d3.touch(z[0]);\r\n // let res = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n // let xcoord = classContext.xScale(res.x);\r\n // let ycoord = classContext.yScale(res.y);\r\n // let label = res.y.toFixed(4) + \" \" + classContext.props.units + \"\\n\" + new Date(res.x).toLocaleDateString(\"en-US\", {year: \"numeric\", month: \"2-digit\", day: \"2-digit\", hour: \"2-digit\", minute: \"2-digit\"})\r\n // //classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n // if (classContext.state.mouseDownDate != null) {\r\n // //console.log('dragging', res.x);\r\n // classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, mouseUpDate: res.x, label: label });\r\n // classContext.props.zoomHandler(classContext.state.mouseDownDate, res.x);\r\n // } else {\r\n // classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n // }\r\n\r\n // })\r\n // .on(\"mouseup\", function (x,y,z) {\r\n // let mouseCoords = d3.mouse(z[0]);\r\n\r\n // let res = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n // let startDate = classContext.state.mouseDownDate;\r\n // classContext.setState({ mouseUpDate: null, mouseDownDate: null }, () => {\r\n // if (startDate != new Date(res.x)) { // only zoom if not focused on a single date\r\n // classContext.props.clickHandler(startDate, res.x);\r\n // }\r\n // });\r\n\r\n // })\r\n // .on(\"mousedown\", function (x, y, z) {\r\n // let mouseCoords = d3.mouse(z[0]);\r\n // let res = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n // //console.log('downdate', res.x);\r\n // classContext.setState({ mouseDownDate: res.x, mouseUpDate: res.x });\r\n // });\r\n\r\n\r\n\r\n\r\n\r\n\r\n };\r\n\r\n mouseEvent = (event: any) => {\r\n //console.log('mouseevent', event);\r\n let res = this.bisect(event.clientX - this.mouseEventOffset); // hard-coded margein left for now plus something - offset of sorts?\r\n let xcoord = this.xScale(res.x);\r\n let ycoord = this.yScale(res.y);\r\n let label = res.y.toFixed(4) + \" \" + this.props.units + \"\\n\" + new Date(res.x).toLocaleDateString(\"en-US\", {year: \"numeric\", month: \"2-digit\", day: \"2-digit\", hour: \"2-digit\", minute: \"2-digit\"})\r\n //this.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n if (this.state.mouseDownDate != null) {\r\n //console.log('dragging', res.x);\r\n this.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, mouseUpDate: res.x, label: label });\r\n this.props.zoomHandler(this.state.mouseDownDate, res.x);\r\n } else {\r\n this.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n }\r\n }\r\n\r\n mouseLeave = () => {\r\n this.setState({ mouseDate: null, mouseValue: null, calloutX: 0, calloutY: 0 });\r\n }\r\n\r\n mouseClickStart = (event: any) => {\r\n //console.log('start drag', event);\r\n let res = this.bisect(event.clientX - this.mouseEventOffset); // hard-coded margein left for now plus something - offset of sorts?\r\n //console.log('downdate', res.x);\r\n this.setState({ mouseDownDate: res.x, mouseUpDate: res.x });\r\n\r\n }\r\n\r\n mouseClickEnd = (event: any) => {\r\n //console.log('end drag', event);\r\n let res = this.bisect(event.clientX - this.mouseEventOffset); // hard-coded margein left for now plus something - offset of sorts?\r\n let startDate = this.state.mouseDownDate;\r\n this.setState({ mouseUpDate: null, mouseDownDate: null }, () => {\r\n if (startDate != new Date(res.x)) { // only zoom if not focused on a single date\r\n this.props.clickHandler(startDate, res.x);\r\n }\r\n });\r\n }\r\n \r\n render() {\r\n const { svgHeight, svgWidth, data } = this.props;\r\n\r\n const margin = { top: 5, right: 20, bottom: 50, left: 70 };\r\n const width = svgWidth - margin.left - margin.right;\r\n const height = svgHeight - margin.top - margin.bottom;\r\n\r\n // 'range' defines the space on the svg that the element can use (in pixels)\r\n // 'domain' defines the values that will show on the axes\r\n // with range and domain defined, d3 will scale appropriately and create ticks with values on the axes\r\n // if needed, can additionally define how we want ticks formatted (eg 10M instead of 10,000,000)\r\n\r\n\r\n this.xScale = d3.scaleTime()\r\n .domain(d3.extent(this.props.data, d => d.x))\r\n .range([0, width]);\r\n\r\n this.myBisect= d3.bisector(d => d.x).left;\r\n\r\n this.yScale = d3.scaleLinear().range([height, 0]);\r\n\r\n // reductionData & crcData are undefined on first render...\r\n if (data != undefined) {\r\n this.yScale.domain([0, d3.max(data, d => d.y) || 0]);\r\n }\r\n\r\n const axisBottomProps = {\r\n height: height,\r\n scale: this.xScale,\r\n class: \"net-viewer-axis\"\r\n };\r\n\r\n const axisLeftProps = {\r\n scale: this.yScale,\r\n position: height,\r\n class: \"net-viewer-axis\"\r\n };\r\n\r\n\r\n const pathProps = {\r\n data: data,\r\n yScale: this.yScale,\r\n xScale: this.xScale,\r\n height: height,\r\n fill: this.props.fill,\r\n color: this.props.color,\r\n strokeWidth: \"1.0\"\r\n };\r\n\r\n const areaStartEndProps = {\r\n data: [{ x: this.state.mouseDownDate != null && this.state.mouseUpDate != null? this.state.mouseDownDate: this.props.zoomStart, y: 50 }, {x: this.state.mouseUpDate != null && this.state.mouseDownDate != null? this.state.mouseUpDate: this.props.zoomEnd, y: 50}],\r\n yScale: this.yScale,\r\n xScale: this.xScale,\r\n height: height,\r\n fill: \"#AADBFF\",\r\n color: \"#AADBFF\",\r\n key: \"test\"\r\n }\r\n\r\n const calloutProps = {\r\n xvalue: new Date(this.state.mouseDate),\r\n yvalue: this.state.mouseValue,\r\n xCoord: this.state.calloutX,\r\n yCoord: this.state.calloutY,\r\n label: this.state.label\r\n }\r\n\r\n const labelBottomProps = {\r\n text: \"Simulation Date/Time\",\r\n width: width,\r\n height: height,\r\n margin: margin,\r\n fontSize: \"15\"\r\n }\r\n\r\n const labelLeftProps = {\r\n text: this.props.units,\r\n width: width,\r\n height: height,\r\n margin: margin,\r\n fontSize: \"15\"\r\n }\r\n\r\n // NOTE: order of chart pieces is important. first rendered will be in back, with each additional piece overlayed\r\n return (\r\n\r\n
\r\n \r\n \r\n { this.mouseClickStart(event) })}\r\n // onMouseUp={((event) => { this.mouseClickEnd(event) })}\r\n // onTouchMove={((event) => { this.mouseEvent(event) })}\r\n // onMouseMove={((event) => { this.mouseEvent(event) })}\r\n // onTouchEnd={((event) => { this.mouseLeave() })}\r\n // onMouseLeave={((event) => { this.mouseLeave() })}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n }\r\n}","import React, { Component } from \"react\";\r\n// import Measure, { ContentRect } from 'react-measure';\r\nimport ITimeseriesProps from \"../../../interfaces/ITimeseriesProps\";\r\nimport { statement } from \"@babel/template\";\r\nimport TimeseriesSVG from \"./chart/TimeseriesSVG\";\r\n\r\n\r\n\r\nexport class TimeseriesLineChartState {\r\n\r\n}\r\n\r\nexport default class TimeseriesLineChart extends Component {\r\n\r\n state = new TimeseriesLineChartState();\r\n\r\n render() {\r\n return (\r\n \r\n )\r\n };\r\n\r\n}","import { INavHistory } from \"../../interfaces/INavHistory\";\r\n\r\nexport interface IDropdownH2O extends INavHistory {\r\n dropdownItems: DropdownOption[];\r\n dropdownTitle: string;\r\n isMultiselect: boolean;\r\n onSelect: (event: any, data: any, index?: any) => any;\r\n onUpdate?: (classContext: any) => any;\r\n}\r\n\r\nexport class DropdownOption {\r\n optionText: string;\r\n optionValue: any;\r\n}","import React, { Component } from \"react\";\r\nimport IAxisLeftProps from '../interfaces/IAxisLeftProps';\r\nimport * as d3 from 'd3';\r\n\r\nexport default class AxisLeftTicks extends Component {\r\n ref: React.RefObject;\r\n\r\n constructor(props: IAxisLeftProps) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current)\r\n .call(d3.axisLeft(this.props.scale).ticks(this.props.ticks));\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current)\r\n .transition()\r\n .call(d3.axisLeft(this.props.scale).ticks(this.props.ticks));\r\n }\r\n }\r\n\r\n render() {\r\n return ;\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport * as d3 from 'd3';\r\nimport IPathsInverseProps from \"../interfaces/IPathsInverseProps\";\r\nimport IData from \"./../interfaces/IData\";\r\n\r\nexport default class PathsInverse extends Component {\r\n\r\n ref: React.RefObject;\r\n\r\n constructor(props: IPathsInverseProps) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n\r\n }\r\n componentDidUpdate() {\r\n const { data, height, xScale, yScale, color, strokeWidth } = this.props;\r\n var line = d3.line()\r\n .x(function (d) { return xScale(d[0]); })\r\n .y(function (d) { return yScale(d[1]); });\r\n\r\n let segData = this.computeSegments(data, height);\r\n\r\n d3.select(this.ref.current).select(\"#inversePathId\").selectAll('path').remove();\r\n\r\n d3.select(this.ref.current).select(\"#inversePathId\").selectAll('g').data(segData.seg)\r\n .enter()\r\n .append('path')\r\n .attr('d', line)\r\n .transition();\r\n }\r\n\r\n computeSegments = (lineData: Array, height: number) => {\r\n var segments: Array> = new Array>();\r\n lineData.forEach(function (item: IData) {\r\n let segment: Array = new Array();\r\n segment.push([item.id,height]);\r\n segment.push([item.id, item.value]);\r\n //console.log(segments, segment, item);\r\n //return segment;\r\n segments.push(segment);\r\n })\r\n var data = { seg: segments };\r\n //console.log(segments);\r\n return data;\r\n }\r\n\r\n\r\n render() {\r\n const { color, strokeWidth } = this.props;\r\n\r\n return ;\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport IPrecipTimseriesSVGProps from \"./interfaces/IPrecipTimeseriesSVGProps\";\r\nimport * as d3 from 'd3';\r\nimport AxisLeftTicks from \"./chartPieces/AxisLeftTicks\";\r\nimport Callout from \"./chartPieces/Callout\";\r\nimport PathsInverse from \"./chartPieces/PathsInverse\";\r\nimport AreaStartEnd from \"./chartPieces/AreaStartEnd\";\r\nimport IData from \"./interfaces/IData\";\r\nimport IDataXY from \"./interfaces/IDataXY\";\r\nimport LabelLeft from \"./chartPieces/LabelLeft\";\r\nimport LabelBottom from \"./chartPieces/LabelBottom\";\r\nimport { Segment } from \"semantic-ui-react\";\r\n\r\nexport class PrecipTimeseriesSVGState {\r\n mouseDate: Date = null;\r\n mouseValue: number = null;\r\n calloutX: number = null;\r\n calloutY: number = null;\r\n label: string = \"\";\r\n mouseDownDate: Date = null;\r\n mouseUpDate: Date = null;\r\n listenersApplied: boolean = false;\r\n}\r\n\r\n\r\nexport class PrecipTimeSeriesData implements IData {\r\n id: number;\r\n date: string;\r\n value: number;\r\n\r\n constructor(date: Date, value: number) {\r\n this.date = date == null? \"\": date.toLocaleDateString();\r\n this.id = date == null? null: date.getTime();\r\n this.value = value;\r\n }\r\n}\r\n\r\nexport default class PrecipTimeseriesSVG extends Component {\r\n state = new PrecipTimeseriesSVGState();\r\n xScale: any;\r\n yScale: any;\r\n myBisect: any;\r\n\r\n mouseEventOffset: number = 70;\r\n\r\n bisect = (mx: any): IData => {\r\n //console.log('bisect in', mx);\r\n let date = this.xScale.invert(mx);\r\n //console.log('bisect date', date);\r\n let index = this.myBisect(this.props.data, date, 1);\r\n //console.log('bisect index', index);\r\n let a = this.props.data[index - 1];\r\n let b = this.props.data[index];\r\n if (a == null && b != null) { return b; }\r\n if (a != null && b == null) { return a; }\r\n if (a == null && b == null) { return new PrecipTimeSeriesData(null, null ); }\r\n return date - a.id > b.id - date ? b : a;\r\n\r\n }\r\n\r\n componentDidUpdate = () => {\r\n const classContext = this;\r\n\r\n if (!this.props.loading) {\r\n if (!this.state.listenersApplied) {\r\n\r\n this.applyD3Listeners();\r\n this.setState({listenersApplied: true});\r\n };\r\n };\r\n\r\n\r\n\r\n }\r\n\r\n applyD3Listeners = () => {\r\n const classContext = this;\r\n\r\n d3.select('#precipG').append('rect')\r\n .attr('width', this.props.svgWidth)\r\n .attr('height', this.props.svgHeight)\r\n .attr('fill', 'none')\r\n .attr('pointer-events', 'all')\r\n .on(\"mousemove\", function (x, y, z) {\r\n let mouseCoords = d3.mouse(z[0]);\r\n let res: IData = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n if (res != null && res != undefined && res.value != null) {\r\n let xcoord = classContext.xScale(res.id);\r\n let ycoord = classContext.yScale(res.value);\r\n //console.log('mousedata', res);\r\n let label = res.value.toFixed(2) + \" in.\" + \"\\n\" + new Date(res.id).toLocaleDateString(\"en-US\", { year: \"numeric\", month: \"2-digit\", day: \"2-digit\", hour: \"2-digit\", minute: \"2-digit\" })\r\n //classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n if (classContext.state.mouseDownDate != null) {\r\n //console.log('dragging', res.x);\r\n classContext.setState({ mouseDate: res.id, mouseValue: res.value, calloutX: xcoord, calloutY: ycoord, mouseUpDate: res.id, label: label });\r\n classContext.props.zoomHandler(classContext.state.mouseDownDate, res.id);\r\n } else {\r\n classContext.setState({ mouseDate: res.id, mouseValue: res.value, calloutX: xcoord, calloutY: ycoord, label: label });\r\n }\r\n \r\n }\r\n\r\n })\r\n .on(\"touchmove\", function (x, y, z) {\r\n let mouseCoords = d3.touch(z[0]);\r\n let res: IData = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n if (res != null && res != undefined && res.value != null) {\r\n let xcoord = classContext.xScale(res.id);\r\n let ycoord = classContext.yScale(res.value);\r\n //console.log('mousedata', res);\r\n let label = res.value.toFixed(2) + \" in.\" + \"\\n\" + new Date(res.id).toLocaleDateString(\"en-US\", { year: \"numeric\", month: \"2-digit\", day: \"2-digit\", hour: \"2-digit\", minute: \"2-digit\" })\r\n //classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n if (classContext.state.mouseDownDate != null) {\r\n //console.log('dragging', res.x);\r\n classContext.setState({ mouseDate: res.id, mouseValue: res.value, calloutX: xcoord, calloutY: ycoord, mouseUpDate: res.id, label: label });\r\n classContext.props.zoomHandler(classContext.state.mouseDownDate, res.id);\r\n } else {\r\n classContext.setState({ mouseDate: res.id, mouseValue: res.value, calloutX: xcoord, calloutY: ycoord, label: label });\r\n }\r\n \r\n }\r\n\r\n })\r\n .on(\"mousedown\", function (x, y, z) {\r\n let mouseCoords = d3.mouse(z[0]);\r\n let res = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n //console.log('downdate', res.x);\r\n classContext.setState({ mouseDownDate: res.id, mouseUpDate: res.id });\r\n })\r\n .on(\"mouseup\", function (x ,y, z) {\r\n let mouseCoords = d3.mouse(z[0]);\r\n let res = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n let startDate = classContext.state.mouseDownDate;\r\n classContext.setState({ mouseUpDate: null, mouseDownDate: null }, () => {\r\n if (startDate != new Date(res.id)) { // only zoom if not focused on a single date\r\n classContext.props.clickHandler(startDate, res.id);\r\n }\r\n });\r\n\r\n });\r\n\r\n d3.select(\"#precipSVG\").on(\"mouseout\", function () {\r\n classContext.setState({ mouseDate: null, mouseValue: null, calloutX: 0, calloutY: 0 });\r\n })\r\n .on(\"touchend\", function () {\r\n classContext.setState({ mouseDate: null, mouseValue: null, calloutX: 0, calloutY: 0 });\r\n });\r\n\r\n }\r\n\r\n\r\n // componentDidMount = () => {\r\n\r\n // const classContext = this;\r\n\r\n // d3.select(\"#precipG\")\r\n // .on(\"mouseover\", function (x, y, z) {\r\n // let mouseCoords = d3.mouse(z[0]);\r\n // let res: IData = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n // if (res != null && res != undefined && res.value != null) {\r\n // let xcoord = classContext.xScale(res.id);\r\n // let ycoord = classContext.yScale(res.value);\r\n // //console.log('mousedata', res);\r\n // let label = res.value.toFixed(2) + \" in.\" + \"\\n\" + new Date(res.id).toLocaleDateString(\"en-US\", { year: \"numeric\", month: \"2-digit\", day: \"2-digit\", hour: \"2-digit\", minute: \"2-digit\" })\r\n // //classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n // if (classContext.state.mouseDownDate != null) {\r\n // //console.log('dragging', res.x);\r\n // classContext.setState({ mouseDate: res.id, mouseValue: res.value, calloutX: xcoord, calloutY: ycoord, mouseUpDate: res.id, label: label });\r\n // classContext.props.zoomHandler(classContext.state.mouseDownDate, res.id);\r\n // } else {\r\n // classContext.setState({ mouseDate: res.id, mouseValue: res.value, calloutX: xcoord, calloutY: ycoord, label: label });\r\n // }\r\n \r\n // }\r\n\r\n // })\r\n // .on(\"touchmove\", function (x, y, z) {\r\n // let mouseCoords = d3.touch(z[0]);\r\n // let res: IData = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n // if (res != null && res != undefined && res.value != null) {\r\n // let xcoord = classContext.xScale(res.id);\r\n // let ycoord = classContext.yScale(res.value);\r\n // //console.log('mousedata', res);\r\n // let label = res.value.toFixed(2) + \" in.\" + \"\\n\" + new Date(res.id).toLocaleDateString(\"en-US\", { year: \"numeric\", month: \"2-digit\", day: \"2-digit\", hour: \"2-digit\", minute: \"2-digit\" })\r\n // //classContext.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n // if (classContext.state.mouseDownDate != null) {\r\n // //console.log('dragging', res.x);\r\n // classContext.setState({ mouseDate: res.id, mouseValue: res.value, calloutX: xcoord, calloutY: ycoord, mouseUpDate: res.id, label: label });\r\n // classContext.props.zoomHandler(classContext.state.mouseDownDate, res.id);\r\n // } else {\r\n // classContext.setState({ mouseDate: res.id, mouseValue: res.value, calloutX: xcoord, calloutY: ycoord, label: label });\r\n // }\r\n \r\n // }\r\n\r\n // })\r\n // .on(\"mousedown\", function (x, y, z) {\r\n // let mouseCoords = d3.mouse(z[0]);\r\n // let res = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n // //console.log('downdate', res.x);\r\n // classContext.setState({ mouseDownDate: res.id, mouseUpDate: res.id });\r\n // })\r\n // .on(\"mouseup\", function (x ,y, z) {\r\n // let mouseCoords = d3.mouse(z[0]);\r\n // let res = classContext.bisect(mouseCoords[0]); // hard-coded margein left for now plus something - offset of sorts?\r\n // let startDate = classContext.state.mouseDownDate;\r\n // classContext.setState({ mouseUpDate: null, mouseDownDate: null }, () => {\r\n // if (startDate != new Date(res.id)) { // only zoom if not focused on a single date\r\n // classContext.props.clickHandler(startDate, res.id);\r\n // }\r\n // });\r\n\r\n // });\r\n\r\n // d3.select(\"#precipSVG\").on(\"mouseout\", function () {\r\n // classContext.setState({ mouseDate: null, mouseValue: null, calloutX: 0, calloutY: 0 });\r\n // })\r\n // .on(\"touchend\", function () {\r\n // classContext.setState({ mouseDate: null, mouseValue: null, calloutX: 0, calloutY: 0 });\r\n // });\r\n\r\n // }\r\n\r\n mouseEvent = (event: any) => {\r\n //console.log('mouseevent', event);\r\n let res: IData = this.bisect(event.clientX - this.mouseEventOffset); // hard-coded margein left for now plus something - offset of sorts?\r\n if (res != null && res != undefined && res.value != null) {\r\n let xcoord = this.xScale(res.id);\r\n let ycoord = this.yScale(res.value);\r\n //console.log('mousedata', res);\r\n let label = res.value.toFixed(2) + \" in.\" + \"\\n\" + new Date(res.id).toLocaleDateString(\"en-US\", { year: \"numeric\", month: \"2-digit\", day: \"2-digit\", hour: \"2-digit\", minute: \"2-digit\" })\r\n //this.setState({ mouseDate: res.x, mouseValue: res.y, calloutX: xcoord, calloutY: ycoord, label: label });\r\n if (this.state.mouseDownDate != null) {\r\n //console.log('dragging', res.x);\r\n this.setState({ mouseDate: res.id, mouseValue: res.value, calloutX: xcoord, calloutY: ycoord, mouseUpDate: res.id, label: label });\r\n this.props.zoomHandler(this.state.mouseDownDate, res.id);\r\n } else {\r\n this.setState({ mouseDate: res.id, mouseValue: res.value, calloutX: xcoord, calloutY: ycoord, label: label });\r\n }\r\n\r\n }\r\n }\r\n\r\n mouseLeave = () => {\r\n this.setState({ mouseDate: null, mouseValue: null, calloutX: 0, calloutY: 0 });\r\n }\r\n\r\n mouseClickStart = (event: any) => {\r\n //console.log('start drag', event);\r\n let res = this.bisect(event.clientX - this.mouseEventOffset); // hard-coded margein left for now plus something - offset of sorts?\r\n //console.log('downdate', res.x);\r\n this.setState({ mouseDownDate: res.id, mouseUpDate: res.id });\r\n\r\n }\r\n\r\n mouseClickEnd = (event: any) => {\r\n //console.log('end drag', event);\r\n let res = this.bisect(event.clientX - this.mouseEventOffset); // hard-coded margein left for now plus something - offset of sorts?\r\n let startDate = this.state.mouseDownDate;\r\n this.setState({ mouseUpDate: null, mouseDownDate: null }, () => {\r\n if (startDate != new Date(res.id)) { // only zoom if not focused on a single date\r\n this.props.clickHandler(startDate, res.id);\r\n }\r\n });\r\n }\r\n\r\n render() {\r\n const { svgHeight, svgWidth, data } = this.props;\r\n\r\n const margin = { top: 10, right: 20, bottom: 45, left: 70 };\r\n const width = svgWidth - margin.left - margin.right;\r\n const height = svgHeight - margin.top - margin.bottom;\r\n\r\n // 'range' defines the space on the svg that the element can use (in pixels)\r\n // 'domain' defines the values that will show on the axes\r\n // with range and domain defined, d3 will scale appropriately and create ticks with values on the axes\r\n // if needed, can additionally define how we want ticks formatted (eg 10M instead of 10,000,000)\r\n\r\n\r\n this.xScale = d3.scaleTime()\r\n .domain(d3.extent(this.props.data, d => d.id))\r\n .range([0, width]);\r\n\r\n this.myBisect = d3.bisector(d => d.id).left;\r\n\r\n this.yScale = d3.scaleLinear().range([0, height]);\r\n\r\n // reductionData & crcData are undefined on first render...\r\n if (data != undefined) {\r\n this.yScale.domain([0, d3.max(data, d => d.value) || 0]);\r\n }\r\n\r\n const axisLeftProps = {\r\n scale: this.yScale,\r\n ticks: 3,\r\n class: \"net-viewer-axis\"\r\n };\r\n\r\n const pathsInverseProps = {\r\n data: data,\r\n yScale: this.yScale,\r\n xScale: this.xScale,\r\n height: 0,\r\n color: this.props.color,\r\n strokeWidth: \"2.0\"\r\n }\r\n\r\n const calloutProps = {\r\n xvalue: new Date(this.state.mouseDate),\r\n yvalue: this.state.mouseValue,\r\n xCoord: this.state.calloutX,\r\n yCoord: this.state.calloutY,\r\n label: this.state.label\r\n }\r\n\r\n const areaStartEndProps = {\r\n data: [{ x: this.state.mouseDownDate != null && this.state.mouseUpDate != null ? this.state.mouseDownDate : this.props.zoomStart, y: 50 }, { x: this.state.mouseUpDate != null && this.state.mouseDownDate != null ? this.state.mouseUpDate : this.props.zoomEnd, y: 50 }],\r\n yScale: this.yScale,\r\n xScale: this.xScale,\r\n height: height,\r\n fill: \"#AADBFF\",\r\n color: \"#AADBFF\",\r\n key: \"test\"\r\n }\r\n\r\n const labelLeftProps = {\r\n text: \"inches\",\r\n width: width,\r\n height: height,\r\n margin: margin,\r\n fontSize: \"15\"\r\n }\r\n\r\n const labelBottomProps = {\r\n text: this.props.noData == true? this.props.precipMsg: \"\",\r\n width: width,\r\n height: height / 2,\r\n margin: margin,\r\n fontSize: \"15\"\r\n }\r\n\r\n\r\n // NOTE: order of chart pieces is important. first rendered will be in back, with each additional piece overlayed\r\n return (\r\n \r\n { this.mouseClickStart(event) })}\r\n // onMouseUp={((event) => { this.mouseClickEnd(event) })}\r\n // onTouchMove={((event) => { this.mouseEvent(event) })} \r\n // onMouseMove={((event) => { this.mouseEvent(event) })} \r\n // onTouchEnd={(() => { this.mouseLeave() })} \r\n // onMouseLeave={(() => { this.mouseLeave() })} \r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}","import React, { Component } from \"react\";\r\n// import Measure, { ContentRect } from 'react-measure';\r\nimport IPrecipTimeseriesProps from \"../../../interfaces/IPrecipTimeseriesProps\";\r\nimport { statement } from \"@babel/template\";\r\nimport TimeseriesSVG from \"./chart/TimeseriesSVG\";\r\nimport PrecipTimeseriesSVG from \"./chart/PrecipTimeseriesSVG\";\r\n\r\n\r\n\r\nexport class PrecipTimeseriesChartState {\r\n\r\n}\r\n\r\nexport default class PrecipTimeseriesChart extends Component {\r\n\r\n state = new PrecipTimeseriesChartState();\r\n\r\n render() {\r\n return (\r\n \r\n )\r\n };\r\n\r\n}","import React, { Component } from \"react\";\r\nimport './Dropdown.css';\r\nimport { Label, Dropdown, Grid } from \"semantic-ui-react\";\r\nimport { IDropdownH2O, DropdownOption } from \"./IDropdownProps\";\r\n\r\n\r\nexport default class DropdownH2O extends Component {\r\n\r\n state = {\r\n value: -1,\r\n loading: true\r\n }\r\n \r\n componentDidMount = () => {\r\n \r\n if (this.props.dropdownItems.length > 0) {\r\n \r\n this.setState({\r\n loading: false,\r\n value: this.props.dropdownItems[0].optionValue\r\n }, () => {\r\n // if (this.props.onUpdate) {\r\n // this.props.onUpdate(this);\r\n // };\r\n });\r\n };\r\n };\r\n \r\n componentDidUpdate = () => {\r\n if (this.props.onUpdate) {\r\n this.props.onUpdate(this);\r\n };\r\n };\r\n\r\n manageChangeOnSingle = (event: any, data) => {\r\n // console.log(\"single\", event, data)\r\n\r\n this.setState({\r\n value: data.value,\r\n }, () => {\r\n this.props.onSelect(event, data);\r\n });\r\n }\r\n\r\n manageChangeOnMultiple = (event: any, data: any) => {\r\n console.log(\"multiple\", event, data)\r\n\r\n }\r\n\r\n createOptions = () => {\r\n if (this.props.dropdownItems !== null && this.props.dropdownItems !== undefined) {\r\n return this.props.dropdownItems.map((o: DropdownOption, index: number) => {\r\n return { key: index, text: o.optionText, value: o.optionValue} \r\n });\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n {\r\n this.props.isMultiselect && \r\n
\r\n
\r\n {this.props.dropdownTitle}:\r\n
\r\n { this.manageChangeOnMultiple(event, data) }}\r\n disabled={this.props.dropdownItems.length < 2}\r\n multiple \r\n selection>\r\n \r\n \r\n
\r\n }\r\n {\r\n !this.props.isMultiselect &&\r\n
\r\n
\r\n {this.props.dropdownTitle}:\r\n
\r\n { this.manageChangeOnSingle(event, data) }}\r\n disabled={this.props.dropdownItems.length < 2}\r\n value={this.state.value}\r\n selection>\r\n \r\n \r\n
\r\n }\r\n
\r\n )\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport './hrefLink.css';\r\nimport { IHrefLinkProps } from \"../../interfaces/IHrefLinkProps\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport ModelDownloads from \"../../models/ModelDownload\";\r\nimport { Icon } from \"semantic-ui-react\";\r\n\r\n\r\nexport class HrefLinkState {\r\n\r\n}\r\n\r\nexport default class HrefLink extends Component {\r\n\r\n state = new HrefLinkState();\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n\r\n }\r\n\r\n\r\n hrefClick = () => {\r\n let classContext: HrefLink = this;\r\n if (classContext.props.newTab == true) {\r\n window.open(classContext.props.endpointUrl);\r\n }\r\n else {\r\n window.location.href = classContext.props.endpointUrl;\r\n }\r\n };\r\n\r\n\r\n\r\n render() {\r\n\r\n let classContext: HrefLink = this;\r\n\r\n return (\r\n classContext.hrefClick()}>\r\n {classContext.props.bold != true && \r\n classContext.props.linkText\r\n }\r\n {classContext.props.bold == true &&\r\n {classContext.props.linkText}\r\n }\r\n {classContext.props.icon != null &&\r\n }\r\n \r\n );\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport './networkSidePanel.css';\r\nimport { identifier } from \"@babel/types\";\r\nimport { INetworkViewer } from \"../../../interfaces/INetworkViewer\";\r\nimport { networkviewer } from \"../../../models/networkAP\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport IDataXY from \"../../Optimization/D3/chart/interfaces/IDataXY\";\r\nimport { networktimeseriesitem, networktimeseries } from \"../../../models/networktimeseries\";\r\nimport { networkdownload } from \"../../../models/networkdownload\";\r\nimport { Label, Dropdown, Button, Table, TableHeader, TableRow, TableBody } from \"semantic-ui-react\";\r\nimport logo from '../../../images/WMMS_logo_full.png';\r\nimport ResponsiveChart from \"../../Optimization/D3/ResponsiveChart\";\r\nimport TimeseriesLineChart from \"../../Optimization/D3/TimeseriesLineChart\";\r\nimport { DropdownOption } from \"../../DOMObjects/IDropdownProps\"\r\nimport DropDownH20 from \"../../DOMObjects/Dropdown\"\r\nimport PrecipTimeseriesChart from \"../../Optimization/D3/PrecipTimeseriesChart\";\r\nimport Config from \"../../../config/Config\";\r\nimport DropdownH2O from \"../../DOMObjects/Dropdown\";\r\nimport { PrecipTimeSeriesData } from \"../../Optimization/D3/chart/PrecipTimeseriesSVG\";\r\nimport DataXY from \"../../Optimization/D3/chart/interfaces/IDataXY\";\r\nimport HrefLink from \"../../../core/hrefLink/hrefLink\";\r\n\r\n\r\nexport class NetworkSidePanelState {\r\n viewToShow: number = 1;\r\n firstDropdownSelection: string = \"\";\r\n secondDropdownSelection: string = \"\";\r\n thirdDropdownSelection: string = \"\";\r\n thirdDropDownOptions: [];\r\n thirdDropdownIndex: number = 0;\r\n timeseriesData: Array;\r\n preciptimeseriesData: Array;\r\n outData: networktimeseries;\r\n preData: networktimeseries;\r\n selAP: string = \"\";\r\n timeseriesStats: TimeseriesStats = new TimeseriesStats();\r\n startDate: number;\r\n endDate: number;\r\n zoomed: boolean = false;\r\n zoomingStartDate: number;\r\n zoomingEndDate: number;\r\n numFadeOut: boolean = false;\r\n dataUnits: string = \"\";\r\n downloadFileSpinner: boolean = false;\r\n statRound: number = 2;\r\n}\r\n\r\nexport class TimeseriesStats {\r\n min: number;\r\n max: number;\r\n average: number;\r\n perc5: number;\r\n perc10: number;\r\n perc25: number;\r\n perc50: number;\r\n perc75: number;\r\n perc90: number;\r\n perc95: number;\r\n stdev: number;\r\n variationCoeff: number; \r\n}\r\n\r\nexport class TimeseriesData {\r\n x: number;\r\n y: number;\r\n}\r\n\r\nexport default class NetworkSidePanel extends Component {\r\n\r\n state = new NetworkSidePanelState();\r\n\r\n constituentMapping: any[] = [\r\n { index: 0, constituent: \"Flow Rate\", units: \"cfs\" }, \r\n { index: 1, constituent: \"Total Suspended Solids\", units: \"mg/l\" }, \r\n { index: 2, constituent: \"Total Nitrogen\", units: \"mg/l\" }, \r\n { index: 3, constituent: \"Total Phosphorous\", units: \"mg/l\" }, \r\n { index: 4, constituent: \"Total Cadmium\", units: \"ug/l\" }, \r\n { index: 5, constituent: \"Total Copper\", units: \"ug/l\" }, \r\n { index: 6, constituent: \"Total Lead\", units: \"ug/l\" }, \r\n { index: 7, constituent: \"Total Zinc\", units: \"ug/l\" } \r\n ]\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n this.buildTimeseriesData();\r\n }\r\n\r\n componentDidUpdate() {\r\n // Selecting a new / different assessment point from the map\r\n if (this.props.apData != null && this.props.apData.assessmentPointId != null && this.props.apData.assessmentPointId != this.state.selAP) {\r\n this.setState({ selAP: this.props.apData.assessmentPointId, loading: true }, () => {\r\n this.setDropDowns();\r\n })\r\n }\r\n }\r\n\r\n handleDateChange = (downClick: number, upClick: number) => {\r\n console.log('handle clicks sidepanel', downClick, upClick);\r\n if (downClick != null && upClick != null && downClick != upClick) {\r\n if (downClick < upClick) {\r\n this.setState({\r\n startDate: downClick,\r\n endDate: upClick,\r\n zoomed: true, \r\n zoomingStartDate: null,\r\n zoomingEndDate: null\r\n }, () => { this.buildTimeseriesData(); })\r\n } else {\r\n this.setState({\r\n startDate: upClick,\r\n endDate: downClick,\r\n zoomed: true,\r\n zoomingStartDate: null,\r\n zoomingEndDate: null\r\n }, () => { this.buildTimeseriesData(); })\r\n }\r\n }\r\n }\r\n\r\n zoomingHandler = (zoomStart: number, zoomEnd: number) => {\r\n if (zoomStart != null && zoomEnd != null) {\r\n this.setState({ zoomingStartDate: zoomStart, zoomingEndDate: zoomEnd });\r\n } else {\r\n this.setState({ zoomingStartDate: null, zoomingEndDate: null });\r\n }\r\n }\r\n\r\n resetZoom = () => {\r\n if (this.state.outData != null) {\r\n let startDate = Date.parse(this.state.outData.data[0].date.toString());\r\n let endDate = Date.parse(this.state.outData.data[this.state.outData.data.length - 1].date.toString());\r\n this.setState({\r\n startDate: startDate,\r\n endDate: endDate,\r\n zoomed: false,\r\n zoomingStartDate: null,\r\n zoomingEndDate: null\r\n }, () => { this.buildTimeseriesData(); })\r\n }\r\n }\r\n\r\n buildTimeseriesData = () => {\r\n if (this.state.outData != null) {\r\n var coordinates = this.state.outData.data.map((i: networktimeseriesitem) => ({ x: Date.parse(i.date.toString()), y: i.values[this.state.thirdDropdownIndex] })).filter((item: TimeseriesData) => (item.x >= this.state.startDate && item.x <= this.state.endDate));\r\n if (coordinates.length > 16600) { // create subset if dataset is too large\r\n //console.log('too large', coordinates.length);\r\n let group: number = Math.round(coordinates.length / 10000); // target about 10000 points when done...\r\n let coordinatesGroup: Array = new Array();\r\n let groupCnt: number = 0;\r\n let maxItem: DataXY = { x: -1, y: -1 };\r\n coordinatesGroup.push(coordinates[0]);\r\n for (var i = 0; i < coordinates.length; i++) {\r\n if (maxItem.y < coordinates[i].y) {\r\n maxItem.x = coordinates[i].x;\r\n maxItem.y = coordinates[i].y;\r\n }\r\n\r\n if (groupCnt >= group) {\r\n groupCnt = 0;\r\n if (maxItem.x > -1) {\r\n coordinatesGroup.push(maxItem);\r\n }\r\n maxItem = { x: -1, y: -1 };\r\n }\r\n\r\n groupCnt++;\r\n }\r\n coordinatesGroup.push(coordinates[coordinates.length - 1]);\r\n coordinates = coordinatesGroup;\r\n }\r\n //console.log('coordinates', coordinates.length);\r\n coordinates = this.padTimeseriesData(coordinates);\r\n this.props.updateLoadingFunction(false, \"\", this.props.networkContext);\r\n this.setState({ timeseriesData: coordinates }, () => { this.buildTimeseriesStats();});\r\n } else {\r\n this.props.updateLoadingFunction(false, \"\", this.props.networkContext);\r\n this.setState({ timeseriesData: [{ x: 0, y: 0 }]});\r\n }\r\n\r\n if (this.state.preData != null) {\r\n let coordinates: Array = this.state.preData.data.map((i: networktimeseriesitem) => (new PrecipTimeSeriesData(new Date(i.date.toString()), i.values[0]))).filter((item: PrecipTimeSeriesData) => (item.id >= this.state.startDate && item.id <= this.state.endDate));\r\n //if (coordinates.length > 10000) { console.log('too large pre', coordinates.length);}\r\n //.filter((item: PrecipTimeSeriesData) => (item.id >= this.state.startDate && item.id <= this.state.endDate))\r\n let msg: string = \"No Precipitation Data Found\";\r\n if (coordinates.length > 0) { msg = \"\"; }\r\n coordinates = this.padPrecipTimeseriesData(coordinates);\r\n this.props.updateLoadingFunction(null, msg, this.props.networkContext);\r\n this.setState({ preciptimeseriesData: coordinates });\r\n } else {\r\n this.props.updateLoadingFunction(null, \"No Precipitation Data Found\", this.props.networkContext);\r\n this.setState({ preciptimeseriesData: [{ x: 0, y: 0 }] });\r\n }\r\n }\r\n\r\n padTimeseriesData = (coordinates: Array) => {\r\n if (coordinates.length > 0) {\r\n if (coordinates[0].x > this.state.startDate) { coordinates.splice(0, 0, { x: this.state.startDate, y: 0 }); }\r\n if (coordinates[coordinates.length - 1].x < this.state.endDate) { coordinates.push({ x: this.state.endDate, y: 0 }); }\r\n } else {\r\n coordinates.push({ x: this.state.startDate, y: 0 });\r\n coordinates.push({ x: this.state.endDate, y: 0 });\r\n }\r\n return coordinates;\r\n }\r\n\r\n padPrecipTimeseriesData = (coordinates: Array) => {\r\n if (coordinates.length > 0) {\r\n if (coordinates[0].id > this.state.startDate) { coordinates.splice(0, 0, new PrecipTimeSeriesData(new Date(this.state.startDate), 0 )); }\r\n if (coordinates[coordinates.length - 1].id < this.state.endDate) { coordinates.push(new PrecipTimeSeriesData(new Date(this.state.endDate), 0)); }\r\n } else {\r\n coordinates.push(new PrecipTimeSeriesData(new Date(this.state.startDate), 0));\r\n coordinates.push(new PrecipTimeSeriesData(new Date(this.state.endDate), 0));\r\n }\r\n return coordinates;\r\n }\r\n\r\n buildTimeseriesStats = () => {\r\n let stats: TimeseriesStats = new TimeseriesStats();\r\n if (this.state.outData != null) {\r\n let dataArr: number[] = new Array();\r\n this.state.timeseriesData.map((item) => { dataArr.push(item.y); });\r\n dataArr.sort((a: number, b: number) => { return a - b; });\r\n stats.min = dataArr[0];\r\n stats.max = dataArr[dataArr.length - 1];\r\n stats.average = dataArr.reduce((a, b) => a + b, 0) / dataArr.length;\r\n\r\n stats.perc5 = this.quartile(dataArr, 0.05);\r\n stats.perc10 = this.quartile(dataArr, 0.10);\r\n stats.perc25 = this.quartile(dataArr, 0.25);\r\n stats.perc50 = this.quartile(dataArr, 0.5);\r\n stats.perc75 = this.quartile(dataArr, 0.75);\r\n stats.perc90 = this.quartile(dataArr, 0.90);\r\n stats.perc95 = this.quartile(dataArr, 0.95);\r\n\r\n //st.dev\r\n const n = dataArr.length;\r\n const mean = dataArr.reduce((a, b) => a + b) / n;\r\n stats.stdev = Math.sqrt(dataArr.map(x => Math.pow(x - mean, 2)).reduce((a, b) => a + b) / n);\r\n\r\n stats.variationCoeff = stats.stdev / stats.average;\r\n } \r\n\r\n let rounding: number = 2;\r\n if (stats.max == null) { rounding = 2; }\r\n else if (stats.max > 100) { rounding = 1; }\r\n else if (stats.max <= 100 && stats.max > 10) { rounding = 2; }\r\n else if (stats.max <= 10.0) { rounding = 3; }\r\n \r\n this.setState({ numFadeOut: true }, () => {\r\n setTimeout(() => {\r\n //run or call logic here with timeout to animate table numebers \r\n this.setState({ numFadeOut: false, timeseriesStats: stats, statRound: rounding });\r\n }, 500);\r\n })\r\n\r\n }\r\n\r\n quartile = (data, q) => {\r\n var pos = ((data.length) - 1) * q;\r\n var base = Math.floor(pos);\r\n var rest = pos - base;\r\n if ((data[base + 1] !== undefined)) {\r\n return data[base] + rest * (data[base + 1] - data[base]);\r\n } else {\r\n return data[base];\r\n }\r\n }\r\n\r\n setDropDowns = () => {\r\n // figure out initial selections\r\n \r\n let distinctSimulations: string[] = this.props.apData.data.map(item => item.simulation).filter((value, index, self) => self.indexOf(value) === index);\r\n let selSimulation: string = distinctSimulations[0];;\r\n if (distinctSimulations.indexOf(\"Long Term\") > -1) {\r\n selSimulation = \"Long Term\";\r\n } \r\n\r\n let eventOptions = this.props.apData.data.filter((item) => item.simulation == selSimulation).map(item => item.event);\r\n let selEvent: string = eventOptions[0];\r\n if (eventOptions.indexOf(\"Daily\") > -1) {\r\n selEvent = \"Daily\";\r\n }\r\n\r\n this.setState({ firstDropdownSelection: selSimulation, secondDropdownSelection: selEvent }, () => { this.getAssessmentPointData(selSimulation, selEvent);})\r\n\r\n }\r\n\r\n updateDropdownOne = (classContext: any) => {\r\n if (classContext.props.dropdownItems.length > 0) {\r\n if (classContext.state.value !== this.state.firstDropdownSelection) {\r\n classContext.setState({value: this.state.firstDropdownSelection, loading: false})\r\n };\r\n };\r\n }\r\n\r\n updateDropdownTwo = (classContext: any) => {\r\n if (classContext.props.dropdownItems.length > 0) {\r\n if (classContext.state.value !== this.state.secondDropdownSelection) {\r\n classContext.setState({value: this.state.secondDropdownSelection, loading: false})\r\n };\r\n };\r\n };\r\n\r\n updateDropdownThree = (classContext: any) => {\r\n if (classContext.props.dropdownItems.length > 0) {\r\n if (classContext.state.value !== this.state.thirdDropdownSelection) {\r\n classContext.setState({value: this.state.thirdDropdownSelection, loading: false})\r\n };\r\n };\r\n\r\n\r\n\r\n if (classContext.props.dropdownItems.length > 0) {\r\n this.constituentMapping.forEach((m) => {\r\n if (this.state.thirdDropdownSelection == m.constituent) {\r\n if (this.state.dataUnits !== m.units ) {\r\n this.setState({dataUnits: m.units})\r\n };\r\n };\r\n });\r\n };\r\n };\r\n\r\n downloadFile = () => {\r\n let dataPath: string = this.props.apData.data.filter(item => item.simulation == this.state.firstDropdownSelection && item.event == this.state.secondDropdownSelection)[0].outFile;\r\n if (dataPath != null && dataPath.length > 0) {\r\n this.setState({ downloadFileSpinner: true });\r\n let filename: string = dataPath.replace(/^.*[\\\\\\/]/, '');\r\n networkdownload.axiosGetAll({ path: dataPath }).then((r: AxiosResponse) => {\r\n const blob = new Blob([r.data], { type: 'text/plain' });\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(blob, filename);\r\n } else {\r\n var link = document.createElement('a');\r\n var href = window.URL.createObjectURL(blob);\r\n link.setAttribute('href', href);\r\n link.setAttribute('download', filename);\r\n document.body.appendChild(link);\r\n link.click();\r\n setTimeout(() => {\r\n window.URL.revokeObjectURL(href);\r\n document.body.removeChild(link);\r\n }, 0)\r\n this.setState({ downloadFileSpinner: false });\r\n }\r\n }).catch((r: AxiosResponse) => {\r\n console.log('error download', r);\r\n this.setState({ downloadFileSpinner: false });\r\n })\r\n }\r\n \r\n }\r\n\r\n getAssessmentPointData = (simulation: string, event: string) => {\r\n let dataPath: string = this.props.apData.data.filter(item => item.simulation == simulation && item.event == event)[0].outFile;\r\n let prePath: string = this.props.apData.data.filter(item => item.simulation == simulation && item.event == event)[0].preFile;\r\n // get first file based on initial selection\r\n\r\n // fetch out data\r\n networktimeseries.axiosGetAll({ path: dataPath }).then((r: AxiosResponse) => {\r\n //console.log('out data res', r.data);\r\n let outData: networktimeseries = r.data;\r\n let thirdOptions = [];\r\n //console.log('get data', this.constituentMapping);\r\n for (let i: number = 0; i < outData.data[0].values.length; i++) {\r\n //console.log('in loop', i, outData.data[0].values.length, this.constituentMapping[i])\r\n if (i < this.constituentMapping.length) {\r\n thirdOptions.push(this.constituentMapping[i].constituent);\r\n }\r\n }\r\n let startDate = Date.parse(outData.data[0].date.toString());\r\n let endDate = Date.parse(outData.data[outData.data.length -1].date.toString());\r\n this.setState({ outData: outData, thirdDropdownSelection: thirdOptions[0], thirdDropDownOptions: thirdOptions, thirdDropdownIndex: 0, startDate: startDate, endDate: endDate }, () => {\r\n if (prePath == null || prePath.length == 0) {\r\n this.setState({ preData: new networktimeseries(), preciptimeseriesData: new Array() }, () => {\r\n this.buildTimeseriesData();\r\n })\r\n } else {\r\n // fetch pre data\r\n networktimeseries.axiosGetAll({ path: prePath }).then((r: AxiosResponse) => {\r\n //console.log('out data res', r.data);\r\n let preData: networktimeseries = r.data;\r\n this.setState({ preData: preData }, () => {\r\n this.buildTimeseriesData();\r\n });\r\n }).catch((r: AxiosResponse) => {\r\n console.log('error getting data', r);\r\n this.props.updateLoadingFunction(false, \"Error retrieving data\", this.props.networkContext);\r\n\r\n });\r\n }\r\n });\r\n }).catch((r: AxiosResponse) => {\r\n console.log('error getting data', r);\r\n this.props.updateLoadingFunction(false, \"Error retrieving data\", this.props.networkContext);\r\n });\r\n }\r\n\r\n\r\n\r\n dropdownFuctionOne = (event: any, data: any, index: any) => {\r\n\r\n\r\n if (this.props.apData != null && this.props.apData.data != null) {\r\n let selEvent = this.props.apData.data.filter((item) => item.simulation == data.value)[0].event;\r\n this.props.updateLoadingFunction(true, \"Loading...\", this.props.networkContext);\r\n this.setState({ firstDropdownSelection: data.value, secondDropdownSelection: selEvent }, () => {\r\n this.getAssessmentPointData(data.value, selEvent);\r\n });\r\n };\r\n\r\n }\r\n\r\n\r\n getFirstDropdownOptions = (): DropdownOption[] => {\r\n\r\n if (this.props.apData != null && this.props.apData.data != null) {\r\n return this.props.apData.data.map(item => item.simulation).filter((value, index, self) => self.indexOf(value) === index).map((option, index) => {\r\n let dropOption = new DropdownOption();\r\n dropOption.optionText = option;\r\n dropOption.optionValue = option;\r\n return dropOption;\r\n });\r\n } else {\r\n return [];\r\n };\r\n\r\n };\r\n\r\n\r\n dropdownFunctionTwo = (event: any, data: any, index: any) => {\r\n this.props.updateLoadingFunction(true, \"Loading...\", this.props.networkContext);\r\n this.setState({ secondDropdownSelection: data.value}, () => {\r\n this.getAssessmentPointData(this.state.firstDropdownSelection, data.value);\r\n });\r\n }\r\n\r\n getSecondDropdownOptions = (): DropdownOption[] => {\r\n \r\n\r\n if (this.props.apData != null && this.props.apData.data != null ) {\r\n\r\n return this.props.apData.data.filter((item) => item.simulation == this.state.firstDropdownSelection).map((option, index) => {\r\n let dropOption = new DropdownOption();\r\n dropOption.optionText = option.event;\r\n dropOption.optionValue = option.event;\r\n return dropOption;\r\n });\r\n\r\n } else {\r\n return [];\r\n };\r\n \r\n\r\n };\r\n\r\n dropdownFunctionThree = (event: any, data: any, index: any) => {\r\n // add unit selection here\r\n console.log('third drop-down', data);\r\n let key = 0;\r\n\r\n this.state.thirdDropDownOptions.forEach((o, thisIndex) => {\r\n if (o == data.value) {\r\n key = thisIndex;\r\n }\r\n });\r\n\r\n this.setState({ thirdDropdownIndex: key, thirdDropdownSelection: data.value }, () => {\r\n this.buildTimeseriesData();\r\n })\r\n };\r\n\r\n getThirdDropdownOptions = () => {\r\n \r\n if (this.state.outData != null) {\r\n\r\n return this.state.thirdDropDownOptions.map((option, index) => {\r\n let dropOption = new DropdownOption();\r\n dropOption.optionText = option;\r\n dropOption.optionValue = option;\r\n return dropOption;\r\n });\r\n\r\n } else {\r\n return [];\r\n };\r\n\r\n };\r\n\r\n render() {\r\n\r\n let graphWidth = (window.innerWidth * .65) - 65;\r\n\r\n let classContext: NetworkSidePanel = this;\r\n // these are props that will be passed to the d3 chart\r\n let chartprops = {\r\n height: 400,\r\n width: graphWidth, // cheating for now. should be dynamic from div and screensize...\r\n fill: \"none\",\r\n color: \"#2185d0\",\r\n linetype: \"line\",\r\n data: classContext.state.timeseriesData, \r\n clickHandler: this.handleDateChange,\r\n zoomHandler: this.zoomingHandler,\r\n zoomStart: this.state.zoomingStartDate,\r\n zoomEnd: this.state.zoomingEndDate,\r\n units: this.state.dataUnits, \r\n loading: this.props.loading\r\n }\r\n\r\n let precipchartprops = {\r\n height: 120,\r\n width: graphWidth, // cheating for now. should be dynamic from div and screensize...\r\n fill: \"#4BC9EF\",\r\n color: \"#4BC9EF\",\r\n linetype: \"area\",\r\n data: classContext.state.preciptimeseriesData,\r\n clickHandler: this.handleDateChange,\r\n zoomHandler: this.zoomingHandler,\r\n zoomStart: this.state.zoomingStartDate,\r\n zoomEnd: this.state.zoomingEndDate,\r\n noData: this.state.preData != null && this.state.preData.data.length > 0 ? false : true,\r\n precipMsg: this.props.precipMsg,\r\n loading: this.props.loading\r\n }\r\n\r\n //bmpData[bmp.name] = [{ x: reduction, y: bmp.value }];\r\n\r\n\r\n // Create params for dropdowns\r\n let dropDownOne = {\r\n dropdownTitle: \"Time Series Type\",\r\n dropdownItems: this.getFirstDropdownOptions(),\r\n onSelect: this.dropdownFuctionOne,\r\n isMultiselect: false,\r\n onUpdate: this.updateDropdownOne\r\n }\r\n\r\n let dropDownTwo = {\r\n dropdownTitle: \"Time Step\",\r\n dropdownItems:this.getSecondDropdownOptions(),\r\n onSelect: this.dropdownFunctionTwo,\r\n isMultiselect: false,\r\n onUpdate: this.updateDropdownTwo\r\n\r\n }\r\n\r\n let dropDownThree = {\r\n dropdownTitle: \"Constituent\",\r\n dropdownItems: this.getThirdDropdownOptions(),\r\n onSelect: this.dropdownFunctionThree,\r\n isMultiselect: false,\r\n onUpdate: this.updateDropdownThree\r\n\r\n }\r\n\r\n return (\r\n
\r\n
\r\n {\r\n this.props.view == 1 &&\r\n
\r\n
\r\n \"wmms2Logo\"\r\n
\r\n
\r\n

\r\n Welcome to the Watershed Management Modeling System, Los Angeles County’s most advanced platform for visioning future strategies to improve water quality, water supply and flood control. The Los Angeles County Flood Control District developed WMMS to allow for simulation of all the major watersheds within Los Angeles County including hydrologic and pollutant generation processes, transport routines, and forecasts of benefits that could be achieved by stormwater capture infrastructure and source control programs. WMMS is built upon two open source, USEPA-developed models – LSPC and SUSTAIN; learn more about WMMS on the page. \r\n

\r\n

\r\n The interactive map to the right shows the major elements of the LSPC model within WMMS 2.0 and allows for visualization of WMMS 2.0 outputs. The WMMS 2.0 configuration and calibration process incorporates:\r\n

\r\n
    \r\n
  • 3,117 square miles of model domain
  • \r\n
  • 2,500+ miles of explicitly modeled stream network
  • \r\n
  • 2,655 subwatersheds
  • \r\n
  • 4,066 ‘jurisheds’
  • \r\n
  • 662 precipitation nodes for weather boundary conditions
  • \r\n
  • 11 water reclamation plants
  • \r\n
  • 26 dams
  • \r\n
  • 26 spreading grounds
  • \r\n
  • 109 debris basins
  • \r\n
  • 23 stream diversions
  • \r\n
  • 34 hydrologic calibration stations, and
  • \r\n
  • 83 water quality calibration stations
  • \r\n
\r\n

To visualize the WMMS 2.0 simulation outputs, the time series for 40 'assessment points' across LA County have been extracted. Click on the assessment points (red flags) to view and download WMMS 2.0 outputs for a variety of hydrology and water quality simulations!

\r\n
\r\n
\r\n }\r\n {\r\n this.props.view == 3 &&\r\n
\r\n
\r\n {/* here for styles */}\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n {this.props.renderSidePanelView(1, this.props.networkContext); this.props.renderMainView(1, this.props.networkContext); this.props.networkContext.childEsriMapRef.current.ZoomTo();})}>\r\n
\r\n
\r\n
\r\n Simulation Output Viewer\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
10-year Calibration Timeseries
\r\n {/*
\r\n \r\n
*/}\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n {\r\n this.state.zoomed == true && \r\n
\r\n \r\n
\r\n }\r\n
\r\n
\r\n
\r\n
\r\n {/* here for styles */}\r\n
\r\n
Drag on graph to zoom. Click the button on right to download the time series file.
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n Statistic\r\n Value\r\n Statistic\r\n Value\r\n \r\n \r\n \r\n \r\n Average\r\n {this.state.timeseriesStats.average != null ? this.state.timeseriesStats.average.toFixed(this.state.statRound).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + this.state.dataUnits : \"N/A\"}\r\n Median\r\n {this.state.timeseriesStats.perc50 != null ? this.state.timeseriesStats.perc50.toFixed(this.state.statRound).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + this.state.dataUnits : \"N/A\"}\r\n \r\n \r\n Minimum\r\n {this.state.timeseriesStats.min != null ? this.state.timeseriesStats.min.toFixed(this.state.statRound).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + this.state.dataUnits : \"N/A\"}\r\n 75th Percentile\r\n {this.state.timeseriesStats.perc75 != null ? this.state.timeseriesStats.perc75.toFixed(this.state.statRound).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + this.state.dataUnits : \"N/A\"}\r\n \r\n \r\n 5th Percentile\r\n {this.state.timeseriesStats.perc5 != null ? this.state.timeseriesStats.perc5.toFixed(this.state.statRound).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + this.state.dataUnits : \"N/A\"}\r\n 90th Percentile\r\n {this.state.timeseriesStats.perc90 != null ? this.state.timeseriesStats.perc90.toFixed(this.state.statRound).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + this.state.dataUnits : \"N/A\"}\r\n \r\n \r\n 10th Percentile\r\n {this.state.timeseriesStats.perc10 != null ? this.state.timeseriesStats.perc10.toFixed(this.state.statRound).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + this.state.dataUnits : \"N/A\"}\r\n 95th Percentile\r\n {this.state.timeseriesStats.perc95 != null ? this.state.timeseriesStats.perc95.toFixed(this.state.statRound).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + this.state.dataUnits : \"N/A\"}\r\n \r\n \r\n 25th Percentile\r\n {this.state.timeseriesStats.perc25 != null ? this.state.timeseriesStats.perc25.toFixed(this.state.statRound).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + this.state.dataUnits : \"N/A\"}\r\n Maximum\r\n {this.state.timeseriesStats.max != null ? this.state.timeseriesStats.max.toFixed(this.state.statRound).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + this.state.dataUnits : \"N/A\"}\r\n \r\n \r\n Standard Deviation\r\n {this.state.timeseriesStats.stdev != null ? this.state.timeseriesStats.stdev.toFixed(this.state.statRound).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + this.state.dataUnits : \"N/A\"}\r\n Coefficient of Variation\r\n {this.state.timeseriesStats.variationCoeff != null ? this.state.timeseriesStats.variationCoeff.toFixed(this.state.statRound).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") : \"N/A\"}\r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n }\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\n\r\n","import React, { Component } from \"react\";\r\nimport './networkBottomPanel.css';\r\nimport { identifier } from \"@babel/types\";\r\nimport { INetworkViewerBottomPanel } from \"../../../interfaces/INetworkViewerBottomPanel\";\r\nimport { networkviewer } from \"../../../models/networkAP\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { Table, TableHeader, TableRow, TableBody } from \"semantic-ui-react\";\r\n\r\n\r\nexport class NetworkBottomPanelState {\r\n\r\n\r\n}\r\n\r\nexport default class NetworkBottomPanel extends Component {\r\n\r\n state = new NetworkBottomPanelState();\r\n\r\n componentDidMount() {\r\n\r\n }\r\n\r\n\r\n\r\n render() {\r\n\r\n let classContext: NetworkBottomPanel = this;\r\n\r\n // window.screen.availHeight\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n Assessment Point Features\r\n \r\n {/* Method\r\n Value */}\r\n \r\n \r\n \r\n \r\n Point Name\r\n {this.props.apInfo.Watershed != null && this.props.apInfo.Watershed.length > 0 ? this.props.apInfo.Watershed : \"N/A\"}\r\n \r\n \r\n Type (terminal outlet or trib outlet)\r\n {this.props.apInfo.Type != null && this.props.apInfo.Type.length > 0 ? this.props.apInfo.Type : \"N/A\"}\r\n \r\n \r\n Subwatershed Outlet ID\r\n {this.props.apInfo.SWS_ID != null && this.props.apInfo.SWS_ID.length > 0? this.props.apInfo.SWS_ID: \"N/A\"}\r\n \r\n \r\n Precipitation Node ID (used in graph on left)\r\n {this.props.apInfo.PreFile_ID != null && this.props.apInfo.PreFile_ID.length > 0 ? this.props.apInfo.PreFile_ID : \"N/A\"}\r\n \r\n \r\n # of Upstream Subwatersheds\r\n {this.props.apInfo.SWS_Cnt != null && this.props.apInfo.SWS_Cnt.length > 0 ? this.props.apInfo.SWS_Cnt : \"N/A\"}\r\n \r\n \r\n # of Upstream Jurisheds\r\n {this.props.apInfo.Jurished_Cnt != null ? this.props.apInfo.Jurished_Cnt : \"N/A\"}\r\n \r\n \r\n # of Upstream Precipitation Nodes\r\n {this.props.apInfo.Gage_Cnt != null && this.props.apInfo.Gage_Cnt.length > 0 ? this.props.apInfo.Gage_Cnt : \"N/A\"}\r\n \r\n \r\n Upstream Area\r\n {this.props.apInfo.US_Area != null ? this.props.apInfo.US_Area + \" acres\" : \"N/A\"}\r\n \r\n \r\n Cumulative Length of Upstream Model Reaches\r\n {this.props.apInfo.US_Length != null ? this.props.apInfo.US_Length + \" miles\" : \"N/A\"}\r\n \r\n \r\n Watershed Imperviousness\r\n {this.props.apInfo.Perc_Imp != null ? this.props.apInfo.Perc_Imp + \" %\" : \"N/A\"}\r\n \r\n \r\n Watershed Average Slope\r\n {this.props.apInfo.WS_Slope != null ? this.props.apInfo.WS_Slope + \" %\" : \"N/A\"}\r\n \r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n}","import { BaseMapOptions } from \"./BaseMapOptions\";\r\nimport { LayerInfo } from \"./LayerInfo\";\r\nimport { IMapProps } from \"./IMapProps\";\r\n\r\n// Class for easily instaniating typesafe props objects for EsriMap.\r\nexport class MapConfig implements IMapProps {\r\n \r\n basemapType: BaseMapOptions; \r\n startingCoords: number[];\r\n startingZoom: number;\r\n mapServiceURL: string;\r\n layerInfos: LayerInfo[];\r\n classContext: any;\r\n legendOpenByDefault: boolean;\r\n angle: number\r\n optionalLegendCallBack: () => any;\r\n\r\n constructor(basemapType: BaseMapOptions, startingCoords: number[], startingZoom: number, mapServiceURL: string, layerInfos: LayerInfo[], classContext: any, angle: number, legendOpenByDefault: boolean, optionalCallback?: any) {\r\n this.basemapType = basemapType;\r\n this.startingCoords = startingCoords;\r\n this.startingZoom = startingZoom;\r\n this.mapServiceURL = mapServiceURL;\r\n this.layerInfos = layerInfos;\r\n this.classContext = classContext;\r\n this.angle = angle;\r\n this.legendOpenByDefault = legendOpenByDefault;\r\n this.optionalLegendCallBack = optionalCallback;\r\n }\r\n\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class networkviewer extends BaseModel {\r\n\r\n \"assessmentPointId\": string;\r\n \"gageId\": string;\r\n \"data\": Array;\r\n //\"email\": string\r\n\r\n constructor() {\r\n super('networkviewer');\r\n }\r\n} \r\n\r\nexport class networkApData {\r\n \"simulation\": string;\r\n \"event\": string;\r\n \"outFile\": string;\r\n \"preFile\": string;\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class alertPropsModel {\r\n header: string;\r\n body: string;\r\n color: string;\r\n size: string; // opt(small-alert, med-alert, large-alert)\r\n className: string;\r\n context: any; \r\n closeBtn: true;\r\n setTimeOut: boolean;\r\n timeOutTime?: number;\r\n\r\n} ","import React, { Component } from \"react\";\r\nimport { INavHistory } from \"../../interfaces/INavHistory\";\r\nimport './network.css';\r\nimport { identifier } from \"@babel/types\";\r\nimport NetworkSidePanel from \"./NetworkSidePanel/networkSidePanel\";\r\nimport NetworkBottomPanel from \"./NetworkBottomPanel/networkBottomPanel\";\r\nimport { EsriMap } from \"../../factories/mapComponent/EsriMap\";\r\nimport { MapConfig } from \"../../factories/mapComponent/mapTypes/MapConfig\";\r\nimport { LayerInfo } from \"../../factories/mapComponent/mapTypes/LayerInfo\";\r\nimport { networkApData, networkviewer } from \"../../models/networkAP\";\r\nimport { FeatureInfoResult, FeatureInfoResultItem } from \"../../factories/mapComponent/helpers/FeatureInfoResult\";\r\nimport Config from \"../../config/Config\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { networktimeseries } from \"../../models/networktimeseries\";\r\nimport { alertPropsModel } from \"../../models/alertPropsModel\";\r\nimport { EsriMapLegend } from \"../../factories/mapComponent/EsriMapLegend\";\r\n\r\nexport class NetworkState {\r\n mainViewToShow: number = 1;\r\n sidePlanelView: number = 1;\r\n showBottomPanel: number = 1;\r\n mapDataLoaded: boolean = false;\r\n geoJsonDataLoaded: boolean = false;\r\n apData: networkviewer = new networkviewer();\r\n firstDropdownArray: Array;\r\n apAttrib: AssessmentPointAttributes = new AssessmentPointAttributes();\r\n numFadeOut: boolean = false;\r\n loading: boolean = false;\r\n precipMsg: string = \"Loading...\";\r\n flagAngle: number = 0;\r\n alertIsOpen: boolean = false; \r\n alertConfguration: alertPropsModel = new alertPropsModel();\r\n collapseLegend: () => any = null;\r\n}\r\n\r\nexport class AssessmentPointAttributes {\r\n SWS_ID: string = \"\";\r\n Watershed: string = \"\";\r\n SWS_Cnt: string = \"\";\r\n Type: string = \"\";\r\n Gage_Cnt: string = \"\";\r\n Jurished_Cnt: string = \"\";\r\n Jurished_ID: string = \"\";\r\n PreFile_ID: string = \"\";\r\n PreFiles: string = \"\";\r\n US_Area: string = \"\";\r\n US_Length: string = \"\";\r\n WS_Slope: string = \"\";\r\n Perc_Imp: string = \"\";\r\n Watershed_ID: string = \"\";\r\n PrecipNode: string = \"\";\r\n AllUS_SWS: string = \"\";\r\n AllUS_Pre: string = \"\";\r\n}\r\n\r\nexport default class Network extends Component {\r\n\r\n state = new NetworkState();\r\n childEsriMapRef = React.createRef();\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {}\r\n\r\n\r\n renderSidePanelView (view, networkContext?: any) {\r\n if (networkContext) {\r\n if (this.state !== null && this.state !== undefined) {\r\n if (this.state.collapseLegend) {\r\n this.state.collapseLegend();\r\n };\r\n }\r\n networkContext.setState({ sidePlanelView: view });\r\n } else {\r\n if (this.state !== null && this.state !== undefined) {\r\n if (this.state.collapseLegend) {\r\n this.state.collapseLegend();\r\n };\r\n }\r\n this.setState({ sidePlanelView: view });\r\n };\r\n };\r\n\r\n renderMainView (view, networkContext?: any) {\r\n if (view == 1) {\r\n if (networkContext) {\r\n networkContext.setState({ mainViewToShow: view});\r\n\r\n setTimeout(() => { \r\n networkContext.setState({ showBottomPanel: view })\r\n }, 1000);\r\n \r\n } else {\r\n this.setState({ mainViewToShow: view });\r\n\r\n setTimeout(() => {\r\n this.setState({ showBottomPanel: view })\r\n }, 1000);\r\n };\r\n\r\n } else {\r\n\r\n if (networkContext) {\r\n networkContext.setState({ mainViewToShow: view, showBottomPanel: view});\r\n } else {\r\n this.setState({ mainViewToShow: view, showBottomPanel: view });\r\n };\r\n };\r\n\r\n };\r\n\r\n //setAngle() {\r\n // if (this.state.flagAngle == 0) {\r\n // this.setState({ flagAngle: 87 }, () => {\r\n // var layerArr = this.getMapLayers();\r\n // let geojson = [];\r\n // for (var i = 0; i < layerArr.length; i++) {\r\n // if (layerArr[i].layerType == 'geojson') { geojson.push(layerArr[i]); }\r\n // }\r\n // if (geojson != null && geojson.length > 0) {\r\n // this.childEsriMapRef.current.addGEOJSONLayers(geojson);\r\n // }\r\n // })\r\n // }\r\n // else {\r\n // this.setState({ flagAngle: 0 }, () => {\r\n // var layerArr = this.getMapLayers();\r\n // let geojson = [];\r\n // for (var i = 0; i < layerArr.length; i++) {\r\n // if (layerArr[i].layerType == 'geojson') { geojson.push(layerArr[i]);}\r\n // }\r\n // if (geojson != null && geojson.length > 0) {\r\n // this.childEsriMapRef.current.addGEOJSONLayers(geojson);\r\n // }\r\n // })\r\n // }\r\n //}\r\n\r\n updateAssessmentPointData(data: networkviewer, networkContext?: any) {\r\n if (networkContext) {\r\n\r\n networkContext.setState({ apData: data });\r\n } else {\r\n this.setState({ apData: data });\r\n };\r\n };\r\n\r\n populateAPDescription(item: FeatureInfoResultItem): AssessmentPointAttributes{\r\n let apInfo: AssessmentPointAttributes = new AssessmentPointAttributes();\r\n console.log('in ap info', item);\r\n if (item != null) {\r\n if (item.attributes != null && item.attributes.length > 0) {\r\n for (var i = 0; i < item.attributes.length; i++) {\r\n if (item.attributes[i].name == \"SWS_ID\") { apInfo.SWS_ID = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"Name\") { apInfo.Watershed = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"SWS_Cnt\") { apInfo.SWS_Cnt = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"Type\") { apInfo.Type = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"Gage_Cnt\") { apInfo.Gage_Cnt = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"Jurisd_Cnt\") { apInfo.Jurished_Cnt = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"JShed_ID\") { apInfo.Jurished_ID = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"PreFile\") { apInfo.PreFile_ID = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"PreFiles\") { apInfo.PreFiles = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"US_Ac\") { apInfo.US_Area = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"RchLen_Mi\") { apInfo.US_Length = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"Imperv_Per\") { apInfo.Perc_Imp = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"Avg_Slope\") { apInfo.WS_Slope = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"Watershed\") { apInfo.Watershed_ID = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"PrecipNode\") { apInfo.PrecipNode = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"AllUpst_SW\") { apInfo.AllUS_SWS = item.attributes[i].value.toString(); }\r\n else if (item.attributes[i].name == \"AllUpst_Pr\") { apInfo.AllUS_Pre = item.attributes[i].value.toString(); }\r\n }\r\n } else if (item.attributes != null) {\r\n console.log(\"yepp\", item.attributes)\r\n\r\n let itemCopy: any = item;\r\n\r\n let featureInfos = [];\r\n\r\n\r\n\r\n for (let key in item.attributes) {\r\n\r\n featureInfos.push({\r\n name: key,\r\n value: item.attributes[key] == null || item.attributes[key] == undefined ? \"a\" : item.attributes[key]\r\n });\r\n\r\n };\r\n\r\n console.log('feature infos built', featureInfos);\r\n\r\n for (var i = 0; i < featureInfos.length; i++) {\r\n console.log('issues', featureInfos[i].name);\r\n if (featureInfos[i].name == \"SWS_ID\") { apInfo.SWS_ID = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"Name\") { apInfo.Watershed = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"SWS_Cnt\") { apInfo.SWS_Cnt = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"Type\") { apInfo.Type = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"Gage_Cnt\") { apInfo.Gage_Cnt = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"Jurisd_Cnt\") { apInfo.Jurished_Cnt = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"JShed_ID\") { apInfo.Jurished_ID = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"PreFile\") { apInfo.PreFile_ID = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"PreFiles\") { apInfo.PreFiles = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"US_Ac\") { apInfo.US_Area = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"RchLen_Mi\") { apInfo.US_Length = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"Imperv_Per\") { apInfo.Perc_Imp = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"Avg_Slope\") { apInfo.WS_Slope = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"Watershed\") { apInfo.Watershed_ID = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"PrecipNode\") { apInfo.PrecipNode = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"AllUpst_SW\") { apInfo.AllUS_SWS = featureInfos[i].value.toString(); }\r\n else if (featureInfos[i].name == \"AllUpst_Pr\") { apInfo.AllUS_Pre = featureInfos[i].value.toString(); }\r\n }\r\n\r\n console.log(\"party on wayne\")\r\n\r\n\r\n }\r\n }\r\n console.log('ap info res', apInfo);\r\n return apInfo\r\n }\r\n\r\n updateLoadingFunction(loading, msg, networkContext?: any) {\r\n if (networkContext != null) {\r\n if (loading != null) {\r\n networkContext.setState({ loading: loading, precipMsg: msg });\r\n } else {\r\n networkContext.setState({ precipMsg: msg });\r\n }\r\n } else {\r\n if (loading != null) {\r\n this.setState({ loading: loading, precipMsg: msg });\r\n } else {\r\n this.setState({ precipMsg: msg });\r\n }\r\n }\r\n }\r\n\r\n eventListenerFunction(evt, data, networkClassContext) {\r\n let resData: Array = data;\r\n console.log('click event', evt, resData);\r\n\r\n let apId: string = \"\";\r\n let gageId: string = \"\";\r\n\r\n if (resData != null && resData.length > 0) {\r\n console.log('resdata', resData[0]);\r\n if (resData[0].name == \"assessment_points\") {\r\n if (resData[0].features.length == 1) {\r\n let apInfo: AssessmentPointAttributes = this.populateAPDescription(resData[0].features[0]);\r\n apId = apInfo.SWS_ID;\r\n // gageId = apInfo.PreFiles;\r\n gageId = apInfo.PreFile_ID;\r\n \r\n // this handles the bottom panel's table number fade\r\n this.setState({ numFadeOut: true }, () => {\r\n setTimeout(() => {\r\n this.setState({ apAttrib: apInfo, numFadeOut: false });\r\n\r\n }, 500);\r\n })\r\n }\r\n else if (resData[0].features.length == 0) { \r\n // alert(\"No assessment point selected. Please click on an assessment point.\"); \r\n\r\n let alertProps: alertPropsModel = {\r\n header: \"No assessment point selected. Please click on an assessment point.\",\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: this,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 4000\r\n };\r\n this.setState({ alertConfguration: alertProps }, () => {\r\n this.setState({ alertIsOpen: true });\r\n });\r\n }\r\n else if (resData[0].features.length > 1) { \r\n // alert(\"Multiple assessment points selected. Please select a single assessment point.\");\r\n\r\n let alertProps: alertPropsModel = {\r\n header: \"Multiple assessment points selected. Please select a single assessment point.\",\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: this,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 4000\r\n };\r\n this.setState({ alertConfguration: alertProps }, () => {\r\n this.setState({ alertIsOpen: true });\r\n });\r\n }\r\n }\r\n } else if (data.screenPoint) {\r\n console.log('screen point', data);\r\n let features = [];\r\n data.results.forEach((r) => {\r\n if (r.graphic.layer.id == \"assessmentPoints\") {\r\n\r\n let apInfo:AssessmentPointAttributes = this.populateAPDescription(r.graphic);\r\n console.log('after apinfo');\r\n let featureInfo = {\r\n apId: apInfo.SWS_ID,\r\n gageId: apInfo.PreFile_ID\r\n };\r\n\r\n\r\n features.push(featureInfo);\r\n\r\n // this handles the bottom panel's table number fade\r\n this.setState({ numFadeOut: true }, () => {\r\n setTimeout(() => {\r\n this.setState({ apAttrib: apInfo, numFadeOut: false });\r\n\r\n }, 500);\r\n })\r\n };\r\n });\r\n\r\n if (features.length > 0) {\r\n apId = features[0].apId;\r\n gageId = features[0].gageId;\r\n };\r\n\r\n };\r\n\r\n console.log('somewhere over');\r\n\r\n let needUpdate: boolean = true;\r\n if (this.state.apData != null && apId != null && apId.length > 0 && gageId != null && gageId.length > 0 && this.state.apData.assessmentPointId != null && this.state.apData.assessmentPointId == apId) {\r\n\r\n // same point, stop\r\n console.log('please stop');\r\n this.updateLoadingFunction(false, \"No Precipitation Data Found\", networkClassContext);\r\n needUpdate = false;\r\n \r\n }\r\n\r\n if (needUpdate == true && apId != null && apId.length > 0 && gageId != null && gageId.length > 0) {\r\n console.log('map update context', networkClassContext);\r\n\r\n this.updateLoadingFunction(true, \"Loading...\", networkClassContext)\r\n this.childEsriMapRef.current.ZoomTo(evt);\r\n\r\n networkviewer.axiosGetAll({ apId: apId, gageId: gageId }).then((r: AxiosResponse) => {\r\n //console.log('yay response');\r\n if (r.data != null) {\r\n let info: networkviewer = r.data;\r\n //this.props.updateAssessmentPoint(info, this.props.networkContext)\r\n //console.log(info, \"INFO\");\r\n if (info != null && info.data != null && info.data.length > 0) {\r\n this.setState({ apData: info });\r\n }\r\n }\r\n }).catch((r: AxiosResponse) => {\r\n console.log('Error getting network data', r);\r\n });\r\n\r\n networkClassContext.renderSidePanelView(3);\r\n networkClassContext.renderMainView(2);\r\n } else {\r\n console.log(\"no update\");\r\n }\r\n }\r\n\r\n getMapLayers = (): LayerInfo[] => {\r\n\r\n // see LayerInfo class for description of different titles\r\n const layerInfos: LayerInfo[] = [\r\n { name: 'assessment_points', legendDisplayName:\"Assessment Points\", shortName: 'assessmentPoints', visible: true, legendOrder: 10, imgSrc: \"\", layerType: 'geojson', queryFeatures: true },\r\n { name: 'Major_Channel_Simpler', legendDisplayName: \"Stream Network\", shortName: 'majorChannels', visible: true, legendOrder: 50, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: 'Jurisheds', legendDisplayName: \"Jurisheds\", shortName: 'jurished', visible: true, legendOrder: 80, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: 'Groundwater_Basins', legendDisplayName: \"Groundwater Basins\", shortName: 'groundwaterBasins', visible: true, legendOrder: 70, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: '6_ALERT_PRISM', legendDisplayName: \"Precipitation Nodes\", shortName: 'alertGages5', visible: true, legendOrder: 30, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: 'MAJOR_DAMS', legendDisplayName: \"Major Dams\", shortName: 'majorDams', visible: true, legendOrder: 35, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: 'LDR_merc', legendDisplayName: \"Stream Diversions\", shortName: 'streamDiversions', visible: true, legendOrder: 35, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: 'Effluent-Plant', legendDisplayName: \"Water Reclamation Plants\", shortName: 'waterReclamationPlants', visible: true, legendOrder: 35, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: 'DEBRIS_BASINS', legendDisplayName: \"Debris Basins\", shortName: 'debrisBasins', visible: true, legendOrder: 35, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: 'SpreadingBasins', legendDisplayName: \"Spreading Grounds\", shortName: 'spreadingBasins', visible: true, legendOrder: 35, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: 'Merge_Union_Clip', legendDisplayName: \"Jurisdictions\", shortName: 'mergeUnion', visible: false, legendOrder: 100, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: 'Updated_Gages_V2_hydro', legendDisplayName: \"Hydrology Calibration Stations\", shortName: 'mergeRunoff', visible: false, legendOrder: 40, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: 'WQ_CalibrationStations', legendDisplayName: \"Water Quality Calibration Stations\", shortName: 'calibrationStations', visible: false, legendOrder: 35, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: '7_Alert_Gages_wData', legendDisplayName: \"Precipitation Voronoi Polygons\", shortName: 'alertGages7', visible: false, legendOrder: 20, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: 'scw_ws_areas', legendDisplayName: \"SCW Watershed Areas\", shortName: 'scwAreas', visible: false, legendOrder: 90, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n { name: 'SDN_Gravity_Main', legendDisplayName: \"Storm Drains\", shortName: 'gravityMain', visible: false, legendOrder: 110, imgSrc: \"\", layerType: 'wms', queryFeatures: false },\r\n ];\r\n\r\n return layerInfos;\r\n }\r\n\r\n getLegendCollapseFunction = (legendContext: EsriMapLegend) => {\r\n this.setState({collapseLegend: legendContext.collapseLegend});\r\n };\r\n\r\n\r\n render() {\r\n \r\n let classContext: Network = this;\r\n\r\n let layerInfos = this.getMapLayers();\r\n\r\n const esriMapConfig = new MapConfig('topo-vector', [-118.2, 34.2], 10, Config.map_connection_url, layerInfos, classContext, this.state.flagAngle, true, this.getLegendCollapseFunction); \r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n {/* */}\r\n
\r\n \r\n
\r\n\r\n
\r\n {/*
*/}\r\n \r\n {/*
*/}\r\n {\r\n this.state.showBottomPanel == 2 &&\r\n
\r\n \r\n
\r\n }\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\n\r\n\r\n// original layout \r\n{/*
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n {\r\n this.state.showBottomPanel == 2 &&\r\n
\r\n \r\n
\r\n }\r\n
\r\n
\r\n
*/}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\nimport { optimizationsummaryitem } from \"./optimizationsummaryitem\";\r\nimport { optimizationcrc } from \"./optimizationcrc\";\r\n\r\nexport class optimizationsummary extends BaseModel {\r\n\r\n \"guid\": string;\r\n \"scenarios\": Array;\r\n \"defaultcrc\": Array;\r\n \"bmpgroups\": any;\r\n \"mrcavailable\": boolean;\r\n \"isSample\": boolean;\r\n \"errors\": Array;\r\n \"visible\"?: boolean;\r\n \"childState\"?: any;\r\n \"key\"?: number;\r\n\r\n constructor() {\r\n super('optimizationviewer');\r\n }\r\n} ","import React, { Component } from \"react\";\r\nimport './colorPickerModal.css';\r\nimport Config from '../../config/Config';\r\nimport { Icon, Modal, Button } from 'semantic-ui-react';\r\nimport { SketchPicker } from 'react-color';\r\n// import { Dropdown, Button, FormGroup, Label, Input, Grid, Table, Icon } from \"semantic-ui-react\";\r\n\r\nexport class ColorPickerModalState {\r\n modal: boolean = false;\r\n selColor: string = \"#aaa\";\r\n}\r\n\r\nexport class ColorPickerModal extends React.Component<{ className: string, modalSize: any, isOpen?: boolean, startColor: string, bmpName: string, callback: Function }> {\r\n constructor(props) {\r\n super(props);\r\n\r\n }\r\n\r\n state: ColorPickerModalState = new ColorPickerModalState();\r\n\r\n componentDidMount = () => {\r\n this.setState({ modal: this.props.isOpen, selColor: this.props.startColor })\r\n }\r\n\r\n handleOpen = () => this.setState({ modal: true })\r\n\r\n handleClose = () => {\r\n this.setState({ modal: false });\r\n this.props.callback(this.state.selColor, this.props.bmpName);\r\n }\r\n\r\n colorPicked = (color: any, event: any) => {\r\n console.log('picked', color);\r\n this.setState({ selColor: color.hex })\r\n }\r\n\r\n colorCancel = (event: any) => {\r\n console.log('cancel');\r\n }\r\n\r\n\r\n render() {\r\n return (\r\n \r\n }>\r\n\r\n \r\n
Select a color for {this.props.bmpName}:
\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\nimport \"./optimizationTable.css\";\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport { Dropdown, Button, FormGroup, Label, Input, Grid, Table, Icon } from \"semantic-ui-react\";\r\nimport ITableProps from \"../../../interfaces/ITableProps\";\r\nimport { create } from \"domain\";\r\nimport { TooltipModal } from \"../../toolTipModal/toolTipModal\";\r\nimport { alertPropsModel } from \"../../../models/alertPropsModel\";\r\nimport { ColorPickerModal } from \"../../../core/colorPickerModal/colorPickerModal\";\r\n\r\nexport class OptimizationTableState {\r\n backupColors: any = [\"#157bdb\", \"#9eb426\", \"#896b6d\", \"#0e1144\", \"#921caa\", \"#a7a795\", \"#013c42\", \"#29770a\", \"#d8a135\", \"#f3927f\"];\r\n editTitle: boolean = false;\r\n tableTitle: string = null;\r\n editPercent: boolean = false;\r\n tablePercent: number = null;\r\n alertIsOpen: boolean = false; \r\n alertConfguration: alertPropsModel = new alertPropsModel();\r\n}\r\n\r\nexport default class OptimizationTable extends Component {\r\n state = new OptimizationTableState();\r\n\r\n constructor(props: ITableProps){\r\n super(props);\r\n } \r\n\r\n // getRandomColor() {\r\n // let classContext: OptimizationTable = this;\r\n // return classContext.state.backupColors[Math.floor(Math.random() * classContext.state.backupColors.length)];\r\n\r\n // // a 3-option ternary can be used to fill in a random color if the searched for key name isn't found\r\n // // this line would be applied to the table cell that needs to be colored:\r\n // // style={{backgroundColor: classContext.props.colors == undefined ? \"none\" : (classContext.props.colors[\"LID, Bioretention\"] == undefined ? classContext.getRandomColor() : classContext.props.colors[\"LID, Bioretention\"])}}\r\n // // not implemented here, because it wouldn't match the chart area unless random color was picked earlier and passed to both chart and table\r\n // }\r\n \r\n createBmpRows() {\r\n let classContext: OptimizationTable = this; \r\n let rows = classContext.props.bmpGroups.map(group => {\r\n return (\r\n \r\n \r\n \r\n {group}\r\n {classContext.props.data.bmPs.find(x => x.name == group).value.toFixed(2).replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")} ac-ft\r\n \r\n \r\n );\r\n });\r\n return rows;\r\n }\r\n\r\n editTitle() {\r\n let classContext: OptimizationTable = this;\r\n classContext.setState({ \r\n tableTitle: this.props.title,\r\n editTitle: true\r\n });\r\n }\r\n\r\n handleUpdate(evt, stateProp, label) {\r\n let lbl = document.getElementById(label);\r\n if (evt.target.value.length > 2 && evt.target.value.indexOf(\" \") == -1) {\r\n lbl.classList.remove('red');\r\n lbl.classList.add('green');\r\n } else {\r\n lbl.classList.add('red');\r\n lbl.classList.remove('green');\r\n }\r\n let compState = Object.assign({}, this.state);\r\n compState[stateProp] = evt.target.value;\r\n this.setState(compState);\r\n }\r\n\r\n updateTitle(e) {\r\n let classContext: OptimizationTable = this;\r\n classContext.setState({ tableTitle: e.target.value });\r\n }\r\n \r\n saveTitleChanges() {\r\n let classContext: OptimizationTable = this;\r\n classContext.setState({ editTitle: false });\r\n classContext.props.onTitleUpdate(this.state.tableTitle);\r\n }\r\n\r\n editPercent() {\r\n let classContext: OptimizationTable = this;\r\n classContext.setState({ \r\n tablePercent: classContext.props.percent,\r\n editPercent: true\r\n });\r\n }\r\n\r\n updatePercent(e) {\r\n let classContext: OptimizationTable = this;\r\n classContext.setState({ tablePercent: e.target.value });\r\n }\r\n \r\n savePercentChanges() {\r\n let classContext: OptimizationTable = this;\r\n if (this.state.tablePercent > classContext.props.maxPct) {\r\n // alert(\"Entered value must not exceed max % from data\");\r\n\r\n let alertProps: alertPropsModel = {\r\n header: \"Entered value must not exceed max % from data\",\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: this,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 3000\r\n };\r\n this.setState({ alertConfguration: alertProps }, () => {\r\n this.setState({ alertIsOpen: true });\r\n });\r\n } else {\r\n classContext.setState({ editPercent: false });\r\n classContext.props.onPercentUpdate(this.state.tablePercent);\r\n }\r\n }\r\n\r\n render() {\r\n let classContext: OptimizationTable = this;\r\n return (\r\n
\r\n
\r\n \r\n {classContext.props.isSample == true &&\r\n
SAMPLE DATA
}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n classContext.state.editTitle\r\n ?\r\n classContext.updateTitle(e)} \r\n onKeyPress={e => {if (e.key === 'Enter') { classContext.saveTitleChanges() }}}\r\n >\r\n :\r\n (classContext.state.tableTitle == null ? classContext.props.title : classContext.state.tableTitle) \r\n }\r\n {\r\n classContext.state.editTitle \r\n ?\r\n \r\n :\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {classContext.props.factor} Reduction\r\n \r\n {\r\n classContext.state.editPercent\r\n ?\r\n classContext.updatePercent(e)} \r\n onKeyPress={e => {if (e.key === 'Enter') { classContext.savePercentChanges() }}}\r\n >\r\n : \r\n {classContext.props.percent}\r\n } %\r\n {\r\n classContext.state.editPercent \r\n ?\r\n \r\n :\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n Total Cost\r\n $ {classContext.props.data == undefined ? \"--\" : (classContext.props.data.cost / 1000000).toFixed(0)} M\r\n \r\n \r\n \r\n \r\n Total Capacity\r\n {classContext.props.data == undefined ? \"--\" : (classContext.props.data.bmPs.reduce((a, b) => ({ value: a.value + b.value })).value).toFixed(2).replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")} ac-ft\r\n \r\n {classContext.props.data != undefined ? this.createBmpRows() : null}\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\nimport { optimizationsummaryitem } from \"./optimizationsummaryitem\";\r\nimport { optimizationcrc } from \"./optimizationcrc\";\r\n\r\nexport class optimizationimplementationplan extends BaseModel {\r\n\r\n \"guid\": string;\r\n \"scenarios\": Array;\r\n \"defaultcrc\": Array;\r\n \"bmpgroups\": any;\r\n \"reduction\": number;\r\n \"errors\": Array;\r\n\r\n constructor() {\r\n super('optimizationviewer/getplan');\r\n }\r\n} ","import { BaseModel } from \"../interfaces/IBaseModel\";\r\nimport { optimizationsummaryitem } from \"./optimizationsummaryitem\";\r\nimport { optimizationcrc } from \"./optimizationcrc\";\r\n\r\nexport class sustainToLSPCbatch extends BaseModel {\r\n\r\n \"guid\": string;\r\n \"scenarios\": Array;\r\n \"defaultcrc\": Array;\r\n \"bmpgroups\": any;\r\n \"reduction\": number;\r\n \"errors\": Array;\r\n\r\n constructor() {\r\n super('optimizationviewer/getLSPCbat');\r\n };\r\n\r\n}; ","import React, { Component } from \"react\";\r\nimport IAxisRightProps from '../interfaces/IAxisRightProps';\r\nimport * as d3 from 'd3';\r\n\r\nexport default class AxisRightMillionFormat extends Component {\r\n ref: React.RefObject;\r\n\r\n constructor(props: IAxisRightProps) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n \r\n componentDidMount() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current)\r\n // .call(d3.axisRight(this.props.scale).tickFormat(x => { return x !== 0 ? (String(x).substring(0,2) + \" M\" ) : \"0 M\" } ));\r\n // .call(d3.axisRight(this.props.scale).tickFormat(x => { return x !== 0 ? x !== 5000000 ? (String(x).substring(0,2) + \" M\" ) : \"5 M\" : \"0 M\" } ));\r\n // .call(d3.axisRight(this.props.scale).tickFormat(x => { return x !== 0 ? x < 10000000 ? (String(x).substring(0,2) + \" M\" ) : (String(x).substring(0,1) + \" M\" ) : \"0 M\" } ));\r\n // .call(d3.axisRight(this.props.scale).tickFormat(x => { console.log(x); return `${(x / 1000000)} M`}));\r\n .call(d3.axisRight(this.props.scale).tickFormat(d3.format(\".2s\")));\r\n\r\n }\r\n }\r\n \r\n componentDidUpdate() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current)\r\n .transition()\r\n // .call(d3.axisRight(this.props.scale).tickFormat(x => { return x !== 0 ? x < 10000000 ? (String(x).substring(0,2) + \" M\" ) : (String(x).substring(0,1) + \" M\" ) : \"0 M\" } ));\r\n // .call(d3.axisRight(this.props.scale).tickFormat(x => { return (String(x).replace(/0/g, '')) + \" M\" } ));\r\n // .call(d3.axisRight(this.props.scale).tickFormat(x => { console.log(x); return `${(x / 1000000)} M`}));\r\n .call(d3.axisRight(this.props.scale).tickFormat(d3.format(\".2s\")));\r\n\r\n }\r\n }\r\n \r\n render() {\r\n // className={this.props.class != null ? this.props.class : null}\r\n return ;\r\n // style={{color: this.props.color}} \r\n }\r\n}","import React, { Component } from \"react\";\r\nimport IAxisBottomProps from '../interfaces/IAxisBottomProps';\r\nimport * as d3 from 'd3';\r\n\r\nexport default class AxisBottom extends Component {\r\n ref: React.RefObject;\r\n\r\n constructor(props: IAxisBottomProps) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n \r\n componentDidMount() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current)\r\n .call(d3.axisBottom(this.props.scale));\r\n }\r\n }\r\n \r\n componentDidUpdate() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current)\r\n .transition()\r\n .call(d3.axisBottom(this.props.scale));\r\n }\r\n }\r\n \r\n render() {\r\n return ;\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport IAreaProps from \"../interfaces/IAreaProps\";\r\nimport * as d3 from 'd3';\r\n\r\nexport default class Area extends Component {\r\n ref: React.RefObject;\r\n\r\n constructor(props: IAreaProps) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n const { data, yScale, xScale, height } = this.props;\r\n\r\n var line = d3.area(data)\r\n .x(function(d) { return xScale(d.x); })\r\n .y0(height)\r\n .y1(function(d) { return yScale(d.y); });\r\n\r\n d3.select(this.ref.current)\r\n .attr(\"class\", \"area\")\r\n .attr(\"d\", line(data))\r\n .transition();\r\n }\r\n\r\n componentDidUpdate() {\r\n const { data, yScale, xScale, height } = this.props;\r\n\r\n var line = d3.area(data)\r\n .x(function(d) { return xScale(d.x); })\r\n .y0(height)\r\n .y1(function(d) { return yScale(d.y); });\r\n\r\n d3.select(this.ref.current)\r\n .attr(\"class\", \"area\")\r\n .attr(\"d\", line(data))\r\n .transition();\r\n }\r\n\r\n render() {\r\n const { fill, color } = this.props;\r\n\r\n return ;\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport IAreasProps from \"../interfaces/IAreasProps\";\r\nimport Area from \"./Area\";\r\n\r\nexport class AreasState {\r\n\r\n}\r\n\r\nexport default class Areas extends Component {\r\n\r\n state = new AreasState();\r\n\r\n // NOTE: order matters! areas will stack with first created in the back to last created in the front. if not sorted properly, they will obscure one another\r\n\r\n render() {\r\n const { crcData, yScaleLeft, yScaleRight, xScale, height, bmpGroupInfo, colors } = this.props;\r\n\r\n const allProps = [];\r\n \r\n if (crcData != undefined){\r\n\r\n bmpGroupInfo.forEach((x, i) => {\r\n\r\n const areaProps = {\r\n data: crcData[x.groupName],\r\n yScale: yScaleLeft,\r\n xScale,\r\n height,\r\n fill: colors[x.groupName],\r\n color: colors[x.groupName],\r\n key: x.groupName,\r\n maxY: null //crcData[x.groupName][crcData[x.groupName].length - 1].y // assumes last option will have highest ac-ft value, which should be the case. can do additional sorting logic if needed.\r\n }\r\n\r\n allProps.push(areaProps);\r\n })\r\n }\r\n \r\n const areas = allProps.map(props => {\r\n return ;\r\n })\r\n\r\n return {areas};\r\n } \r\n}","import React, { Component } from \"react\";\r\nimport ICircleProps from \"../interfaces/ICircleProps\";\r\nimport * as d3 from 'd3';\r\n\r\nexport default class Circle extends Component {\r\n ref: React.RefObject;\r\n\r\n constructor(props: ICircleProps) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n\r\n render() {\r\n let { radius, cx, cy, defaultcx, defaultcy} = this.props;\r\n\r\n // console.log(\"circle props\", cx, cy);\r\n // console.log(\"default\", defaultcx, defaultcy);\r\n\r\n return (\r\n \r\n );\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport * as d3 from 'd3';\r\nimport IAxisBottomProps from '../interfaces/IAxisBottomProps';\r\nimport ILabel from \"../interfaces/ILabel\";\r\n\r\nexport default class LabelRight extends Component {\r\n ref: React.RefObject;\r\n\r\n constructor(props: ILabel) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current).append(\"text\")\r\n .attr(\"transform\", \"rotate(-90)\")\r\n .attr(\"y\", this.props.width + this.props.margin.right - 15)\r\n .attr(\"x\", 0 - (this.props.height / 2))\r\n .attr(\"dy\", \"1em\")\r\n .attr(\"text-anchor\", \"middle\")\r\n .attr(\"font-size\", this.props.fontSize)\r\n .attr(\"font-family\", \"sans-serif\")\r\n .attr(\"font-weight\", \"bold\")\r\n // .attr(\"fill\", this.props.color)\r\n .attr(\"letter-spacing\", \"0.1em\")\r\n .text(this.props.text);\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n if (this.ref.current) {\r\n d3.select(this.ref.current).selectAll(\"text\").remove();\r\n\r\n d3.select(this.ref.current).append(\"text\")\r\n .attr(\"transform\", \"rotate(-90)\")\r\n .attr(\"y\", this.props.width + this.props.margin.right - 15)\r\n .attr(\"x\", 0 - (this.props.height / 2))\r\n .attr(\"dy\", \"1em\")\r\n .attr(\"text-anchor\", \"middle\")\r\n .attr(\"font-size\", this.props.fontSize)\r\n .attr(\"font-family\", \"sans-serif\")\r\n .attr(\"font-weight\", \"bold\")\r\n // .attr(\"fill\", this.props.color)\r\n .attr(\"letter-spacing\", \"0.1em\")\r\n .text(this.props.text);\r\n }\r\n }\r\n\r\n render() {\r\n return ;\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport ILineProps from \"../interfaces/ILineProps\";\r\nimport * as d3 from 'd3';\r\n\r\nexport default class Line extends Component {\r\n ref: React.RefObject;\r\n\r\n constructor(props: ILineProps) {\r\n super(props);\r\n this.ref = React.createRef();\r\n }\r\n\r\n componentDidUpdate() {\r\n const { defaultx, x, y, height } = this.props;\r\n let lineData;\r\n if (x == null){\r\n lineData = [\r\n [defaultx, y],\r\n [defaultx, height]\r\n ];\r\n } else {\r\n lineData = [\r\n [x, y],\r\n [x, height]\r\n ];\r\n }\r\n\r\n var line = d3.line(lineData);\r\n\r\n d3.select(this.ref.current)\r\n .attr(\"class\", \"line\")\r\n .attr(\"d\", line(lineData))\r\n .transition();\r\n }\r\n\r\n render() {\r\n const { color, strokeWidth } = this.props;\r\n\r\n return (\r\n \r\n \r\n );\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport IOptimizationSVGProps from \"./interfaces/IOptimizationSVGProps\";\r\nimport * as d3 from 'd3';\r\nimport AxisLeft from \"./chartPieces/AxisLeft\";\r\nimport AxisRightMillionFormat from \"./chartPieces/AxisRightMillionFormat\";\r\nimport AxisBottom from \"./chartPieces/AxisBottom\";\r\nimport Path from \"./chartPieces/Path\";\r\nimport Areas from \"./chartPieces/Areas\";\r\nimport Circle from \"./chartPieces/Circle\";\r\nimport Callout from \"./chartPieces/Callout\";\r\nimport LabelLeft from \"./chartPieces/LabelLeft\";\r\nimport LabelBottom from \"./chartPieces/LabelBottom\";\r\nimport LabelRight from \"./chartPieces/LabelRight\";\r\nimport Line from \"./chartPieces/Line\";\r\n\r\nexport class OptimizationSVGState {\r\n cx: number = null;\r\n cy: number = null;\r\n mouseXvalue: number = null;\r\n mouseYvalue: number = null;\r\n calloutX: number = null;\r\n calloutY: number = null;\r\n label: string = \"\";\r\n selectedPct: number = null;\r\n selectedCost: number = null;\r\n}\r\n\r\nexport default class OptimizationSVG extends Component {\r\n\r\n state = new OptimizationSVGState();\r\n xScale: any;\r\n yScaleLeft: any;\r\n yScaleRight: any;\r\n myBisect: any;\r\n uniqueID: string;\r\n\r\n\r\n forceResetCircle = () => {\r\n this.setState({\r\n cx: null,\r\n cy: null\r\n });\r\n }\r\n\r\n // have to reset cx & cy when props change due to update button, otherwise circle won't position correctly\r\n componentDidUpdate(prevProps) {\r\n\r\n const classContext: OptimizationSVG = this;\r\n\r\n if (this.props.defaultCirclePct != prevProps.defaultCirclePct) {\r\n this.setState({\r\n cx: null,\r\n cy: null\r\n });\r\n }\r\n\r\n d3.select((\"#\" + this.uniqueID)).select(\".opt-rect\")\r\n .on(\"mousemove\", function (x, y, z) {\r\n let mouseCoords = d3.mouse(z[0]);\r\n let res = classContext.bisect(mouseCoords[0]); \r\n let xcoord = classContext.xScale(res.x);\r\n let ycoord = classContext.yScaleRight(res.y);\r\n let label = res.x.toLocaleString() + \"%\";\r\n classContext.setState({ \r\n mouseXvalue: res.x, \r\n mouseYvalue: res.y, \r\n calloutX: xcoord, \r\n calloutY: ycoord, \r\n label: label \r\n });\r\n\r\n })\r\n .on(\"mouseout\", function (x ,y ,z) {\r\n classContext.setState({ mouseXvalue: null, mouseYvalue: null, calloutX: 0, calloutY: 0 });\r\n })\r\n .on(\"click\", function () {\r\n classContext.setPointOnClick(classContext.state.calloutX, classContext.state.calloutY, classContext.state.mouseXvalue, classContext.state.mouseYvalue);\r\n }) \r\n\r\n\r\n }\r\n\r\n componentWillMount = () => {\r\n\r\n this.uniqueID = this.getUniqueId();\r\n\r\n }\r\n\r\n componentDidMount = () => {\r\n const classContext: OptimizationSVG = this;\r\n\r\n d3.select((\"#\" + this.uniqueID)).append('rect')\r\n .attr(\"class\", \"opt-rect\")\r\n .attr('width', this.props.svgWidth)\r\n .attr('height', this.props.svgHeight)\r\n .attr('fill', 'none')\r\n .attr('pointer-events', 'all')\r\n .on(\"mousemove\", function (x, y, z) {\r\n let mouseCoords = d3.mouse(z[0]);\r\n let res = classContext.bisect(mouseCoords[0]); \r\n let xcoord = classContext.xScale(res.x);\r\n let ycoord = classContext.yScaleRight(res.y);\r\n let label = res.x.toLocaleString() + \"%\";\r\n classContext.setState({ \r\n mouseXvalue: res.x, \r\n mouseYvalue: res.y, \r\n calloutX: xcoord, \r\n calloutY: ycoord, \r\n label: label \r\n });\r\n\r\n })\r\n .on(\"mouseout\", function (x ,y ,z) {\r\n classContext.setState({ mouseXvalue: null, mouseYvalue: null, calloutX: 0, calloutY: 0 });\r\n })\r\n .on(\"click\", function () {\r\n classContext.setPointOnClick(classContext.state.calloutX, classContext.state.calloutY, classContext.state.mouseXvalue, classContext.state.mouseYvalue);\r\n }) \r\n\r\n }\r\n\r\n\r\n getUniqueId = () => {\r\n\r\n return \"optSVG\" + String(Math.floor(Math.random() * 6) + 1) + String(Math.floor(Math.random() * 6) + 1) + String(Math.floor(Math.random() * 6) + 1) + String(Math.floor(Math.random() * 6) + 1) + String(Math.floor(Math.random() * 6) + 1); \r\n\r\n }\r\n\r\n bisect = (mx: any) => {\r\n let reduction = this.xScale.invert(mx);\r\n let index = this.myBisect(this.props.reductionData, reduction, 1);\r\n let a = this.props.reductionData[index - 1];\r\n let b = this.props.reductionData[index];\r\n if (a == null && b != null) { return b; }\r\n if (a != null && b == null) { return a; }\r\n if (a == null && b == null) { return { x: null, y: null };}\r\n return reduction - a.reduction > b.reduction - reduction ? b : a;\r\n }\r\n\r\n mouseEvent = (event: any) => {\r\n let res = this.bisect(event.clientX); // hard-coded margin left for now - offset of sorts?\r\n let xcoord = this.xScale(res.x);\r\n let ycoord = this.yScaleRight(res.y);\r\n let label = res.x.toLocaleString() + \"%\";\r\n this.setState({ \r\n mouseXvalue: res.x, \r\n mouseYvalue: res.y, \r\n calloutX: xcoord, \r\n calloutY: ycoord, \r\n label: label \r\n });\r\n }\r\n\r\n mouseLeave = () => {\r\n this.setState({ mouseXvalue: null, mouseYvalue: null, calloutX: 0, calloutY: 0 });\r\n }\r\n\r\n setPointOnClick = (xCoord, yCoord, xValue, yValue) => {\r\n let classContext: OptimizationSVG = this;\r\n this.setState({ \r\n cx: xCoord, \r\n cy: yCoord \r\n });\r\n // send selected point back up so it can be used for data table\r\n classContext.props.clickHandler(xValue, yValue);\r\n }\r\n\r\n render() { \r\n let classContext: OptimizationSVG = this;\r\n const { svgHeight, svgWidth, crcData, reductionData, maxCapacity, bmpGroupInfo, colors, defaultCirclePct } = this.props;\r\n \r\n // right margin is larger to accomodate large numbers in tick labels\r\n const margin = { top: 15, right: 70, bottom: 55, left: 55 };\r\n const width = svgWidth - margin.left - margin.right;\r\n const height = svgHeight - margin.top - margin.bottom;\r\n \r\n // 'range' defines the space on the svg that the element can use (in pixels)\r\n // 'domain' defines the values that will show on the axes\r\n // with range and domain defined, d3 will scale appropriately and create ticks with values on the axes\r\n // if needed, can additionally define how we want ticks formatted (eg $10M instead of 10,000,000)\r\n\r\n classContext.yScaleLeft = d3.scaleLinear().range([height, 0]);\r\n classContext.xScale = d3.scaleLinear().range([0, width]);\r\n classContext.yScaleRight = d3.scaleLinear().range([height, 0]);\r\n classContext.myBisect = d3.bisector(d => d.x).right;\r\n \r\n let defaultcx = 0;\r\n let defaultcy = 430;\r\n\r\n // reductionData & crcData are undefined on first render...\r\n if (reductionData != undefined && maxCapacity != undefined) {\r\n const maxReduction = reductionData.reduce((max, b) => Math.max(max, b.x), reductionData[0].x);\r\n classContext.xScale.domain([0, maxReduction]);\r\n classContext.yScaleRight.domain([0, d3.max(reductionData, d => d.y) || 0]);\r\n classContext.yScaleLeft.domain([0, maxCapacity || 0]);\r\n\r\n // set default location of circle\r\n let circleCoords = reductionData.find(x => x.x == defaultCirclePct);\r\n if (circleCoords != undefined) {\r\n defaultcx = classContext.xScale(circleCoords.x);\r\n defaultcy = classContext.yScaleRight(circleCoords.y);\r\n }\r\n } \r\n \r\n // find y-coord of uppermost area at x-coord of circle (to use for drawing vertical line)\r\n let lineY = 0;\r\n if (crcData != undefined) {\r\n let matchingYs = [];\r\n if (classContext.state.cx == null) {\r\n Object.keys(crcData).forEach(key => {\r\n let item = crcData[key].find(x => classContext.xScale(x.x) == defaultcx);\r\n //console.log('item', item);\r\n if (item != null) {\r\n let match = classContext.yScaleLeft(item.y);\r\n matchingYs.push(match);\r\n }\r\n });\r\n } else {\r\n Object.keys(crcData).forEach(key => {\r\n let item = crcData[key].find(x => classContext.xScale(x.x) == classContext.state.cx);\r\n if (item != null) {\r\n let match = classContext.yScaleLeft(item.y);\r\n matchingYs.push(match);\r\n }\r\n });\r\n }\r\n lineY = Math.min(...matchingYs);\r\n }\r\n \r\n // create props for all chart pieces\r\n const axisBottomProps = {\r\n height,\r\n scale: classContext.xScale,\r\n class: \"opt-viewer-axis\"\r\n };\r\n\r\n const axisLeftProps = { \r\n scale: classContext.yScaleLeft,\r\n class: \"opt-viewer-axis\"\r\n };\r\n\r\n const axisRightProps = { \r\n scale: classContext.yScaleRight,\r\n position: width,\r\n color: \"rgb(128, 0, 0)\",\r\n class: \"opt-viewer-axis opt-viewer-axis-right\"\r\n };\r\n\r\n const labelBottomProps = {\r\n text: \"Reduction (%)\",\r\n width: width,\r\n height: height,\r\n margin: margin,\r\n fontSize: \"15\"\r\n };\r\n\r\n const labelLeftProps = {\r\n text: \"Capacity (ac-ft)\",\r\n width: width,\r\n height: height,\r\n margin: margin,\r\n fontSize: \"15\"\r\n };\r\n\r\n const labelRightProps = {\r\n text: \"Implementation Cost ($)\",\r\n width: width - 5,\r\n height: height,\r\n margin: margin,\r\n fontSize: \"15\"\r\n // color: \"rgb(128, 0, 0)\"\r\n };\r\n\r\n const areaProps = {\r\n crcData,\r\n xScale: classContext.xScale,\r\n yScaleLeft: classContext.yScaleLeft,\r\n yScaleRight: classContext.yScaleRight,\r\n height,\r\n bmpGroupInfo,\r\n colors\r\n };\r\n\r\n const pathProps = {\r\n data: reductionData,\r\n yScale: classContext.yScaleRight,\r\n xScale: classContext.xScale,\r\n height,\r\n fill: \"none\",\r\n color: \"rgb(128, 0, 0)\",\r\n strokeWidth: \"3\"\r\n };\r\n\r\n const circleProps = {\r\n radius: 7,\r\n color: \"rgb(128, 0, 0)\",\r\n cx: classContext.state.cx,\r\n cy: classContext.state.cy,\r\n defaultcx,\r\n defaultcy\r\n };\r\n\r\n const lineProps = {\r\n defaultx: defaultcx,\r\n x: classContext.state.cx,\r\n y: lineY,\r\n // circleCoords: {cx: classContext.state.cx, cy: lineY},\r\n // defaultCircleCoords: {cx: defaultcx, cy: lineY},\r\n height,\r\n color: \"rgb(128, 0, 0)\",\r\n strokeWidth: \"2\"\r\n }\r\n\r\n const calloutProps = {\r\n xvalue: classContext.state.mouseXvalue,\r\n yvalue: classContext.state.mouseYvalue,\r\n xCoord: classContext.state.calloutX,\r\n yCoord: classContext.state.calloutY,\r\n label: classContext.state.label\r\n };\r\n \r\n // NOTE: order of chart pieces is important. first rendered will be in back, with each additional piece overlayed\r\n return (\r\n
\r\n {classContext.props.isSample == true &&
SAMPLE DATA
}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport \"./alertComponent.css\";\r\nimport { IAlertProps } from \"../../interfaces/IAlertProps\";\r\nimport { Button, Icon } from \"semantic-ui-react\";\r\n\r\n\r\n\r\n// How TO USE \r\n\r\n// 1. The component you want to render this from will need these two item in it's state.\r\n// alertIsOpen: boolean = false; \r\n// alertConfguration: alertPropsModel = new alertPropsModel(); \r\n\r\n// 2. In the spot you want to trigger the alert from you will need this. You can configure it as needed(i.e. color, size, weather or not it should be a time out alter, how long before it times out, if it should be a click to close alert, or combo of both options.\r\n\r\n// let alertProps: alertPropsModel = {\r\n// header: \"Entered value must not exceed max % from data\",\r\n// body: '',\r\n// color: 'warning',\r\n// size: 'small-alert', OPT(small-alert, med-alert, large-alert)\r\n// className: '',\r\n// context: this,\r\n// closeBtn: true,\r\n// setTimeOut: true,\r\n// timeOutTime: 3000 e.g. (this has a 3 second timeout)\r\n// };\r\n// this.setState({ alertConfguration: alertProps }, () => {\r\n// this.setState({ alertIsOpen: true });\r\n// });\r\n\r\n\r\nexport class AlertComponentState {\r\n\r\n}\r\n\r\nexport default class AlertComponent extends Component {\r\n state = new AlertComponentState();\r\n\r\n componentDidMount() {\r\n\r\n if (this.props.setTimeOut == true) {\r\n this.startTimeOut()\r\n }\r\n }\r\n\r\n closeAlert = () => {\r\n this.props.context.setState({ alertIsOpen: false });\r\n }\r\n\r\n startTimeOut = () => {\r\n setTimeout(() => {\r\n \r\n this.props.context.setState({ alertIsOpen: false });\r\n }, this.props.timeOutTime)\r\n }\r\n\r\n render() {\r\n let classContext: AlertComponent = this;\r\n return (\r\n
\r\n
\r\n {\r\n this.props.closeBtn &&\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n }\r\n
\r\n
\r\n
{this.props.header}
\r\n\r\n
\r\n

{this.props.body}

\r\n
\r\n
\r\n
\r\n ) \r\n } \r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\nimport { optimizationsummaryitem } from \"./optimizationsummaryitem\";\r\nimport { optimizationcrc } from \"./optimizationcrc\";\r\n\r\nexport class optimizationdeliveryratio extends BaseModel {\r\n\r\n \"guid\": string;\r\n \"scenarios\": Array;\r\n \"defaultcrc\": Array;\r\n \"bmpgroups\": any;\r\n \"reduction\": number;\r\n \"errors\": Array;\r\n\r\n constructor() {\r\n super('optimizationviewer/getratio');\r\n }\r\n} ","import { BaseModel } from \"../interfaces/IBaseModel\";\r\nimport { optimizationsummaryitem } from \"./optimizationsummaryitem\";\r\nimport { optimizationcrc } from \"./optimizationcrc\";\r\n\r\nexport class optimizationassessmentpointdata extends BaseModel {\r\n\r\n \"guid\": string;\r\n \"scenarios\": Array;\r\n //\"defaultcrc\": Array;\r\n //\"bmpgroups\": any;\r\n \"reduction\": number;\r\n \"errors\": Array;\r\n\r\n constructor() {\r\n super('optimizationviewer/getapdata');\r\n }\r\n} ","import React, { Component } from \"react\";\r\nimport \"./scenarioViewer.css\";\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport { Dropdown, Button, FormGroup, Label, Input, Grid, Segment, Loader } from \"semantic-ui-react\";\r\nimport { IOptimizationViewer } from \"../../../interfaces/IOptimizationViewer\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { optimizationsummary } from \"../../../models/optimizationsummary\";\r\nimport ResponsiveChart from \"../D3/ResponsiveChart\";\r\nimport OptimizationTable from \"./optimizationTable\";\r\nimport DropdownH2O from \"../../DOMObjects/Dropdown\";\r\nimport { DropdownOption } from \"../../DOMObjects/IDropdownProps\"\r\nimport { optimizationimplementationplan } from \"../../../models/optimizationimplementationplan\";\r\nimport { sustainToLSPCbatch } from \"../../../models/sustainToLSPCbatch\";\r\nimport { optimizationsummaryitem } from \"../../../models/optimizationsummaryitem\";\r\nimport ReactDOM from \"react-dom\";\r\nimport html2canvas from 'html2canvas';\r\nimport OptimizationSVG from \"../D3/chart/OptimizationSVG\";\r\nimport { TooltipModal } from \"../../toolTipModal/toolTipModal\";\r\nimport * as d3 from 'd3';\r\n\r\nimport Canvg from 'canvg';\r\nimport { alertPropsModel } from \"../../../models/alertPropsModel\";\r\nimport AlertComponent from \"../../AlertComponent/alertComponent\";\r\nimport { optimizationdeliveryratio } from \"../../../models/optimizationdeliveryratio\";\r\nimport { optimizationassessmentpointdata } from \"../../../models/optimizationassessmentpointdata\";\r\n\r\nexport class ScenarioViewerState {\r\n scenario: number;\r\n assessmentpoint: number;\r\n factor: string = \"Flow\";\r\n factorNumber: number = 0; \r\n scenIndexToLookAt: number = 0;\r\n apIndexToLookAt: number = 0;\r\n facIndexToLookAt: number = 0;\r\n reductionCoordinateData: Array;\r\n bmpCoordinateData: Array;\r\n maxCapacity: number = 0;\r\n currentCRC: any;\r\n bmpGroups: any;\r\n tableData: any;\r\n tableBmps: any;\r\n tableFactor: string;\r\n tableTitle: string;\r\n tablePercent: number;\r\n tableMaxPct: number;\r\n tableTitleIsCustom: boolean = false;\r\n defaultCirclePct: number = 0;\r\n isUpdating: boolean = false;\r\n updateMsg: string = \"Loading...\";\r\n currentCiclePct: number = 0;\r\n scenOptions: any = [];\r\n apsOptions: any = [];\r\n facOptions: any = [];\r\n key: number;\r\n toggleFetchData: boolean = false;\r\n chartColors: any = {\r\n \"Infiltration Well\": \"#F59841\",\r\n \"LID, Bioretention\": \"#62AEE4\", \r\n \"LID, Other\": \"#009933\", \r\n \"Regional Treatment\": \"#C288F8\",\r\n \"Region Infiltration\": \"#4DD6D3\", // TODO remove once updated to 'regional' in all places\r\n \"Regional Infiltration\": \"#4DD6D3\",\r\n \"Regional TBD\":\"#F9E43E\",\r\n \"Existing LID\": \"#D5D5D5\",\r\n \"Existing Regional\": \"#CCC2CC\",\r\n \"MJR BMP\": \"#FF7777\"\r\n };\r\n isGeneratingPlan: boolean = false;\r\n isGeneratingBatch: boolean = false;\r\n isGeneratingRatio: boolean = false;\r\n isGeneratingAPData: boolean = false;\r\n alertIsOpen: boolean = false; \r\n alertConfguration: alertPropsModel = new alertPropsModel();\r\n numFadeOut: boolean = false;\r\n}\r\n\r\nexport default class ScenarioViewer extends Component {\r\n\r\n state = new ScenarioViewerState();\r\n child: React.RefObject = React.createRef();\r\n\r\n // 0.6875 because widescreen break-down is 11 and 5 thus 11/16 = 0.6875. Other screens (less than 1920) go full width.\r\n curveGraphWidth: number = document.body.clientWidth >= 1920 ? (document.body.clientWidth * 0.6875) - 100 : document.body.clientWidth - 100;\r\n\r\n componentDidMount() {\r\n\r\n let classContext: ScenarioViewer = this;\r\n\r\n // on load, use first scenario to populate graph and set initial state\r\n let defaultScenario = classContext.props.scenariodata.scenarios[0];\r\n let sortedBmpGroups = classContext.props.scenariodata.bmpGroups;\r\n // Set factor name early - lots of dependencies\r\n classContext.setState({ factor: defaultScenario.factorName }, () => {\r\n // find point at middle reduction value to place initial dot and populate initial table\r\n let reductionValues = classContext.props.scenariodata.defaultCRC.map(x => x.responses.find(y => y.name == defaultScenario.factorName).value);\r\n let lastCRC = classContext.props.scenariodata.defaultCRC[classContext.props.scenariodata.defaultCRC.length - 1];\r\n let maxPct = lastCRC.responses.find(x => x.name == defaultScenario.factorName).value;\r\n let middle = maxPct / 2;\r\n var closest = reductionValues.reduce(function (prev, curr) {\r\n return (Math.abs(curr - middle) < Math.abs(prev - middle) ? curr : prev);\r\n });\r\n\r\n // only want to show groups in table that are represented on chart\r\n let tableBmpGroups = lastCRC.bmPs.filter(x => x.value != 0).map(x => x.name);\r\n\r\n let defaultTableData = classContext.props.scenariodata.defaultCRC.find(x => x.responses.find(y => y.name == defaultScenario.factorName).value == closest);\r\n\r\n let tableTitle = `Scenario ${defaultScenario.scenario} (${defaultScenario.factorName} - ${defaultScenario.mjrEffect}) -- Assessment Point ${defaultScenario.assessmentPoint} (${defaultScenario.city})`;\r\n let tablePercent = defaultTableData.responses.find(x => x.name == defaultScenario.factorName).value.toFixed(2);\r\n\r\n // dynamically adding colors not already in the color pallet - default is set of primary colors:\r\n let currentColors = this.extendColors(tableBmpGroups);\r\n //console.log('did mount', this.props);\r\n classContext.setState({\r\n scenario: defaultScenario.scenario,\r\n assessmentpoint: defaultScenario.assessmentPoint,\r\n currentCRC: classContext.props.scenariodata.defaultCRC,\r\n bmpGroups: sortedBmpGroups,\r\n defaultCirclePct: closest,\r\n currentCiclePct: closest,\r\n key: this.props.scenariodata.key,\r\n tableFactor: defaultScenario.factorName,\r\n tableData: defaultTableData,\r\n tableBmps: tableBmpGroups,\r\n tableTitle: tableTitle,\r\n tablePercent: tablePercent,\r\n tableMaxPct: maxPct,\r\n chartColors: currentColors\r\n }, () => {\r\n classContext.generateSenarioDropdownOptions();\r\n classContext.generateAPsDropdownOptions();\r\n classContext.generateFactorDropdownOptions();\r\n classContext.getBatchData();\r\n //classContext.getPlanData();\r\n });\r\n\r\n classContext.handleReductionLineData(classContext.props.scenariodata.defaultCRC);\r\n classContext.handleCapacityAreasData(classContext.props.scenariodata.defaultCRC);\r\n })\r\n }\r\n\r\n componentDidUpdate = () => {\r\n this.props.onStateUpdate(this.state);\r\n }\r\n\r\n onTableTitleUpdate = (title, pct) => {\r\n if (this.state.tableTitle != title) {\r\n this.setState({ \r\n tableTitle: title,\r\n tableTitleIsCustom: true\r\n });\r\n }\r\n }\r\n\r\n onTablePercentUpdate = (pct) => {\r\n if (this.state.tablePercent != pct) {\r\n // update circle and table data to closest matching percent\r\n let reductionValues = this.state.currentCRC.map(x => x.responses.find(y => y.name == this.state.tableFactor).value);\r\n var closest = reductionValues.filter(x => x >= pct).reduce(function(prev, curr) {\r\n return (Math.abs(curr - pct) < Math.abs(prev - pct) ? curr : prev);\r\n });\r\n // use closest to reposition circle and re-populate data table\r\n let matchingData = this.state.currentCRC.find(x => x.responses.find(y => y.name == this.state.tableFactor).value == closest);\r\n this.setState({\r\n tablePercent: closest.toFixed(2),\r\n defaultCirclePct: closest,\r\n tableData: matchingData,\r\n currentCiclePct: closest\r\n })\r\n }\r\n }\r\n\r\n updateViewer() {\r\n let classContext: ScenarioViewer = this;\r\n if (classContext.state.toggleFetchData == true) {\r\n classContext.setState({ isUpdating: true, toggleFetchData: false });\r\n\r\n // use selected ap and scenario to find matching scenario summary, then fetch appropriate crc data\r\n let matchingScenario = classContext.props.scenariodata.scenarios.filter(x => x.scenario == classContext.state.scenario && x.assessmentPoint == classContext.state.assessmentpoint);\r\n\r\n if (matchingScenario.length > 0) {\r\n let data = new optimizationsummary();\r\n data.guid = classContext.props.scenariodata.guid;\r\n data.scenarios = [matchingScenario];\r\n data.isSample = classContext.props.scenariodata.isSample;\r\n\r\n optimizationsummary.axiosGetAll(data).then((r: AxiosResponse) => {\r\n if (r.data != null) {\r\n let data: optimizationsummary = r.data;\r\n if (data.errors != null && data.errors.length > 0) {\r\n //console.log('errors in opt data');\r\n let alertProps: alertPropsModel = {\r\n header: \"There was an error loading the data\",\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: this,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 2500\r\n };\r\n this.setState({ alertConfguration: alertProps, isUpdating: false }, () => {\r\n this.setState({ alertIsOpen: true });\r\n });\r\n } else {\r\n data.defaultcrc = r.data.defaultCRC;\r\n data.bmpgroups = r.data.bmpGroups;\r\n // find point at middle reduction value to place initial dot and populate initial table\r\n let reductionValues = data.defaultcrc.map(x => x.responses.find(y => y.name == classContext.state.factor).value);\r\n let maxPct = data.defaultcrc[data.defaultcrc.length - 1].responses.find(x => x.name == classContext.state.factor).value;\r\n let middle = maxPct / 2;\r\n\r\n // find closest matching % value in data (next up if no exact match)\r\n var closest = reductionValues.reduce(function (prev, curr) {\r\n return (Math.abs(curr - middle) < Math.abs(prev - middle) ? curr : prev);\r\n });\r\n\r\n // only want to show groups in table that are represented on chart\r\n let tableBmpGroups = r.data.defaultCRC[r.data.defaultCRC.length - 1].bmPs.filter(x => x.value != 0).map(x => x.name);\r\n\r\n let defaultTableData = data.defaultcrc.find(x => x.responses.find(y => y.name == classContext.state.factor).value == closest);\r\n\r\n let tableTitle;\r\n if (!classContext.state.tableTitleIsCustom) {\r\n tableTitle = `Scenario ${classContext.state.scenario} (${matchingScenario[0].factorName} - ${matchingScenario[0].mjrEffect}) -- Assessment Point ${classContext.state.assessmentpoint} (${matchingScenario[0].city})`;\r\n } else {\r\n tableTitle = classContext.state.tableTitle\r\n };\r\n\r\n // dynamically adding colors not already in the color pallet - default is set of primary colors:\r\n let currentColors = this.extendColors(tableBmpGroups);\r\n\r\n this.setState({ numFadeOut: true }, () => {\r\n setTimeout(() => {\r\n this.setState({\r\n numFadeOut: false,\r\n chartColors: currentColors,\r\n currentCRC: data.defaultcrc,\r\n bmpGroups: data.bmpgroups,\r\n defaultCirclePct: closest,\r\n currentCiclePct: closest,\r\n tableFactor: classContext.state.factor,\r\n tableData: defaultTableData,\r\n tableBmps: tableBmpGroups,\r\n tableTitle: tableTitle,\r\n tablePercent: closest.toFixed(2),\r\n tableMaxPct: maxPct,\r\n isUpdating: false\r\n\r\n }, () => {\r\n // pass data to graph component\r\n classContext.handleReductionLineData(data.defaultcrc);\r\n classContext.handleCapacityAreasData(data.defaultcrc);\r\n this.child.current.forceResetCircle();\r\n });\r\n\r\n }, 500);\r\n })\r\n }\r\n }\r\n })\r\n } else {\r\n // alert(\"Please choose a valid combination\");\r\n\r\n let alertProps: alertPropsModel = {\r\n header: \"Please choose a valid combination\",\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: this,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 2500\r\n };\r\n classContext.setState({ alertConfguration: alertProps }, () => {\r\n classContext.setState({ alertIsOpen: true, isUpdating: false });\r\n });\r\n }\r\n } else {\r\n // If only eval factor has changed we already have the data\r\n // \r\n //console.log('else');\r\n classContext.setState({ isUpdating: true });\r\n let reductionValues = classContext.state.currentCRC.map(x => x.responses.find(y => y.name == classContext.state.factor).value);\r\n let maxPct = classContext.state.currentCRC[classContext.state.currentCRC.length - 1].responses.find(x => x.name == classContext.state.factor).value;\r\n\r\n // get index of current reduction selection and then get new reduction value from index (index = ML)\r\n let prevReductionValues = classContext.state.currentCRC.map(x => x.responses.find(y => y.name == classContext.state.tableFactor).value);\r\n let currentSolutionNumber = prevReductionValues.indexOf(classContext.state.currentCiclePct);\r\n\r\n // find closest matching % value in data (next up if no exact match)\r\n var closest = reductionValues[currentSolutionNumber];\r\n\r\n // only want to show groups in table that are represented on chart\r\n let tableBmpGroups = classContext.state.currentCRC[classContext.state.currentCRC.length - 1].bmPs.filter(x => x.value != 0).map(x => x.name);\r\n\r\n let defaultTableData = classContext.state.currentCRC.find(x => x.responses.find(y => y.name == classContext.state.factor).value == closest);\r\n\r\n // dynamically adding colors not already in the color pallet - default is set of primary colors:\r\n let currentColors = this.extendColors(tableBmpGroups);\r\n\r\n this.setState({ numFadeOut: true }, () => {\r\n setTimeout(() => {\r\n this.setState({\r\n numFadeOut: false,\r\n chartColors: currentColors,\r\n defaultCirclePct: closest,\r\n currentCiclePct: closest,\r\n tableFactor: classContext.state.factor,\r\n tableData: defaultTableData,\r\n tableBmps: tableBmpGroups,\r\n tablePercent: closest.toFixed(2),\r\n tableMaxPct: maxPct,\r\n isUpdating: false\r\n\r\n }, () => {\r\n // pass data to graph component\r\n classContext.handleReductionLineData(classContext.state.currentCRC);\r\n classContext.handleCapacityAreasData(classContext.state.currentCRC);\r\n //this.child.current.forceResetCircle();\r\n });\r\n\r\n }, 500);\r\n })\r\n }\r\n }\r\n\r\n extendColors(tableBmpGroups: any): any {\r\n let currentColors = Object.assign({}, this.state.chartColors);\r\n let dynamicColors = ['#e6194b', '#3cb44b', '#ffe119', '#4363d8', '#911eb4', '#46f0f0', '#f032e6', '#bcf60c', '#fabebe', '#008080', '#e6beff', '#9a6324', '#fffac8', '#800000', '#aaffc3', '#808000', '#ffd8b1', '#000075', '#808080', '#ffffff', '#000000', '#f58231']\r\n for (let c = 0; c < tableBmpGroups.length; c++) {\r\n if (currentColors[tableBmpGroups[c]] === undefined) {\r\n currentColors[tableBmpGroups[c]] = dynamicColors[c];\r\n }\r\n }\r\n return currentColors;\r\n }\r\n\r\n handleReductionLineData(crc) {\r\n let classContext: ScenarioViewer = this;\r\n\r\n // turn this data into array of x,y coordinate pair objects (where x = percent reduction, y = total cost)\r\n var coordinates = crc.map(data => ({ \r\n x: data.responses.filter(r => r.name == classContext.state.factor)[0].value, \r\n y: data.cost \r\n }));\r\n classContext.setState({ reductionCoordinateData: coordinates });\r\n };\r\n\r\n handleCapacityAreasData(crc) {\r\n let classContext: ScenarioViewer = this;\r\n let bmpData = {};\r\n let maxCapacity = 0;\r\n let totalCap = 0;\r\n // for each \"stack\" of bmps, create array of coordinates and add it to bmpData\r\n crc.forEach(datum => {\r\n let reduction = datum.responses.filter(r => r.name == classContext.state.factor)[0].value; \r\n \r\n // scale left axis based on total capacity of all bmps for a selection\r\n let capacity = datum.totalCapacity;\r\n maxCapacity = Math.max(maxCapacity, capacity);\r\n totalCap += capacity;\r\n\r\n datum.bmPs.forEach(bmp => {\r\n if(bmpData[bmp.name] == undefined) {\r\n bmpData[bmp.name] = [{ x: reduction, y: bmp.value }];\r\n } else {\r\n bmpData[bmp.name].push({ x: reduction, y: bmp.value });\r\n };\r\n }); \r\n });\r\n\r\n // \"stack\" bmps by adding y values of previous points\r\n // in order to \"stack\", need each y coordinate to incorporate previous y values at the same point \r\n // add previous y value each time so by the end, the last bmpgroup accounts for all capacity\r\n // use reverse order array of bmp group names to iterate over\r\n let reverseBmpArray;\r\n if (classContext.state.bmpGroups == undefined) {\r\n reverseBmpArray = classContext.props.scenariodata.bmpGroups.map(x => x.groupName).reverse();\r\n } else {\r\n reverseBmpArray = classContext.state.bmpGroups.map(x => x.groupName).reverse();\r\n };\r\n for (let i = 1; i < reverseBmpArray.length; i++) {\r\n let bmp = reverseBmpArray[i];\r\n let prevbmp = reverseBmpArray[i - 1];\r\n \r\n for (let j = 0; j < bmpData[bmp].length; j++) {\r\n let currentY = bmpData[bmp][j].y;\r\n let prevY = bmpData[prevbmp][j].y;\r\n let newY = currentY + prevY;\r\n bmpData[bmp][j].y = newY;\r\n };\r\n };\r\n\r\n classContext.setState({ \r\n bmpCoordinateData: bmpData, \r\n maxCapacity: maxCapacity \r\n }, () => {\r\n classContext.getBatchData();\r\n //classContext.getPlanData();\r\n });\r\n }\r\n\r\n handlePctReductionSelection = (pctRed, cost) => {\r\n // get first matching crc item, because depending on data, there may be repeats that have the same values\r\n let matchingCRCitem = this.state.currentCRC.filter(x => x.cost == cost && x.responses.filter(y => y.name == this.state.tableFactor)[0].value == pctRed)[0];\r\n\r\n let tablePct = matchingCRCitem.responses.find(x => x.name == this.state.tableFactor).value.toFixed(2); \r\n\r\n this.setState({ numFadeOut: true }, () => {\r\n setTimeout(() => {\r\n this.setState({\r\n numFadeOut: false,\r\n tableData: matchingCRCitem, \r\n currentCiclePct: pctRed,\r\n tablePercent: tablePct \r\n });\r\n\r\n }, 500);\r\n });\r\n }\r\n\r\n updateDropdownScenario = (classContext: any) => {\r\n if (classContext.props.dropdownItems.length > 0) {\r\n if (classContext.state.value !== this.state.scenario) {\r\n classContext.setState({ value: this.state.scenario, loading: false, toggleFetchData: true});\r\n };\r\n };\r\n };\r\n\r\n dropdownScenario = (event: any, data: any, index: any) => {\r\n let classContext: ScenarioViewer = this;\r\n let key = 0;\r\n this.state.scenOptions.forEach((o, thisIndex) => {\r\n if (o == data.value) {\r\n key = thisIndex;\r\n }\r\n });\r\n\r\n this.setState({ scenIndexToLookAt: key, scenario: data.value, toggleFetchData: true }, () => {\r\n // call this to update APs dropdown\r\n classContext.generateAPsDropdownOptions();\r\n });\r\n };\r\n\r\n updateDropdownAPs = (classContext: any) => {\r\n if (classContext.props.dropdownItems.length > 0) {\r\n if (classContext.state.value !== this.state.assessmentpoint) {\r\n classContext.setState({ value: this.state.assessmentpoint, loading: false, toggleFetchData: true})\r\n };\r\n };\r\n };\r\n\r\n dropdownAPs = (event: any, data: any, index: any) => {\r\n let key = 0;\r\n this.state.apsOptions.forEach((o, thisIndex) => {\r\n if (o == data.value) {\r\n key = thisIndex;\r\n };\r\n });\r\n\r\n this.setState({ apIndexToLookAt: key, assessmentpoint: data.value, toggleFetchData: true }, () => {\r\n })\r\n };\r\n\r\n updateDropdownFactor = (classContext: any) => {\r\n if (classContext.props.dropdownItems.length > 0) {\r\n if (classContext.state.value !== this.state.factorNumber) {\r\n classContext.setState({value: this.state.factorNumber, loading: false})\r\n };\r\n };\r\n };\r\n\r\n dropdownFactor = (event: any, data: any, index: any) => {\r\n let key = 0;\r\n let factor;\r\n let factorNummber;\r\n this.state.facOptions.forEach((o, thisIndex) => {\r\n if (o.optionValue == data.value) {\r\n key = thisIndex;\r\n factor = data.options[data.value].text;\r\n factorNummber = thisIndex;\r\n }; \r\n });\r\n\r\n this.setState({ facIndexToLookAt: key, factor: factor, factorNumber: factorNummber });\r\n };\r\n\r\n generateSenarioDropdownOptions = () => {\r\n let classContext: ScenarioViewer = this;\r\n\r\n let scenOptions;\r\n let scens = [];\r\n classContext.props.scenariodata.scenarios.forEach(x => scens.push({ key: x.scenario, text: `${x.scenario} - ${x.factorName} - ${x.mjrEffect}`, value: x.scenario }));\r\n const unique = Array.from(new Set(scens.map(x => x.key))).map(key => {\r\n let dropOption = new DropdownOption();\r\n dropOption.optionText = scens.find(x => x.key === key).text;\r\n dropOption.optionValue = scens.find(x => x.key === key).value;\r\n\r\n return dropOption;\r\n });\r\n scenOptions = unique;\r\n\r\n this.setState({ scenOptions: scenOptions});\r\n }\r\n\r\n generateAPsDropdownOptions = () => {\r\n let classContext: ScenarioViewer = this;\r\n let APs = [];\r\n let filtered = classContext.props.scenariodata.scenarios.filter(x => x.scenario == classContext.state.scenario);\r\n let sortedAPs = filtered.sort((a: any, b: any) => {\r\n if ( a.assessmentPoint < b.assessmentPoint ){\r\n return -1;\r\n }\r\n if ( a.assessmentPoint > b.assessmentPoint ){\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n let matchApId: boolean = false; // used to verify the current AP ID selection is valid in the new result set\r\n if (sortedAPs.length > 0) {\r\n sortedAPs.forEach((x) => {\r\n\r\n let dropOption = new DropdownOption();\r\n dropOption.optionText = `${x.assessmentPoint} - ${x.city}`;\r\n dropOption.optionValue = x.assessmentPoint;\r\n\r\n APs.push(dropOption);\r\n if (classContext.state.assessmentpoint == x.assessmentPoint) {\r\n matchApId = true;\r\n }\r\n });\r\n };\r\n classContext.setState({ apsOptions: APs })\r\n if (matchApId === false) {\r\n classContext.setState({ assessmentpoint: sortedAPs[0].assessmentPoint });\r\n }\r\n }\r\n\r\n generateFactorDropdownOptions = () => {\r\n let factors = [\"Flow\",\"SOSED\", \"PLS_TN\", \"PLS_TP\", \"PLS_TCd\", \"PLS_TCu\", \"PLS_TPb\", \"PLS_TZn\"];\r\n let formattedFactors: any = [];\r\n factors.forEach((fact, index) => {\r\n let dropOption = new DropdownOption();\r\n dropOption.optionText = fact;\r\n dropOption.optionValue = index;\r\n formattedFactors.push(dropOption);\r\n });\r\n\r\n this.setState({ facOptions: formattedFactors }, () => {\r\n let data: any = {};\r\n data.options = []\r\n for (var i = 0; i < factors.length; i++) {\r\n var item: any = {};\r\n item.key = i;\r\n item.value = i;\r\n item.text = factors[i];\r\n data.options.push(item);\r\n if (factors[i] == this.state.tableFactor) {\r\n data.value = i;\r\n }\r\n }\r\n this.dropdownFactor(null, data, null);\r\n });\r\n }\r\n\r\n findChildElement = (elem: any, childClassName: string): any => {\r\n for (var i = 0; i < elem.children.length; i++) {\r\n if (elem.children[i].classList.contains(childClassName)) {\r\n return elem.children[i];\r\n } else {\r\n let res = this.findChildElement(elem.children[i], childClassName);\r\n if (res != null) { return res;}\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n updateColor = (color: string, bmpName: string) => {\r\n //console.log('update color', color, bmpName, this);\r\n let currentColors = Object.assign({}, this.state.chartColors);\r\n if (currentColors[bmpName] !== undefined) {\r\n currentColors[bmpName] = color;\r\n this.setState({ chartColors: currentColors });\r\n }\r\n }\r\n\r\n generateAPData = () => {\r\n //alert('generate ap');\r\n let classContext: ScenarioViewer = this;\r\n classContext.setState({ isGeneratingAPData: true });\r\n let matchingScenario: optimizationsummaryitem[] = classContext.props.scenariodata.scenarios.filter(x => x.scenario == classContext.state.scenario && x.assessmentPoint == classContext.state.assessmentpoint);\r\n if (matchingScenario != null && matchingScenario.length > 0) {\r\n matchingScenario[0].factorname = classContext.state.factor;\r\n\r\n \r\n // let data = new optimizationassessmentpointdata();\r\n // data.guid = classContext.props.scenariodata.guid;\r\n // data.scenarios = matchingScenario;\r\n // data.reduction = classContext.state.currentCiclePct;\r\n\r\n let formData: FormData = new FormData();\r\n formData.append(\"guid\", classContext.props.scenariodata.guid);\r\n formData.append(\"scenarios\", JSON.stringify(matchingScenario));\r\n formData.append(\"reduction\", classContext.state.currentCiclePct.toString());\r\n\r\n let filename: string = \"apData.ccf\";\r\n //filename = classContext.generateAPFileName(filename, \"APData_\", \".ccf\");\r\n\r\n optimizationassessmentpointdata.axiosPostImage(formData)\r\n .then((r: AxiosResponse) => {\r\n classContext.setState({ isGeneratingAPData: false });\r\n const blob = new Blob([r.data], { type: 'text/plain' });\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(blob, filename);\r\n } else {\r\n const blob = new Blob([r.data], { type: \"text/plain\" });\r\n var link = document.createElement('a');\r\n var href = window.URL.createObjectURL(blob);\r\n link.setAttribute('href', href);\r\n link.setAttribute('download', filename);\r\n document.body.appendChild(link);\r\n link.click();\r\n setTimeout(() => {\r\n window.URL.revokeObjectURL(href);\r\n document.body.removeChild(link);\r\n }, 0)\r\n }\r\n })\r\n .catch((r: AxiosResponse) => {\r\n //console.log(\"error getting implementation plan \", r.data, classContext)\r\n classContext.setState({ isGeneratingAPData: false });\r\n let alertProps: alertPropsModel = {\r\n header: \"There was an error generating the assessment point data.\",\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: classContext,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 2500\r\n };\r\n\r\n //console.log('after props', alertProps);\r\n classContext.setState({ alertConfguration: alertProps }, () => {\r\n classContext.setState({ alertIsOpen: true });\r\n });\r\n })\r\n }\r\n }\r\n\r\n generateDeliveryRatios = () => {\r\n //alert('generating ratio');\r\n let classContext: ScenarioViewer = this;\r\n classContext.setState({ isGeneratingRatio: true });\r\n let matchingScenario: optimizationsummaryitem[] = classContext.props.scenariodata.scenarios.filter(x => x.scenario == classContext.state.scenario && x.assessmentPoint == classContext.state.assessmentpoint);\r\n if (matchingScenario != null && matchingScenario.length > 0) {\r\n matchingScenario[0].factorname = classContext.state.factor;\r\n\r\n let formData: FormData = new FormData();\r\n formData.append(\"guid\", classContext.props.scenariodata.guid);\r\n formData.append(\"scenarios\", JSON.stringify(matchingScenario));\r\n formData.append(\"reduction\", classContext.state.currentCiclePct.toString());\r\n\r\n let data = new optimizationdeliveryratio();\r\n //data.guid = classContext.props.scenariodata.guid;\r\n //data.scenarios = JSON.stringify(matchingScenario);\r\n //data.reduction = classContext.state.currentCiclePct;\r\n\r\n optimizationdeliveryratio.axiosPostImage(formData)\r\n .then((r: AxiosResponse) => {\r\n classContext.setState({ isGeneratingRatio: false });\r\n let filename: string = \"DeliveryRatio.mrc\";\r\n const blob = new Blob([r.data], { type: 'text/plain' });\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(blob, filename);\r\n } else {\r\n const blob = new Blob([r.data], { type: \"text/plain\" });\r\n var link = document.createElement('a');\r\n var href = window.URL.createObjectURL(blob);\r\n link.setAttribute('href', href);\r\n link.setAttribute('download', filename);\r\n document.body.appendChild(link);\r\n link.click();\r\n setTimeout(() => {\r\n window.URL.revokeObjectURL(href);\r\n document.body.removeChild(link);\r\n }, 0)\r\n }\r\n })\r\n .catch((r: AxiosResponse) => {\r\n //console.log(\"error getting implementation plan \", r.data, classContext)\r\n classContext.setState({ isGeneratingRatio: false });\r\n let alertProps: alertPropsModel = {\r\n header: \"There was an error generating the delivery ratio.\",\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: classContext,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 2500\r\n };\r\n\r\n //console.log('after props', alertProps);\r\n classContext.setState({ alertConfguration: alertProps }, () => {\r\n classContext.setState({ alertIsOpen: true });\r\n });\r\n })\r\n }\r\n }\r\n\r\n\r\n generateImplementationPlan = () => {\r\n let classContext: ScenarioViewer = this;\r\n classContext.setState({ isGeneratingPlan: true });\r\n \r\n let elem = ReactDOM.findDOMNode(classContext);\r\n //console.log('elem', elem);\r\n let svgElem = classContext.findChildElement(elem, 'optSVG');\r\n\r\n\r\n if (svgElem == null) {\r\n // alert('element not found'); \r\n let alertProps: alertPropsModel = {\r\n header: \"Element not found\",\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: classContext,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 2500\r\n };\r\n classContext.setState({ alertConfguration: alertProps }, () => {\r\n classContext.setState({ alertIsOpen: true });\r\n });\r\n\r\n\r\n \r\n }\r\n else {\r\n svgElem.scrollTo(0,0);\r\n window.scrollTo(0,0);\r\n\r\n \r\n let newCanvas = document.createElement(\"canvas\");\r\n let ctx = newCanvas.getContext(\"2d\");\r\n // d3.select(svgElem).style(\"background-color\", \"white\");\r\n \r\n\r\n Canvg.from(ctx, svgElem.outerHTML, {ignoreClear: true}).then((canvg: Canvg) => {\r\n //get the current ImageData for the canvas.\r\n // canvg.render();\r\n\r\n canvg.start();\r\n\r\n canvg.ready().then((x => {\r\n\r\n let data = ctx.getImageData(0, 0, classContext.curveGraphWidth, 500);\r\n \r\n //store the current globalCompositeOperation\r\n let compositeOperation = ctx.globalCompositeOperation;\r\n \r\n //set to draw behind current content\r\n ctx.globalCompositeOperation = \"destination-over\";\r\n \r\n //set background color\r\n ctx.fillStyle = \"white\";\r\n \r\n //draw background / rect on entire canvas\r\n ctx.fillRect(0, 0, classContext.curveGraphWidth,500);\r\n \r\n let imgData = newCanvas.toDataURL('image/jpeg'); \r\n \r\n //clear the canvas\r\n ctx.clearRect(0, 0, classContext.curveGraphWidth,500);\r\n \r\n //restore it with original / cached ImageData\r\n ctx.putImageData(data, 0,0);\t\t\r\n \r\n //reset the globalCompositeOperation to what it was\r\n ctx.globalCompositeOperation = compositeOperation;\r\n \r\n let matchingScenario: optimizationsummaryitem[] = classContext.props.scenariodata.scenarios.filter(x => x.scenario == classContext.state.scenario && x.assessmentPoint == classContext.state.assessmentpoint);\r\n matchingScenario[0].factorname = classContext.state.factor;\r\n if (matchingScenario != null && matchingScenario.length > 0) {\r\n\r\n let formData: FormData = new FormData();\r\n\r\n formData.append(\"base64image\", imgData);\r\n formData.append(\"guid\", classContext.props.scenariodata.guid);\r\n formData.append(\"scenarios\", JSON.stringify(matchingScenario));\r\n formData.append(\"reduction\", classContext.state.currentCiclePct.toString());\r\n\r\n optimizationimplementationplan.axiosPostImage(formData)\r\n .then((r: AxiosResponse) => {\r\n classContext.setState({ isGeneratingPlan: false });\r\n let filename: string = \"ImplementationPlan.xlsx\";\r\n const blob = new Blob([r.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(blob, filename);\r\n } else {\r\n const blob = new Blob([r.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n var link = document.createElement('a');\r\n var href = window.URL.createObjectURL(blob);\r\n link.setAttribute('href', href);\r\n link.setAttribute('download', filename);\r\n document.body.appendChild(link);\r\n link.click();\r\n setTimeout(() => {\r\n canvg.stop();\r\n window.URL.revokeObjectURL(href);\r\n document.body.removeChild(link);\r\n }, 0)\r\n }\r\n })\r\n .catch((r: AxiosResponse) => {\r\n //console.log(\"error getting implementation plan \", r.data)\r\n classContext.setState({ isGeneratingPlan: false });\r\n let alertProps: alertPropsModel = {\r\n header: \"There was an error generating the implementation plan\",\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: classContext,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 2500\r\n };\r\n classContext.setState({ alertConfguration: alertProps }, () => {\r\n classContext.setState({ alertIsOpen: true });\r\n });\r\n })\r\n }\r\n\r\n }));\r\n\r\n\r\n })\r\n .catch((error) => {\r\n console.log(\"error creating image.\");\r\n classContext.setState({ isGeneratingPlan: false });\r\n });\r\n }\r\n }\r\n \r\n getBatchData = () => {\r\n\r\n let classContext: ScenarioViewer = this;\r\n let matchingScenario: optimizationsummaryitem[] = classContext.props.scenariodata.scenarios.filter(x => x.scenario == classContext.state.scenario && x.assessmentPoint == classContext.state.assessmentpoint);\r\n if (matchingScenario != null && matchingScenario.length > 0) {\r\n matchingScenario[0].factorname = classContext.state.factor;\r\n\r\n let data = new sustainToLSPCbatch();\r\n data.guid = classContext.props.scenariodata.guid;\r\n data.scenarios = matchingScenario;\r\n data.reduction = classContext.state.currentCiclePct;\r\n\r\n classContext.props.setBatchData(data, classContext.props.indexValue);\r\n }\r\n };\r\n\r\n\r\n //getPlanData = () => {\r\n // let classContext: ScenarioViewer = this;\r\n\r\n \r\n //};\r\n\r\n getSustainToLSPCBath = () => {\r\n //console.log('generating batch: ', this.state.currentCiclePct);\r\n let classContext: ScenarioViewer = this;\r\n classContext.setState({ isGeneratingBatch: true }, () => {\r\n\r\n // use selected ap and scenario to find matching scenario summary, then fetch appropriate crc data\r\n let matchingScenario: optimizationsummaryitem[] = classContext.props.scenariodata.scenarios.filter(x => x.scenario == classContext.state.scenario && x.assessmentPoint == classContext.state.assessmentpoint);\r\n if (matchingScenario != null && matchingScenario.length > 0) {\r\n matchingScenario[0].factorname = classContext.state.factor;\r\n\r\n //let data = new sustainToLSPCbatch();\r\n //data.guid = classContext.props.scenariodata.guid;\r\n //data.scenarios = JSON.stringify(matchingScenario);\r\n //data.reduction = classContext.state.currentCiclePct;\r\n\r\n let formData: FormData = new FormData();\r\n formData.append(\"guid\", classContext.props.scenariodata.guid);\r\n formData.append(\"scenarios\", JSON.stringify(matchingScenario));\r\n formData.append(\"reduction\", classContext.state.currentCiclePct.toString());\r\n\r\n sustainToLSPCbatch.axiosPostImage(formData)\r\n .then((r: AxiosResponse) => {\r\n classContext.setState({ isGeneratingBatch: false }, () => {\r\n let filename: string = \"Sustain2LSPC.zip\";\r\n const bloboBaggins = new Blob([r.data], { type: \"application/zip\" });\r\n\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(bloboBaggins, filename);\r\n } else {\r\n const bloboBaggins = new Blob([r.data], { type: 'application/zip' });\r\n var link = document.createElement('a');\r\n var href = window.URL.createObjectURL(bloboBaggins);\r\n link.setAttribute('href', href);\r\n link.setAttribute('download', filename);\r\n document.body.appendChild(link);\r\n link.click();\r\n setTimeout(() => {\r\n window.URL.revokeObjectURL(href);\r\n document.body.removeChild(link);\r\n }, 0)\r\n };\r\n });\r\n })\r\n .catch((r: any) => {\r\n let alertProps: alertPropsModel = {\r\n header: \"Error generating the requested data.\",\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: this,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 3000\r\n };\r\n this.setState({ alertConfguration: alertProps }, () => {\r\n this.setState({ alertIsOpen: true });\r\n });\r\n\r\n\r\n console.log(\"error getting batch file for \", this.state.currentCiclePct);\r\n classContext.setState({ isGeneratingBatch: false });\r\n });\r\n }\r\n });\r\n }\r\n\r\n render() {\r\n let classContext: ScenarioViewer = this;\r\n\r\n let chartprops = {\r\n svgHeight: 500,\r\n svgWidth: classContext.curveGraphWidth,\r\n crcData: classContext.state.bmpCoordinateData,\r\n reductionData: classContext.state.reductionCoordinateData,\r\n maxCapacity: classContext.state.maxCapacity,\r\n clickHandler: classContext.handlePctReductionSelection,\r\n bmpGroupInfo: classContext.state.bmpGroups,\r\n colors: classContext.state.chartColors,\r\n defaultCirclePct: classContext.state.defaultCirclePct ,\r\n currentCirclePct: classContext.state.currentCiclePct,\r\n loading: classContext.state.isUpdating,\r\n textSize: 12,\r\n isSample: classContext.props.scenariodata.isSample\r\n };\r\n\r\n let tableprops = {\r\n data: classContext.state.tableData,\r\n bmpGroups: classContext.state.tableBmps,\r\n factor: classContext.state.tableFactor,\r\n title: classContext.state.tableTitle,\r\n percent: classContext.state.tablePercent,\r\n maxPct: classContext.state.tableMaxPct,\r\n colors: classContext.state.chartColors,\r\n onTitleUpdate: classContext.onTableTitleUpdate,\r\n onPercentUpdate: classContext.onTablePercentUpdate,\r\n generatePlan: classContext.generateImplementationPlan,\r\n isGeneratingPlan: classContext.state.isGeneratingPlan,\r\n generateBatch: classContext.getSustainToLSPCBath,\r\n isGeneratingBatch: classContext.state.isGeneratingBatch,\r\n generateRatio: classContext.generateDeliveryRatios,\r\n generateAPData: classContext.generateAPData,\r\n isGeneratingAPData: classContext.state.isGeneratingAPData,\r\n isGeneratingRatio: classContext.state.isGeneratingRatio,\r\n tooltipFactory: classContext.props.tooltipFactory,\r\n tooltipsReady: classContext.props.tooltipsReady,\r\n numFadeOut: classContext.state.numFadeOut,\r\n updateColorFunction: classContext.updateColor,\r\n mrcAvailable: classContext.props.scenariodata.mrcAvailable,\r\n isSample: classContext.props.scenariodata.isSample\r\n };\r\n\r\n // Create params for dropdowns\r\n let dropDownOne = {\r\n dropdownTitle: \"Optimization Target\",\r\n dropdownItems: classContext.state.scenOptions,\r\n onSelect: classContext.dropdownScenario,\r\n isMultiselect: false,\r\n onUpdate: classContext.updateDropdownScenario\r\n };\r\n\r\n let dropDownTwo = {\r\n dropdownTitle: \"Assessment Point\",\r\n dropdownItems: classContext.state.apsOptions,\r\n onSelect: classContext.dropdownAPs,\r\n isMultiselect: false,\r\n onUpdate: classContext.updateDropdownAPs\r\n };\r\n\r\n let dropDownThree = {\r\n dropdownTitle: \"Evaluation Factor\",\r\n dropdownItems: classContext.state.facOptions,\r\n onSelect: classContext.dropdownFactor,\r\n isMultiselect: false,\r\n onUpdate: classContext.updateDropdownFactor\r\n\r\n };\r\n\r\n return (\r\n
\r\n {\r\n this.state.alertIsOpen &&\r\n \r\n }\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n {/* */}\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class optimizationupload extends BaseModel {\r\n\r\n \"zipfilename\": string;\r\n \"zipfiletype\": string;\r\n \"zipfileblob\": Blob;\r\n\r\n constructor() {\r\n super('optimizationviewer');\r\n }\r\n} ","import React, { Component } from \"react\";\r\nimport \"./comparisonTable.css\";\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport { Dropdown, Button, FormGroup, Label, Input, Grid, Table, Tab, Icon } from \"semantic-ui-react\";\r\nimport ITableProps from \"../../../interfaces/ITableProps\";\r\nimport { TooltipModal } from \"../../toolTipModal/toolTipModal\";\r\nimport { sustainToLSPCbatch } from \"../../../models/sustainToLSPCbatch\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { optimizationimplementationplan } from \"../../../models/optimizationimplementationplan\";\r\n\r\nexport default class ComparisonTable extends Component {\r\n\r\n state = {\r\n loadingPlan: false,\r\n loadingBatch: false\r\n }\r\n\r\n\r\n constructor(props: ITableProps){\r\n super(props);\r\n } \r\n\r\n createHeader() {\r\n return (\r\n \r\n \r\n \r\n Optimization Metric\r\n \r\n \r\n {this.props.data[0].tableTitle}\r\n \r\n \r\n {this.props.data[1].tableTitle}\r\n \r\n {\r\n this.props.data.length == 3 ?\r\n \r\n {this.props.data[2].tableTitle}\r\n \r\n : null\r\n }\r\n \r\n \r\n );\r\n }\r\n\r\n createBmpRows() {\r\n let bmpNames = this.props.data[0].tableData.bmPs.map(x => x.name);\r\n return bmpNames.map(bmp => {\r\n return (\r\n \r\n \r\n {bmp}\r\n \r\n \r\n {(this.props.data[0].tableData.bmPs.find(x => x.name == bmp).value).toFixed(2).replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")} ac-ft\r\n \r\n \r\n {(this.props.data[1].tableData.bmPs.find(x => x.name == bmp).value).toFixed(2).replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")} ac-ft\r\n \r\n {\r\n this.props.data.length == 3 ?\r\n \r\n {(this.props.data[2].tableData.bmPs.find(x => x.name == bmp).value).toFixed(2).replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")} ac-ft\r\n \r\n : null\r\n }\r\n \r\n )\r\n });\r\n }\r\n\r\n getPlan = (data) => {\r\n\r\n this.setState({loadingPlan: true}, () => {\r\n \r\n optimizationimplementationplan.axiosPostImage(data)\r\n .then((r: AxiosResponse) => {\r\n // classContext.setState({ isGeneratingPlan: false });\r\n let filename: string = \"ImplementationPlan.xlsx\";\r\n const blob = new Blob([r.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(blob, filename);\r\n } else {\r\n const blob = new Blob([r.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n var link = document.createElement('a');\r\n var href = window.URL.createObjectURL(blob);\r\n link.setAttribute('href', href);\r\n link.setAttribute('download', filename);\r\n document.body.appendChild(link);\r\n link.click();\r\n setTimeout(() => {\r\n window.URL.revokeObjectURL(href);\r\n document.body.removeChild(link);\r\n }, 0)\r\n }\r\n this.setState({loadingPlan: false});\r\n })\r\n .catch((r: AxiosResponse) => {\r\n console.log(\"error getting implementation plan \", r.data)\r\n // classContext.setState({ isGeneratingPlan: false });\r\n });\r\n\r\n })\r\n\r\n\r\n\r\n }\r\n\r\n getBatch = (data) => {\r\n\r\n this.setState({loadingBatch: true}, () => {\r\n\r\n \r\n sustainToLSPCbatch.axiosGetBlob(data)\r\n .then((r: AxiosResponse) => {\r\n \r\n let filename: string = \"Sustain2LSPC.zip\";\r\n const bloboBaggins = new Blob([r.data], {type: \"application/zip\"});\r\n \r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(bloboBaggins, filename);\r\n } else {\r\n const bloboBaggins = new Blob([r.data], { type: 'application/zip' });\r\n var link = document.createElement('a');\r\n var href = window.URL.createObjectURL(bloboBaggins);\r\n link.setAttribute('href', href);\r\n link.setAttribute('download', filename);\r\n document.body.appendChild(link);\r\n link.click();\r\n setTimeout(() => {\r\n window.URL.revokeObjectURL(href);\r\n document.body.removeChild(link);\r\n }, 0)\r\n };\r\n\r\n this.setState({loadingBatch: false});\r\n })\r\n .catch((r: AxiosResponse) => {\r\n alert(\"Could not find match for scenario\");\r\n console.log(\"error getting batch file in compare\");\r\n });\r\n\r\n });\r\n }\r\n\r\n createBody() {\r\n return (\r\n \r\n \r\n \r\n Reduction\r\n \r\n \r\n {this.props.data[0].tableFactor}: {(this.props.data[0].tableData.responses.find(x => x.name == this.props.data[0].tableFactor).value).toFixed(2)}%\r\n \r\n \r\n {this.props.data[1].tableFactor}: {(this.props.data[1].tableData.responses.find(x => x.name == this.props.data[1].tableFactor).value).toFixed(2)}% \r\n \r\n {\r\n this.props.data.length == 3 &&\r\n \r\n {this.props.data[2].tableFactor}: {(this.props.data[2].tableData.responses.find(x => x.name == this.props.data[2].tableFactor).value).toFixed(2)}% \r\n \r\n }\r\n \r\n \r\n \r\n Total Cost\r\n \r\n \r\n ${(this.props.data[0].tableData.cost / 1000000).toFixed(0)} M\r\n \r\n \r\n ${(this.props.data[1].tableData.cost / 1000000).toFixed(0)} M\r\n \r\n {\r\n this.props.data.length == 3 &&\r\n \r\n ${(this.props.data[2].tableData.cost / 1000000).toFixed(0)} M\r\n \r\n }\r\n \r\n \r\n \r\n Total Capacity\r\n \r\n \r\n {(this.props.data[0].tableData.bmPs.reduce((a, b) => ({ value: a.value + b.value })).value).toFixed(2).replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")} ac-ft\r\n \r\n \r\n {(this.props.data[1].tableData.bmPs.reduce((a, b) => ({ value: a.value + b.value })).value).toFixed(2).replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")} ac-ft\r\n \r\n {\r\n this.props.data.length == 3 &&\r\n \r\n {(this.props.data[2].tableData.bmPs.reduce((a, b) => ({ value: a.value + b.value })).value).toFixed(2).replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")} ac-ft\r\n \r\n }\r\n \r\n {this.createBmpRows()}\r\n \r\n );\r\n }\r\n \r\n render() {\r\n let classContext: ComparisonTable = this;\r\n return (\r\n
\r\n
\r\n
\r\n CRZ Comparison Table\r\n
\r\n
\r\n Slice Comparison: the following table compares the BMP costs and capacities for the selected slices.\r\n
\r\n
\r\n
\r\n \r\n {this.createHeader()}\r\n {this.createBody()}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport './downloadLink.css';\r\nimport { Grid, Button, Table, Icon } from \"semantic-ui-react\";\r\nimport { IDownloadLinkProps } from \"../../interfaces/IDownloadLinkProps\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport ModelDownloads from \"../../models/ModelDownload\";\r\n\r\n\r\nexport class DownloadLinkState {\r\n // TODO this is a placeholder for real data that will be obtained from the API\r\n //data: any = [\r\n // {Name: \"Flood Storms - 10 year\", Description: \"You see, the refried beans are really just the adhesive necessary to apply the soft tortilla to the hard taco shell.\"},\r\n // {Name: \"Long Term - Daily\", Description: \"Um, Tabasco? No thanks, do you have any Cholula?\"},\r\n // {Name: \"Water Quality Critical Condition - 85%ile Storm\", Description: \"Yeah, apparently the taco shack was robbed. They left the money but took the tacos.\"}\r\n //];\r\n\r\n\r\n downloading: boolean = false;\r\n}\r\n\r\nexport default class DownloadLink extends Component {\r\n\r\n state = new DownloadLinkState();\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n\r\n }\r\n\r\n\r\n downloadModelFile = (modelDownloadId: number, mimeType: string, filename: string) => {\r\n let classContext: DownloadLink = this;\r\n if (classContext.state.downloading == false) { // only download if not already downloading...\r\n\r\n classContext.setState({ downloading: true }, () => {\r\n ModelDownloads.axiosGetBlobById(modelDownloadId)\r\n .then((r: AxiosResponse) => {\r\n const bloboBaggins = new Blob([r.data], { type: mimeType });\r\n classContext.setState({ downloading: false });\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(bloboBaggins, filename);\r\n } else {\r\n const bloboBaggins = new Blob([r.data], { type: mimeType });\r\n var link = document.createElement('a');\r\n var href = window.URL.createObjectURL(bloboBaggins);\r\n link.setAttribute('href', href);\r\n link.setAttribute('download', filename);\r\n document.body.appendChild(link);\r\n link.click();\r\n setTimeout(() => {\r\n window.URL.revokeObjectURL(href);\r\n document.body.removeChild(link);\r\n }, 0)\r\n };\r\n })\r\n .catch((r: AxiosResponse) => {\r\n classContext.setState({ downloading: false });\r\n console.log(\"error downloading file\")\r\n });\r\n });\r\n }\r\n };\r\n\r\n\r\n\r\n render() {\r\n\r\n let classContext: DownloadLink = this;\r\n\r\n return (\r\n classContext.downloadModelFile(classContext.props.recordId, classContext.props.mimetype, classContext.props.filename)}>\r\n {classContext.props.bold != true && \r\n classContext.props.linkText\r\n }\r\n {classContext.props.bold == true &&\r\n {classContext.props.linkText}\r\n }\r\n \r\n );\r\n }\r\n}","import React, { useEffect, useRef, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport './FileDragAndDrop.css';\r\n\r\ninterface IFileDragAndDrop {\r\n onUpload: Function\r\n children: any\r\n count: number\r\n formats: string[]\r\n}\r\n\r\nexport default function FileDragAndDrop(props: IFileDragAndDrop) {\r\n\r\n const drop = useRef(null);\r\n const drag = useRef(null);\r\n const [dragging, setDragging] = useState(false);\r\n\r\n const [status, setStatus] = useState(\"waiting\");\r\n\r\n useEffect(() => {\r\n drop.current.addEventListener('dragover', handleDragOver);\r\n drop.current.addEventListener('drop', handleDrop);\r\n drop.current.addEventListener('dragenter', handleDragEnter);\r\n drop.current.addEventListener('dragleave', handleDragLeave);\r\n\r\n return () => {\r\n drop.current.removeEventListener('dragover', handleDragOver);\r\n drop.current.removeEventListener('drop', handleDrop);\r\n drop.current.removeEventListener('dragenter', handleDragEnter);\r\n drop.current.removeEventListener('dragleave', handleDragLeave);\r\n };\r\n }, []);\r\n\r\n const handleDragOver = (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n };\r\n\r\n const handleDragEnter = (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n if (e.target !== drag.current) {\r\n setDragging(true);\r\n setStatus('dragging');\r\n }\r\n };\r\n\r\n const handleDragLeave = (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n if (e.target === drag.current) {\r\n setDragging(false);\r\n setStatus('waiting');\r\n }\r\n };\r\n\r\n const handleDrop = (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n setDragging(false);\r\n\r\n // this is required to convert FileList object to array\r\n const files = [...e.dataTransfer.files];\r\n\r\n if (props.count && props.count < files.length) {\r\n showMessage('error', 2000);\r\n return;\r\n }\r\n\r\n if (props.formats && files.some((file) => !props.formats.some((format) => file.name.toLowerCase().endsWith(format.toLowerCase())))) {\r\n showMessage('error', 2000);\r\n return;\r\n }\r\n\r\n if (files && files.length) {\r\n showMessage('success', 1000);\r\n props.onUpload(files);\r\n }\r\n };\r\n\r\n const showMessage = (type, timeout) => {\r\n setStatus(type);\r\n\r\n setTimeout(() => setStatus(\"waiting\"), timeout);\r\n };\r\n\r\n return (\r\n
\r\n
\r\n\r\n {props.children}\r\n
\r\n
\r\n );\r\n}\r\n\r\nFileDragAndDrop.propTypes = {\r\n onUpload: PropTypes.func.isRequired,\r\n};","import React, { Component } from \"react\";\r\nimport \"./optimization.css\";\r\nimport { INavHistory } from \"../../interfaces/INavHistory\";\r\nimport ScenarioViewer from \"./ScenarioViewer/scenarioViewer\";\r\nimport { Button, Label, Icon } from \"semantic-ui-react\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { optimizationupload } from \"../../models/optimizationupload\";\r\nimport { optimizationsummary } from \"../../models/optimizationsummary\";\r\nimport { eventNames } from \"cluster\";\r\nimport ComparisonTable from \"./ComparisonTable/comparisonTable\";\r\nimport { TooltipModal } from \"../toolTipModal/toolTipModal\";\r\nimport AlertComponent from \"../AlertComponent/alertComponent\";\r\nimport { alertPropsModel } from \"../../models/alertPropsModel\";\r\nimport logo from '../../images/wmms-opt.png';\r\nimport DownloadLink from \"../../core/downloadLink/downloadLink\";\r\nimport Config from \"../../config/Config\";\r\nimport HrefLink from \"../../core/hrefLink/hrefLink\";\r\nimport FileDragAndDrop from \"../../core/fileDragAndDrop/FileDragAndDrop\";\r\n\r\nexport class OptimizationState {\r\n scenarios: Array = new Array();\r\n scenarioCount: number = 0;\r\n zipfilename: string = \"No selection\";\r\n zipfile: File = null;\r\n isLoadingScenario: boolean = false;\r\n compareTableData: Array = null;\r\n isComparing: boolean = false;\r\n batchData: any = [];\r\n planData: any = [];\r\n alertIsOpen: boolean = false; \r\n alertConfguration: alertPropsModel = new alertPropsModel();\r\n}\r\n\r\nexport default class Optimization extends Component {\r\n state = new OptimizationState();\r\n\r\n componentDidMount() {\r\n this.addSample();\r\n }\r\n\r\n handleItemUpdate(evt, typestr) {\r\n let lbl = document.getElementById(typestr + 'uploadlabel');\r\n if (evt.target.files.length > 0) {\r\n lbl.classList.remove('red');\r\n lbl.classList.add('green');\r\n this.setState({ [typestr + 'filename']: evt.target.files[0].name, [typestr + 'file']: evt.target.files[0] });\r\n } else {\r\n lbl.classList.add('red');\r\n lbl.classList.remove('green');\r\n this.setState({ [typestr + 'filename']: 'None Selected', file: null });\r\n }\r\n }\r\n\r\n addSample() {\r\n let classContext: Optimization = this;\r\n if (classContext.state.scenarioCount == 0 && !classContext.state.isLoadingScenario) {\r\n\r\n let arr: Array = classContext.state.scenarios;\r\n\r\n classContext.setState({\r\n isLoadingScenario: true\r\n });\r\n\r\n let form = new FormData();\r\n form.append(\"sample\", \"true\");\r\n\r\n optimizationupload.axiosPostUpload(form)\r\n .then((r: AxiosResponse) => {\r\n let data: optimizationsummary = r.data;\r\n if (data.errors == null || data.errors.length == 0) {\r\n data.visible = true;\r\n data.childState = {\r\n tableTitle: null,\r\n tableFactor: null,\r\n tableData: null\r\n };\r\n data.key = this.state.scenarios.length;\r\n arr.push(data);\r\n let cnt: number = classContext.state.scenarioCount + 1;\r\n classContext.setState({\r\n scenarios: arr,\r\n isLoadingScenario: false,\r\n scenarioCount: cnt\r\n }, () => {\r\n // this scrolls to the newly added scenario\r\n //document.getElementById(`scenario-viewer-${this.state.scenarioCount - 1}`).scrollIntoView({ behavior: \"smooth\" });\r\n });\r\n } else {\r\n\r\n let alertProps: alertPropsModel = {\r\n header: data.errors.join(\"; \"),\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: this,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 4000\r\n };\r\n this.setState({ alertConfguration: alertProps, isLoadingScenario: false }, () => {\r\n this.setState({ alertIsOpen: true });\r\n });\r\n\r\n // alert(data.errors.join(\"; \"));\r\n }\r\n })\r\n .catch((r: AxiosResponse) => {\r\n //console.log('There was an issue adding that senario', r);\r\n this.setState({ isLoadingScenario: false });\r\n let alertProps: alertPropsModel = {\r\n header: 'There was an issue adding that senario',\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: this,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 4000\r\n };\r\n this.setState({ alertConfguration: alertProps }, () => {\r\n this.setState({ alertIsOpen: true });\r\n });\r\n })\r\n }\r\n }\r\n\r\n fileDragDropUpload = (files: Array) => {\r\n let classContext: Optimization = this;\r\n\r\n if (files != undefined && files.length == 1) {\r\n classContext.setState({ ['zipfilename']: files[0].name, ['zipfile']: files[0] }, () => {\r\n classContext.addScenarioClick();\r\n });\r\n }\r\n }\r\n\r\n addScenarioClick() {\r\n if (this.state.zipfile == null) {\r\n let alertProps: alertPropsModel = {\r\n header: 'Please select a file',\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: this,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 2500\r\n };\r\n this.setState({ alertConfguration: alertProps }, () => {\r\n this.setState({ alertIsOpen: true });\r\n });\r\n \r\n } else {\r\n let classContext: Optimization = this;\r\n if (classContext.state.scenarioCount >= 3) {\r\n // alert(\"You've reached the maximum of 3 scenarios!\");\r\n\r\n let alertProps: alertPropsModel = {\r\n header: \"You've reached the maximum of 3 scenarios!\",\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: this,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 2500\r\n };\r\n this.setState({ alertConfguration: alertProps }, () => {\r\n this.setState({ alertIsOpen: true });\r\n });\r\n\r\n \r\n } else if (!this.state.isLoadingScenario) {\r\n let arr: Array = classContext.state.scenarios;\r\n\r\n classContext.setState({ \r\n isLoadingScenario: true\r\n });\r\n\r\n let form = new FormData();\r\n form.append(\"data\", this.state.zipfile);\r\n\r\n optimizationupload.axiosPostUpload(form)\r\n .then((r: AxiosResponse) => {\r\n let data: optimizationsummary = r.data;\r\n if (data.errors == null || data.errors.length == 0) {\r\n data.visible = true;\r\n data.childState = {\r\n tableTitle: null,\r\n tableFactor: null,\r\n tableData: null\r\n };\r\n data.key = this.state.scenarios.length;\r\n arr.push(data);\r\n let cnt: number = classContext.state.scenarioCount + 1;\r\n classContext.setState({ \r\n scenarios: arr,\r\n isLoadingScenario: false,\r\n scenarioCount: cnt\r\n }, () => {\r\n // this scrolls to the newly added scenario\r\n document.getElementById(`scenario-viewer-${this.state.scenarioCount - 1}`).scrollIntoView({ behavior: \"smooth\" });\r\n });\r\n } else {\r\n\r\n let alertProps: alertPropsModel = {\r\n header: data.errors.join(\"; \"),\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: this,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 4000\r\n };\r\n this.setState({ alertConfguration: alertProps, isLoadingScenario: false }, () => {\r\n this.setState({ alertIsOpen: true });\r\n });\r\n\r\n // alert(data.errors.join(\"; \"));\r\n }\r\n })\r\n .catch((r: AxiosResponse) => {\r\n //console.log('There was an issue adding that senario', r);\r\n this.setState({ isLoadingScenario: false });\r\n let alertProps: alertPropsModel = {\r\n header: 'There was an issue adding that senario',\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: this,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 4000\r\n };\r\n this.setState({ alertConfguration: alertProps }, () => {\r\n this.setState({ alertIsOpen: true });\r\n });\r\n })\r\n }\r\n }\r\n }\r\n\r\n removeScenario(evt, data) {\r\n let classContext: Optimization = this;\r\n\r\n let scenToRemove = data.id.split(\"-\")[2];\r\n\r\n // toggle visibility of matching scenario\r\n classContext.state.scenarios.forEach((scen, i) => {\r\n if (scen.key == scenToRemove) {\r\n let arr: Array = classContext.state.scenarios;\r\n arr[scenToRemove].visible = false;\r\n classContext.setState({ scenarios: arr });\r\n }\r\n });\r\n\r\n // add hidden class to matching scenario\r\n document.getElementById(`scenario-viewer-${scenToRemove}`).classList.toggle(\"hidden\");\r\n let cnt: number = classContext.state.scenarioCount - 1;\r\n classContext.setState({ scenarioCount: cnt });\r\n }\r\n\r\n compareScenarios() {\r\n let compareScens = [];\r\n this.state.scenarios.forEach((scen, index) => {\r\n if (scen.visible) {\r\n scen.childState.batchData = this.state.batchData[index]\r\n scen.childState.planData = this.state.planData[index]\r\n compareScens.push(scen.childState)\r\n }\r\n });\r\n document.getElementById(\"scenario-container\").classList.toggle(\"hidden\");\r\n this.setState({ \r\n compareTableData: compareScens,\r\n isComparing: true\r\n });\r\n }\r\n\r\n handleCompareBtnClick = (evt) => {\r\n let splitId = evt.target.id.split(\"-\");\r\n let clickedBtn = splitId[0];\r\n let btnId = splitId[2];\r\n let activeScens = this.state.scenarios.filter(x => x.visible);\r\n let matchingScen = activeScens[btnId].key;\r\n }\r\n\r\n closeCompare() {\r\n document.getElementById(\"scenario-container\").classList.toggle(\"hidden\");\r\n this.setState({ isComparing: false });\r\n }\r\n \r\n updateScenarioStates = (currentState) => {\r\n if (this.state != null) {\r\n\r\n let didUpdate = -1;\r\n\r\n this.state.scenarios.forEach(scen => {\r\n if (scen.key == currentState.key) {\r\n if (scen.childState.tableTitle !== currentState.tableTitle || scen.childState.tableFactor !== currentState.tableFactor || scen.childState.tableData !== currentState.tableData) {\r\n didUpdate = scen.key;\r\n }\r\n }\r\n });\r\n\r\n if (didUpdate > -1) {\r\n let arr: Array = this.state.scenarios;\r\n arr[didUpdate].childState.tableTitle = currentState.tableTitle;\r\n arr[didUpdate].childState.tableFactor = currentState.tableFactor;\r\n arr[didUpdate].childState.tableData = currentState.tableData;\r\n this.setState({ scenarios: arr });\r\n };\r\n }\r\n }\r\n \r\n getScenarioJSX = (): any => {\r\n return this.state.scenarios.map(m => {return {scenariodata: m}}).map((props: any, i: number) => {\r\n return
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n });\r\n }\r\n\r\n setBatchData = (data, index) => {\r\n let classContext: Optimization = this;\r\n let array = classContext.state.batchData.slice(0);\r\n array[index] = data;\r\n\r\n classContext.setState({batchData: array});\r\n\r\n };\r\n\r\n setPlanData = (data, index) => {\r\n let classContext: Optimization = this;\r\n let array = classContext.state.planData.slice(0);\r\n array[index] = data;\r\n\r\n classContext.setState({planData: array});\r\n };\r\n\r\n render() {\r\n let classContext: Optimization = this;\r\n\r\n return (\r\n
\r\n \r\n {\r\n this.state.alertIsOpen &&\r\n \r\n }\r\n
\r\n
\r\n
\r\n
\r\n \"wmms2Logo\"\r\n
\r\n

\r\n WELCOME to the Optimization Viewer. This viewer renders watershed-scale optimization outputs from the Two-tiered Optimization Utility. These optimization curves are the culmination of the WMMS 2.0 Optimization Framework; they display the cost-optimized strategies to achieve pollutant or flow reductions based on the provided BMP menu and reduction targets. For additional context on the optimization utilities used to develop these curves, reference the .\r\n
\r\n
\r\n To illustrate the functionality of the Optimization Viewer, sample data has been pre-loaded below. For context, this data was developed from BMPs characterized in the . A schematic has also been generated to describe functions. \r\n

\r\n
\r\n
\r\n
\r\n\r\n
\r\n {/* here for styles */}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Select a scenario to upload:

\r\n
\r\n
\r\n
File Name: {classContext.state.zipfilename}
\r\n \r\n classContext.handleItemUpdate(evt, 'zip')} className=\"hidden\" />\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {/* here for styles */}\r\n
\r\n
\r\n
\r\n {this.getScenarioJSX()}\r\n
\r\n {\r\n this.state.isComparing &&\r\n
\r\n
\r\n
\r\n {/* here for style purposes */}\r\n
\r\n
\r\n \r\n
\r\n
\r\n this.handleCompareBtnClick(evt)} tooltipFactory={this.props.tooltipFactory}\r\n tooltipsReady={this.props.tooltipsReady} updateColorFunction={null}>\r\n
\r\n }\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAS8AAABnCAYAAABRosRtAAAdfUlEQVR4Ae1d+5MURZ7fP+S8VVfvp4u9uI27dXfvbvc2YuNCcHWN29u721UQ9/ZOAT0NFcG7MzZ2XQFBxV0YREBA5KEoAgPIQ5E3zHt63k8YYJjpefdM94AzoH4vPsV8Macmsyuruqu7mvlmREZVV30r85uf/OanvpmdmfUNkiAICAKCQAEi8I0C1FlUFgQEgTwi8NVXX1G2Y5DiCHkFQU2eEQSmIQIgrC+//JKuX79O4+PjNDY2Rp9//nngiOeRDtJDukjfTxDy8oOWyAoC0xQBEMsXX3zhEFYymaTBwUHq6+ujnp6ewBHPI51UKuWQmF8CE/KapsYoxRYE/CAA8rp27RoduTxM98c+p/tKE1mL3d3dBEJE+n68LyEvPzUosoLANEUAXtHVq1fpYEd/1smrubnZ8eLQBRXymqYGJsUWBMJCAF3G0dFR2tcWzzp5VVdXU1dXF125csUZ+7Itg3hetkiJnCAwjREAeWFsam9rd9bJq6ysjDo7Ox1yhIdnG4S8bJESOUFgGiMQJnmVlpbSpUuXhLymsX1J0QWB0BAAeaFbt6+9h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iSF4OpAuwuGIMMWVNwk4FJznSd9fCqSDxvI6vTh6+pBsb62JTRhryQhxfBcZ44ckPCc6aYDneTkap58LmNrI3+Xo3JVD9cVsY/U/JCudTGiHPdS4DLz0fWA3jogg1OuudwTX2WcVDzUe2M9TClxde98GY59ajqoV5n7NPZlCqfz3NP8oJyXgarGoipMEjDxnBMz3NFh0lebCy68qpGZdIROCCaAqef7kXgflanC8uwAabLk2WQt1ewkeV6MJXBxvg5DV1dcnlxtNHZq0yclx/sWRZ46IINTrrn+BraAeqMj3ydjyg737NpM5DBM35CujJwHfhJLx+yVuTFBqlrJLiGwuoMUS0QV4h6zc85G6FXPkjTRlanDxMU7iENNfA993VVBljoMIIMP29jjJwm454uTzZcEy7pjJTz4aOtLNe5m8BYX68ypqsfvoc6yAZ5cZmQHqJNCJu81DLq6pbzh75ujHX6sw3o7pmuMS46jDl/k02Z0sz1dSvyYqXYaNkQcNQVnuXVI2S9jFqVd59zhdsAaiNr0ofLiMpVA5OPzthYDs8i6gLrpGLnPneXjY3SrYuaPhOGqR7SGamaDs79yHK+7jKk05XzYyzc5eX7XAfpsGZZmyPjaGt/3HhNZWGc3GXn36Zysa5sS5DXyarYmnTgtHDk8nH+6jGIXbB+pmfVvPN57ou88qmo5C0ICAKCgIqAkJeKhpwLAoJAwSAg5FUwVSWKCgKCgIqAkJeKhpwLAoJAwSAg5FUwVSWKCgKCgIqAkJeKhpwLAoJAwSAg5FUwVSWKCgKCgIqAkJeKhpwLAoJAwSAg5FUwVSWKCgKCgIrA/wOJsvyTmOSXPAAAAABJRU5ErkJggg==\"","import React, { Component } from \"react\";\r\nimport { INavHistory } from \"../../interfaces/INavHistory\";\r\nimport { Icon } from \"semantic-ui-react\";\r\nimport HrefLink from \"../../core/hrefLink/hrefLink\";\r\n\r\nexport default class Links extends Component {\r\n\r\n state = {\r\n\r\n }\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n\r\n }\r\n\r\n\r\n render() {\r\n\r\n let classContext: Links = this;\r\n\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Links\r\n
\r\n
\r\n

\r\n

    \r\n
  • Los Angeles County Public Works:
  • \r\n
  • USEPA SUSTAIN web page:
  • \r\n
  • USEPA LSPC web page:
  • \r\n
  • Los Angeles Region Watershed Management Programs:
  • \r\n
  • Developing Reasonable Assurance: A Guide to Performing Model-Based Analysis to Support Municipal Stormwater Program Planning.
  • \r\n
  • California Stormwater Quality Association:
  • \r\n
\r\n

\r\n
\r\n
\r\n
\r\n );\r\n\r\n }\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class ftable extends BaseModel {\r\n\r\n \"filename\": string;\r\n \"filetype\": string;\r\n \"fileblob\": Blob;\r\n\r\n\r\n constructor() {\r\n super('ftable');\r\n }\r\n} ","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class processviewmodel extends BaseModel {\r\n\r\n \"id\": number;\r\n \"queueId\": number;\r\n \"resultId\": number;\r\n \"status\": string;\r\n \"type\": string;\r\n \"message\": string;\r\n\r\n\r\n constructor() {\r\n super('process');\r\n }\r\n} \r\n","import './ftableutil.css'\r\nimport React, { Component } from \"react\";\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport { Button, Input, Label, Form, Icon, Message, Grid, GridColumn, LabelDetail } from \"semantic-ui-react\";\r\nimport { ftable } from \"../../../models/ftable\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { IUtilityCard } from \"../../../interfaces/IUtilityCard\";\r\nimport Config from \"../../../config/Config\";\r\nimport { processviewmodel } from \"../../../models/processviewmodel\";\r\nimport { setInterval } from \"timers\";\r\nimport DownloadLink from '../../../core/downloadLink/downloadLink';\r\n\r\n\r\nexport class FTableUtilState {\r\n pageObj: ftable = new ftable();\r\n filename: string = \"No selection\";\r\n file: File = null;\r\n processing: boolean = false;\r\n}\r\n\r\n\r\nexport default class FTableUtil extends Component {\r\n state = new FTableUtilState;\r\n interval: NodeJS.Timeout;\r\n uploadFile() {\r\n // error list\r\n let list = new Array();\r\n if (this.state.file == null) {\r\n list.push(\"No file selected\");\r\n this.handleErrors(list);\r\n } else {\r\n let classContext: FTableUtil = this;\r\n classContext.setState({ processing: true });\r\n this.handleErrors(new Array());\r\n let form = new FormData();\r\n let table = new ftable();\r\n table.fileblob = this.state.file;\r\n table.filename = this.state.filename;\r\n table.filetype = \"text/csv\";\r\n form.append(\"attachmentData\", JSON.stringify(table));\r\n form.append(\"data\", this.state.file);\r\n\r\n ftable.axiosPostUpload(form).then((r: AxiosResponse) => {\r\n if (r.data.status.toLowerCase() == \"submitted\") {\r\n let data: processviewmodel = r.data;\r\n if (data.queueId > 0) {\r\n let id = data.queueId;\r\n let intvl = setInterval(() => {\r\n processviewmodel.axiosGet(id).then((r: AxiosResponse) => {\r\n let data: processviewmodel = r.data;\r\n if (data.status.toLowerCase() == \"completed\") {\r\n classContext.props.stopInterval();\r\n classContext.getResult(data.resultId);\r\n // if completed but with errors\r\n if (data.message != null) {\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n } else if (data.status.toLowerCase() == \"error\") {\r\n classContext.props.stopInterval();\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n else {\r\n //console.log('keep checking');\r\n }\r\n });\r\n }, 1000);\r\n classContext.props.beginInterval(intvl);\r\n }\r\n } else if (r.data.status.toLowerCase() == \"error\") {\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(r.data.message);\r\n classContext.handleErrors(list);\r\n } else {\r\n classContext.setState({ processing: false });\r\n list.push(\"Unknown error\");\r\n classContext.handleErrors(list);\r\n }\r\n })\r\n }\r\n }\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n }\r\n getResult(id: number) {\r\n let classContext: FTableUtil = this;\r\n classContext.setState({ processing: false });\r\n if (id > 0) {\r\n window.location.href = Config.api_endpoint + 'FTable/' + id;\r\n }\r\n }\r\n handleErrors(list) {\r\n let err = document.getElementById('errorPlace');\r\n err.classList.remove('hidden');\r\n let msgs = document.getElementById('errorMessages');\r\n while (msgs.firstChild) {\r\n msgs.removeChild(msgs.firstChild);\r\n }\r\n if (list.length > 0) {\r\n for (var i = 0; i < list.length; i++) {\r\n if (list[i].indexOf(';') > 0) {\r\n var smallArr = list[i].split(';');\r\n for (var j = 0; j < smallArr.length; j++) {\r\n if (smallArr[j].length > 1) {\r\n let dv = document.createElement('li');\r\n dv.append(smallArr[j])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n }\r\n else {\r\n let dv = document.createElement('li');\r\n dv.append(list[i])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n } else {\r\n err.classList.add('hidden');\r\n }\r\n }\r\n handleItemUpdate(evt) {\r\n //alert(evt)\r\n let lbl = document.getElementById('uploadlabel');\r\n if (evt.target.files.length > 0) {\r\n lbl.classList.remove('red');\r\n lbl.classList.add('green');\r\n this.setState({ filename: evt.target.files[0].name, file: evt.target.files[0] });\r\n this.handleErrors(new Array());\r\n } else {\r\n lbl.classList.add('red');\r\n lbl.classList.remove('green');\r\n this.setState({ filename: 'None Selected', file: null });\r\n }\r\n }\r\n render() {\r\n let classContext: FTableUtil = this;\r\n return (\r\n
\r\n
\r\n \r\n \r\n

{this.props.cardTitle}

\r\n
\r\n \r\n \r\n
\r\n {this.props.cardDescription}\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n classContext.handleErrors(new Array())}>\r\n Errors parsing the file:\r\n \r\n \r\n \r\n
\r\n
\r\n
File Name: {classContext.state.filename}
\r\n \r\n classContext.handleItemUpdate(evt)} className=\"hidden\" />\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n

Process Description:

\r\n

1. Save (.csv) to desired location on local hard drive.

\r\n

2. Input parameter values for each of the desired hydraulic features. Reference the parameter for descriptions and context.

\r\n

3. Save .csv on local drive.

\r\n

4. Upload to the Utility website and execute the tool.

\r\n

5. Retrieve output .csv in local download folder.

\r\n

6. Upload .csv to LSPC Map Interface through \"Load stage/storage\" pathway option (See LSPC Map User Document for further details).

\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n );\r\n }\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class weather extends BaseModel {\r\n\r\n \"gagefilename\": string;\r\n \"gagefiletype\": string;\r\n \"gagefileblob\": Blob;\r\n \"nldasfilename\": string;\r\n \"nldasfiletype\": string;\r\n \"nldasfileblob\": Blob;\r\n \"prismfilename\": string;\r\n \"prismfiletype\": string;\r\n \"prismfileblob\": Blob;\r\n \"evapfilename\": string;\r\n \"evapfiletype\": string;\r\n \"evapfileblob\": Blob;\r\n \"email\": string\r\n\r\n constructor() {\r\n super('weather');\r\n }\r\n} ","import './weatherutil.css';\r\nimport React, { Component } from \"react\";\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport { Grid, Icon, Message, Button, Label } from \"semantic-ui-react\";\r\nimport Config from \"../../../config/Config\";\r\nimport { IUtilityCard } from \"../../../interfaces/IUtilityCard\";\r\nimport { weather } from \"../../../models/weather\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { processviewmodel } from \"../../../models/processviewmodel\";\r\nimport { weatherdata } from \"../../../models/weatherdata\";\r\nimport { setInterval } from \"timers\";\r\nimport DownloadLink from '../../../core/downloadLink/downloadLink';\r\n\r\nexport class WeatherUtilState {\r\n //pageObj: weather = new weather();\r\n gagefilename: string = \"No selection\";\r\n gagefile: File = null;\r\n prismfilename: string = \"No selection\";\r\n prismfile: File = null;\r\n nldasfilename: string = \"No selection\";\r\n nldasfile: File = null;\r\n evapfilename: string = \"No selection\";\r\n evapfile: File = null;\r\n email: string = \"\";\r\n \r\n processing: boolean = false;\r\n processStatus: string = \"\";\r\n processMessage: string = \"\";\r\n}\r\n\r\nexport default class WeatherUtil extends Component {\r\n\r\n state = new WeatherUtilState;\r\n interval: any = null;\r\n\r\n uploadFile() {\r\n if (this.state.gagefile == null || this.state.nldasfile == null || this.state.prismfile == null || this.state.evapfile == null) {\r\n let list = new Array();\r\n list.push(\"Please select all needed files\");\r\n this.handleErrors(list);\r\n } else {\r\n let classContext: WeatherUtil = this;\r\n classContext.setState({ processing: true });\r\n this.handleErrors(new Array());\r\n let form = new FormData();\r\n\r\n form.append(\"data\", this.state.gagefile);\r\n form.append(\"data\", this.state.nldasfile);\r\n form.append(\"data\", this.state.prismfile);\r\n form.append(\"data\", this.state.evapfile);\r\n if (this.state.email.length > 0) {\r\n if (classContext.validateEmail(classContext.state.email)) {\r\n form.append(\"email\", classContext.state.email);\r\n } else {\r\n let list = new Array();\r\n list.push(\"The email address provided is invalid\");\r\n classContext.handleErrors(list);\r\n classContext.setState({ processing: false });\r\n return;\r\n }\r\n }\r\n weather.axiosPostUpload(form).then((r: AxiosResponse) => {\r\n classContext.setStatusMessage(r.data.status, r.data.message);\r\n if (r.data.status.toLowerCase() == \"submitted\") {\r\n let data: processviewmodel = r.data;\r\n if (data.queueId > 0) {\r\n let id = data.queueId;\r\n let intvl = setInterval(() => {\r\n processviewmodel.axiosGet(id).then((r: AxiosResponse) => {\r\n let data: processviewmodel = r.data;\r\n classContext.setStatusMessage(data.status, data.message);\r\n if (data.status != undefined && data.status.toLowerCase() == \"completed\") {\r\n classContext.props.stopInterval();\r\n if (data.message.length > 1) {\r\n let list = new Array();\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n classContext.getResult(data.resultId);\r\n } else if (data.status != undefined && data.status.toLowerCase() == \"error\") {\r\n classContext.props.stopInterval();\r\n classContext.setState({ processing: false });\r\n let list = new Array();\r\n list.push(\"Error during processing\");\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n else {\r\n //console.log('keep checking');\r\n\r\n }\r\n });\r\n }, 2000);\r\n classContext.props.beginInterval(intvl);\r\n }\r\n } else if (r.data.status.toLowerCase() == \"error\") {\r\n classContext.setState({ processing: false });\r\n let list = new Array();\r\n list.push(\"Error during processing\");\r\n list.push(r.data.message);\r\n classContext.handleErrors(list);\r\n } else {\r\n classContext.setState({ processing: false });\r\n let list = new Array();\r\n list.push(\"Unknown error\");\r\n classContext.handleErrors(list);\r\n }\r\n\r\n }).catch(function (error) {\r\n classContext.setState({ processing: false });\r\n let list = new Array();\r\n list.push(error.message);\r\n classContext.handleErrors(list);\r\n })\r\n }\r\n }\r\n\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n\r\n }\r\n\r\n getResult(id: number) {\r\n let classContext: WeatherUtil = this;\r\n classContext.setState({ processing: false });\r\n if (id > 0) {\r\n window.location.href = Config.api_endpoint + 'Weather/' + id;\r\n }\r\n }\r\n\r\n validateEmail(email: string): boolean {\r\n if (/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(email)) { return true; }\r\n return false;\r\n }\r\n\r\n setStatusMessage(status: string, message: string) {\r\n let classContext: WeatherUtil = this;\r\n if (status != undefined && (status.toLowerCase() == \"submitted\" || status.toLowerCase() == \"queued\" || status.toLowerCase() == \"processing\")) {\r\n classContext.setState({ processStatus: status, processMessage: message })\r\n } else {\r\n classContext.setState({ processStatus: \"\", processMessage: \"\" })\r\n }\r\n }\r\n\r\n handleErrors(list) {\r\n let err = document.getElementById('errorPlace');\r\n err.classList.remove('hidden');\r\n\r\n let msgs = document.getElementById('errorMessages');\r\n while (msgs.firstChild) {\r\n msgs.removeChild(msgs.firstChild);\r\n }\r\n if (list.length > 0) {\r\n for (var i = 0; i < list.length; i++) {\r\n if (list[i].indexOf(';') > 0) {\r\n var smallArr = list[i].split(';');\r\n for (var j = 0; j < smallArr.length; j++) {\r\n if (smallArr[j].length > 1) {\r\n let dv = document.createElement('li');\r\n dv.append(smallArr[j])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n }\r\n else {\r\n let dv = document.createElement('li');\r\n dv.append(list[i])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n } else {\r\n err.classList.add('hidden');\r\n }\r\n }\r\n\r\n\r\n handleItemUpdate(evt, typestr) {\r\n //alert(evt)\r\n let lbl = document.getElementById(typestr + 'uploadlabel');\r\n if (evt.target.files.length > 0) {\r\n lbl.classList.remove('red');\r\n lbl.classList.add('green');\r\n this.setState({ [typestr + 'filename']: evt.target.files[0].name, [typestr + 'file']: evt.target.files[0] });\r\n this.handleErrors(new Array());\r\n } else {\r\n lbl.classList.add('red');\r\n lbl.classList.remove('green');\r\n this.setState({ [typestr + 'filename']: 'None Selected', file: null });\r\n }\r\n }\r\n\r\n handleTextUpdate(evt) {\r\n this.setState({ email: evt.target.value });\r\n }\r\n\r\n\r\n render() {\r\n\r\n let classContext: WeatherUtil = this;\r\n \r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n

{this.props.cardTitle}

\r\n
\r\n \r\n \r\n
\r\n {this.props.cardDescription} The data sources used to develop the timeseries utilize a network of ground-based and remotely sensed data from:\r\n
    \r\n
  • the Los Angeles County Dept. of Public Works Automatic Local Evaluation in Real Time (ALERT) system,
  • \r\n
  • the North American Land Data Assimilation System (NLDAS), and
  • \r\n
  • the Parameter-elevation Regressions on Independent Slopes Model (PRISM).
  • \r\n
\r\n
\r\n
\r\n \r\n
\r\n

Each of the modeled subwatersheds within the WMMS project area receive a precipitation and evapotranspiration timeseries from this utility based on their proximity to the nearest ALERT gage, PRISM and NLDAS node. The indicates the linkage between subwatersheds and their corresponding gage and nodes. Provided (e.g., shapefiles) can be used to reference the WMMS subwatersheds, ALERT gages, and PRISM and NLDAS node locations as needed.

\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n classContext.handleErrors(new Array())}>\r\n Processing Messages:\r\n \r\n \r\n \r\n
\r\n
\r\n
File Name: {classContext.state.gagefilename}
\r\n
Gage files should all be in the .xlsx file extension and uploaded in a zipped folder. Example file name: 1070_2008-10-17~2018-09-06_Logger_hourly.xlsx.
\r\n \r\n classContext.handleItemUpdate(evt, 'gage')} className=\"hidden\" />\r\n
\r\n
\r\n
File Name: {classContext.state.nldasfilename}
\r\n
NLDAS precipitation files should all be in the .prcp file extension and uploaded in a zipped folder. Example file name: x53y71.prcp.
\r\n \r\n classContext.handleItemUpdate(evt, 'nldas')} className=\"hidden\" />\r\n
\r\n
\r\n
File Name: {classContext.state.prismfilename}
\r\n
PRISM files should all be in the .prcp file extension and uploaded in a zipped folder. Example file name: 541084.prcp.
\r\n \r\n classContext.handleItemUpdate(evt, 'prism')} className=\"hidden\" />\r\n
\r\n
\r\n
File Name: {classContext.state.evapfilename}
\r\n
NLDAS evaporation files should all be in the .evap file extension and uploaded in a zipped folder. Example file name: x53y71.evap.
\r\n \r\n classContext.handleItemUpdate(evt, 'evap')} className=\"hidden\" />\r\n
\r\n
\r\n
Optional Email: Provide email address to receive completion email
\r\n
classContext.handleTextUpdate(evt)} />
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {this.state.processStatus} {this.state.processMessage}\r\n
\r\n
\r\n
\r\n \r\n
\r\n

The process description below outlines the necessary Utility input files to successfully create the meteorological timeseries described above. For further details on the process described below, access the . Formatted is also provided as an example for each input dataset.

\r\n

1. Upload formatted hourly precipitation data (in ‘.xlsx’ files) from the LACDPW ALERT system in a zipped folder in the provided space. A is provided to facilitate the formatting of ALERT data; see the user’s guide for further detail on its use.

\r\n

2. Upload formatted hourly precipitation data (‘.prcp’ text file) from NLDAS and monthly precipitation data from PRISM in zipped folders in the provided spaces. Reference the above sample data for formatted timeseries.

\r\n

3. Upload formatted hourly evapotranspiration data from NLDAS (‘.evap’ text file). Reference the above formatted data for sample timeseries.

\r\n

4. Once ALERT, NLDAS, and PRISM datasets are uploaded the utility will create a set of timeseries that link all of the uploaded input files to create ‘.pre’ and ‘.air’ files.

\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n\r\n }\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class bmpopportunity extends BaseModel {\r\n\r\n \"filename\": string;\r\n \"filetype\": string;\r\n \"fileblob\": Blob;\r\n //\"email\": string\r\n\r\n constructor() {\r\n super('bmpopportunity');\r\n }\r\n} ","import React, { Component } from \"react\";\r\nimport './bmpopportunityutil.css';\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport { Grid, Icon, Message, Button, Label } from \"semantic-ui-react\";\r\nimport Config from \"../../../config/Config\";\r\nimport { IUtilityCard } from \"../../../interfaces/IUtilityCard\";\r\nimport { bmpopportunity } from \"../../../models/bmpopportunity\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { processviewmodel } from \"../../../models/processviewmodel\";\r\nimport { setInterval } from \"timers\";\r\nimport DownloadLink from \"../../../core/downloadLink/downloadLink\";\r\n\r\nexport class BmpOpportunityUtilState {\r\n pageObj: bmpopportunity = new bmpopportunity();\r\n filename: string = \"No selection\";\r\n file: File = null;\r\n processing: boolean = false;\r\n //email: string = \"\";\r\n processStatus: string = \"\";\r\n processMessage: string = \"\";\r\n}\r\n\r\nexport default class BmpOpportunityUtil extends Component {\r\n\r\n state = new BmpOpportunityUtilState;\r\n interval: NodeJS.Timeout;\r\n\r\n uploadFile() {\r\n // error list\r\n let list= new Array();\r\n if (this.state.file == null) {\r\n list.push(\"No file selected\");\r\n this.handleErrors(list);\r\n } else {\r\n let classContext: BmpOpportunityUtil = this;\r\n classContext.setState({ processing: true });\r\n this.handleErrors(new Array());\r\n let form = new FormData();\r\n\r\n let bmpopp = new bmpopportunity();\r\n bmpopp.fileblob = this.state.file;\r\n bmpopp.filename = this.state.filename;\r\n bmpopp.filetype = \"xlsx\";\r\n form.append(\"attachmentData\", JSON.stringify(bmpopp));\r\n\r\n form.append(\"data\", this.state.file);\r\n\r\n //if (this.state.email.length > 0) {\r\n // if (classContext.validateEmail(classContext.state.email)) {\r\n // form.append(\"email\", classContext.state.email);\r\n // } else {\r\n // list.push(\"The email address provided is invalid\");\r\n // classContext.handleErrors(list);\r\n // classContext.setState({ processing: false });\r\n // return;\r\n // }\r\n //}\r\n\r\n bmpopportunity.axiosPostUpload(form).then((r: AxiosResponse) => {\r\n classContext.setStatusMessage(r.data.status, r.data.message); \r\n if (r.data.status.toLowerCase() == \"submitted\") {\r\n let data: processviewmodel = r.data;\r\n if (data.queueId > 0) {\r\n let id = data.queueId;\r\n let intvl = setInterval(() => {\r\n processviewmodel.axiosGet(id).then((r: AxiosResponse) => {\r\n let data: processviewmodel = r.data;\r\n classContext.setStatusMessage(data.status, data.message);\r\n if (data.status != undefined && data.status.toLowerCase() == \"completed\") {\r\n classContext.props.stopInterval();\r\n if (data.message != null) {\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n classContext.getResult(data.resultId);\r\n } else if (data.status != undefined && data.status.toLowerCase() == \"error\") {\r\n classContext.props.stopInterval();\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n else {\r\n }\r\n });\r\n }, 1000); \r\n classContext.props.beginInterval(intvl);\r\n }\r\n } else if (r.data.status.toLowerCase() == \"error\") {\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(r.data.message);\r\n classContext.handleErrors(list);\r\n } else {\r\n classContext.setState({ processing: false });\r\n list.push(\"Unknown error\");\r\n classContext.handleErrors(list);\r\n }\r\n\r\n }).catch(function (error) {\r\n classContext.setState({ processing: false });\r\n list.push(error.message);\r\n classContext.handleErrors(list);\r\n })\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n }\r\n\r\n getResult(id: number) {\r\n let classContext: BmpOpportunityUtil = this;\r\n classContext.setState({ processing: false });\r\n if (id > 0) {\r\n window.location.href = Config.api_endpoint + 'BmpOpportunity/' + id;\r\n }\r\n }\r\n\r\n setStatusMessage(status: string, message: string) {\r\n let classContext: BmpOpportunityUtil = this;\r\n if (status != undefined && (status.toLowerCase() == \"submitted\" || status.toLowerCase() == \"queued\" || status.toLowerCase() == \"processing\")) {\r\n classContext.setState({ processStatus: status, processMessage: message })\r\n } else {\r\n classContext.setState({ processStatus: \"\", processMessage: \"\" })\r\n }\r\n }\r\n\r\n handleErrors = (list) => {\r\n let err = document.getElementById('errorPlace');\r\n err.classList.remove('hidden');\r\n\r\n let msgs = document.getElementById('errorMessages');\r\n while (msgs.firstChild) {\r\n msgs.removeChild(msgs.firstChild);\r\n }\r\n if (list.length > 0) {\r\n for (var i = 0; i < list.length; i++) {\r\n if (list[i].indexOf(';') > 0) {\r\n var smallArr = list[i].split(';');\r\n for (var j = 0; j < smallArr.length; j++) {\r\n if (smallArr[j].length > 1) {\r\n let dv = document.createElement('li');\r\n dv.append(smallArr[j])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n }\r\n else {\r\n let dv = document.createElement('li');\r\n dv.append(list[i])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n } else {\r\n err.classList.add('hidden');\r\n }\r\n }\r\n\r\n\r\n handleItemUpdate(evt) {\r\n let lbl = document.getElementById('uploadlabel');\r\n if (evt.target.files.length > 0) {\r\n lbl.classList.remove('red');\r\n lbl.classList.add('green');\r\n this.setState({ ['filename']: evt.target.files[0].name, ['file']: evt.target.files[0] });\r\n this.handleErrors(new Array());\r\n } else {\r\n lbl.classList.add('red');\r\n lbl.classList.remove('green');\r\n this.setState({ filename: 'None Selected', file: null });\r\n }\r\n }\r\n\r\n // TODO will we set status messages for this util?\r\n //setStatusMessage(status: string, message: string) {\r\n // let classContext: BmpOpportunityUtil = this;\r\n // if (status != undefined && (status.toLowerCase() == \"submitted\" || status.toLowerCase() == \"processing\")) {\r\n // classContext.setState({ processStatus: status, processMessage: message })\r\n // } else {\r\n // classContext.setState({ processStatus: \"\", processMessage: \"\" })\r\n // }\r\n //}\r\n\r\n // TODO will we use email delivery?\r\n //handleTextUpdate(evt) {\r\n // this.setState({ email: evt.target.value });\r\n //}\r\n\r\n\r\n\r\n render() {\r\n let classContext: BmpOpportunityUtil = this;\r\n return (\r\n
\r\n
\r\n \r\n \r\n

{this.props.cardTitle}

\r\n
\r\n \r\n \r\n
\r\n The BMP Opportunities Utility translates BMP specifications (e.g. maximum footprint, drainage area, soil depth) from a separate user-completed screening/feasibility analysis into model-ready SUSTAIN input files. These files are the driving component in the Optimization Framework for quantifying BMP performance (e.g., load reduction). \r\n
\r\n
\r\n \r\n
\r\n Through the processes described in the , BMP specifications are entered by a user in the . The Utility then converts those details into model input files with the corresponding parameters. Input files are formatted for simulation at the subwatershed/jurisdiction (“jurished”) scale in the SUSTAIN model. Additionally, a are provided for further context on how data is prepared and processed for upload to this Utility.\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n classContext.handleErrors(new Array())}>\r\n Processing Messages:\r\n \r\n \r\n \r\n
\r\n
\r\n
File Name: {classContext.state.filename}
\r\n \r\n classContext.handleItemUpdate(evt)} className=\"hidden\" />\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {this.state.processStatus} {this.state.processMessage}\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Additional supporting documentation includes:

\r\n
  • HRU GIS data: and for characterization of BMP drainage areas. See the Utility user documentation for distinctions between these two datasets.
  • \r\n
  • Jurished GIS data: representing the jurisdictional boundaries across the WMMS model domain.
  • \r\n
  • Tabular data: . These values were parameterized in the LSPC model calibration and validation process and used to develop the Complete HRU raster from the Mapped HRU raster. See the Utility user documentation for additional details.
  • \r\n
    \r\n

    DISCLAIMER: The Complete HRU raster contains mapped HRU values (e.g., ResHigh) that were reassigned to unmapped groups (e.g., Overspray) using a spatial statistical distribution method. Therefore, the cell-by-cell reassignment of the unmapped HRUs should not be interpreted as actual locations of unmapped activities. For example, a cell that was reassigned to Overspray does not express the precise location where Overspray is occurring in a subwatershed. Instead, the reassignments should be considered at the subwatershed scale and as diffuse reassignments.

    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n );\r\n }\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class wramps extends BaseModel {\r\n\r\n \"filename\": string;\r\n \"filetype\": string;\r\n \"fileblob\": Blob;\r\n \"watershedGroupName\": string;\r\n //\"email\": string\r\n\r\n constructor() {\r\n super('wramps');\r\n }\r\n} ","import React, { Component } from \"react\";\r\nimport './wrampsutil.css';\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport { Grid, Icon, Message, Button, Label, Dropdown, Select } from \"semantic-ui-react\";\r\nimport Config from \"../../../config/Config\";\r\nimport { IUtilityCard } from \"../../../interfaces/IUtilityCard\";\r\nimport { wramps } from \"../../../models/wramps\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { processviewmodel } from \"../../../models/processviewmodel\";\r\nimport { setInterval } from \"timers\";\r\nimport { WrampsWatershedGroup } from \"../../../models/wrampsWatershedGroup\";\r\nimport DownloadLink from \"../../../core/downloadLink/downloadLink\";\r\nimport HrefLink from \"../../../core/hrefLink/hrefLink\";\r\n\r\nexport class WrampsUtilState {\r\n pageObj: wramps = new wramps();\r\n filename: string = \"No selection\";\r\n file: File = null;\r\n wmg: number = 0;\r\n watershedGroups: WrampsWatershedGroup[] = new Array();\r\n wsgOptions = [];\r\n\r\n processing: boolean = false;\r\n processStatus: string = \"\";\r\n processMessage: string = \"\";\r\n}\r\n\r\nexport default class WrampsUtil extends Component {\r\n\r\n state = new WrampsUtilState;\r\n interval: NodeJS.Timeout;\r\n\r\n uploadFile() {\r\n // error list\r\n let list= new Array();\r\n if (this.state.file == null) {\r\n list.push(\"No file selected\");\r\n this.handleErrors(list);\r\n } else {\r\n let classContext: WrampsUtil = this;\r\n classContext.setState({ processing: true });\r\n this.handleErrors(new Array());\r\n let form = new FormData();\r\n\r\n let wrampsutil = new wramps();\r\n wrampsutil.fileblob = this.state.file;\r\n wrampsutil.filename = this.state.filename;\r\n wrampsutil.filetype = \"xlsx\";\r\n //form.append(\"attachmentData\", JSON.stringify(wrampsutil));\r\n\r\n form.append(\"data\", this.state.file);\r\n\r\n //if (classContext.state.pageObj.watershedGroupName != null && classContext.state.pageObj.watershedGroupName.length > 0) {\r\n // form.append(\"watershedGroupd\", classContext.state.pageObj.watershedGroupName);\r\n //} else {\r\n // let list = new Array();\r\n // list.push(\"Please select a watershed group\");\r\n // classContext.handleErrors(list);\r\n // classContext.setState({ processing: false });\r\n // return;\r\n //}\r\n\r\n wramps.axiosPostUpload(form).then((r: AxiosResponse) => {\r\n classContext.setStatusMessage(r.data.status, r.data.message); // if using status messages\r\n if (r.data.status.toLowerCase() == \"submitted\") {\r\n let data: processviewmodel = r.data;\r\n if (data.queueId > 0) {\r\n let id = data.queueId;\r\n let intvl = setInterval(() => {\r\n processviewmodel.axiosGet(id).then((r: AxiosResponse) => {\r\n let data: processviewmodel = r.data;\r\n classContext.setStatusMessage(data.status, data.message); // if using status messages\r\n if (data.status != undefined && data.status.toLowerCase() == \"completed\") {\r\n classContext.props.stopInterval();\r\n if (data.message != null) {\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n classContext.getResult(data.resultId);\r\n } else if (data.status != undefined && data.status.toLowerCase() == \"error\") {\r\n classContext.props.stopInterval();\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n else {\r\n }\r\n });\r\n }, 2000);\r\n classContext.props.beginInterval(intvl);\r\n }\r\n } else if (r.data.status.toLowerCase() == \"error\") {\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(r.data.message);\r\n classContext.handleErrors(list);\r\n } else {\r\n classContext.setState({ processing: false });\r\n list.push(\"Unknown error\");\r\n classContext.handleErrors(list);\r\n }\r\n }).catch(function (error) {\r\n classContext.setState({ processing: false });\r\n list.push(error.message);\r\n classContext.handleErrors(list);\r\n })\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n //WrampsWatershedGroup.axiosGetAll().then((r: AxiosResponse) => {\r\n // if (r.data != null) {\r\n // this.setState({ watershedGroups: r.data }, () => {\r\n // let wsgOptions = []\r\n // this.state.watershedGroups.forEach((group: WrampsWatershedGroup) => {\r\n // if (group.active == 1) {\r\n // wsgOptions.push({ key: group.id, text: group.groupName, value: group.internalName });\r\n // }\r\n // });\r\n // this.setState({ wsgOptions: wsgOptions });\r\n // });\r\n\r\n // } else {\r\n // //console.log(\"empty data returned\");\r\n // }\r\n //}).catch((e: AxiosResponse) => {\r\n // //console.log(\"Fetch error: \" + e);\r\n //});\r\n }\r\n\r\n getResult(id: number) {\r\n let classContext: WrampsUtil = this;\r\n classContext.setState({ processing: false });\r\n if (id > 0) {\r\n window.location.href = Config.api_endpoint + 'Wramps/' + id;\r\n }\r\n }\r\n\r\n handleErrors(list) {\r\n let err = document.getElementById('errorPlace');\r\n err.classList.remove('hidden');\r\n\r\n let msgs = document.getElementById('errorMessages');\r\n while (msgs.firstChild) {\r\n msgs.removeChild(msgs.firstChild);\r\n }\r\n if (list.length > 0) {\r\n for (var i = 0; i < list.length; i++) {\r\n if (list[i].indexOf(';') > 0) {\r\n var smallArr = list[i].split(';');\r\n for (var j = 0; j < smallArr.length; j++) {\r\n if (smallArr[j].length > 1) {\r\n let dv = document.createElement('li');\r\n dv.append(smallArr[j])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n }\r\n else {\r\n let dv = document.createElement('li');\r\n dv.append(list[i])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n } else {\r\n err.classList.add('hidden');\r\n }\r\n }\r\n\r\n handleSelect(data: any) {\r\n let classContext: WrampsUtil = this;\r\n let pageObj = Object.assign({}, classContext.state.pageObj);\r\n\r\n // check if input type field exists\r\n pageObj.watershedGroupName = data.value;\r\n\r\n classContext.setState({ pageObj: pageObj });\r\n }\r\n\r\n handleItemUpdate(evt) {\r\n let lbl = document.getElementById('uploadlabel');\r\n if (evt.target.files.length > 0) {\r\n lbl.classList.remove('red');\r\n lbl.classList.add('green');\r\n this.setState({ ['filename']: evt.target.files[0].name, ['file']: evt.target.files[0] });\r\n this.handleErrors(new Array());\r\n } else {\r\n lbl.classList.add('red');\r\n lbl.classList.remove('green');\r\n this.setState({ filename: 'None Selected', file: null });\r\n }\r\n }\r\n\r\n setStatusMessage(status: string, message: string) {\r\n let classContext: WrampsUtil = this;\r\n if (status != undefined && (status.toLowerCase() == \"submitted\" || status.toLowerCase() == \"queued\" || status.toLowerCase() == \"processing\")) {\r\n classContext.setState({ processStatus: status, processMessage: message })\r\n } else {\r\n classContext.setState({ processStatus: \"\", processMessage: \"\" })\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n render() {\r\n let classContext: WrampsUtil = this;\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n

    {this.props.cardTitle}

    \r\n
    \r\n \r\n \r\n
    \r\n ATTENTION: This Utility has been specifically developed for use by municipalities with access to the Watershed Reporting, Adaptive Management and Planning System (WRAMPS) database. Valid login credentials are required for obtaining information on built or planned best management practices (BMPs) stored within WRAMPS that serve as input to this Utility. Individuals without access to WRAMPS can reach out to the lead representative of the appropriate watershed management group to obtain the desired BMP data.\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n In 2016, WRAMPS launched as a web-based platform for MS4 reporting and is used by a majority of municipalities in Los Angeles County. Since that time, WRAMPS has become the key repository of data regarding existing and planned structural BMPs, storing information for over 10,000 BMPs across the County (as of October 2019). BMP information stored within WRAMPS is organized by municipal jurisdiction and watershed management group and can be used to track progress towards meeting goals defined by the individual watershed management programs.\r\n
    \r\n
    \r\n \r\n
    \r\n The WRAMPS Utility translates the contents of a bulk export from the WRAMPS database into a summary spreadsheet which can be uploaded to the BMP Opportunities Utility (the next utility in the Optimization Framework). This process enables existing and planned BMPs to be integrated into the WMMS 2.0 Optimization Framework, such that their impact on downstream hydrology and water quality can be characterized. \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n classContext.handleErrors(new Array())}>\r\n Processing Messages:\r\n \r\n \r\n \r\n
    \r\n
    \r\n
    File Name: {classContext.state.filename}
    \r\n \r\n classContext.handleItemUpdate(evt)} className=\"hidden\" />\r\n
    \r\n
    \r\n\r\n {/*
    \r\n\r\n
    \r\n
    \r\n Watershed Management Group:\r\n
    \r\n classContext.handleSelect(data)}\r\n />\r\n
    \r\n */}\r\n
    \r\n
    \r\n \r\n
    \r\n {this.state.processStatus} {this.state.processMessage}\r\n
    \r\n \r\n
    \r\n

    The process description below outlines the necessary steps to successfully execute this utility. For additional details, access the .

    \r\n

    1. With the appropriate credentials (username and password), log in to and access the BMP database to obtain the desired list of existing and/or planned BMPs. Output from the WRAMPS database is in the form of a Microsoft Excel spreadsheet.

    \r\n

    2. Upload the WRAMPS database output directly to this utility and select \"Process\".

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n );\r\n }\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class inclusivebestsolutions extends BaseModel {\r\n\r\n \"zipfilename\": string;\r\n \"zipfiletype\": string;\r\n \"zipfileblob\": Blob;\r\n \"wmmsfilename\": string;\r\n \"wmmsfiletype\": string;\r\n \"wmmsfileblob\": Blob;\r\n \"email\": string;\r\n \"reduction\": number;\r\n\r\n constructor() {\r\n super('inclusivebestsolutions');\r\n }\r\n} ","import './inclusivebestsolutionsutil.css';\r\nimport React, { Component } from \"react\";\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport { Grid, Icon, Message, Button, Label } from \"semantic-ui-react\";\r\nimport Config from \"../../../config/Config\";\r\nimport { IUtilityCard } from \"../../../interfaces/IUtilityCard\";\r\nimport { inclusivebestsolutions } from \"../../../models/inclusivebestsolutions\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { processviewmodel } from \"../../../models/processviewmodel\";\r\nimport { setInterval } from \"timers\";\r\nimport DownloadLink from '../../../core/downloadLink/downloadLink';\r\n\r\nexport class InclusiveBestSolutionsUtilState {\r\n //pageObj: inclusivebestsolutions = new inclusivebestsolutions();\r\n zipfilename: string = \"No selection\";\r\n zipfile: File = null;\r\n wmmsfilename: string = \"No selection\";\r\n wmmsfile: File = null;\r\n email: string = \"\";\r\n reduction: number = 100;\r\n \r\n processing: boolean = false;\r\n processStatus: string = \"\";\r\n processMessage: string = \"\";\r\n}\r\n\r\nexport default class InclusiveBestSolutionsUtil extends Component {\r\n\r\n state = new InclusiveBestSolutionsUtilState;\r\n interval: NodeJS.Timeout;\r\n\r\n uploadFile() {\r\n // error list\r\n let list = new Array();\r\n if (this.state.zipfile == null || this.state.wmmsfile == null) {\r\n list.push(\"Please select all needed files\");\r\n this.handleErrors(list);\r\n } else {\r\n let classContext: InclusiveBestSolutionsUtil = this;\r\n classContext.setState({ processing: true });\r\n this.handleErrors(new Array());\r\n let form = new FormData();\r\n\r\n form.append(\"data\", this.state.zipfile);\r\n form.append(\"data\", this.state.wmmsfile);\r\n\r\n if (classContext.state.reduction != null && classContext.state.reduction > 0 && classContext.state.reduction <= 100) {\r\n form.append(\"reduction\", classContext.state.reduction.toString());\r\n } else {\r\n let list = new Array();\r\n list.push(\"Please specify a target reduction between 0-100\");\r\n classContext.handleErrors(list);\r\n classContext.setState({ processing: false });\r\n return;\r\n }\r\n\r\n inclusivebestsolutions.axiosPostUpload(form).then((r: AxiosResponse) => {\r\n classContext.setStatusMessage(r.data.status, r.data.message);\r\n if (r.data.status.toLowerCase() == \"submitted\") {\r\n let data: processviewmodel = r.data;\r\n if (data.queueId > 0) {\r\n let id = data.queueId;\r\n let intvl = setInterval(() => {\r\n processviewmodel.axiosGet(id).then((r: AxiosResponse) => {\r\n let data: processviewmodel = r.data;\r\n classContext.setStatusMessage(data.status, data.message);\r\n if (data.status != undefined && data.status.toLowerCase() == \"completed\") {\r\n classContext.props.stopInterval();\r\n if (data.message != null) {\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n classContext.getResult(data.resultId);\r\n } else if (data.status != undefined && data.status.toLowerCase() == \"error\") {\r\n classContext.props.stopInterval();\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n else {\r\n }\r\n });\r\n }, 2000); \r\n classContext.props.beginInterval(intvl);\r\n }\r\n } else if (r.data.status.toLowerCase() == \"error\") {\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(r.data.message);\r\n classContext.handleErrors(list);\r\n } else {\r\n classContext.setState({ processing: false });\r\n list.push(\"Unknown error\");\r\n classContext.handleErrors(list);\r\n }\r\n }).catch(function (error) {\r\n classContext.setState({ processing: false });\r\n list.push(error.message);\r\n classContext.handleErrors(list);\r\n })\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n }\r\n\r\n getResult(id: number) {\r\n let classContext: InclusiveBestSolutionsUtil = this;\r\n classContext.setState({ processing: false });\r\n if (id > 0) {\r\n window.location.href = Config.api_endpoint + 'InclusiveBestSolutions/' + id;\r\n }\r\n }\r\n \r\n handleReductionUpdate(evt) {\r\n this.setState({ reduction: evt.target.value });\r\n }\r\n\r\n setStatusMessage(status: string, message: string) {\r\n let classContext: InclusiveBestSolutionsUtil = this;\r\n if (status != undefined && (status.toLowerCase() == \"submitted\" || status.toLowerCase() == \"queued\" || status.toLowerCase() == \"processing\")) {\r\n classContext.setState({ processStatus: status, processMessage: message })\r\n } else {\r\n classContext.setState({ processStatus: \"\", processMessage: \"\" })\r\n }\r\n }\r\n\r\n handleErrors = (list) => {\r\n let err = document.getElementById('errorPlace');\r\n err.classList.remove('hidden');\r\n\r\n let msgs = document.getElementById('errorMessages');\r\n while (msgs.firstChild) {\r\n msgs.removeChild(msgs.firstChild);\r\n }\r\n if (list.length > 0) {\r\n for (var i = 0; i < list.length; i++) {\r\n if (list[i].indexOf(';') > 0) {\r\n var smallArr = list[i].split(';');\r\n for (var j = 0; j < smallArr.length; j++) {\r\n if (smallArr[j].length > 1) {\r\n let dv = document.createElement('li');\r\n dv.append(smallArr[j])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n }\r\n else {\r\n let dv = document.createElement('li');\r\n dv.append(list[i])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n } else {\r\n err.classList.add('hidden');\r\n }\r\n }\r\n\r\n handleItemUpdate(evt, typestr) {\r\n let lbl = document.getElementById(typestr + 'uploadlabel');\r\n if (evt.target.files.length > 0) {\r\n lbl.classList.remove('red');\r\n lbl.classList.add('green');\r\n this.setState({ [typestr + 'filename']: evt.target.files[0].name, [typestr + 'file']: evt.target.files[0] });\r\n this.handleErrors(new Array());\r\n } else {\r\n lbl.classList.add('red');\r\n lbl.classList.remove('green');\r\n this.setState({ [typestr + 'filename']: 'None Selected', file: null });\r\n }\r\n }\r\n \r\n render() {\r\n let classContext: InclusiveBestSolutionsUtil = this;\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n

    {this.props.cardTitle}

    \r\n
    \r\n \r\n \r\n
    \r\n Three utilities have been developed to manage the workflow for SUSTAIN’s two-tier optimization process: (1) the Inclusive Best Solutions Utility, (2) the MJR BMP Utility, and (3) the Two-tiered Optimization Utility. These utilities accept and process output from SUSTAIN model runs such that their results can be uploaded to the Optimization Viewer to discern cost-optimal BMP performance and develop implementation strategies. \r\n
    \r\n
    \r\n \r\n
    \r\n Once the first tier of the SUSTAIN optimization is completed, results can be uploaded to this Inclusive Best Solutions Utility to be organized as an inclusive set of best solutions. Output from this optimization is a cloud of thousands (sometimes tens-of-thousands) of unique BMP combinations for each modeled subwatershed/jurisdiction (“jurished”). Each BMP combination is a distinct blend of BMP type and storage capacity from the BMP spreadsheet template developed for the BMP Opportunities Utility. For additional details on this process and for the other two utilities in the Optimization Framework (MJR BMP and Two-tiered Optimization) a has been developed. \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n classContext.handleErrors(new Array())}>\r\n Processing Messages:\r\n \r\n \r\n \r\n
    \r\n
    \r\n
    File Name: {classContext.state.zipfilename}
    \r\n \r\n classContext.handleItemUpdate(evt, 'zip')} className=\"hidden\" />\r\n
    \r\n
    \r\n
    File Name: {classContext.state.wmmsfilename}
    \r\n \r\n classContext.handleItemUpdate(evt, 'wmms')} className=\"hidden\" />\r\n
    \r\n
    \r\n
    Target Reduction:
    \r\n
    classContext.handleReductionUpdate(evt)} />
    %
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n {this.state.processStatus} {this.state.processMessage}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n

    Process Description:

    \r\n

    1. Upload the zipped folder containing output from the first tier of the SUSTAIN optimization in the 1optimized folder. This folder is located within the broader package of folders output from the BMP Opportunities Utility.

    \r\n

    2. Upload the \".wmms\" file within the 4viewer folder. This file contains BMP and model specifications as defined in the BMP Opportunities spreadsheet template.

    \r\n

    3. Enter a maximum reduction target for the selected constituent (e.g., total zinc). The recommended value is 100% (i.e., maximum possible reduction in each jurished)

    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n );\r\n }\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class tier2 extends BaseModel {\r\n\r\n \"zipfilename\": string;\r\n \"zipfiletype\": string;\r\n \"zipfileblob\": Blob;\r\n \"scenariofilename\": string;\r\n \"scenariofiletype\": string;\r\n \"scenariofileblob\": Blob;\r\n \"wmmsfilename\": string;\r\n \"wmmsfiletype\": string;\r\n \"wmmsfileblob\": Blob;\r\n \"mjrbmp\": boolean;\r\n //\"email\": string;\r\n //\"reduction\": number;\r\n \"mrcFilename\": string\r\n \"mrcFiletype\": string\r\n \"mrcFileblob\": string\r\n\r\n constructor() {\r\n super('tier2');\r\n }\r\n} ","import './tier2util.css';\r\nimport React, { Component } from \"react\";\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport { Grid, Icon, Message, Button, Label, Radio, Checkbox } from \"semantic-ui-react\";\r\nimport Config from \"../../../config/Config\";\r\nimport { IUtilityCard } from \"../../../interfaces/IUtilityCard\";\r\nimport { tier2 } from \"../../../models/tier2\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { processviewmodel } from \"../../../models/processviewmodel\";\r\nimport { setInterval } from \"timers\";\r\nimport DownloadLink from '../../../core/downloadLink/downloadLink';\r\nimport HrefLink from '../../../core/hrefLink/hrefLink';\r\n\r\nexport class Tier2UtilState {\r\n zipfilename: string = \"No selection\";\r\n zipfile: File = null;\r\n scenariofilename: string = \"No selection\";\r\n scenariofile: File = null;\r\n wmmsfilename: string = \"No selection\";\r\n wmmsfile: File = null;\r\n mrcfilename: string = \"No selection\";\r\n mrcfile: File = null;\r\n mjrbmp: boolean = false;\r\n //email: string = \"\";\r\n //reduction: number = null;\r\n \r\n processing: boolean = false;\r\n processStatus: string = \"\";\r\n processMessage: string = \"\";\r\n}\r\n\r\nexport default class Tier2Util extends Component {\r\n\r\n state = new Tier2UtilState;\r\n interval: NodeJS.Timeout;\r\n\r\n componentDidMount() {\r\n }\r\n\r\n getResult(id: number) {\r\n let classContext: Tier2Util = this;\r\n classContext.setState({ processing: false });\r\n if (id > 0) {\r\n window.location.href = Config.api_endpoint + 'Tier2/' + id;\r\n }\r\n }\r\n\r\n uploadFile() {\r\n // error list\r\n let list = new Array();\r\n if (this.state.zipfile == null || this.state.scenariofile == null || this.state.wmmsfile == null) {\r\n list.push(\"Please select all needed files\");\r\n this.handleErrors(list);\r\n } else {\r\n let classContext: Tier2Util = this;\r\n classContext.setState({ processing: true });\r\n this.handleErrors(new Array());\r\n let form = new FormData();\r\n\r\n form.append(\"data\", this.state.zipfile);\r\n form.append(\"data\", this.state.scenariofile);\r\n form.append(\"data\", this.state.wmmsfile);\r\n form.append(\"data\", this.state.mrcfile);\r\n let mjrbmpstring = this.state.mjrbmp.toString();\r\n form.append(\"mjrbmp\", mjrbmpstring);\r\n\r\n //if (this.state.email.length > 0) {\r\n // if (classContext.validateEmail(classContext.state.email)) {\r\n // form.append(\"email\", classContext.state.email);\r\n // } else {\r\n // list.push(\"The email address provided is invalid\");\r\n // classContext.handleErrors(list);\r\n // classContext.setState({ processing: false });\r\n // return;\r\n // }\r\n //}\r\n\r\n tier2.axiosPostUpload(form).then((r: AxiosResponse) => {\r\n classContext.setStatusMessage(r.data.status, r.data.message);\r\n if (r.data.status.toLowerCase() == \"submitted\") {\r\n let data: processviewmodel = r.data;\r\n if (data.queueId > 0) {\r\n let id = data.queueId;\r\n let intvl = setInterval(() => {\r\n processviewmodel.axiosGet(id).then((r: AxiosResponse) => {\r\n let data: processviewmodel = r.data;\r\n classContext.setStatusMessage(data.status, data.message);\r\n if (data.status != undefined && data.status.toLowerCase() == \"completed\") {\r\n classContext.props.stopInterval();\r\n if (data.message != null) {\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n classContext.getResult(data.resultId);\r\n } else if (data.status != undefined && data.status.toLowerCase() == \"error\") {\r\n classContext.props.stopInterval();\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n else {\r\n }\r\n });\r\n }, 2000);\r\n classContext.props.beginInterval(intvl);\r\n }\r\n } else if (r.data.status.toLowerCase() == \"error\") {\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(r.data.message);\r\n classContext.handleErrors(list);\r\n } else {\r\n classContext.setState({ processing: false });\r\n list.push(\"Unknown error\");\r\n classContext.handleErrors(list);\r\n }\r\n }).catch(function (error) {\r\n classContext.setState({ processing: false });\r\n list.push(error.message);\r\n classContext.handleErrors(list);\r\n })\r\n }\r\n }\r\n\r\n //validateEmail(email: string): boolean {\r\n // if (/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(email)) { return true; }\r\n // return false;\r\n //}\r\n \r\n //handleEmailUpdate(evt) {\r\n // this.setState({ email: evt.target.value });\r\n //}\r\n\r\n handleToggleUpdate = () => {\r\n //console.log(!this.state.mjrbmp);\r\n this.setState({ mjrbmp: !this.state.mjrbmp });\r\n }\r\n\r\n setStatusMessage(status: string, message: string) {\r\n let classContext: Tier2Util = this;\r\n if (status != undefined && (status.toLowerCase() == \"submitted\" || status.toLowerCase() == \"queued\" || status.toLowerCase() == \"processing\")) {\r\n classContext.setState({ processStatus: status, processMessage: message })\r\n } else {\r\n classContext.setState({ processStatus: \"\", processMessage: \"\" })\r\n }\r\n }\r\n\r\n handleErrors = (list) => {\r\n let err = document.getElementById('errorPlace');\r\n err.classList.remove('hidden');\r\n\r\n let msgs = document.getElementById('errorMessages');\r\n while (msgs.firstChild) {\r\n msgs.removeChild(msgs.firstChild);\r\n }\r\n if (list.length > 0) {\r\n for (var i = 0; i < list.length; i++) {\r\n if (list[i].indexOf(';') > 0) {\r\n var smallArr = list[i].split(';');\r\n for (var j = 0; j < smallArr.length; j++) {\r\n if (smallArr[j].length > 1) {\r\n let dv = document.createElement('li');\r\n dv.append(smallArr[j])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n }\r\n else {\r\n let dv = document.createElement('li');\r\n dv.append(list[i])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n } else {\r\n err.classList.add('hidden');\r\n }\r\n }\r\n\r\n handleItemUpdate(evt, typestr) {\r\n let lbl = document.getElementById(typestr + 'uploadlabel');\r\n if (evt.target.files.length > 0) {\r\n lbl.classList.remove('red');\r\n lbl.classList.add('green');\r\n this.setState({ [typestr + 'filename']: evt.target.files[0].name, [typestr + 'file']: evt.target.files[0] });\r\n this.handleErrors(new Array());\r\n } else {\r\n lbl.classList.add('red');\r\n lbl.classList.remove('green');\r\n this.setState({ [typestr + 'filename']: 'None Selected', file: null });\r\n }\r\n }\r\n \r\n render() {\r\n let classContext: Tier2Util = this;\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n

    {this.props.cardTitle}

    \r\n
    \r\n \r\n \r\n
    \r\n Within a jurished, the set of “Best Solutions” represent the most cost-effective BMP implementation options. However, when compared with results from another jurished, it is sometimes more cost-effective on a regional scale to manage more aggressively in another jurished to meet downstream objectives. This Two-tiered Optimization Utility is where this problem formulation for watershed-scale optimization across all considered jurisheds occurs. In this two-tier model structure, the varying cost and benefits of all considered BMP options are balanced across a management area to most cost-effectively meet downstream objectives. Reference the for a full description of the processes and mechanics for executing this utility. \r\n
    \r\n
    \r\n \r\n
    \r\n This Utility accepts output from the second tier of optimization (if MJR BMPs are not present) or the MJR BMP simulation (if MJR BMPs are present). The output of the Two-tiered utility is a CRZ file used in the for result visualization and further processing.\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n classContext.handleErrors(new Array())}>\r\n Processing Messages:\r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    File Name: {classContext.state.zipfilename}
    \r\n \r\n classContext.handleItemUpdate(evt, 'zip')} className=\"hidden\" />\r\n
    \r\n\r\n
    \r\n
    File Name: {classContext.state.scenariofilename}
    \r\n \r\n classContext.handleItemUpdate(evt, 'scenario')} className=\"hidden\" />\r\n
    \r\n
    \r\n
    File Name: {classContext.state.wmmsfilename}
    \r\n \r\n classContext.handleItemUpdate(evt, 'wmms')} className=\"hidden\" />\r\n
    \r\n
    \r\n
    Process with MJR BMPs?
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n {this.state.mjrbmp == true && Yes}\r\n {this.state.mjrbmp == false && No}\r\n
    \r\n
    \r\n
    \r\n {/*this.state.mjrbmp &&
    \r\n
    Optional File Name: {classContext.state.mrcfilename}
    \r\n \r\n classContext.handleItemUpdate(evt, 'mrc')} className=\"hidden\" />\r\n
    */}\r\n {/*
    \r\n
    Optional Email: Provide email address to receive completion email
    \r\n
    classContext.handleEmailUpdate(evt)} />
    \r\n
    */}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n {this.state.processStatus} {this.state.processMessage}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n

    Process Description:

    \r\n

    1. If MJR BMPs are not present, upload the zipped folder containing output in the 2production folder. If MJR BMPs are present, upload the zipped folder containing output from the 2production folder and the 3mjrBmpProduction folder.

    \r\n

    2. Upload a configured \"scenario definition file\" that defines the management objective, assessment point, and decision variables. A is provided as an example; see the user guide for further detail on its use.

    \r\n

    3. Upload the \".wmms\" file within the 4viewer folder. This file contains BMP and model specifications as defined in the BMP Opportunities template spreadsheet template.

    \r\n

    4. If MJR BMPs are not present, toggle the MJRBMPs slider to \"No\". If MJR BMPs are present, toggle the MJRBMPs slider to \"Yes\".

    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n );\r\n }\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class mjrsolutions extends BaseModel {\r\n\r\n \"zipfilename\": string;\r\n \"zipfiletype\": string;\r\n \"zipfileblob\": Blob;\r\n \"wmmsfilename\": string;\r\n \"wmmsfiletype\": string;\r\n \"wmmsfileblob\": Blob;\r\n\r\n\r\n constructor() {\r\n super('mjrbmpsolutions');\r\n }\r\n} ","import './mjrbmpsolutions.css';\r\nimport React, { Component } from \"react\";\r\nimport { IUtilityCard } from '../../../interfaces/IUtilityCard';\r\nimport { Grid, Icon, Message, Label, Checkbox, Button } from 'semantic-ui-react';\r\nimport { Config } from '../../../config/Config';\r\nimport { mjrsolutions } from '../../../models/mjrsolutions';\r\nimport { AxiosResponse } from 'axios';\r\nimport { processviewmodel } from '../../../models/processviewmodel';\r\nimport { setInterval } from \"timers\";\r\nimport DownloadLink from '../../../core/downloadLink/downloadLink';\r\n\r\n\r\nexport class MjrBMPSolutionsState {\r\n zipfilename: string = \"No selection\";\r\n zipfile: File = null;\r\n wmmsfilename: string = \"No selection\";\r\n wmmsfile: File = null;\r\n //email: string = \"\";\r\n //reduction: number = null;\r\n\r\n processing: boolean = false;\r\n processStatus: string = \"\";\r\n processMessage: string = \"\";\r\n}\r\n\r\nexport default class MjrBMPSolutions extends Component {\r\n\r\n state = new MjrBMPSolutionsState;\r\n interval: NodeJS.Timeout;\r\n\r\n componentDidMount() {\r\n }\r\n\r\n uploadFile() {\r\n // error list\r\n let list = new Array();\r\n if (this.state.zipfile == null || this.state.wmmsfile == null) {\r\n list.push(\"Please select all needed files\");\r\n this.handleErrors(list);\r\n } else {\r\n let classContext: MjrBMPSolutions = this;\r\n classContext.setState({ processing: true });\r\n this.handleErrors(new Array());\r\n let form = new FormData();\r\n\r\n form.append(\"data\", this.state.zipfile);\r\n form.append(\"data\", this.state.wmmsfile);\r\n\r\n\r\n //if (this.state.email.length > 0) {\r\n // if (classContext.validateEmail(classContext.state.email)) {\r\n // form.append(\"email\", classContext.state.email);\r\n // } else {\r\n // list.push(\"The email address provided is invalid\");\r\n // classContext.handleErrors(list);\r\n // classContext.setState({ processing: false });\r\n // return;\r\n // }\r\n //}\r\n\r\n mjrsolutions.axiosPostUpload(form).then((r: AxiosResponse) => {\r\n classContext.setStatusMessage(r.data.status, r.data.message);\r\n if (r.data.status.toLowerCase() == \"submitted\") {\r\n let data: processviewmodel = r.data;\r\n if (data.queueId > 0) {\r\n let id = data.queueId;\r\n let intvl = setInterval(() => {\r\n processviewmodel.axiosGet(id).then((r: AxiosResponse) => {\r\n let data: processviewmodel = r.data;\r\n classContext.setStatusMessage(data.status, data.message);\r\n if (data.status != undefined && data.status.toLowerCase() == \"completed\") {\r\n classContext.props.stopInterval();\r\n if (data.message != null) {\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n classContext.getResult(data.resultId);\r\n } else if (data.status != undefined && data.status.toLowerCase() == \"error\") {\r\n classContext.props.stopInterval();\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n else {\r\n }\r\n });\r\n }, 2000);\r\n classContext.props.beginInterval(intvl);\r\n }\r\n } else if (r.data.status.toLowerCase() == \"error\") {\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(r.data.message);\r\n classContext.handleErrors(list);\r\n } else {\r\n classContext.setState({ processing: false });\r\n list.push(\"Unknown error\");\r\n classContext.handleErrors(list);\r\n }\r\n }).catch(function (error) {\r\n classContext.setState({ processing: false });\r\n list.push(error.message);\r\n classContext.handleErrors(list);\r\n })\r\n }\r\n }\r\n\r\n getResult(id: number) {\r\n let classContext: MjrBMPSolutions = this;\r\n classContext.setState({ processing: false });\r\n if (id > 0) {\r\n window.location.href = Config.api_endpoint + 'MjrBMPSolutions/' + id;\r\n }\r\n }\r\n\r\n\r\n setStatusMessage(status: string, message: string) {\r\n let classContext: MjrBMPSolutions = this;\r\n if (status != undefined && (status.toLowerCase() == \"submitted\" || status.toLowerCase() == \"queued\" || status.toLowerCase() == \"processing\")) {\r\n classContext.setState({ processStatus: status, processMessage: message })\r\n } else {\r\n classContext.setState({ processStatus: \"\", processMessage: \"\" })\r\n }\r\n }\r\n\r\n handleErrors = (list) => {\r\n let err = document.getElementById('errorPlace');\r\n err.classList.remove('hidden');\r\n\r\n let msgs = document.getElementById('errorMessages');\r\n while (msgs.firstChild) {\r\n msgs.removeChild(msgs.firstChild);\r\n }\r\n if (list.length > 0) {\r\n for (var i = 0; i < list.length; i++) {\r\n if (list[i].indexOf(';') > 0) {\r\n var smallArr = list[i].split(';');\r\n for (var j = 0; j < smallArr.length; j++) {\r\n if (smallArr[j].length > 1) {\r\n let dv = document.createElement('li');\r\n dv.append(smallArr[j])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n }\r\n else {\r\n let dv = document.createElement('li');\r\n dv.append(list[i])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n } else {\r\n err.classList.add('hidden');\r\n }\r\n }\r\n\r\n handleItemUpdate(evt, typestr) {\r\n let lbl = document.getElementById(typestr + 'uploadlabel');\r\n if (evt.target.files.length > 0) {\r\n lbl.classList.remove('red');\r\n lbl.classList.add('green');\r\n this.setState({ [typestr + 'filename']: evt.target.files[0].name, [typestr + 'file']: evt.target.files[0] });\r\n this.handleErrors(new Array());\r\n } else {\r\n lbl.classList.add('red');\r\n lbl.classList.remove('green');\r\n this.setState({ [typestr + 'filename']: 'None Selected', file: null });\r\n }\r\n }\r\n\r\n\r\n render() {\r\n let classContext: MjrBMPSolutions = this;\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n

    {this.props.cardTitle}

    \r\n
    \r\n \r\n \r\n
    \r\n The MJR BMP Utility is used when Multi-jurished Regional (MJR) BMPs are present within the modeled domain. MJR BMPs are projects whose drainage areas are contained within more than one jurished. If MJR BMPs are not present, users should proceed directly to the Two-Tiered Optimization Utility. \r\n
    \r\n
    \r\n \r\n
    \r\n This utility processes output files from the second tier of optimization (2production folder) such that the performance of MJR BMPs can be evaluated in conjunction with other upstream regional and distributed projects. Reference the for a full description of the processes and mechanics for executing this utility. \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n classContext.handleErrors(new Array())}>\r\n Processing Messages:\r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    File Name: {classContext.state.zipfilename}
    \r\n \r\n classContext.handleItemUpdate(evt, 'zip')} className=\"hidden\" />\r\n
    \r\n
    \r\n
    File Name: {classContext.state.wmmsfilename}
    \r\n \r\n classContext.handleItemUpdate(evt, 'wmms')} className=\"hidden\" />\r\n
    \r\n {/*
    \r\n
    Optional Email: Provide email address to receive completion email
    \r\n
    classContext.handleEmailUpdate(evt)} />
    \r\n
    */}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n {this.state.processStatus} {this.state.processMessage}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n

    Process Description:

    \r\n

    1. Upload the zipped folder containing output in the 2production folder. This folder is located within the broader package of folders output from the BMP Opportunities Utility.

    \r\n

    2. Upload the \".wmms\" file within the 4viewer folder. This file contains BMP and model specifications as defined in the BMP Opportunities template spreadsheet template.

    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n );\r\n }\r\n}","import { BaseModel } from \"../interfaces/IBaseModel\";\r\n\r\nexport class climatechange extends BaseModel {\r\n\r\n \"filenameXls\": string;\r\n \"filetypeXls\": string;\r\n \"fileblobXls\": Blob;\r\n \"filenameInp\": string;\r\n \"filetypeInp\": string;\r\n \"fileblobInp\": Blob;\r\n \"filenameCsv\": string;\r\n \"filetypeCsv\": string;\r\n \"fileblobCsv\": Blob;\r\n \"basePath\": string\r\n\r\n constructor() {\r\n super('climatechange');\r\n }\r\n} ","import React, { Component } from \"react\";\r\nimport './climatechangeutil.css';\r\nimport { INavHistory } from \"../../../interfaces/INavHistory\";\r\nimport { Grid, Icon, Message, Button, Label, Input, Divider } from \"semantic-ui-react\";\r\nimport Config from \"../../../config/Config\";\r\nimport { IUtilityCard } from \"../../../interfaces/IUtilityCard\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { processviewmodel } from \"../../../models/processviewmodel\";\r\nimport { setInterval } from \"timers\";\r\nimport { climatechange } from \"../../../models/climatechange\"\r\nimport HrefLink from \"../../../core/hrefLink/hrefLink\";\r\nimport DownloadLink from \"../../../core/downloadLink/downloadLink\";\r\n\r\n\r\nexport class ClimateChangeUtilState {\r\n pageObj: climatechange = new climatechange();\r\n filenameXls: string = \"No selection\";\r\n fileXls: File = null;\r\n filenameInp: string = \"No selection\";\r\n fileInp: File = null;\r\n filenameCsv: string = \"No selection\";\r\n fileCsv: File = null;\r\n filenameCConfig: string = \"No selection\";\r\n fileCConfig: File = null;\r\n filenameCcf: string = \"No selection\";\r\n fileCcf: File = null;\r\n basePath: string = \"\";\r\n numBatch: number = 1;\r\n processing: boolean = false;\r\n //email: string = \"\";\r\n processStatus: string = \"\";\r\n processMessage: string = \"\";\r\n}\r\n\r\nexport default class ClimateChangeUtil extends Component {\r\n\r\n state = new ClimateChangeUtilState;\r\n\r\n uploadFile() {\r\n // error list\r\n let list = new Array();\r\n if (this.state.fileXls == null) {\r\n list.push(\"No Excel file selected\");\r\n this.handleErrors(list);\r\n // } else if (this.state.fileInp == null) {\r\n // list.push(\"No Input template file selected\");\r\n // this.handleErrors(list);\r\n // } else if (this.state.fileCsv == null) {\r\n // list.push(\"No WstNum file selected\");\r\n // this.handleErrors(list);\r\n } else if (this.state.fileCcf == null) {\r\n list.push(\"No Ccf file selected\");\r\n this.handleErrors(list); \r\n } else if (this.state.fileCConfig== null) {\r\n list.push(\"No Climate Config file selected\");\r\n this.handleErrors(list); \r\n // } if (this.state.basePath == null || this.state.basePath.length < 1) {\r\n // list.push(\"No base path specified\");\r\n // this.handleErrors(list);\r\n } else {\r\n let classContext: ClimateChangeUtil = this;\r\n classContext.setState({ processing: true });\r\n this.handleErrors(new Array());\r\n let form = new FormData();\r\n\r\n form.append(\"data\", this.state.fileXls);\r\n // form.append(\"data\", this.state.fileInp);\r\n // form.append(\"data\", this.state.fileCsv);\r\n form.append(\"data\", this.state.fileCcf);\r\n form.append(\"data\", this.state.fileCConfig);\r\n // form.append(\"basepath\", this.state.basePath.toString());\r\n // form.append(\"numbatch\", this.state.numBatch.toString());\r\n\r\n climatechange.axiosPostUpload(form).then((r: AxiosResponse) => {\r\n classContext.setStatusMessage(r.data.status, r.data.message); \r\n if (r.data.status.toLowerCase() == \"submitted\") {\r\n let data: processviewmodel = r.data;\r\n if (data.queueId > 0) {\r\n let id = data.queueId;\r\n let intvl = setInterval(() => {\r\n processviewmodel.axiosGet(id).then((r: AxiosResponse) => {\r\n let data: processviewmodel = r.data;\r\n classContext.setStatusMessage(data.status, data.message);\r\n if (data.status != undefined && data.status.toLowerCase() == \"completed\") {\r\n classContext.props.stopInterval();\r\n if (data.message != null) {\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n classContext.getResult(data.resultId);\r\n } else if (data.status != undefined && data.status.toLowerCase() == \"error\") {\r\n classContext.props.stopInterval();\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(data.message);\r\n classContext.handleErrors(list);\r\n }\r\n else {\r\n //console.log('keep checking');\r\n }\r\n });\r\n }, 1000); // TODO change interval?\r\n classContext.props.beginInterval(intvl);\r\n }\r\n } else if (r.data.status.toLowerCase() == \"error\") {\r\n classContext.setState({ processing: false });\r\n list.push(\"Error during processing\");\r\n list.push(r.data.message);\r\n classContext.handleErrors(list);\r\n } else {\r\n classContext.setState({ processing: false });\r\n list.push(\"Unknown error\");\r\n classContext.handleErrors(list);\r\n }\r\n\r\n }).catch(function (error) {\r\n classContext.setState({ processing: false });\r\n list.push(error.message);\r\n classContext.handleErrors(list);\r\n })\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n }\r\n\r\n getResult(id: number) {\r\n let classContext: ClimateChangeUtil = this;\r\n classContext.setState({ processing: false });\r\n if (id > 0) {\r\n window.location.href = Config.api_endpoint + 'ClimateChange/' + id;\r\n }\r\n }\r\n\r\n setStatusMessage(status: string, message: string) {\r\n let classContext: ClimateChangeUtil = this;\r\n if (status != undefined && (status.toLowerCase() == \"submitted\" || status.toLowerCase() == \"queued\" || status.toLowerCase() == \"processing\")) {\r\n classContext.setState({ processStatus: status, processMessage: message })\r\n } else {\r\n classContext.setState({ processStatus: \"\", processMessage: \"\" })\r\n }\r\n }\r\n\r\n handleErrors = (list) => {\r\n let err = document.getElementById('errorPlace');\r\n err.classList.remove('hidden');\r\n\r\n let msgs = document.getElementById('errorMessages');\r\n while (msgs.firstChild) {\r\n msgs.removeChild(msgs.firstChild);\r\n }\r\n if (list.length > 0) {\r\n for (var i = 0; i < list.length; i++) {\r\n if (list[i].indexOf(';') > 0) {\r\n var smallArr = list[i].split(';');\r\n for (var j = 0; j < smallArr.length; j++) {\r\n if (smallArr[j].length > 1) {\r\n let dv = document.createElement('li');\r\n dv.append(smallArr[j])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n }\r\n else {\r\n let dv = document.createElement('li');\r\n dv.append(list[i])\r\n msgs.appendChild(dv);\r\n }\r\n }\r\n } else {\r\n err.classList.add('hidden');\r\n }\r\n }\r\n\r\n handleItemUpdate(evt, lblName, stateName, stateObj) {\r\n let lbl = document.getElementById(lblName);\r\n if (evt.target.files.length > 0) {\r\n lbl.classList.remove('red');\r\n lbl.classList.add('green');\r\n this.setState({ [stateName]: evt.target.files[0].name, [stateObj]: evt.target.files[0] });\r\n this.handleErrors(new Array());\r\n } else {\r\n lbl.classList.add('red');\r\n lbl.classList.remove('green');\r\n this.setState({ [stateName]: 'None Selected', file: null });\r\n }\r\n }\r\n\r\n handleUpdate(evt) {\r\n let lbl = document.getElementById('uploadlabel');\r\n if (evt.target.value.length > 2 && evt.target.value.indexOf(\" \") == -1) {\r\n lbl.classList.remove('red');\r\n lbl.classList.add('green');\r\n } else {\r\n lbl.classList.add('red');\r\n lbl.classList.remove('green');\r\n }\r\n this.setState({ basePath: evt.target.value });\r\n }\r\n\r\n handleUpdateBatch(evt) {\r\n let lbl = document.getElementById('batchlabel');\r\n if (evt.target.value > 0) {\r\n lbl.classList.remove('red');\r\n lbl.classList.add('green');\r\n } else {\r\n lbl.classList.add('red');\r\n lbl.classList.remove('green');\r\n }\r\n this.setState({ numBatch: evt.target.value });\r\n }\r\n\r\n render() {\r\n let classContext: ClimateChangeUtil = this;\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n

    {this.props.cardTitle}

    \r\n
    \r\n \r\n \r\n

    \r\n Changing climate is forecasted to significantly impact rainfall patterns around the world, including throughout Los Angeles County. To support water resources planning, general circulation models (GCMs) have been widely used to understand and predict future climate variability (Barsugli et al. 2009; Taylor et al. 2012; IPCC 2013). This Utility leverages 10 GCMs from 2 Representative Concentration Pathways (RCPs) for a total of 20 future climate projections. GCMs were developed from the Intergovernmental Panel on Climate Change (IPCC) Coupled Model Inter-comparison Project Phase 5 (CMIP5) (CCTAG 2015). To evaluate expected future conditions specific to the Los Angeles region the selected GCMs were spatially and temporally downscaled. For a detailed accounting of the GCMs employed, the process and assumptions, and the underlying climatological data, reference the .\r\n

    \r\n
    \r\n \r\n

    \r\n Each of the 20 modeled GCMs were spatially downscaled to the WMMS 2.0 subbasin scale and temporally downscaled to an hourly continuous timeseries (both precipitation and evapotranspiration). This produced an ensemble of future climate projections which can be directly simulated in WMMS 2.0. Specifically, the BMP implementation strategies developed through the Optimization Framework can be evaluated for their climate resiliency. \r\n

    \r\n

    \r\n Through the process described in the a series of files are first uploaded to this Utility to create a set of SUSTAIN input files. Then, input files are downloaded and executed on a user’s desktop with any combination of the 20 GCM timeseries provided below. Lastly, to interact with and interpret model results, SUSTAIN output is uploaded to the . To provide additional context for the format of data uploaded to this Utility, a sample dataset is provided below.\r\n

    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n classContext.handleErrors(new Array())}>\r\n Processing Messages:\r\n \r\n \r\n \r\n
    \r\n
    \r\n
    File Name: {classContext.state.filenameXls}
    \r\n \r\n classContext.handleItemUpdate(evt, 'uploadlabelxls', 'filenameXls', 'fileXls')} className=\"hidden\" />\r\n
    \r\n {/*
    \r\n
    File Name: {classContext.state.filenameInp}
    \r\n \r\n classContext.handleItemUpdate(evt, 'uploadlabelinp', 'filenameInp', 'fileInp')} className=\"hidden\" />\r\n
    \r\n
    \r\n
    File Name: {classContext.state.filenameCsv}
    \r\n \r\n classContext.handleItemUpdate(evt, 'uploadlabelcsv', 'filenameCsv', 'fileCsv')} className=\"hidden\" />\r\n
    */}\r\n
    \r\n
    File Name: {classContext.state.filenameCConfig}
    \r\n \r\n classContext.handleItemUpdate(evt, 'uploadlabelcconfig', 'filenameCConfig', 'fileCConfig')} className=\"hidden\" />\r\n
    \r\n
    \r\n
    File Name: {classContext.state.filenameCcf}
    \r\n \r\n classContext.handleItemUpdate(evt, 'uploadlabelccf', 'filenameCcf', 'fileCcf')} className=\"hidden\" />\r\n
    \r\n {/*
    \r\n \r\n classContext.handleUpdate(evt)} className=\"\" />\r\n
    \r\n
    \r\n \r\n classContext.handleUpdateBatch(evt)} className=\"\" />\r\n
    */}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n {this.state.processStatus} {this.state.processMessage}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n

    Additional datasets include:

    \r\n
  • Continuous hourly timeseries: Two RCPs are available for this analysis to capture the range of potential future climatic conditions from the 10 modeled GCMs. \r\n
    • The first is RCP 4.5, commonly referred to as the ‘stabilization’ scenario, where radiative forcing rises until mid-century, and then stabilizes at 4.5 W/m2 by 2099 ( and files).
    • \r\n
    • The second is RCP 8.5, commonly referred to as the ‘business-as-usual’ scenario, where carbon emissions continue to climb at historical rates of increase with radiative forcing of about 8.5 W/m2 by 2099 (IIASA 2009) ( and files).
    • \r\n
  • \r\n
  • Future 85th percentile 24-hr storm timeseries: As described in Los Angeles County Public Works Hydrology Manual (LACDPW 2004), the 85th percentile 24-hour storm is the depth of precipitation determined from a spatially distributed statistical analysis using rainfall stations within the region. Using this approach and the continuous hourly timeseries above, a future 85th percentile storm was developed from for the year 2099.
  • \r\n
  • Sample upload dataset: includes a completed spreadsheet from the BMP Opportunities Utility (*.xlsx), a climate configuration file (*.csv), and an AP data file (*.ccf) from the Optimization Viewer.
  • \r\n
    \r\n\r\n \r\n
    \r\n
    REFERENCES: \r\n

    Barsugli J., C. Anderson, J. Smith, and J. Vogel. 2009. Options for Improving Climate Modeling to Assist Water Utility Planning for Climate Change. Water Utility Climate Alliance. San Francisco, CA. pp 146.

    \r\n

    CCTAG (Climate Change Technical Advisory Group). 2015. Perspectives and Guidance for Climate Change Analysis. California Department of Water Resources.

    \r\n

    IIASA (International Institute for Applied Systems Analysis). 2009. Representative Concentration Pathways (RCP) Database, version 2.0. Data accessed March 2019 at

    \r\n

    IPCC (Intergovernmental Panel on Climate Change Climate Change). 2013. The Physical Science Basis. Contribution of Working Group I to the Fifth Assessment Report of the Intergovernmental Panel on Climate Change. Cambridge University Press, Cambridge, United Kingdom and New York, NY, USA, pp 1535.

    \r\n

    LACDPW (Los Angeles County Department of Public Works). 2004. Analysis of 85th Percentile 24-hour Rainfall Depth Analysis Within the County of Los Angeles. Los Angeles County Department of Public Works, Water Resources Division, Alhambra, CA.

    \r\n

    Taylor K., R. Stouffer, and G. Meehl. 2012. An Overview of CMIP5 and the Experiment Design. Bulletin of the American Meteorological Society, 93, 485-498.

    \r\n
    \r\n\r\n\r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n );\r\n }\r\n}","import { IUtilityCard } from \"./interfaces/IUtilityCard\";\r\nimport FTableUtil from \"./components/Utilities/FTable/ftableutil\";\r\nimport WeatherUtil from \"./components/Utilities/Weather/weatherutil\";\r\nimport { ftable } from \"./models/ftable\";\r\nimport BmpOpportunityUtil from \"./components/Utilities/BmpOpportunity/bmpopportunityutil\";\r\nimport WrampsUtil from \"./components/Utilities/Wramps/wrampsutil\";\r\nimport InclusiveBestSolutionsUtil from \"./components/Utilities/InclusiveBestSolutions/inclusivebestsolutionsutil\";\r\nimport Tier2Util from \"./components/Utilities/Tier2/tier2util\";\r\nimport MjrBMPSolutions from \"./components/Utilities/MjrBMPSolutions/mjrbmpsolutions\";\r\nimport ClimateChangeUtil from \"./components/Utilities/ClimateChange/climatechangeutil\";\r\n\r\nexport default class UtilityMenu {\r\n static getMenu(): Array {\r\n\r\n // MainTab data structure array\r\n var utils: Array = new Array();\r\n\r\n // User Projects Info\r\n\r\n utils.push({\r\n cardTitle: \"F-table Utility\",\r\n cardDescription: \"This utility converts model reach and/or BMP geometric characteristics into a stage-storage-discharge rating curve for use in LSPC.\",\r\n component: FTableUtil, cardIcon: \"area chart\", visible: true, active: true, wmmsColor: \"lspc\", internalName: \"ftableutil\", cardSubtitle: \"Stage/Storage Utility\", helpDoc: \"\", templateDoc: \"\", utilComponentIsOpen: null, beginInterval: null, stopInterval: null\r\n /* how to do this correctly? */\r\n });\r\n utils.push({\r\n cardTitle: \"Weather Utility\",\r\n cardDescription: \"This utility integrates three meteorological data sources to create hourly precipitation and evapotranspiration timeseries for use in LSPC.\",\r\n component: WeatherUtil, cardIcon: \"cloud\", visible: true, active: true, wmmsColor: \"lspc\", internalName: \"weatherutil\", cardSubtitle: \"Weather Utility\", helpDoc: \"\", templateDoc: \"\", utilComponentIsOpen: null, beginInterval: null, stopInterval: null\r\n });\r\n utils.push({\r\n cardTitle: \"WRAMPS Utility\",\r\n cardDescription: \"For WRAMPS users. This utility parameterizes the contents of a bulk export from the WRAMPS database into a spreadsheet that can then be uploaded to the BMP Opportunities Utility.\",\r\n component: WrampsUtil, cardIcon: \"signal\", visible: true, active: true, wmmsColor: \"input\", internalName: \"wrampsutil\", cardSubtitle: \"WRAMPS Utility\", helpDoc: \"\", templateDoc: \"\", utilComponentIsOpen: null, beginInterval: null, stopInterval: null\r\n });\r\n utils.push({\r\n cardTitle: \"BMP Opportunities Utility\",\r\n cardDescription: \"This utility translates BMP specifications (e.g., footprint, drainage area, ponding height) into SUSTAIN input files. These input files are used to initiate the first tier of the Optimization Framework.\",\r\n component: BmpOpportunityUtil, cardIcon: \"braille\", visible: true, active: true, wmmsColor: \"input\", internalName: \"bmpopportunityutil\", cardSubtitle: \"BMP Opportunities Utility\", helpDoc: \"\", templateDoc: \"\", utilComponentIsOpen: null, beginInterval: null, stopInterval: null\r\n });\r\n utils.push({\r\n cardTitle: \"Inclusive Best Solutions Utility\",\r\n cardDescription: \"This utility organizes output files from the first tier of the optimization. Utility output is a set inclusive set of best solutions that is evaluated in the second tier of the Optimization Framework.\",\r\n component: InclusiveBestSolutionsUtil, cardIcon: \"sync alternate\", visible: true, active: true, wmmsColor: \"sustain\", internalName: \"inclusivebestsolutionsutil\", cardSubtitle: \"Inclusive Best Solutions Utility\", helpDoc: \"\", templateDoc: \"\", utilComponentIsOpen: null, beginInterval: null, stopInterval: null\r\n });\r\n utils.push({\r\n cardTitle: \"MJR BMP Utility\",\r\n cardDescription: \"If multi-jurished regional (MJR) BMPs are present, this utility can be used to evaluate their performance in conjunction with other upstream regional and distributed BMP projects.\",\r\n component: MjrBMPSolutions, cardIcon: \"sun\", visible: true, active: true, wmmsColor: \"sustain\", internalName: \"mjrsolutil\", cardSubtitle: \"MJR BMP Solutions Utility\", helpDoc: \"\", templateDoc: \"\", utilComponentIsOpen: null, beginInterval: null, stopInterval: null\r\n });\r\n utils.push({\r\n cardTitle: \"Two-tiered Utility\",\r\n cardDescription: \"This Utility accepts results from the second tier of optimization (plus the MJR BMP simulation if applicable). Utility output is a performance summary file that is uploaded to the Optimization Viewer.\",\r\n component: Tier2Util, cardIcon: \"sort amount up\", visible: true, active: true, wmmsColor: \"sustain\", internalName: \"tier2util\", cardSubtitle: \"Tier 2 Utility\", helpDoc: \"\", templateDoc: \"\", utilComponentIsOpen: null, beginInterval: null, stopInterval: null\r\n });\r\n utils.push({\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n cardTitle: \"Climate Resiliency Utility\",\r\n cardDescription: \"This Utility processes the results from the Optimization Viewer to evaluate various future climate scenarios. Output is uploaded to the Climate Resiliency Viewer.\",\r\n component: ClimateChangeUtil, cardIcon: \"leaf\", visible: true, active: true, wmmsColor: \"sustain\", internalName: \"climatechangeutil\", cardSubtitle: \"Climate Resiliency Input File Utility\", helpDoc: \"\", templateDoc: \"\", utilComponentIsOpen: null, beginInterval: null, stopInterval: null\r\n });\r\n\r\n return utils\r\n }\r\n}","import axios, { AxiosInstance, AxiosPromise, AxiosResponse } from \"axios\";\r\nimport Config from \"../config/Config\";\r\n\r\nexport default class tooltipFactory {\r\n\r\n baseInstance: AxiosInstance;\r\n tooltipData: any;\r\n tooltipDataLoaded: boolean = false;\r\n setTooltipDataLoaded: any;\r\n\r\n constructor (setTooltipDataLoaded) {\r\n this.baseInstance = this.makeBaseAxiosInstance();\r\n this.populateTooltipData();\r\n this.setTooltipDataLoaded = setTooltipDataLoaded;\r\n\r\n \r\n }\r\n\r\n private makeBaseAxiosInstance = function(): AxiosInstance {\r\n\r\n return axios.create({\r\n baseURL: Config.client_endpoint,\r\n headers: {\r\n \"Access-Control-Allow-Origin\": '*',\r\n \"Content-Type\": 'application/json;charset=UTF-8',\r\n }\r\n });\r\n\r\n };\r\n\r\n public getTooltipJSON = (): AxiosPromise => {\r\n return this.baseInstance({\r\n method: \"GET\",\r\n url: 'json/tooltipData.json',\r\n })\r\n\r\n }\r\n\r\n public populateTooltipData = () => {\r\n this.getTooltipJSON().then((r: AxiosResponse) => {\r\n this.tooltipData = r.data;\r\n this.tooltipDataLoaded = true;\r\n this.setTooltipDataLoaded(true)\r\n })\r\n .catch((r: AxiosResponse) => {\r\n\r\n })\r\n\r\n }\r\n\r\n\r\n}","export default __webpack_public_path__ + \"static/media/wmms_map.8667712d.png\";","export default __webpack_public_path__ + \"static/media/wmms_curve.32c67b32.png\";","import React, { Component } from \"react\";\r\nimport './about.css';\r\nimport { INavHistory } from \"../../interfaces/INavHistory\";\r\nimport Config from \"../../config/Config\";\r\nimport wmmsMap from \"../../images/wmms_map.png\";\r\nimport wmmsCurve from \"../../images/wmms_curve.png\";\r\nimport { Grid, GridRow, GridColumn, Icon } from \"semantic-ui-react\";\r\nimport DownloadLink from \"../../core/downloadLink/downloadLink\";\r\nimport HrefLink from \"../../core/hrefLink/hrefLink\";\r\n\r\nexport default class About extends Component {\r\n\r\n state = {\r\n\r\n }\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n\r\n }\r\n\r\n\r\n render() {\r\n\r\n let classContext: About = this;\r\n\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n About\r\n
    \r\n
    \r\n \r\n \r\n \r\n

    Since its release by the Los Angeles County Flood Control District (LACFCD) and Los Angeles County Department of Public Works (LACDPW 2010a, 2010b, 2011), the Watershed Management Modeling System (WMMS) has played an important role in supporting watershed planning (LARWQCB 2018), best management practice (BMP) conceptual design and implementation, and climate change analyses for the region (USBR and LACDPW 2016). At the time of its release, WMMS was a state-of-the-art planning tool based on the best available data and models. Recent advancements in computational efficiency, monitoring, and high-resolution data and lessons learned through best management practice (BMP) planning and implementation have provided an opportunity to enhance and update WMMS. To incorporate these advances and develop an accessible, user-focused web platform, LACFCD and LACDPW conducted an update to WMMS (WMMS 2.0) (LACFCD and LACDPW 2020a and 2020b).

    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \"wmms\r\n
    \r\n
    \r\n
    \r\n \r\n

    Loading Simulation Program in C++ (LSPC): The LSPC component of WMMS 2.0 is an open-source, process-based watershed modeling system developed by the U.S. Environmental Protection Agency (EPA) for simulating watershed hydrology, sediment erosion and transport, and water quality processes from both upland contributing areas and receiving streams (Shen et al. 2005). LSPC serves as the baseline watershed model within WMMS 2.0, and includes improved representation of land characteristics, meteorological boundary conditions, and pollutant sources and transport. The LSPC model was calibrated and validated based on extensive hydrologic and water quality monitoring datasets available throughout Los Angeles County watersheds.

    \r\n
    \r\n
    \r\n \r\n \r\n

    System for Urban Stormwater Treatment and Analysis Integration (SUSTAIN): The SUSTAIN component of WMMS 2.0 is an open-source, decision support system developed by the EPA that provides process-based simulation and cost-optimization of BMPs (USEPA 2009). WMMS 2.0 provides updates to SUSTAIN including improvements to the model code and the representation, parameterization, and cost estimation of BMPs.

    \r\n
    \r\n \r\n
    \r\n
    \r\n \"wmms\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n

    To enable maximum usability and transparency for LSPC and SUSTAIN applications in the County, the WMMS 2.0 web-based user platform was developed. This platform includes a where the LSPC and SUSTAIN executables and input data can be downloaded, an to illustrate LSPC model inputs and output, and a with support documentation to facilitate BMP cost optimizations that can inform watershed planning efforts. In concert, the updated LSPC baseline model, SUSTAIN model, and the WMMS 2.0 web platform provide a substantively more powerful and accessible modeling framework, further empowering successful stormwater management for LA County watersheds.

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n References\r\n
    \r\n
    \r\n

    \r\n

    LACDPW (Los Angeles County Department of Public Works). 2010a. Los Angeles County Watershed Model Configuration and Calibration—Part I: Hydrology. Los Angeles County Department of Public Works, Watershed Management Division.\r\n

    \r\n

    LACDPW (Los Angeles County Department of Public Works). 2010b. Los Angeles County Watershed Model Configuration and Calibration—Part II: Water Quality. Los Angeles County Department of Public Works, Watershed Management Division. \r\n

    \r\n

    LACDPW (Los Angeles County Department of Public Works). 2011a. Phase III Report: Development of the Framework for Watershed-Scale Optimization Modeling. Los Angeles County Department of Public Works, Watershed Management Division.\r\n

    \r\n

    LACFCD (Los Angeles County Flood Control District) and LACDPW (Los Angeles County Department of Public Works). 2020a. Watershed Management Modeling System Version 2.0 Phase I Report: Baseline Hydrology and Water Quality Model. Los Angeles County Department of Public Works, Stormwater Quality Division. \r\n

    \r\n

    LACFCD (Los Angeles County Flood Control District) and LACDPW (Los Angeles County Department of Public Works). 2020b. Watershed Management Modeling System Version 2.0 Phase II Report: BMP Model and Optimization Framework. Los Angeles County Department of Public Works, Stormwater Quality Division. \r\n

    \r\n

    LARWQCB (Los Angeles Regional Water Quality Control Board). 2018. Watershed Management Programs. Accessed January 2020 at \r\n

    \r\n

    Shen, J., A. Parker, J. Riverson. 2005. A New Approach for a Windows-based Watershed Modeling System Based on a Database-supporting Architecture. Environmental Modelling & Software, 20(9) pp 1127-1138. \r\n

    \r\n

    USBR (U.S. Department of Interior, Bureau of Reclamation) and LACDPW (Los Angeles County Department of Public Works). 2016. Los Angeles Basin Study. Prepared by the U.S. Department of Interior, Bureau of Reclamation, Lower Colorado Region, Southern California Area Office, Los Angeles County Department of Public Works, and Los Angeles County Flood Control District.\r\n

    \r\n

    USEPA (United States Environmental Protection Agency). 2009. SUSTAIN - A Framework for Placement of Best Management Practices in Urban Watersheds to Protect Water Quality. Office of Research and Development. National Risk Management Research Laboratory, Water Supply and Water Resources Division. \r\n

    \r\n

    \r\n

    \r\n Please contact if there are questions related to the application of WMMS 2.0 or access to the associated models or utilities.\r\n

    \r\n
    \r\n
    \r\n
    \r\n );\r\n\r\n }\r\n}","export default __webpack_public_path__ + \"static/media/WMMS_Utility_Diagram_ForPW.d733af7f.png\";","import React, { Component } from \"react\";\r\nimport './utilitiesPW.css';\r\nimport { Card, Icon, Button, Confirm, Divider } from \"semantic-ui-react\";\r\nimport { IUtilityPage } from \"../../interfaces/IUtilityPage\";\r\nimport { IUtilityCard } from \"../../interfaces/IUtilityCard\";\r\nimport { clearInterval } from \"timers\";\r\nimport Logo from \"../../images/WMMS_Utility_Diagram_ForPW.png\";\r\nimport { Route } from 'react-router-dom';\r\nimport Config from \"../../config/Config\";\r\n\r\n\r\nexport class UtilitiesStatePW {\r\n processing: boolean = false;\r\n selection: string = \"\";\r\n utilComponentIsOpen: boolean = false;\r\n showCards: boolean = false;\r\n}\r\n\r\nexport default class UtilitiesPW extends Component {\r\n\r\n state = new UtilitiesStatePW;\r\n\r\n constructor(props) {\r\n super(props);\r\n };\r\n\r\n // track intervals here so we can check on 'back' click;\r\n interval: any;\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n\r\n\r\n\r\n // this.handleFirstRender();\r\n\r\n }\r\n\r\n handleFirstRender = () => {\r\n\r\n let desiredUrl: string = window.location.href;\r\n\r\n if (Config.client_endpoint + \"utilities\" !== desiredUrl) {\r\n let desiredRoute = desiredUrl.split(Config.client_endpoint + \"utilities/\")[1];\r\n this.props.history.push(\"/utilities/\" + desiredRoute);\r\n this.setState({ selection: desiredRoute })\r\n }\r\n\r\n }\r\n\r\n handleItemClick = (name) => {\r\n this.setState({\r\n showCards: !this.state.showCards,\r\n utilComponentIsOpen: !this.state.utilComponentIsOpen\r\n });\r\n\r\n setTimeout(() => {\r\n this.setState({ selection: name }, () => {\r\n // this.setUtilityRoute(name);\r\n\r\n\r\n })\r\n }, 500);\r\n }\r\n\r\n beginInterval = (intvl: any) => {\r\n let classContext: UtilitiesPW = this;\r\n classContext.interval = intvl;\r\n classContext.setState({ processing: true })\r\n }\r\n\r\n stopInterval = () => {\r\n let classContext: UtilitiesPW = this;\r\n if (classContext.interval != null) {\r\n clearInterval(classContext.interval);\r\n classContext.interval = null;\r\n classContext.setState({ processing: false })\r\n }\r\n }\r\n\r\n setUtilityRoute = (name) => {\r\n this.props.history.push(\"/utilities/\" + name);\r\n }\r\n\r\n getUtilityRouteJSX = () => {\r\n\r\n let classContext = this;\r\n\r\n return classContext.props.utilities.map((card: IUtilityCard, index: number) => {\r\n return {\r\n return < card.component\r\n key={card.internalName}\r\n cardTitle={card.cardTitle}\r\n cardDescription={card.cardDescription}\r\n component={card.component}\r\n cardIcon={card.cardIcon}\r\n visible={card.visible}\r\n active={card.active}\r\n wmmsColor={card.wmmsColor}\r\n internalName={card.internalName}\r\n cardSubtitle={card.cardSubtitle}\r\n helpDoc={card.helpDoc}\r\n templateDoc={card.templateDoc}\r\n beginInterval={this.beginInterval}\r\n stopInterval={this.stopInterval}\r\n utilComponentIsOpen={this.state.utilComponentIsOpen}\r\n {...props}\r\n />\r\n }} key={index} />\r\n\r\n });\r\n\r\n }\r\n\r\n\r\n\r\n\r\n render() {\r\n\r\n let classContext: UtilitiesPW = this;\r\n\r\n return (\r\n
    \r\n
    \r\n {/*
    Utilities
    */}\r\n {classContext.state.selection.length == 0 &&\r\n
    \r\n
    \r\n
    \r\n \"wmms\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n LSPC\r\n
    \r\n
    \r\n {classContext.props.utilities.map((card: IUtilityCard) => {\r\n if (card.internalName == 'ftableutil' || card.internalName == 'weatherutil') {\r\n\r\n return (card.visible == false ? \"\" : card.active ? classContext.handleItemClick(card.internalName)} className={'ulit-card wmms-' + card.wmmsColor}>\r\n \r\n \r\n {card.cardTitle}\r\n {/*\r\n {card.cardSubtitle}\r\n */}\r\n \r\n {card.cardDescription}\r\n \r\n \r\n : \r\n \r\n \r\n {card.cardTitle}\r\n {/*\r\n {card.cardSubtitle}\r\n */}\r\n \r\n {card.cardDescription}\r\n \r\n \r\n )\r\n }\r\n })}\r\n\r\n
    \r\n
    \r\n\r\n
    \r\n\r\n
    \r\n
    \r\n SUSTAIN\r\n
    \r\n
    \r\n {classContext.props.utilities.map((card: IUtilityCard) => {\r\n if (card.internalName != 'ftableutil' && card.internalName != 'weatherutil') {\r\n\r\n return (card.visible == false ? \"\" : card.active ? classContext.handleItemClick(card.internalName)} className={'ulit-card wmms-' + card.wmmsColor}>\r\n \r\n \r\n {card.cardTitle}\r\n {/*\r\n {card.cardSubtitle}\r\n */}\r\n \r\n {card.cardDescription}\r\n \r\n \r\n : \r\n \r\n \r\n {card.cardTitle}\r\n {/*\r\n {card.cardSubtitle}\r\n */}\r\n \r\n {card.cardDescription}\r\n \r\n \r\n )\r\n }\r\n })}\r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n }\r\n {classContext.state.selection.length > 0 &&\r\n
    \r\n\r\n
    \r\n {\r\n classContext.handleItemClick(\"\");\r\n classContext.stopInterval();\r\n }} >\r\n Back to Main Utility Page\r\n
    \r\n {/* \r\n {this.getUtilityRouteJSX()}\r\n */}\r\n\r\n {classContext.props.utilities.map((card: IUtilityCard) => {\r\n if (card.internalName == classContext.state.selection) {\r\n return (\r\n < card.component\r\n key={card.internalName}\r\n cardTitle={card.cardTitle}\r\n cardDescription={card.cardDescription}\r\n component={card.component}\r\n cardIcon={card.cardIcon}\r\n visible={card.visible}\r\n active={card.active}\r\n wmmsColor={card.wmmsColor}\r\n internalName={card.internalName}\r\n cardSubtitle={card.cardSubtitle}\r\n helpDoc={card.helpDoc}\r\n templateDoc={card.templateDoc}\r\n beginInterval={this.beginInterval}\r\n stopInterval={this.stopInterval}\r\n utilComponentIsOpen={this.state.utilComponentIsOpen}\r\n />\r\n )\r\n }\r\n })\r\n }\r\n\r\n
    \r\n }\r\n
    \r\n
    \r\n );\r\n\r\n }\r\n}","import React, { Component } from \"react\";\r\nimport './mobile.css';\r\nimport { INavHistory } from \"../../interfaces/INavHistory\";\r\nimport logo from '../../images/WMMS_logo_full.png';\r\n\r\n\r\nexport default class Mobile extends Component {\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {}\r\n\r\n render() {\r\n \r\n let classContext: Mobile = this;\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n
    \r\n \"wmms2Logo\"\r\n
    \r\n
    \r\n

    \r\n Thank you for visiting the Watershed Management Modeling System. Please visit this site on a desktop as it is not optimized for mobile viewing.\r\n

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\n\r\n\r\n// original layout \r\n{/*
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n\r\n\r\n
    \r\n \r\n
    \r\n\r\n
    \r\n {\r\n this.state.showBottomPanel == 2 &&\r\n
    \r\n \r\n
    \r\n }\r\n
    \r\n
    \r\n
    */}","import { BaseModel } from \"../../interfaces/IBaseModel\";\r\n\r\nexport class climateUpload extends BaseModel {\r\n\r\n \"zipfilename\": string;\r\n \"zipfiletype\": string;\r\n \"zipfileblob\": Blob;\r\n\r\n constructor() {\r\n super('climatechangeviewer');\r\n }\r\n} ","import { BaseModel } from \"../../interfaces/IBaseModel\";\r\nimport { ClimateItem } from \"./climateItem\";\r\n\r\nexport class ClimateSummary extends BaseModel {\r\n\r\n \"guid\": string;\r\n \"errors\": string[];\r\n \"items\": ClimateItem[];\r\n \"selectedScenarioId\": number;\r\n \"isSample\": boolean;\r\n\r\n constructor() {\r\n super('');\r\n }\r\n} ","import { BaseModel } from \"../../interfaces/IBaseModel\";\r\n\r\nexport class ClimateCsv extends BaseModel {\r\n\r\n \"guid\": string;\r\n\r\n\r\n constructor() {\r\n super('climatechangeviewer/getCsv');\r\n }\r\n} ","// install (please make sure versions match peerDependencies)\r\n// yarn add @nivo/core @nivo/bar\r\nimport React, { Component, useEffect, useState } from \"react\";\r\nimport { ResponsiveBar } from '@nivo/bar'\r\nimport {animated, to} from '@react-spring/web'\r\n// make sure parent container have a defined height when using\r\n// responsive component, otherwise height will be 0 and\r\n// no chart will be rendered.\r\n// website examples showcase many properties,\r\n// you'll often use just a few of them.\r\nexport const MyResponsiveBar = ({ data, indexBy, myKeys, myColors, groupMode, tickRotation, itemHeight, padding, markerVal, markerTxt /* see data tab */ }) => {\r\n\r\n const [extraNameSpace, setExtraNameSpace] = useState(false);\r\n useEffect(() =>{\r\n // console.log('data', data);\r\n if(data && data.length > 0 && data[0].id){\r\n let needSpace = false;\r\n if(data.filter((item) => item.id.length >= 20).length > 0){\r\n needSpace = true;\r\n }\r\n\r\n setExtraNameSpace(needSpace);\r\n }\r\n }, [data])\r\n\r\n const CustomLeftTick = (val: any, animatedProps: any) => {\r\n return (\r\n \r\n \r\n \r\n {val.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")} ac-ft\r\n \r\n \r\n )\r\n }\r\n\r\n const CustomBottomTick = (val: any, animatedProps: any) => {\r\n return (\r\n \r\n \r\n {/* need to programmatically split if val is longer than XXX chars & rickRotation == 0 */} \r\n {(val === null || val.length < 20 || tickRotation !== 0) && \r\n \r\n {val}\r\n \r\n }\r\n {(val && val.length >= 20 && tickRotation === 0) && \r\n val.split(' ').map((v, i) => {return (\r\n \r\n {v}\r\n \r\n )})}\r\n\r\n \r\n )\r\n }\r\n\r\n return( `${v} ac-ft`}\r\n labelTextColor={{ from: 'color', modifiers: [ [ 'darker', 1.6 ] ] }}\r\n axisBottom={{ tickRotation: tickRotation, renderTick: ({ value, animatedProps }) => CustomBottomTick(value, animatedProps)}}\r\n axisLeft={{format: v => `${v} ac-ft`, renderTick: ({ value, animatedProps }) => CustomLeftTick(value, animatedProps)}}\r\n markers={markerVal != null? [\r\n {\r\n axis: 'y',\r\n value: markerVal,\r\n lineStyle: {stroke:'#13A0C2', strokeWidth:3, strokeDasharray:\"6,2\"},\r\n legend: markerTxt,\r\n legendOrientation: 'vertical',\r\n legendPosition: 'bottom-right'\r\n },\r\n ]: []}\r\n legends={[\r\n {\r\n dataFrom: 'keys',\r\n anchor: 'bottom',\r\n direction: 'row',\r\n justify: false,\r\n translateX: 0,\r\n translateY: tickRotation !== 0? 80: extraNameSpace === true? 90 : 50, // 90\r\n itemsSpacing: 2,\r\n itemWidth: 100,\r\n itemHeight: itemHeight,\r\n itemDirection: 'left-to-right',\r\n itemOpacity: 1.0,\r\n symbolSize: 30,\r\n padding: padding\r\n }\r\n ]}\r\n theme={{\r\n fontSize: 14\r\n }}\r\n //motionStiffness={90}\r\n //motionDamping={15}\r\n />)\r\n}","import React from \"react\";\r\nimport \"./ButtonGroup.css\";\r\nimport { Button, Label, SemanticCOLORS } from \"semantic-ui-react\";\r\n\r\ninterface IButtonGroupProps {\r\n groupOptions: any[];\r\n addOr?: boolean;\r\n currentSelect: any;\r\n setSelection: Function;\r\n activeColor: SemanticCOLORS;\r\n labelText?: string;\r\n}\r\n\r\nexport const ButtonGroup: React.FC = ({ ...props }) => {\r\n\r\n return (\r\n \r\n {props.groupOptions.map((item, idx) => {\r\n return(\r\n \r\n {props.addOr === true && idx > 0 && \r\n \r\n }\r\n {props.labelText !== undefined && props.labelText.length > 0 && idx === 0 &&\r\n \r\n })\r\n \r\n )})}\r\n\r\n \r\n );\r\n}\r\n","// install (please make sure versions match peerDependencies)\r\n// yarn add @nivo/core @nivo/line\r\nimport React, { Component } from \"react\";\r\nimport { ResponsiveLine } from '@nivo/line'\r\nimport { PatternLines } from \"@nivo/core\";\r\nimport {animated, to} from '@react-spring/web'\r\n\r\n\r\nexport const MyResponsiveLine = ({ data, xAxisName, yAxisName, selScenXVal, lineLegendClick, seriesClick, xAxisUnit, yAxisUnit }) => {\r\n // transform={to([x, y], (x, y) => `translate(${x},${y})`)}\r\n const CustomLeftTick = (val: any, animatedProps: any) => {\r\n return (\r\n \r\n \r\n \r\n {val.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + yAxisUnit}\r\n \r\n \r\n )\r\n }\r\n\r\n const CustomRightTick = (val: any, animatedProps: any) => {\r\n return (\r\n \r\n \r\n \r\n {val.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + yAxisUnit}\r\n \r\n \r\n )\r\n }\r\n\r\n const CustomBottomTick = (val: any, animatedProps: any) => {\r\n return (\r\n \r\n \r\n \r\n {val.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" \" + xAxisUnit}\r\n \r\n \r\n )\r\n }\r\n \r\n return(\r\n\r\n CustomRightTick(value, animatedProps)\r\n }}\r\n axisBottom={{\r\n tickSize: 5,\r\n tickPadding: 5,\r\n tickRotation: 0,\r\n legend: xAxisName,\r\n legendOffset: 36,\r\n legendPosition: 'middle',\r\n renderTick: ({ value, animatedProps }) => CustomBottomTick(value, animatedProps)\r\n }}\r\n axisLeft={{\r\n tickSize: 5,\r\n tickPadding: 5,\r\n tickRotation: 0,\r\n legend: yAxisName,\r\n legendOffset: -90,\r\n legendPosition: 'middle',\r\n renderTick: ({ value, animatedProps }) => CustomLeftTick(value, animatedProps)\r\n }}\r\n colors={[\"#F59841\", \"#62AEE4\", \"#009933\",\"#C288F8\", \"#4DD6D3\", \"#F9E43E\", \"#D5D5D5\", \"#FF7777\", '#e6194b', '#3cb44b', '#ffe119', '#4363d8', '#f58231', '#911eb4', '#46f0f0', '#f032e6', '#bcf60c', '#fabebe', '#008080', '#e6beff', '#9a6324', '#fffac8', '#800000', '#aaffc3', '#808000', '#ffd8b1', '#000075', '#808080', '#ffffff', '#000000']}\r\n pointSize={6}\r\n markers={[\r\n {\r\n axis: 'x',\r\n value: selScenXVal,\r\n lineStyle: { stroke: '#00b8e655', strokeWidth: 5},\r\n legend: 'selected solution',\r\n // textStyle: {padding: '50px'},\r\n legendPosition: 'top',\r\n }\r\n ]}\r\n //layers={ ['grid','axes', 'markers', 'lines', 'mesh', 'points', 'legends']}\r\n pointLabelYOffset={-12}\r\n useMesh={true}\r\n onClick={function(data, evt) {\r\n //console.log('click graph', data, evt);\r\n seriesClick(data.data.y, data.serieId);\r\n }}\r\n //legendLabel={datum => `${datum.id}`}\r\n legends={[\r\n {\r\n anchor: 'bottom-right',\r\n direction: 'column',\r\n justify: true,\r\n translateX: 270,\r\n // translateX: 230,\r\n translateY: 30,\r\n itemsSpacing: 0,\r\n itemDirection: 'left-to-right',\r\n // itemWidth: 140,\r\n itemWidth: 175,\r\n itemHeight: 18,\r\n itemOpacity: 0.75,\r\n symbolSize: 12,\r\n symbolShape: 'circle',\r\n symbolBorderColor: 'rgba(0, 0, 0, .5)',\r\n effects: [\r\n {\r\n on: 'hover',\r\n style: {\r\n itemBackground: 'rgba(0, 0, 0, .03)',\r\n itemOpacity: 1\r\n }\r\n }\r\n ],\r\n // padding: 10,\r\n onClick:function(data, event) {lineLegendClick(data)}\r\n }\r\n ]}\r\n />)\r\n}","// install (please make sure versions match peerDependencies)\r\n// yarn add @nivo/core @nivo/bar\r\nimport React from \"react\";\r\nimport { ResponsiveBullet } from \"@nivo/bullet\";\r\nimport {animated, to} from '@react-spring/web'\r\n// make sure parent container have a defined height when using\r\n// responsive component, otherwise height will be 0 and\r\n// no chart will be rendered.\r\n// website examples showcase many properties,\r\n// you'll often use just a few of them.\r\nexport const MyResponsiveBullet = ({ data, min, max, avgs, markerClick /* see data tab */ }) => (\r\n (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n value - 4)}\r\n height={height}\r\n fill={color}\r\n //filter={data.v0 == min || data.v1 == max ? \"\" : \"url(#dropshadow1)\"}\r\n stroke={data.v0 == min || data.v1 == max ? \"#FFFFFF\" : borderColor}\r\n strokeWidth={data.v0 == min || data.v1 == max ? 0 : borderWidth}\r\n onMouseEnter={(a) => {\r\n let ev: any = new MouseEvent(\"enter\", {\r\n clientX: a.clientX,\r\n clientY: a.clientY\r\n });\r\n\r\n if ((data.v0 != min && data.v1 != max) ||(data.v0 == min && index > 0)) {\r\n onMouseEnter(data, ev);\r\n }\r\n }}\r\n onMouseMove={(a) => {\r\n let ev: any = new MouseEvent(\"move\", {\r\n clientX: a.clientX,\r\n clientY: a.clientY\r\n });\r\n if ((data.v0 != min && data.v1 != max) ||(data.v0 == min && index > 0)) {\r\n onMouseMove(data, ev);\r\n }\r\n }}\r\n onMouseLeave={(a) => {\r\n let ev: any = new MouseEvent(\"leave\", {\r\n clientX: a.clientX,\r\n clientY: a.clientY\r\n });\r\n onMouseLeave(data, ev);\r\n }}\r\n \r\n >\r\n \r\n )}\r\n measureComponent={({index,data,animatedProps: { x, y, width, height, color },onMouseEnter,onMouseMove,onMouseLeave}) => (\r\n `translate(${x},${y})`)}\r\n onMouseEnter={(a) => {\r\n let ev: any = new MouseEvent(\"enter\", {\r\n clientX: a.clientX,\r\n clientY: a.clientY\r\n });\r\n if(avgs.indexOf(data.v1) < 0){\r\n // data.color = '#006099';\r\n data.color = '#13A0C2';\r\n } \r\n onMouseEnter(data, ev);\r\n }}\r\n\r\n onMouseLeave={(a) => {\r\n let ev: any = new MouseEvent(\"leave\", {\r\n clientX: a.clientX,\r\n clientY: a.clientY\r\n });\r\n onMouseLeave(data, ev);\r\n }}\r\n >\r\n\r\n {/* */}\r\n {avgs.indexOf(data.v1) > -1 && }\r\n {avgs.indexOf(data.v1) > -1 && }\r\n {avgs.indexOf(data.v1) < 0 && }\r\n\r\n \r\n )}\r\n markerComponent={({size, data, animatedProps: { x, y1, color },onMouseEnter,onMouseMove,onMouseLeave}) => (\r\n\r\n `translate(${x},${y + size / 2})`)}\r\n onMouseEnter={(a) => {\r\n //console.log(\"mouse enter marker\", data);\r\n let ev: any = new MouseEvent(\"enter\", {\r\n clientX: a.clientX,\r\n clientY: a.clientY\r\n });\r\n onMouseEnter(data, ev);\r\n }}\r\n onClick={(ev) => {\r\n markerClick(data, ev);\r\n }}\r\n onMouseLeave={(a) => {\r\n let ev: any = new MouseEvent(\"leave\", {\r\n clientX: a.clientX,\r\n clientY: a.clientY\r\n });\r\n onMouseLeave(data, ev);\r\n }}\r\n >\r\n \r\n \r\n )}\r\n />\r\n);\r\n","// import { convertUTCDateToLocalDate, getDownloadDateText } from \"./DateHelpers\";\r\n\r\n// export const buildFileDownloadName = (processType: number, description: string, created: Date) => {\r\n// let name: string = \"\";\r\n// let processName: string = description.replace(/[^a-zA-Z0-9 ]/g, \"\");\r\n// name = processName.replace(/ /g, '_');\r\n// if (processType == 1) { name = name + \"_Workbook_Inp\"; }\r\n// if (processType == 2) { name = name + \"_Mapping_Inp\"; }\r\n// if (processType == 3) { name = name + \"_Sustain_Inp\"; }\r\n// if (processType == 4) { name = name + \"_ScenDef_Inp\"; }\r\n// let processTime: Date = convertUTCDateToLocalDate(new Date(created.toString()));\r\n// name = name + \"_\" + getDownloadDateText(processTime);\r\n// return name;\r\n// }\r\n\r\nexport const buildLeftUnit = (loadedGraphType: string, conversionUnit: string, costUnit: string, footprintUnit: string): string =>{\r\n if(loadedGraphType == \"CapacityCost\" || loadedGraphType == \"CapacityConcentration\" || loadedGraphType == \"CapacityFootprint\"){\r\n return conversionUnit;\r\n } else if(loadedGraphType == \"CostCapacity\"){\r\n return costUnit;\r\n } else if(loadedGraphType == \"FootprintCost\"){\r\n return footprintUnit;\r\n } else {\r\n return \"\";\r\n } \r\n}\r\n\r\nexport const buildLeftFactor = (loadedGraphType: string, conversionFactor: number, costFactor: number, footprintFactor: number): number =>{\r\n if(loadedGraphType == \"CapacityCost\" || loadedGraphType == \"CapacityConcentration\" || loadedGraphType == \"CapacityFootprint\"){\r\n return conversionFactor;\r\n } else if(loadedGraphType == \"CostCapacity\"){\r\n return costFactor;\r\n } else if(loadedGraphType == \"FootprintCost\"){\r\n return footprintFactor;\r\n } else {\r\n return 1.0;\r\n } \r\n}\r\n\r\nexport const buildLeftLabel = (loadedGraphType: string): string =>{\r\n if(loadedGraphType == \"CapacityCost\" || loadedGraphType == \"CapacityConcentration\" || loadedGraphType == \"CapacityFootprint\"){\r\n return \"Capacity\";\r\n } else if(loadedGraphType == \"CostCapacity\"){\r\n return \"Cost\";\r\n } else if(loadedGraphType == \"FootprintCost\"){\r\n return \"Footprint\";\r\n } else {\r\n return \"Unknown\";\r\n } \r\n}\r\n\r\n//(classContext.state.loadedGraphType == \"CapacityCost\" || classContext.state.loadedGraphType == \"CapacityConcentration\") ? \"\" : classContext.state.loadedGraphType == \"CostCapacity\" ? \".2s\" : classContext.state.loadedGraphType == \"FootprintCost\" ? \".2s\" : \"\"\r\nexport const buildLeftLabelFormat = (loadedGraphType: string): string =>{\r\n if(loadedGraphType == \"CostCapacity\"){\r\n return \".2s\";\r\n } else {\r\n return \"\";\r\n } \r\n}\r\n\r\nexport const buildRightUnit = (loadedGraphType: string, conversionUnit: string, costUnit: string, footprintUnit: string): string =>{\r\n if(loadedGraphType == \"CapacityCost\" || loadedGraphType == \"FootprintCost\"){\r\n return costUnit;\r\n } else if(loadedGraphType == \"CostCapacity\"){\r\n return conversionUnit;\r\n } else if(loadedGraphType == \"CapacityFootprint\"){\r\n return footprintUnit;\r\n }else if(loadedGraphType == \"CapacityConcentration\"){\r\n return \"mg/l\";\r\n } else {\r\n return \"\";\r\n } \r\n}\r\n\r\nexport const buildRightFactor = (loadedGraphType: string, conversionFactor: number, costFactor: number, footprintFactor: number): number =>{\r\n if(loadedGraphType == \"CapacityCost\" || loadedGraphType == \"FootprintCost\"){\r\n return costFactor;\r\n } else if(loadedGraphType == \"CostCapacity\"){\r\n return conversionFactor;\r\n } else if(loadedGraphType == \"CapacityFootprint\"){\r\n return footprintFactor;\r\n } else {\r\n return 1.0; // also for \"CapacityConcentration\"\r\n } \r\n}\r\n\r\nexport const buildRightLabel = (loadedGraphType: string): string =>{\r\n if(loadedGraphType == \"CapacityCost\" || loadedGraphType == \"FootprintCost\"){\r\n return \"Cost\";\r\n } else if(loadedGraphType == \"CostCapacity\"){\r\n return \"Capacity\";\r\n } else if(loadedGraphType == \"CapacityFootprint\"){\r\n return \"Footprint\";\r\n } else if(loadedGraphType == \"CapacityConcentration\"){\r\n return \"Concentration\";\r\n } else {\r\n return \"Unknown\";\r\n } \r\n}\r\n//(classContext.state.loadedGraphType == \"CapacityCost\" || classContext.state.loadedGraphType == \"FootprintCost\") ? \".2s\" : ((classContext.state.loadedGraphType == \"CostCapacity\" || classContext.state.loadedGraphType == \"CapacityConcentration\") ? \"\" : \"\"),\r\nexport const buildRightLabelFormat = (loadedGraphType: string): string =>{\r\n if(loadedGraphType == \"CapacityCost\" || loadedGraphType == \"FootprintCost\"){\r\n return \".2s\";\r\n } else {\r\n return \"\";\r\n } \r\n}\r\n\r\nexport const formatNumber = (data: number, numDecimal: number): string => {\r\n return data.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\r\n}\r\n\r\nexport const getDateTimeStr = (date: Date): string =>{\r\n let h = checkTime(date.getHours());\r\n let m = checkTime(date.getMinutes());\r\n let s = checkTime(date.getSeconds());\r\n let d = checkTime(date.getDate());\r\n let mo = checkTime(date.getMonth() + 1);\r\n let y = checkTime(date.getFullYear());\r\n \r\n return \"_\" + y + mo + d + \"_\" + h + m + s;\r\n}\r\n\r\nfunction checkTime(i) {\r\n return (i < 10) ? \"0\" + i : i;\r\n}\r\n\r\nexport const edgleyRound = (num: number): string => {\r\n if(num >= 100){return num.toFixed(0);}\r\n else if(num >= 1 && num < 100){return num.toFixed(1);}\r\n return num.toFixed(2);\r\n}\r\n","import React, { useState } from \"react\";\r\nimport { Button, Icon } from \"semantic-ui-react\";\r\nimport { ButtonGroup } from \"../../../core/buttonGroup/ButtonGroup\";\r\nimport './detailItem.css'\r\nimport {formatNumber } from \"../../../core/HelperFx\";\r\n\r\n\r\nexport const DetailItem = ({data, toggleVisible, visibleArray, close, YAxisSel, hideui}) => {\r\n\r\n const [itemIdx, setItemIdx] = useState(0);\r\n const [itemList, setItemList] = useState>([...Array(data.length).keys()] )\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n {data.length > 1 && \r\n }\r\n
    Details: {data[itemIdx].fullModelName}
    \r\n {\r\n visibleArray.indexOf(data[itemIdx].fullModelName) > -1 && hideui == false && \r\n
    toggleVisible({id: 'x ' + data[itemIdx].fullModelName})} title='Enable'>
    \r\n }\r\n {\r\n visibleArray.indexOf(data[itemIdx].fullModelName) < 0 && hideui == false && \r\n
    toggleVisible({id: data[itemIdx].fullModelName})} title='Disable'>
    \r\n }\r\n { hideui == false &&
    close()} title='Close Details'>
    }\r\n
    \r\n\r\n
    \r\n
    \r\n
    Model: {data[itemIdx].model}
    \r\n
    Event Label: {data[itemIdx].eventLabel}
    \r\n
    Event: {data[itemIdx].event}
    \r\n
    RCP: {data[itemIdx].rcp}
    \r\n
    \r\n
    \r\n
    Runoff: {data[itemIdx][\"Runoff\"]} ac-ft
    \r\n
    Capture: {data[itemIdx][\"Capture\"]} ac-ft
    \r\n
    Remaining Flow: {data[itemIdx][\"Remaining Flow\"]} ac-ft
    \r\n
    % Reduction: {data[itemIdx][\"% Reduction\"]} %
    \r\n
    \r\n
    \r\n
    Cost: ${formatNumber(data[itemIdx][\"scenarioCost\"], 2)}
    \r\n
    Capacity: {data[itemIdx][\"scenarioCapacity\"]} ac-ft
    \r\n
    Footprint: {data[itemIdx][\"scenarioFootprint\"]} sq-ft
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n )\r\n}","import React, { useState } from \"react\";\r\nimport { useEffect } from \"react\";\r\nimport { Icon } from \"semantic-ui-react\";\r\nimport { edgleyRound } from \"../../../core/HelperFx\";\r\nimport { TooltipModal } from \"../../toolTipModal/toolTipModal\";\r\nimport './performanceSummary.css'\r\n\r\nclass PerformanceSummaryItem {\r\n basemodelName: string;\r\n modelName: string;\r\n capture: number;\r\n goal: number;\r\n pct: number;\r\n visible: boolean;\r\n incdec: string;\r\n defexc: string;\r\n}\r\n\r\nexport const PerformanceSummary = ({barData, hideui, tooltipFactory, tooltipsReady}) => {\r\n\r\n const [performanceItems, setPerformanceItems] = useState([]);\r\n // weight 1 are longer series\r\n // weight 2 are future\r\n // if now future, then compare weight 1...\r\n\r\n useEffect(() =>{\r\n // assume first bar data is always historical; then compare the others accordingly\r\n if(barData !== undefined && barData.length > 0){\r\n let historic = barData[0];\r\n let newPerformanceItems = [];\r\n for(var i = 1; i < barData.length; i++){\r\n var newItem = new PerformanceSummaryItem();\r\n newItem.basemodelName = historic.id;\r\n newItem.modelName = barData[i].id;\r\n newItem.capture = barData[i][\"Capture\"];\r\n newItem.goal = barData[i][\"Runoff\"] - historic[\"Runoff\"];\r\n newItem.pct = Math.round((newItem.capture / newItem.goal) * 10000) / 100;\r\n newItem.visible = true;\r\n if(newItem.goal < 0){\r\n newItem.incdec = \"decrease\";\r\n newItem.defexc = \"deficit\";\r\n } else {\r\n newItem.incdec = \"increase\";\r\n newItem.defexc = \"excess\";\r\n }\r\n newPerformanceItems.push(newItem);\r\n\r\n // if(barData[i][\"CaptureAvg\"] > 0){\r\n // var newItem = new PerformanceSummaryItem();\r\n // newItem.basemodelName = historic.id;\r\n // newItem.modelName = barData[i].idAvg;\r\n // newItem.capture = barData[i][\"CaptureAvg\"];\r\n // newItem.goal = barData[i][\"Runoff\"] - historic[\"Runoff\"];\r\n // newItem.pct = Math.round((newItem.capture / newItem.goal) * 10000) / 100;\r\n // newItem.visible = true;\r\n // newPerformanceItems.push(newItem);\r\n // }\r\n }\r\n\r\n setPerformanceItems(newPerformanceItems);\r\n }\r\n }, [barData])\r\n\r\n const hideItem = (item: PerformanceSummaryItem) =>{\r\n if(item){\r\n const newArray = performanceItems.map(a => Object.assign({}, a));\r\n for(var i = 0; i < newArray.length; i++){\r\n if(newArray[i].basemodelName == item.basemodelName && newArray[i].modelName == item.modelName){\r\n newArray[i].visible = false;\r\n }\r\n }\r\n\r\n setPerformanceItems(newArray);\r\n }\r\n }\r\n\r\n const makeAllVisible = () =>{\r\n const newArray = performanceItems.map(a => Object.assign({}, a));\r\n for(var i = 0; i < newArray.length; i++){\r\n newArray[i].visible = true;\r\n }\r\n\r\n setPerformanceItems(newArray);\r\n }\r\n\r\n\r\n // className='performance-cursor' onClick={() => hideItem(item)}\r\n return (\r\n
    \r\n
    \r\n {performanceItems.filter((item) => !item.visible).length > 0 && hideui == false &&
    makeAllVisible()} title='View all summaries'>
    }\r\n
    \r\n {/* OG */}\r\n {/* \r\n Summary:\r\n {performanceItems.filter((item) => item.visible).length === 0 &&
    No performance comparison available
    }\r\n {performanceItems.filter((item) => item.visible).length > 0 && performanceItems.filter((item) => item.visible).map((item, i) =>{\r\n return(

    \r\n From {item.basemodelName} to {item.modelName} there is a {item.incdec} in runoff of {Math.abs(Math.round(item.goal * 100)/100)} ac-ft. The {item.defexc} is mitigated by {Math.abs(item.pct)}% ({Math.round(item.capture * 100)/100} ac-ft is captured by BMPs in the {item.modelName} scenario, offsetting the {Math.abs(Math.round(item.goal * 100)/100)} ac-ft {item.defexc} by {Math.round(Math.abs(item.capture/item.goal) * 10)/10} times.)\r\n

    )\r\n\r\n })} */}\r\n
    \r\n
    Summary
    \r\n
    \r\n {\r\n performanceItems.filter((item) => item.visible).length === 0 && \r\n
    No performance comparison available
    \r\n }\r\n
    \r\n \r\n {\r\n performanceItems.filter((item) => item.visible).length > 0 && \r\n performanceItems.filter((item) => item.visible).map((item, i) => {\r\n return (\r\n
    \r\n From {item.basemodelName} to {item.modelName} there is a {item.incdec} in runoff of {edgleyRound(Math.abs(item.goal))} ac-ft. The {item.defexc} is mitigated by {edgleyRound(Math.abs(item.pct))}% ({edgleyRound(item.capture)} ac-ft is captured by BMPs in the {item.modelName} scenario, offsetting the {edgleyRound(Math.abs(item.goal))} ac-ft {item.defexc} by {edgleyRound(Math.abs(item.capture/item.goal))} times.)\r\n
    \r\n )\r\n })\r\n }\r\n
    \r\n
    \r\n
    \r\n )\r\n}","import React, { useState } from \"react\";\r\nimport { useEffect } from \"react\";\r\nimport { Table } from \"semantic-ui-react\";\r\n\r\n// need a few properties:\r\n// data array\r\n// optional field display name prop; otherwise use data prop name directly\r\n// list of properties displayed (in order of display)\r\n// sort (bool or array of fields to sortable)\r\n// click even listener (bool or array of fields)\r\n\r\nexport interface DataTableProps{\r\n tableData: any;\r\n columnArr?: string[];\r\n headerNames?: string[];\r\n valuePostpend?: string[];\r\n numberRoundLength?: number[]; // works with sort type\r\n headerBackgroundColor: string;\r\n headerTextColor: string;\r\n sortable?: boolean;\r\n celled?: boolean;\r\n fixed?: boolean;\r\n striped?: boolean;\r\n columnSortType?: Array<'text'|'number'>;\r\n}\r\n\r\n\r\nexport const DataTable: React.FC = ({tableData, columnArr, headerNames, headerBackgroundColor, headerTextColor, sortable, celled, fixed, striped, columnSortType, valuePostpend, numberRoundLength}) => {\r\n\r\n const [sortTable, dispatch] = React.useReducer(exampleReducer, {\r\n column: null,\r\n data: tableData,\r\n direction: null,\r\n })\r\n const { column, data, direction } = sortTable\r\n\r\n const [headerArr, setHeaderArr] = useState(new Array())\r\n const [dataArr, setDataArr] = useState(new Array())\r\n\r\n useEffect(() =>{\r\n let columnNames = [];\r\n if(columnArr){\r\n columnNames = columnArr;\r\n } else {\r\n if(tableData){\r\n for (var prop in tableData[0]) {\r\n if (Object.prototype.hasOwnProperty.call(tableData[0], prop)) {\r\n columnNames.push(prop);\r\n }\r\n }\r\n }\r\n }\r\n\r\n //console.log('set dataarr eff');\r\n setDataArr(columnNames);\r\n\r\n let hdrNames = [];\r\n if(headerNames){\r\n hdrNames = headerNames;\r\n } else {\r\n if(columnNames){\r\n hdrNames = columnNames;\r\n }\r\n }\r\n\r\n setHeaderArr(hdrNames);\r\n\r\n dispatch({ type: 'RESET', column: '' })\r\n\r\n }, [tableData, columnArr, headerNames])\r\n\r\n function exampleReducer(state, action) {\r\n switch (action.type) {\r\n case 'CHANGE_SORT':\r\n if (state.column === action.column) {\r\n return {\r\n ...state,\r\n data: state.data.slice().reverse(),\r\n direction:\r\n state.direction === 'ascending' ? 'descending' : 'ascending',\r\n }\r\n }\r\n\r\n let newData = [];\r\n //console.log('change sort', state, action.column);\r\n if(columnSortType && columnArr){\r\n // get array index\r\n let idx = -1;\r\n columnArr.map((d, i) => {\r\n if(d == action.column){idx = i;}\r\n })\r\n //console.log('idx', idx, tableData)\r\n // then look into columnSortType for sorting type text vs number\r\n let sortType = columnSortType[idx];\r\n if(sortType === 'text'){\r\n newData = tableData.sort(function(a: any, b: any){\r\n if (a[action.column] !== null && b[action.column] === null){return -1;}\r\n if (a[action.column] === null && b[action.column] !== null){return 1;}\r\n if (a[action.column].toLowerCase() < b[action.column].toLowerCase()){return -1;}\r\n if (a[action.column].toLowerCase() > b[action.column].toLowerCase()){return 1;}\r\n return 0;\r\n });\r\n } else {\r\n newData = tableData.sort(function(a: any, b: any){return a[action.column] - b[action.column];});\r\n }\r\n } else {\r\n newData = tableData.sort(function(a: any, b: any){return a[action.column] - b[action.column];});\r\n }\r\n \r\n return {\r\n column: action.column,\r\n data: newData,\r\n direction: 'ascending',\r\n }\r\n case 'RESET':\r\n return {\r\n column: null,\r\n data: tableData,\r\n direction: null,\r\n }\r\n default:\r\n throw new Error()\r\n }\r\n }\r\n\r\n const formatData = (val: any, idx: number): string =>{\r\n let display = '';\r\n //data[dataName] + ' ' +( valuePostpend && valuePostpend[idx].length >0? valuePostpend[idx]: '')\r\n if(val === null){return display;}\r\n if(columnSortType && columnSortType[idx] === 'number' && numberRoundLength && numberRoundLength[idx] > 0 && val){\r\n display = display + val.toFixed(numberRoundLength[idx]);\r\n } else {\r\n display = display + val;\r\n }\r\n\r\n if(valuePostpend && valuePostpend[idx].length > 0){ display = display + ' ' + valuePostpend[idx]; }\r\n\r\n return display;\r\n }\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n {dataArr.length > 0 && dataArr.map((dataName, i) =>(\r\n {\r\n if(sortable === true) {dispatch({ type: 'CHANGE_SORT', column: dataName })}}}\r\n style={{backgroundColor: headerBackgroundColor, color: headerTextColor }}\r\n >\r\n {headerArr[i]}\r\n \r\n ))}\r\n {dataArr.length == 0 && No data}\r\n \r\n \r\n \r\n {data.length > 0 && data.map((data, index) => (\r\n \r\n {dataArr.length > 0 && dataArr.map((dataName, idx) =>(\r\n {formatData(data[dataName], idx)}\r\n ))}\r\n {dataArr.length == 0 && No data}\r\n \r\n ))}\r\n \r\n
    \r\n
    \r\n )\r\n}","// install (please make sure versions match peerDependencies)\r\n// yarn add @nivo/core @nivo/bar\r\nimport React, { Component, useEffect, useState } from \"react\";\r\nimport { ResponsiveBar } from '@nivo/bar'\r\nimport {animated, to} from '@react-spring/web'\r\n// make sure parent container have a defined height when using\r\n// responsive component, otherwise height will be 0 and\r\n// no chart will be rendered.\r\n// website examples showcase many properties,\r\n// you'll often use just a few of them.\r\nexport const DivergingBar = ({ data, indexBy, groupMode, legendNames, capturePropName /* see data tab */ }) => {\r\n const [graphData, setGraphData] = useState([]);\r\n const [ymin, setYMin] = useState(-100);\r\n const [ymax, setYMax] = useState(100);\r\n const [maxBottomPad, setMaxBottomPad] = useState(20);\r\n const [myColors, setMyColors] = useState(['','']);\r\n const [myKeys, setMyKeys] = useState(['','']);\r\n const [showsDeficit, setShowsDeficit] = useState(false);\r\n //const [legendStyle, setLegendStyle] = useState('both');\r\n const [markers, setMarkers] = useState([]);\r\n\r\n\r\n useEffect(() => {\r\n //console.log('div useeffect', data);\r\n if(data && data.length > 0){\r\n let historic = data[0];\r\n let excess: boolean = false;\r\n let deficit: boolean = false;\r\n let newDivergeBarData = [];\r\n let newDivKeys = [];\r\n let newDivColors = [];\r\n let newMarkers = [];\r\n //let divLegend = \"both\";\r\n let divMin = 0;\r\n let divMax = 0;\r\n //console.log('historic', historic);\r\n for(var i = 1; i < data.length; i++){\r\n let diff = data[i].Runoff - historic.Runoff;\r\n //console.log('diff', diff, data[i]);\r\n if(historic.Runoff <= data[i].Runoff){ // runoff excess\r\n excess = true;\r\n let newDivItem = {\r\n 'id': data[i].id,\r\n 'Excess Compared to Historical': Math.round(diff) ,\r\n 'Mitigation by BMP Solution': Math.round(data[i].Capture),\r\n }\r\n newDivergeBarData.push(newDivItem);\r\n if(newDivItem['Excess Compared to Historical'] > divMax){divMax = newDivItem['Excess Compared to Historical'];}\r\n if(newDivItem['Mitigation by BMP Solution'] > divMax){divMax = newDivItem['Mitigation by BMP Solution'];}\r\n } else { // Deficit Compared to Historical\r\n deficit = true;\r\n let newDivItem = {\r\n 'id': data[i].id,\r\n 'Deficit Compared to Historical': Math.round(diff),\r\n 'Mitigation by BMP Solution': Math.round(data[i].Capture),\r\n }\r\n newDivergeBarData.push(newDivItem);\r\n if(newDivItem['Deficit Compared to Historical'] < divMin){divMin = newDivItem['Deficit Compared to Historical'];}\r\n if(newDivItem['Mitigation by BMP Solution'] > divMax){divMax = newDivItem['Mitigation by BMP Solution'];}\r\n\r\n }\r\n }\r\n\r\n if(excess === true && deficit === false ) // excess only\r\n {\r\n newMarkers.push({\r\n axis: 'y',\r\n value: 0,\r\n lineStyle: { stroke: '#888888', strokeWidth: 1 },\r\n // textStyle: { fill: '#006099' },\r\n textStyle: { fill: '#13A0C2' },\r\n legend: legendNames[0],\r\n legendPosition: 'top-left',\r\n legendOrientation: 'vertical'\r\n });\r\n }\r\n else if(excess === false && deficit === true )// deficit only\r\n {\r\n newMarkers.push({\r\n axis: 'y',\r\n value: 0,\r\n lineStyle: { stroke: '#888888', strokeWidth: 1 },\r\n textStyle: { fill: '#e25c3b' },\r\n legend: legendNames[1],\r\n legendPosition: 'bottom-left',\r\n legendOrientation: 'vertical'\r\n });\r\n }\r\n else// both\r\n {\r\n newMarkers.push({\r\n axis: 'y',\r\n value: 0,\r\n lineStyle: { strokeOpacity: 0 },\r\n // textStyle: { fill: '#006099' },\r\n textStyle: { fill: '#13A0C2' },\r\n legend: (legendNames[0]),\r\n legendPosition: 'top-left',\r\n legendOrientation: 'vertical'\r\n });\r\n newMarkers.push({\r\n axis: 'y',\r\n value: 0,\r\n lineStyle: { stroke: '#888888', strokeWidth: 1 },\r\n textStyle: { fill: '#e25c3b' },\r\n legend: (legendNames[1]),\r\n legendPosition: 'bottom-left',\r\n legendOrientation: 'vertical'\r\n });\r\n }\r\n\r\n if(excess === true){\r\n newDivKeys.push('Excess Compared to Historical');\r\n // newDivColors.push('#7eb0ce');\r\n // newDivColors.push('#006099');\r\n newDivColors.push('#AEDEEA');\r\n \r\n }\r\n newDivKeys.push('Mitigation by BMP Solution');\r\n newDivColors.push('#13A0C2');\r\n\r\n if(deficit === true){\r\n\r\n newDivKeys.push('Deficit Compared to Historical');\r\n // newDivKeys.push('Deficit Mitigation by BMP Solution');\r\n //\"#F59841\", \"#fbd8b6\"\r\n newDivColors.push('#f2b5a6');\r\n // newDivColors.push('#e25c3b');\r\n //newDivColors.push('#fbd8b6');\r\n //newDivColors.push('#F59841');\r\n\r\n }\r\n // calculate bottom padding\r\n let ratio = Math.abs(divMax / divMin);\r\n let newPad = (10.5 * ratio) + 5.5;\r\n //console.log('min and max', divMin, divMax, ratio, newPad);\r\n if(newPad < 10) {newPad = 10;}\r\n if(newPad > 110) {newPad = 110;}\r\n // add a bit?\r\n divMax = divMax * 1.1;\r\n divMin = divMin * 1.1;\r\n\r\n setMaxBottomPad(newPad);\r\n setYMin(divMin);\r\n setYMax(divMax);\r\n setMarkers(newMarkers);\r\n //setLegendStyle(divLegend);\r\n setMyColors(newDivColors);\r\n setMyKeys(newDivKeys);\r\n setGraphData(newDivergeBarData);\r\n setShowsDeficit(deficit)\r\n //console.log('set done', divMin, divMax, divLegend, newDivColors, newDivergeBarData);\r\n }\r\n }, [data])\r\n\r\n const CustomLeftTick = (val: any, animatedProps: any) => {\r\n return (\r\n \r\n \r\n \r\n {val.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")} ac-ft\r\n \r\n \r\n )\r\n }\r\n\r\n const CustomBottomTick = (val: any, animatedProps: any) => {\r\n return (\r\n \r\n \r\n {val}\r\n \r\n \r\n )\r\n }\r\n\r\n return(\r\n 100$', 'gained <= 100$', 'lost <= 100$', 'lost > 100$']}\r\n keys={myKeys}\r\n indexBy={indexBy}\r\n margin={{ top: 35, right: 345, bottom: showsDeficit === true? maxBottomPad: 10, left: 10 }}\r\n padding={0.3}\r\n valueScale={{ type: 'linear' }}\r\n //indexScale={{ type: 'band', round: true }}\r\n colors={myColors}\r\n //colors={['#97e3d5', '#61cdbb', '#f47560', '#e25c3b']}\r\n groupMode={groupMode}\r\n enableLabel={true}\r\n minValue={ymin}\r\n maxValue={ymax}\r\n // enableGridX={true}\r\n // enableGridY={false}\r\n valueFormat={v => `${v} ac-ft`}\r\n labelTextColor='inherit:darker(1.2)'\r\n axisTop={ {\r\n tickSize: 0,\r\n tickPadding: 12,\r\n renderTick: ({ value, animatedProps }) => CustomBottomTick(value, animatedProps)\r\n }}\r\n axisLeft={null}\r\n axisRight={{\r\n format: (v: number) => `${Math.abs(v)} ac-ft`,\r\n renderTick: ({ value, animatedProps }) => CustomLeftTick(value, animatedProps)\r\n }}\r\n axisBottom={null}\r\n markers={ markers}\r\n // legendLabel={datum => `${datum.id} (${datum.value})`}\r\n legends={[\r\n {\r\n dataFrom: 'keys',\r\n anchor: 'right',\r\n direction: 'column',\r\n justify: false,\r\n translateX: 320,\r\n translateY: 0,\r\n itemsSpacing: 2,\r\n itemWidth: 250,\r\n itemHeight: 30,\r\n itemDirection: 'left-to-right',\r\n itemOpacity: 1.0,\r\n symbolSize: 30\r\n }\r\n ]}\r\n theme={{\r\n fontSize: 14\r\n }}\r\n />\r\n )\r\n}","import React from \"react\";\r\nimport \"./watermark.css\";\r\n\r\n\r\ninterface IWatermarkProps {\r\n watermark_text: string\r\n children: any\r\n}\r\n\r\nexport const Watermark: React.FC = ({ ...props }) => {\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n
    \r\n {props.watermark_text}\r\n
    \r\n
    \r\n
    \r\n {props.children}\r\n
    \r\n );\r\n}\r\n","export default __webpack_public_path__ + \"static/media/wmms-climate.8c2031b7.png\";","import { AxiosError, AxiosResponse } from \"axios\";\r\nimport React, { Component } from \"react\";\r\nimport \"./ClimateViewer.css\";\r\nimport FileDragAndDrop from \"../../core/fileDragAndDrop/FileDragAndDrop\";\r\nimport { INavHistory } from \"../../interfaces/INavHistory\";\r\nimport { alertPropsModel } from \"../../models/alertPropsModel\";\r\nimport { climateUpload } from \"../../models/ClimateChange/climateUpload\";\r\nimport { ClimateSummary } from \"../../models/ClimateChange/climateSummary\";\r\nimport { ClimateCsv } from \"../../models/ClimateChange/climateCsv\";\r\nimport { Button, Checkbox, Container, Dropdown, Icon, Label, List, Loader, Transition } from \"semantic-ui-react\";\r\nimport { MyResponsiveBar } from \"./NivoBarChart/myResponsiveBar\";\r\nimport { ButtonGroup } from \"../../core/buttonGroup/ButtonGroup\";\r\nimport { MyResponsiveLine } from \"./NivoLineChart/myResponsiveLine\";\r\nimport { MyResponsiveBullet } from \"./NivoBullet/myResponsiveBullet\";\r\nimport { DetailItem } from \"./DetailItem/detailItem\";\r\nimport { PerformanceSummary } from \"./PerformanceSummary/performanceSummary\";\r\nimport {formatNumber } from \"../../core/HelperFx\";\r\nimport { DataTable } from \"./DataTable/dataTable\";\r\nimport { DivergingBar } from \"./NivoDivergingBar/DivergingBar\";\r\nimport YesNoModal from \"../../core/modals/yesNoModal/yesNoModal\";\r\nimport { Watermark } from \"../../core/watermark/watermark\";\r\nimport { TooltipModal } from \"../toolTipModal/toolTipModal\";\r\nimport Config from \"../../config/Config\";\r\nimport DownloadLink from \"../../core/downloadLink/downloadLink\";\r\nimport logo from '../../images/wmms-climate.png';\r\nimport { ClimateItem } from \"../../models/ClimateChange/climateItem\";\r\n\r\n\r\nexport class ClimateViewerState {\r\n summary: ClimateSummary = new ClimateSummary();\r\n origData: ClimateSummary = new ClimateSummary();\r\n zipfilename: string = \"No selection\";\r\n zipfile: File = null;\r\n isLoadingData: boolean = false;\r\n isGeneratingCsv: boolean = false;\r\n alertConfguration: alertPropsModel = new alertPropsModel();\r\n alertIsOpen: boolean = false;\r\n barsBy: string = \"All\";\r\n selScenarioId: number = 1;\r\n selScenarioVal: number = 479;\r\n evalIdx: number = 0;\r\n evalName: number = 0;\r\n evalNames = [];\r\n lineXName = 'Capacity';\r\n lineXNames = ['Capacity', 'Footprint', 'Cost', 'Reduction'];\r\n lineXUnit = 'ac-ft';\r\n lineYName = 'Capture';\r\n lineYNames = ['Runoff', 'Capture', 'Remaining Flow', '% Reduction']\r\n lineYUnit = 'ac-ft';\r\n //solGraphNumberOptions = [\"5\", \"10\", \"20\", \"All\"]\r\n selGraphNumberSolutions = \"All\";\r\n statsBarOptions = [\"Median\", \"Mean\"]\r\n selStatsBarOption = \"Median\";\r\n lineData = []\r\n performanceGraphData = []\r\n filteredGraphs = []\r\n costGroups: any[] = [\"group A\"];\r\n modelGroups: any[] = [\"group A\"];\r\n eventGroups: string[] = [\"something\"];\r\n scenarioGroups: any[] = [\"something\"];\r\n scenSelOptions = [];\r\n singleNames: string = \"\";\r\n bulletData = [\r\n {\"id\":\"2\",\"ranges\":[162,678],\"markers\":[295], \"weight\": 1},\r\n {\"id\":\"5\",\"ranges\":[162,678],\"markers\":[234], \"weight\": 1},\r\n {\"id\":\"Historic\",\"ranges\":[162,163], \"weight\": 1}\r\n ]\r\n bulletMin = 1500;\r\n bulletMax = 2500;\r\n bulletAvgs = [];\r\n hideui: boolean = false;\r\n showDetails: boolean = false;\r\n detailItem: any = [];\r\n divergingData: any = [];\r\n divergingLegend: string = \"both\";\r\n divKeys: string[] = [];\r\n divKeysMean: string[] = [];\r\n divColorsMean: string[] = [];\r\n divColors: string[] = [];\r\n divYMinMean: number = -100;\r\n divYMaxMean: number = 100;\r\n divYMin: number = -100;\r\n divYMax: number = 100;\r\n}\r\n\r\nexport default class ClimateViewer extends Component {\r\n\r\n state = new ClimateViewerState();\r\n componentDidMount() {\r\n this.addSample();\r\n }\r\n\r\n fileDragDropUpload = (files: Array) => {\r\n let classContext: ClimateViewer = this;\r\n\r\n if (files != undefined && files.length == 1) {\r\n classContext.setState({ ['zipfilename']: files[0].name, ['zipfile']: files[0] }, () => {\r\n classContext.addScenarioClick();\r\n });\r\n }\r\n }\r\n\r\n getState = () => {\r\n let stateCopy = Object.assign({}, this.state)\r\n return stateCopy;\r\n }\r\n\r\n // recursively removes rect with rgba(255,255,255,1) from base element \r\n clearChildrenRecursive = (elem: any): any => {\r\n if(elem.tagName == 'rect'){\r\n if(elem.attributes['fill'] !== undefined){\r\n if(elem.attributes['fill'].nodeValue === \"rgba(255, 255, 255, 1)\"){\r\n return {\"is\":true, \"any\": true};\r\n }\r\n }\r\n }\r\n let track = {\"is\":false, \"any\": false}\r\n for(var i = 0; i < elem.children.length; i++){\r\n let res = this.clearChildrenRecursive(elem.children[i]);\r\n if(res.is == true){\r\n track.any = true;\r\n elem.removeChild(elem.children[i]);\r\n } else if(res.any == true){\r\n track.any = true;\r\n }\r\n\r\n }\r\n return track;\r\n }\r\n\r\n // Get's called when we come back from the API or change number of solutions. Highest level entry point\r\n dataPrep = () =>{\r\n let classContext: ClimateViewer = this;\r\n let dataCopy: ClimateSummary = Object.assign({}, classContext.state.origData);\r\n\r\n let subsetNum = 10000;\r\n if(classContext.state.selGraphNumberSolutions.toLowerCase() != \"all\"){\r\n subsetNum = Number.parseInt(classContext.state.selGraphNumberSolutions);\r\n }\r\n\r\n let newScenariosIds = Array.from(new Set(dataCopy.items.map(item => item.scenarioId))).sort(function(a: number, b: number){return a - b;});\r\n if(newScenariosIds.length > subsetNum){\r\n let selScenarioIds: number[] = new Array();\r\n \r\n selScenarioIds.push(newScenariosIds.shift());\r\n newScenariosIds.push(newScenariosIds[newScenariosIds.length -1]);\r\n newScenariosIds.pop();\r\n \r\n if(selScenarioIds.indexOf(dataCopy.selectedScenarioId)< 0){\r\n selScenarioIds.push(dataCopy.selectedScenarioId);\r\n newScenariosIds.splice(newScenariosIds.indexOf(dataCopy.selectedScenarioId), 1);\r\n }\r\n \r\n let itemsNeededRemain = subsetNum - selScenarioIds.length;\r\n let averageNum = newScenariosIds.length / itemsNeededRemain;\r\n let numAgg = 0.0;\r\n\r\n while(numAgg < newScenariosIds.length && selScenarioIds.length <= subsetNum){\r\n numAgg += averageNum;\r\n selScenarioIds.push(newScenariosIds[Math.round(numAgg) -1]); \r\n }\r\n\r\n dataCopy.items = dataCopy.items.filter((item) => selScenarioIds.indexOf(item.scenarioId) >= 0);\r\n }\r\n\r\n classContext.setState({summary: dataCopy}, () => {\r\n if(classContext.state.summary!= null && classContext.state.summary.items != null && classContext.state.summary.items.length > 0){\r\n let newCosts = Array.from(new Set(classContext.state.summary.items.map(item => item.cost))).sort();\r\n let newEvents = Array.from(new Set(classContext.state.summary.items.map(item => item.eventLabel))).sort();\r\n let newScenarios = Array.from(new Set(classContext.state.summary.items.map(item => item.scenarioId))).sort(function(a: number, b: number){return a - b;});\r\n\r\n let newModels = Array.from(new Set(classContext.state.summary.items.map(item => item.model))).sort();\r\n let newEvalNames = [];\r\n\r\n for(var i = 0; i < classContext.state.summary.items[0].responses.length; i++){\r\n newEvalNames.push(classContext.state.summary.items[0].responses[i].constituent);\r\n }\r\n\r\n let newScenOpt = [];\r\n for(var i = 0; i < newScenarios.length; i++){\r\n let scenCap = classContext.state.summary.items.filter((item) => item.scenarioId == newScenarios[i])[0];\r\n newScenOpt.push({\r\n key: i,\r\n value: newScenarios[i],\r\n text: scenCap.scenarioCapacity.toString() + ' ac-ft - ' + formatNumber(scenCap.scenarioFootprint, 0).toString() + ' sq-ft (' + newScenarios[i].toString() + ')'\r\n })\r\n }\r\n let scenId: any = 0;\r\n if(classContext.state.summary.selectedScenarioId > 0){\r\n scenId = classContext.state.summary.selectedScenarioId;\r\n } else {\r\n if(newScenarios.length > 0){ scenId = newScenarios[newScenarios.length - 1]; }\r\n }\r\n\r\n classContext.setState({ costGroups: newCosts, eventGroups: newEvents, evalNames: newEvalNames, evalName: newEvalNames[0], scenSelOptions: newScenOpt, scenarioGroups: newScenarios, modelGroups: newModels, selScenarioId: scenId }, () => this.dataUpdate());\r\n }\r\n })\r\n }\r\n\r\n // Get's called anytime the user changes viz options (x or y axis, scenario selection, etc...)\r\n dataUpdate = () =>{\r\n let classContext: ClimateViewer = this;\r\n let newData: any = new Array();\r\n if(classContext.state.summary!= null && classContext.state.summary.items != null && classContext.state.summary.items.length > 0){\r\n for(var i = 0; i < classContext.state.summary.items.length; i++){\r\n classContext.state.summary.items[i].id = i;\r\n classContext.state.summary.items[i]['Remaining Flow'] = classContext.state.summary.items[i].responses[classContext.state.evalIdx].initEval;\r\n classContext.state.summary.items[i]['Capture'] = Math.round((classContext.state.summary.items[i].responses[classContext.state.evalIdx].postDev - classContext.state.summary.items[i].responses[classContext.state.evalIdx].initEval) * 100) / 100 ;\r\n classContext.state.summary.items[i]['Runoff'] = classContext.state.summary.items[i].responses[classContext.state.evalIdx].postDev;\r\n classContext.state.summary.items[i]['% Reduction'] = classContext.state.summary.items[i].responses[classContext.state.evalIdx].percentReduction;\r\n classContext.state.summary.items[i]['Tier2Reduction'] = classContext.state.summary.items[i].responses[classContext.state.evalIdx].tier2Reduction;\r\n\r\n // creating full model name\r\n if(classContext.state.summary.items[i].modelDescription && classContext.state.summary.items[i].modelDescription.length > 1){\r\n classContext.state.summary.items[i].fullModelName = classContext.state.summary.items[i].modelDescription;\r\n }\r\n else if(classContext.state.summary.items[i].event){\r\n classContext.state.summary.items[i].fullModelName = classContext.state.summary.items[i].model + ' - ' + classContext.state.summary.items[i].event\r\n } else {\r\n classContext.state.summary.items[i].fullModelName = classContext.state.summary.items[i].model;\r\n }\r\n }\r\n\r\n let newFullModelNames = Array.from(new Set(classContext.state.summary.items.map(item => item.fullModelName))).sort();\r\n \r\n let yName = 'scenarioId';\r\n if(classContext.state.lineXName == 'Cost') {yName = 'scenarioCost';}\r\n if(classContext.state.lineXName == 'Reduction') {yName = 'Tier2Reduction';}\r\n if(classContext.state.lineXName == 'Capacity') {yName = 'scenarioCapacity';}\r\n if(classContext.state.lineXName == 'Footprint') {yName = 'scenarioFootprint';}\r\n\r\n let selScenVal = classContext.state.summary.items.filter((selitm) => selitm.scenarioId == classContext.state.selScenarioId)[0][yName];\r\n \r\n // build line graph\r\n for(var i = 0; i < newFullModelNames.length; i++){\r\n let lineItem: any = {};\r\n let filter: boolean = false;\r\n if(classContext.state.filteredGraphs.indexOf(newFullModelNames[i]) >= 0){\r\n filter = true;\r\n lineItem.id = 'x ' + newFullModelNames[i];\r\n \r\n } else {\r\n lineItem.id = newFullModelNames[i];\r\n }\r\n lineItem.data = new Array();\r\n let modelItems = classContext.state.summary.items.filter((item) => item.fullModelName == newFullModelNames[i]);\r\n // sort it\r\n modelItems = modelItems.sort(function(a: any, b: any) {return a[yName] - b[yName]})\r\n\r\n if(!filter){\r\n for(var j = 0; j < modelItems.length; j++){\r\n lineItem.data.push({x: modelItems[j][yName], y: modelItems[j][classContext.state.lineYName]});\r\n }\r\n }\r\n newData.push(lineItem);\r\n }\r\n\r\n // build bullet/box-whisker data & performanceBars\r\n // always 'event based' -- eventGroups\r\n let newBoxData = [];\r\n let boxMin = 0;\r\n let boxMax = 0;\r\n let newAvgs = [];\r\n let newSingleNames = \"\";\r\n let newPerformanceBarData = [];\r\n\r\n let scenarioItems = classContext.state.summary.items.filter((item) => item.scenarioId == classContext.state.selScenarioId && classContext.state.filteredGraphs.indexOf(item.fullModelName) < 0)\r\n if(scenarioItems && scenarioItems.length > 0){\r\n boxMin = scenarioItems.reduce((min, p) => p[classContext.state.lineYName] < min? p[classContext.state.lineYName] : min, scenarioItems[0][classContext.state.lineYName]);\r\n boxMax = scenarioItems.reduce((max, p) => p[classContext.state.lineYName] > max? p[classContext.state.lineYName] : max, scenarioItems[0][classContext.state.lineYName]);\r\n // calculate min/max as 10% beyond min/max data points without going negative\r\n let pct10 = (boxMax - boxMin) * 0.15;\r\n boxMin = Math.round((boxMin - pct10) * 1000)/1000;\r\n boxMax = Math.round((boxMax + pct10) * 1000)/1000;\r\n let historicalLines = [];\r\n \r\n // consider the Y-Axis selection for 'which' datapoints to use. -- lineYName\r\n classContext.state.eventGroups.map((x) =>{\r\n if(x !== null){\r\n let items = scenarioItems.filter((item) => item.eventLabel == x && item.scenarioId == classContext.state.selScenarioId && classContext.state.filteredGraphs.indexOf(item.fullModelName) < 0)\r\n if(items.length == 1){\r\n let eventName = classContext.getItmName(items[0]);\r\n newBoxData.push(classContext.buildBoxSingle(items[0], eventName, boxMin, boxMax));\r\n historicalLines.push(items[0][classContext.state.lineYName])\r\n newSingleNames += eventName + \" \"\r\n\r\n newPerformanceBarData.push(classContext.buildPerformanceBar(items, eventName));\r\n } else if(items.length > 0) {\r\n let eventName = classContext.getItmName(items[0]);\r\n let newItem = classContext.buildBoxStats(items, eventName);\r\n newBoxData.push(newItem);\r\n newAvgs.push(newItem.measures[0])\r\n\r\n newPerformanceBarData.push(classContext.buildPerformanceBar(items, eventName + ' (' + classContext.state.selStatsBarOption+')'));\r\n }\r\n } else {\r\n let items = scenarioItems.filter((item) => item.eventLabel == x && item.scenarioId == classContext.state.selScenarioId && classContext.state.filteredGraphs.indexOf(item.fullModelName) < 0)\r\n items.map((y) =>{\r\n let eventName = classContext.getItmName(y);\r\n newBoxData.push(classContext.buildBoxSingle(y, eventName, boxMin, boxMax))\r\n historicalLines.push(y[classContext.state.lineYName])\r\n newSingleNames += eventName + \" \"\r\n\r\n newPerformanceBarData.push(classContext.buildPerformanceBar(items, eventName));\r\n })\r\n }\r\n })\r\n\r\n newData = newData.reverse(); // need to reverse for legend and graph to line up \r\n \r\n // ingest the historical marker lines into the box plots\r\n for(var i = 0; i < newBoxData.length; i++){\r\n if(newBoxData[i].weight == 2){\r\n historicalLines.map((x) =>{newBoxData[i].measures.push(x);});\r\n }\r\n }\r\n\r\n newBoxData = newBoxData.sort(function(a, b) {\r\n if(a.weight != b.weight) {return a.weight - b.weight;}\r\n else { \r\n let aDate: any = new Date(a.startDate);\r\n let bDate: any = new Date(b.startDate)\r\n return aDate - bDate;}\r\n })\r\n newPerformanceBarData = newPerformanceBarData.sort(function(a, b) {\r\n if(a.weight != b.weight) {return a.weight - b.weight;}\r\n else { \r\n let aDate: any = new Date(a.startDate);\r\n let bDate: any = new Date(b.startDate)\r\n return aDate - bDate;}\r\n })\r\n\r\n // adjust first (assumed historic); set capture zero and remaining = runoff\r\n newPerformanceBarData[0].Capture = 0;\r\n newPerformanceBarData[0]['Remaining Flow'] = newPerformanceBarData[0].Runoff;\r\n\r\n // if all weight one / aka nothing larger than weight one, then set min to zero...\r\n if(newBoxData.filter((item) => item.weight > 1).length == 0){\r\n // reset box data items from previous boxMin to zero...\r\n for(var i = 0; i < newBoxData.length; i++){\r\n for(var j = 0; j < newBoxData[i].ranges.length; j++){\r\n if(newBoxData[i].ranges[j] == boxMin){newBoxData[i].ranges[j] = 0.001;}\r\n }\r\n }\r\n boxMin = 0;\r\n }\r\n }\r\n\r\n classContext.setState({ bulletMin: boxMin, bulletMax: boxMax, bulletAvgs: newAvgs, lineData: newData, bulletData: newBoxData, \r\n selScenarioVal: selScenVal, singleNames: newSingleNames, performanceGraphData: newPerformanceBarData\r\n });\r\n }\r\n }\r\n\r\n getItmName = (itm: ClimateItem): string => {\r\n let name = itm.fullModelName;\r\n if(itm.eventLabel !== null && itm.eventLabel.length > 0){name = itm.eventLabel;}\r\n\r\n return name;\r\n }\r\n\r\n findItmByNumber = (num: number, event: string) => {\r\n let classContext: ClimateViewer = this;\r\n //console.log('find item by number', num, event)\r\n let searchResult = classContext.state.summary.items.filter((item) => item.eventLabel == event && item.scenarioId == classContext.state.selScenarioId && item[classContext.state.lineYName] == num);\r\n classContext.setState({showDetails: true, detailItem: searchResult});\r\n }\r\n\r\n findItmByFullModelName = (num: number, fullName: string) => {\r\n let classContext: ClimateViewer = this;\r\n let searchResult = classContext.state.summary.items.filter((item) => item.fullModelName == fullName && item[classContext.state.lineYName] == num);\r\n classContext.setState({showDetails: true, detailItem: searchResult});\r\n }\r\n\r\n buildPerformanceBar = (items, name) => {\r\n let classContext: ClimateViewer = this;\r\n let runoff = 0;\r\n let capture = 0;\r\n let captureAvg = -999;\r\n let remainingFlow = 0;\r\n let weight = 0;\r\n if(items.length > 1){\r\n let itemValsRunoffSort = Array.from(items.map(item => item[\"Runoff\"])).sort(function(a: number, b: number){return a - b;});\r\n let itemValsCaptureSort = Array.from(items.map(item => item[\"Capture\"])).sort(function(a: number, b: number){return a - b;});\r\n let itemValsRemainFlowSort = Array.from(items.map(item => item[\"Remaining Flow\"])).sort(function(a: number, b: number){return a - b;});\r\n if(classContext.state.selStatsBarOption == \"Median\"){\r\n runoff = classContext.quantile(itemValsRunoffSort, 0.5)\r\n capture = classContext.quantile(itemValsCaptureSort, 0.5)\r\n remainingFlow = classContext.quantile(itemValsRemainFlowSort, 0.5)\r\n } else {\r\n runoff = classContext.average(itemValsRunoffSort)\r\n capture = classContext.average(itemValsCaptureSort);\r\n remainingFlow = classContext.average(itemValsRemainFlowSort)\r\n }\r\n weight = 2;\r\n } else {\r\n runoff = items[0][\"Runoff\"]\r\n capture = items[0][\"Capture\"]\r\n remainingFlow = items[0][\"Remaining Flow\"]\r\n weight = 1;\r\n }\r\n\r\n let newBarItem ={\r\n \"id\": name, \r\n \"Runoff\": runoff,\r\n \"Capture\": capture,\r\n \"Remaining Flow\": remainingFlow,\r\n \"weight\": weight,\r\n \"startDate\": items[0].modelStartDate,\r\n \"title\": classContext.buildBoxTitle(name)\r\n }\r\n\r\n return newBarItem;\r\n }\r\n\r\n buildBoxStats = (items, name) => {\r\n let classContext: ClimateViewer = this;\r\n let itemValsSort = Array.from(items.map(item => item[classContext.state.lineYName])).sort(function(a: number, b: number){return a - b;});\r\n let itemMin = itemValsSort[0];\r\n let itemMax = itemValsSort[itemValsSort.length -1];\r\n let newBoxItem = {\r\n \"id\": name, \r\n \"ranges\": [classContext.quantile(itemValsSort, 0.25), classContext.quantile(itemValsSort, 0.5), classContext.quantile(itemValsSort, 0.75)],\r\n \"markers\": itemValsSort,\r\n \"measures\": [classContext.average(itemValsSort)],\r\n \"weight\": 2,\r\n \"startDate\": items[0].modelStartDate,\r\n \"title\": classContext.buildBoxTitle(name)\r\n };\r\n return newBoxItem;\r\n }\r\n\r\n buildBoxSingle = (item, name, boxMin, boxMax) => {\r\n let classContext: ClimateViewer = this;\r\n let newBoxItem2 = {\r\n \"id\": name,\r\n \"ranges\": [boxMin,boxMin,boxMin,boxMin,item[classContext.state.lineYName]],\r\n \"markers\":[],\r\n \"measures\":[], \r\n \"weight\": 1,\r\n \"startDate\": item.modelStartDate,\r\n \"title\": classContext.buildBoxTitle(name)\r\n }\r\n return newBoxItem2;\r\n }\r\n\r\n buildBoxTitle = (name) =>{\r\n return (\r\n {name}\r\n )\r\n }\r\n\r\n quantile = (arr, q) => {\r\n arr = arr.sort(function(a: number, b: number){return a - b;})\r\n const pos = (arr.length - 1) * q;\r\n const base = Math.floor(pos);\r\n const rest = pos - base;\r\n if (arr[base + 1] !== undefined) {\r\n return Math.round((arr[base] + rest * (arr[base + 1] - arr[base]))*1000)/1000;\r\n } else {\r\n return Math.round((arr[base])*1000)/1000;\r\n }\r\n };\r\n\r\n average = (arr) => {\r\n let sum: number = arr.reduce((a: number, b: number): number => {return a + b;});\r\n return Math.round((sum / arr.length)*1000)/1000;\r\n }\r\n\r\n lineLegendClick = (data) => {\r\n let classContext: ClimateViewer = this;\r\n let id: string = data.id.toString();\r\n let filterArr: Array = classContext.state.filteredGraphs;\r\n if(id.startsWith(\"x \")){\r\n let unfilteredId = id.substr(2);\r\n filterArr.splice(filterArr.indexOf(unfilteredId), 1);\r\n } else {\r\n filterArr.push(id);\r\n }\r\n classContext.setState({filteredGraphs: filterArr}, () =>{\r\n classContext.dataUpdate();\r\n })\r\n }\r\n\r\n bulletMarkerClick = (data, evt) => {\r\n let classContext: ClimateViewer = this;\r\n let num = data.value;\r\n let event = evt.target.parentElement.parentElement.children[evt.target.parentElement.parentElement.children.length-1].children[0].innerHTML;\r\n classContext.findItmByNumber(num, event);\r\n }\r\n\r\n addSample() {\r\n let classContext: ClimateViewer = this;\r\n if (!classContext.state.isLoadingData) {\r\n classContext.setState({\r\n isLoadingScenario: true\r\n });\r\n\r\n let form = new FormData();\r\n form.append(\"sample\", \"true\");\r\n\r\n if (!classContext.state.isLoadingData) {\r\n classContext.setState({isLoadingData: true, barsBy: \"All\", lineXName: \"Capacity\", lineYName: \"Capture\", selGraphNumberSolutions: \"All\", \r\n filteredGraphs: [], showDetails: false, detailItem: [], lineXUnit: 'ac-ft', lineYUnit: 'ac-ft', summary: new ClimateSummary(),\r\n origData: new ClimateSummary(), performanceGraphData: []});\r\n\r\n climateUpload.axiosPostUpload(form)\r\n .then((r: AxiosResponse) =>{\r\n //console.log('ok reponse', r);\r\n classContext.setState({origData: r.data, isLoadingData: false}, () => {classContext.dataPrep()});\r\n //alert('yay data');\r\n }).catch((r: AxiosError) => {\r\n console.log('upload error', r);\r\n classContext.setState({isLoadingData: false}, () => {});\r\n })\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n addScenarioClick() {\r\n let classContext: ClimateViewer = this;\r\n if (this.state.zipfile == null) {\r\n let alertProps: alertPropsModel = {\r\n header: 'Please select a file',\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: classContext,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 2500\r\n };\r\n classContext.setState({ alertConfguration: alertProps }, () => {\r\n classContext.setState({ alertIsOpen: true });\r\n });\r\n\r\n } else {\r\n if (!classContext.state.isLoadingData) {\r\n classContext.setState({isLoadingData: true, barsBy: \"All\", lineXName: \"Capacity\", lineYName: \"Capture\", selGraphNumberSolutions: \"All\", \r\n filteredGraphs: [], showDetails: false, detailItem: [], lineXUnit: 'ac-ft', lineYUnit: 'ac-ft', summary: new ClimateSummary(),\r\n origData: new ClimateSummary(), performanceGraphData: []});\r\n\r\n let form = new FormData();\r\n form.append(\"data\", classContext.state.zipfile);\r\n\r\n climateUpload.axiosPostUpload(form)\r\n .then((r: AxiosResponse) =>{\r\n //console.log('ok reponse', r);\r\n classContext.setState({origData: r.data, isLoadingData: false}, () => {classContext.dataPrep()});\r\n //alert('yay data');\r\n }).catch((r: AxiosError) => {\r\n console.log('upload error', r);\r\n classContext.setState({isLoadingData: false}, () => {});\r\n })\r\n }\r\n }\r\n }\r\n\r\n handleIdxChange = (newName) =>{\r\n let classContext: ClimateViewer = this;\r\n let newIdx: number = 0;\r\n for(var i = 0; i < classContext.state.summary.items[0].responses.length; i++){\r\n if(newName === classContext.state.summary.items[0].responses[i].constituent){\r\n newIdx = i;\r\n break;\r\n }\r\n }\r\n classContext.setState({evalIdx: newIdx, evalName: newName}, () =>{classContext.dataUpdate()});\r\n }\r\n\r\n handleSolNumberChange = (newNumber) =>{\r\n let classContext: ClimateViewer = this;\r\n classContext.setState({selGraphNumberSolutions: newNumber, showDetails: false, detailItem: []}, () =>{classContext.dataPrep()}); \r\n }\r\n\r\n handleAllAlertClick =(val: boolean) =>{\r\n let classContext: ClimateViewer = this;\r\n if(val === true){\r\n classContext.handleSolNumberChange('All');\r\n }\r\n }\r\n\r\n handleStatsBarChange = (newName) =>{\r\n let classContext: ClimateViewer = this;\r\n classContext.setState({selStatsBarOption: newName}, () =>{classContext.dataUpdate()});\r\n }\r\n\r\n handleLineXIdxChange = (newName) =>{\r\n let classContext: ClimateViewer = this;\r\n let newUnitName = 'ac-ft';\r\n if(newName === \"Footprint\"){newUnitName = \"sq-ft\";}\r\n if(newName === \"Cost\"){newUnitName = \"$\";}\r\n if(newName === \"Reduction\"){newUnitName = \"%\";}\r\n classContext.setState({lineXName: newName, lineXUnit: newUnitName}, () =>{classContext.dataUpdate()});\r\n }\r\n \r\n handleLineYIdxChange = (newName) =>{\r\n let classContext: ClimateViewer = this;\r\n let newUnitName = 'ac-ft';\r\n if(newName === \"% Reduction\") {newUnitName = \"%\"};\r\n classContext.setState({lineYName: newName, lineYUnit: newUnitName}, () =>{classContext.dataUpdate()});\r\n }\r\n\r\n handleScenChange = (e, {value}) =>{\r\n let classContext: ClimateViewer = this;\r\n classContext.setState({selScenarioId: value}, () =>{classContext.dataUpdate()});\r\n }\r\n\r\n handleBarsButtonClick = (sel: string) =>{\r\n let classContext: ClimateViewer = this;\r\n classContext.setState({barsBy: sel});\r\n }\r\n\r\n handleItemUpdate(evt, typestr) {\r\n let lbl = document.getElementById(typestr + 'uploadlabel');\r\n if (evt.target.files.length > 0) {\r\n lbl.classList.remove('red');\r\n lbl.classList.add('green');\r\n this.setState({ [typestr + 'filename']: evt.target.files[0].name, [typestr + 'file']: evt.target.files[0] });\r\n } else {\r\n lbl.classList.add('red');\r\n lbl.classList.remove('green');\r\n this.setState({ [typestr + 'filename']: 'None Selected', file: null });\r\n }\r\n }\r\n\r\n generateCsv = () => {\r\n let classContext: ClimateViewer = this;\r\n let navigation: any = window.navigator;\r\n classContext.setState({ isGeneratingCsv: true });\r\n if (classContext.state.summary != null && classContext.state.summary.guid.length > 0) {\r\n\r\n let formData: FormData = new FormData();\r\n formData.append(\"guid\", classContext.state.summary.guid);\r\n\r\n let filename: string = \"ClimateData.csv\";\r\n\r\n ClimateCsv.axiosPostImage(formData)\r\n .then((r: AxiosResponse) => {\r\n classContext.setState({ isGeneratingCsv: false });\r\n const blob = new Blob([r.data], { type: 'text/csv' });\r\n if (navigation?.msSaveOrOpenBlob) {\r\n navigation.msSaveOrOpenBlob(blob, filename);\r\n } else {\r\n const blob = new Blob([r.data], { type: \"text/csv\" });\r\n var link = document.createElement('a');\r\n var href = window.URL.createObjectURL(blob);\r\n link.setAttribute('href', href);\r\n link.setAttribute('download', filename);\r\n document.body.appendChild(link);\r\n link.click();\r\n setTimeout(() => {\r\n window.URL.revokeObjectURL(href);\r\n document.body.removeChild(link);\r\n }, 0)\r\n }\r\n })\r\n .catch((r: AxiosResponse) => {\r\n classContext.setState({ isGeneratingCsv: false });\r\n let alertProps: alertPropsModel = {\r\n header: \"There was an error generating the csv.\",\r\n body: '',\r\n color: 'warning',\r\n size: 'small-alert',\r\n className: '',\r\n context: classContext,\r\n closeBtn: true,\r\n setTimeOut: true,\r\n timeOutTime: 2500\r\n };\r\n\r\n classContext.setState({ alertConfguration: alertProps }, () => {\r\n classContext.setState({ alertIsOpen: true });\r\n });\r\n })\r\n }\r\n }\r\n\r\n toggleDetails = () =>{\r\n let classContext: ClimateViewer = this;\r\n classContext.setState({showDetails: !classContext.state.showDetails})\r\n }\r\n\r\n \r\n toggleUI = () => {\r\n //console.log(!this.state.mjrbmp);\r\n this.setState({ hideui: !this.state.hideui });\r\n }\r\n\r\n render() {\r\n let classContext: ClimateViewer = this;\r\n\r\n return (\r\n
    \r\n \r\n\r\n
    \r\n {/*
    */}\r\n
    \r\n
    \r\n
    \r\n \"wmms2Logo\"\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n

    \r\n WELCOME to the Climate Resiliency Viewer. This viewer renders watershed-scale model output from the Climate Resiliency Utility. The plots below illustrate the range of runoff and BMP performance from as many as 20 general circulation models (GCMs) through the year 2099. For additional context on the data, process, and assumptions used to develop these outputs reference the .\r\n

    \r\n

    \r\n To illustrate the functionality of the viewer, sample data has been pre-loaded below. For context, this data was developed from BMPs characterized in the BMP Opportunities Utility Tutorial.\r\n

    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n {((classContext.state.summary == null || classContext.state.summary.guid == null) || classContext.state.isLoadingData === true) && \r\n
    \r\n {(classContext.state.summary == null || classContext.state.summary.guid == null) &&\r\n
    \r\n

    Drag & drop a climate utility data.zip to visualize and explore results

    \r\n
    \r\n }\r\n {classContext.state.isLoadingData == true &&\r\n Loading data ...\r\n }\r\n
    \r\n }\r\n
    \r\n\r\n {classContext.state.isLoadingData == false && classContext.state.summary != null && classContext.state.summary.guid != null && classContext.state.summary.guid.length > 0 &&\r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n {/* here for styles */}\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n

    Select a scenario to upload:

    \r\n
    \r\n
    \r\n
    File Name: {classContext.state.zipfilename}
    \r\n \r\n classContext.handleItemUpdate(evt, 'zip')} className=\"hidden\" />\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n {this.state.hideui == true && Hide UI}\r\n {this.state.hideui == false && Show UI}\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n {/* here for styles */}\r\n
    \r\n
    \r\n
    Historical & Forecasted {classContext.state.lineYName} ({classContext.state.lineYUnit})
    \r\n
    Four types of model output can be displayed in the Viewer: Runoff, Capture, Remaining Flow, and Percent Reduction
    \r\n
    \r\n {this.state.hideui == false &&
    \r\n
    \r\n
    \r\n \r\n {/* */}\r\n
    \r\n \r\n \r\n
    \r\n
    \r\n BMP Solution: \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    }\r\n
    \r\n
    \r\n {/* here for styles */}\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    {classContext.state.lineYUnit}
    \r\n
    \r\n
    \r\n {classContext.state.bulletData.filter((item) => item.weight == 1).length !== 0 &&
    }\r\n {classContext.state.bulletData.filter((item) => item.weight == 1).length !== 0 &&
    {classContext.state.singleNames}
    }\r\n {classContext.state.bulletData.filter((item) => item.weight > 1).length !== 0 &&
    }\r\n {classContext.state.bulletData.filter((item) => item.weight > 1).length !== 0 &&
    Q2
    }\r\n {classContext.state.bulletData.filter((item) => item.weight > 1).length !== 0 &&
    }\r\n {classContext.state.bulletData.filter((item) => item.weight > 1).length !== 0 &&
    Q3
    }\r\n {classContext.state.bulletData.filter((item) => item.weight > 1).length !== 0 &&
    }\r\n {classContext.state.bulletData.filter((item) => item.weight > 1).length !== 0 &&
    Mean
    }\r\n {classContext.state.bulletData.filter((item) => item.weight > 1).length !== 0 &&
    }\r\n {classContext.state.bulletData.filter((item) => item.weight > 1).length !== 0 &&
    Data Point
    }\r\n
    \r\n
    \r\n
    \r\n \r\n {classContext.state.showDetails && \r\n \r\n \r\n \r\n }\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n {/* here for styles */}\r\n
    \r\n
    \r\n
    Climate Change Mitigation Benefits for Runoff & Capture
    \r\n
    Plots below summarize mean and median historical and forecasted output (left), volume deficit or excess for future scenarios (right), and a plain language summary (bottom)
    \r\n\r\n {classContext.state.hideui == false && classContext.state.bulletData.filter((item) => item.weight > 1).length !== 0 &&
    }\r\n\r\n
    \r\n
    \r\n {/* here for styles */}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n 0?classContext.state.performanceGraphData[0].Runoff:null}\r\n markerTxt={classContext.state.performanceGraphData && classContext.state.performanceGraphData.length > 0?classContext.state.performanceGraphData[0].id:\"\"}\r\n />\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n {/* here for styles */}\r\n
    \r\n
    \r\n
    All Solutions Plot
    \r\n
    Line plot illustrates the range in performance for all solutions uploaded to the Viewer
    \r\n\r\n {classContext.state.hideui == false &&
    \r\n
    \r\n
    \r\n {/*
    */}\r\n
    }\r\n
    \r\n
    \r\n {/* here for styles */}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n {\r\n classContext.state.filteredGraphs.length >0 && classContext.state.hideui == false && \r\n
    classContext.setState({filteredGraphs: []}, () => classContext.dataUpdate())} title='View all'>
    \r\n\r\n }\r\n {/* */}\r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n {/* here for styles */}\r\n
    \r\n
    \r\n
    All Model Output
    \r\n
    Stacked bar plots for all modeled output uploaded to the Viewer. Organized by Event, GCM, or both
    \r\n\r\n {classContext.state.hideui == false &&
    \r\n\r\n
    \r\n
    \r\n \r\n {/* */}\r\n
    \r\n
    }\r\n
    \r\n
    \r\n {/* here for styles */}\r\n
    \r\n
    \r\n {classContext.state.barsBy == \"All\" && \r\n
    \r\n \r\n
    All
    \r\n
    \r\n item.scenarioId == classContext.state.selScenarioId && classContext.state.filteredGraphs.indexOf(item.fullModelName) < 0)}\r\n myKeys={['Capture', 'Remaining Flow']}\r\n // myColors={[\"#F59841\", \"#006099\"]}\r\n myColors={[\"#13A0C2\", \"#1ACE7D\"]}\r\n groupMode={'stacked'}\r\n tickRotation={classContext.state.summary.items.filter((item) => item.scenarioId == classContext.state.selScenarioId && classContext.state.filteredGraphs.indexOf(item.fullModelName) < 0).length > 12? -30: 0}\r\n itemHeight={50}\r\n padding={-100}\r\n markerVal={null}\r\n markerTxt={''}\r\n />\r\n
    \r\n
    \r\n
    \r\n }\r\n {classContext.state.barsBy == \"Event\" && classContext.state.eventGroups.map((x) =>{\r\n return(\r\n
    \r\n \r\n
    Event: {x != null? x : \"N/A\"}
    \r\n
    \r\n item.eventLabel == x && item.scenarioId == classContext.state.selScenarioId && classContext.state.filteredGraphs.indexOf(item.fullModelName) < 0)} \r\n myKeys={['Capture', 'Remaining Flow']}\r\n // myColors={[\"#F59841\", \"#006099\"]}\r\n myColors={[\"#13A0C2\", \"#1ACE7D\"]}\r\n groupMode={'stacked'}\r\n tickRotation={0}\r\n itemHeight={50}\r\n padding={-20}\r\n markerVal={null}\r\n markerTxt={''}\r\n />\r\n
    \r\n
    \r\n
    \r\n )\r\n })\r\n }\r\n {classContext.state.barsBy == \"Model\" && classContext.state.modelGroups.map((x) =>{\r\n return(\r\n
    \r\n \r\n
    Model: {x != null? x : \"N/A\"}
    \r\n
    \r\n item.model == x && item.scenarioId == classContext.state.selScenarioId && classContext.state.filteredGraphs.indexOf(item.fullModelName) < 0)} \r\n myKeys={['Capture', 'Remaining Flow']}\r\n // myColors={[\"#F59841\", \"#006099\"]}\r\n myColors={[\"#13A0C2\", \"#1ACE7D\"]}\r\n groupMode={'stacked'}\r\n tickRotation={0}\r\n itemHeight={50}\r\n padding={-20}\r\n markerVal={null}\r\n markerTxt={''}\r\n />\r\n
    \r\n
    \r\n
    \r\n )\r\n })\r\n }\r\n\r\n
    \r\n
    \r\n {/* here for styles */}\r\n
    \r\n
    \r\n
    All Model Output
    \r\n
    Tabular format for all modeled output uploaded to the Viewer
    \r\n
    \r\n
    \r\n {/* here for styles */}\r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n selitm.scenarioId == classContext.state.selScenarioId && classContext.state.filteredGraphs.indexOf(selitm.fullModelName) < 0)} \r\n columnArr={['model', 'event', 'rcp', 'Runoff', 'Capture', 'Remaining Flow', '% Reduction']}\r\n headerNames={['Model', 'Event', 'RCP', 'Runoff', 'Capture', 'Remaining Flow', '% Reduction']}\r\n valuePostpend={['', '', '', 'ac-ft', 'ac-ft', 'ac-ft', '%']}\r\n columnSortType={['text', 'text', 'text', 'number', 'number', 'number', 'number']}\r\n numberRoundLength={[-1, -1, -1, 3, 3, 3, 2]}\r\n headerBackgroundColor=\"#006099\"\r\n headerTextColor=\"#FFFFFF\"\r\n sortable={true}\r\n striped={true}\r\n celled={true}\r\n fixed={true}\r\n />\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n }\r\n\r\n
    \r\n
    \r\n \r\n\r\n
    \r\n
    \r\n );\r\n }\r\n}","import './App.css';\r\nimport React, { Component } from \"react\";\r\nimport { INavHistory } from \"./interfaces/INavHistory\";\r\nimport { Menu, MenuItemProps, MenuItem, Icon, Sticky } from \"semantic-ui-react\";\r\nimport logo from './images/WMMS_logo.png';\r\nimport Downloads from \"./components/Downloads/downloads\";\r\nimport Utilities from \"./components/Utilities/Utilities\";\r\nimport Network from \"./components/Network/network\";\r\nimport Optimization from \"./components/Optimization/optimization\";\r\nimport Links from \"./components/Links/links\";\r\nimport UtilityMenu from \"./UtilitiesMenu\";\r\nimport TooltipFactory from './core/tootipFactory';\r\nimport {Route} from 'react-router-dom';\r\nimport Config from './config/Config';\r\nimport About from './components/About/about';\r\nimport UtilitiesPW from './components/Utilities-PW/UtilitiesPW';\r\nimport ComingSoon from './components/ComingSoon/comingSoon';\r\nimport Mobile from './components/Mobile/mobile';\r\nimport ClimateViewer from './components/ClimateChangeViewer/ClimateViewer';\r\n \r\n\r\nexport default class App extends Component {\r\n state = {\r\n activeItem: \"home\",\r\n tooltipFactory: null,\r\n tooltipsReady: false,\r\n isMobile: false\r\n }\r\n\r\n // Will eventually need to implement an async function here to look for cookie info in the browser\r\n // And also put in componentDidUpdate so app will constantly be checking auth status\r\n componentDidMount() {\r\n \r\n this.handleFirstRender(); \r\n const tooltipFactory = new TooltipFactory(this.tooltipLoaded);\r\n this.setState({ tooltipFactory: tooltipFactory }) \r\n }\r\n\r\n tooltipLoaded = (dataLoaded: boolean) => {\r\n this.setState({ tooltipsReady: dataLoaded })\r\n }\r\n\r\n handleComponentChange = (name) => {\r\n let width = window.innerWidth;\r\n\r\n if (width < 800 && this.state) {\r\n this.setState({ activeItem: \"mobile\", isMobile: true }, () => {\r\n this.props.history.push(Config.routeUrl + \"mobile\");\r\n })\r\n }\r\n else {\r\n this.setState({ activeItem: name, isMobile: false }, () => {\r\n this.props.history.push(Config.routeUrl + name);\r\n })\r\n }\r\n }\r\n\r\n checkScreen = () => {\r\n let width = window.innerWidth;\r\n\r\n if (width < 800 && this.state) {\r\n //this.setState({ activeItem: \"mobile\", isMobile: true }, () => {\r\n // this.props.history.push(Config.routeUrl + \"mobile\");\r\n //})\r\n this.handleComponentChange(\"mobile\");\r\n }\r\n }\r\n\r\n handleFirstRender = () => {\r\n this.checkScreen();\r\n\r\n\r\n let desiredUrl: string = window.location.href;\r\n\r\n if (Config.appUrl == desiredUrl) {\r\n this.handleComponentChange(\"home\");\r\n } else {\r\n\r\n let desiredRoute = desiredUrl.split(Config.appUrl)[1];\r\n if (desiredRoute.split(\"/\").length > 1) {\r\n let parentRoute = desiredRoute.split(\"/\")[0];\r\n this.setState({ activeItem: parentRoute.toLowerCase() })\r\n this.props.history.push(Config.routeUrl + parentRoute);\r\n } else {\r\n this.setState({ activeItem: desiredRoute.toLowerCase() })\r\n this.props.history.push(Config.routeUrl + desiredRoute);\r\n }\r\n }\r\n \r\n }\r\n\r\n getActiveComponent = (): JSX.Element => {\r\n //return () // for coming soon lnly\r\n switch (this.state.activeItem) {\r\n case \"downloads\": {\r\n return ()\r\n };\r\n case \"utilities\": {\r\n return ()\r\n };\r\n case \"pw-utilities\": {\r\n return ()\r\n };\r\n case \"home\": {\r\n return ()\r\n };\r\n case \"optimization\": {\r\n return ()\r\n };\r\n case \"cliamte\": {\r\n return ()\r\n }; \r\n case \"links\": {\r\n return ()\r\n };\r\n case \"about\": {\r\n return ()\r\n };\r\n case \"mobile\": {\r\n return ()\r\n };\r\n default: {\r\n return ()\r\n }\r\n };\r\n };\r\n\r\n render() {\r\n\r\n let classContext: App = this;\r\n\r\n return (\r\n\r\n
    \r\n \r\n {classContext.state.isMobile == false &&\r\n \r\n {this.handleComponentChange('home')}}>\r\n \"wmms2Logo\"/\r\n \r\n\r\n\r\n this.handleComponentChange('about')}>About\r\n\r\n this.handleComponentChange('downloads')}>Documents, Data & Downloads\r\n\r\n this.handleComponentChange('utilities')}>Utilities\r\n\r\n this.handleComponentChange('optimization')}>Optimization Viewer\r\n\r\n this.handleComponentChange('climate')}>Climate Resiliency Viewer\r\n\r\n this.handleComponentChange('links')}>Links\r\n \r\n }\r\n {classContext.state.isMobile == true &&\r\n \r\n \r\n \"wmms2Logo\"\r\n \r\n \r\n }\r\n \r\n \r\n\r\n
    \r\n \r\n {/* { return }} key={0} />*/ }\r\n \r\n { return }} key={0} />\r\n { return }} key={1} />\r\n { return }} key={2} />\r\n { return }} key={3} />\r\n { return }} key={4} />\r\n { return }} key={5} />\r\n { return }} key={8} />\r\n { return }} key={6} />\r\n { return }} key={7} />\r\n \r\n
    \r\n
    \r\n );\r\n };\r\n};","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\ntype Config = {\r\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\r\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\r\n};\r\n\r\nexport function register(config?: Config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(\r\n (process as { env: { [key: string]: string } }).env.PUBLIC_URL,\r\n window.location.href\r\n );\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl: string, config?: Config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport './index.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport 'semantic-ui-css/semantic.min.css';\r\nimport {BrowserRouter, Route} from 'react-router-dom'\r\n\r\nReactDOM.render(, document.getElementById('root'));\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister();"],"sourceRoot":""}