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kG,EAAAA,EAAM,CAACC,WAAY,IACnBrB,IAAa9E,EAAAA,EAAAA,KAACoG,EAAAA,IAAO,KACtBpG,EAAAA,EAAAA,KAACqG,EAAM,CAACnI,QAASkE,KACjBpC,EAAAA,EAAAA,KAACsG,EAAK,CAAClE,YAAaA,MAGhC,C","sources":["pages/Research/ProjectDetails/Banner.js","pages/Research/ProjectDetails/About.js","pages/Research/ProjectDetails/ProjectDetails.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport sampleImage from '../../../assets/images/sample-background.jpg';\nimport { useHistory } from 'react-router-dom';\n\nimport { ArrowLeft24 } from '@carbon/icons-react';\nimport ShareButtons from '../../../components/ShareButtons/ShareButtons';\n\nconst Banner = ({ project }) => {\n const history = useHistory();\n const [image, setImage] = useState(sampleImage);\n\n const checkIfImageExists = (url, callback) => {\n const img = new Image();\n img.src = url;\n img.alt = 'Project Image';\n\n if (img.complete) {\n callback(true);\n } else {\n img.onload = () => {\n callback(true);\n };\n\n img.onerror = () => {\n callback(false);\n };\n }\n };\n\n useEffect(() => {\n try {\n if (project) {\n if (!project.imageFile) {\n setImage(sampleImage);\n } else {\n checkIfImageExists(\n `${\n process.env.REACT_APP_BACKEND_BASENAME\n ? process.env.REACT_APP_BACKEND_BASENAME\n : ''\n }/ibm/images/projects/${project.imageFile}`,\n exists => {\n if (exists) {\n let newLink = `${\n process.env.REACT_APP_BACKEND_BASENAME\n ? process.env.REACT_APP_BACKEND_BASENAME\n : ''\n }/ibm/images/projects/${project.imageFile}`;\n\n setImage(newLink);\n } else {\n setImage(sampleImage);\n }\n }\n );\n }\n }\n } catch (err) {\n console.log(err);\n }\n }, [setImage, project]);\n\n return (\n <>\n {project ? (\n <div style={{ position: 'relative', zIndex: '1' }}>\n <div\n className=\"detailsBanner\"\n style={{\n backgroundImage: `linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(\n ${image}\n )`,\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n width: '100%',\n height: '100%',\n position: 'absolute',\n zIndex: '-1'\n }}\n ></div>\n <div className=\"detailsBannerContent\">\n <div className=\"projectBannerTopBar\">\n <div style={{ display: 'inline-block' }}>\n <div\n className=\"detailsBack\"\n onClick={() => history.push(`/research`)}\n >\n <ArrowLeft24 className=\"detailsBackArrow\" />{' '}\n Back to Research\n </div>\n </div>\n <div className=\"aboutShareProject\">\n <div style={{ paddingBottom: '12px' }}>\n Share this project\n </div>\n <ShareButtons light />\n </div>\n </div>\n\n <div className=\"detailsBannerTitleContainer\">\n <h1 className=\"detailsBannerTitle\">\n {project._id} - {project.projectName}\n </h1>\n </div>\n\n <div className=\"detailsBannerSubtitle\">\n {project.insts &&\n project.insts.map((inst, index) => {\n if (index !== project.insts.length - 1) {\n return (\n <span key={index}>\n {inst.name}, \n </span>\n );\n }\n return (\n <span key={index}>\n {inst.name} \n </span>\n );\n })}\n \n {`| ${project.projectYear} | `} \n {project.products &&\n project.products.map((product, index) => {\n return (\n <a\n className=\"detailsBannerProduct\"\n href={product.productUrl}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n key={index}\n >\n {product.name}\n </a>\n );\n })}\n </div>\n </div>\n </div>\n ) : (\n <div\n className=\"detailsBanner\"\n style={{\n backgroundImage: `linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .55)), url(\n ${image}\n )`,\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundPosition: 'center'\n }}\n >\n <div style={{ display: 'inline-block' }}>\n <div\n className=\"detailsBack\"\n onClick={() => history.push(`/research`)}\n >\n <ArrowLeft24 className=\"detailsBackArrow\" /> Back to\n Research\n </div>\n </div>\n <div className=\"detailsBannerTitleContainer\">\n <h1 className=\"detailsBannerTitle\">1000 - Project</h1>\n </div>\n </div>\n )}\n </>\n );\n};\n\nexport default Banner;\n","import React, { useEffect, useState } from 'react';\nimport { ArrowRight24 } from '@carbon/icons-react';\n\nconst About = ({ projectInfo }) => {\n const [dropdownYears, setDropdownYears] = useState();\n const [selectedYear, setSelectedYear] = useState();\n const [currentVideo, setCurrentVideo] = useState();\n\n useEffect(() => {\n let yearArray = [];\n if (projectInfo && projectInfo.youTubeIds) {\n yearArray = projectInfo.youTubeIds\n .map(video => video.year)\n .sort((a, b) => b - a);\n setDropdownYears(yearArray);\n setSelectedYear(yearArray[0]);\n }\n }, [projectInfo]);\n\n useEffect(() => {\n if (projectInfo && projectInfo.youTubeIds) {\n let currentVid = projectInfo.youTubeIds.filter(\n video => video.year === selectedYear\n )[0];\n if (currentVid && currentVid.youTubeId !== undefined) {\n setCurrentVideo(currentVid.youTubeId);\n }\n }\n }, [projectInfo, selectedYear]);\n\n return (\n <>\n <div className=\"detailLine\"></div>\n <div className=\"aboutContainer\">\n {projectInfo &&\n projectInfo.youTubeIds &&\n projectInfo &&\n projectInfo.youTubeIds &&\n dropdownYears &&\n dropdownYears.length > 0 && (\n <div className=\"bx--grid bx--grid--full-width detailSection\">\n <div className=\"bx--row\">\n <div className=\"bx--col-lg-5\">\n <h4 className=\"detailTitleText\">\n Video Overview\n </h4>\n </div>\n <div className=\"bx--col-lg-11 aboutSectionContent\">\n <>\n <div className=\"detailYearContainer\">\n {dropdownYears.map(\n (year, index) => (\n <div\n key={index}\n onClick={() =>\n setSelectedYear(\n year\n )\n }\n className={\n selectedYear ===\n year\n ? 'detailYearOption detailYearSelected'\n : 'detailYearOption'\n }\n >\n {year}\n </div>\n )\n )}\n </div>\n <div className=\"york_video_container\">\n <div className=\"york_video\">\n <iframe\n className=\"responsive\"\n width=\"315\"\n height=\"560\"\n src={`https://www.youtube.com/embed/${currentVideo}`}\n title=\"YouTube video player\"\n frameBorder=\"0\"\n alt=\"York Video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n allowFullScreen\n ></iframe>\n </div>\n </div>\n </>\n </div>\n </div>\n </div>\n )}\n\n {projectInfo &&\n projectInfo.publicProjectDescription !== '' &&\n projectInfo.publicProjectDescription !== undefined && (\n <div className=\"bx--grid bx--grid--full-width detailSection\">\n <div className=\"bx--row\">\n <div className=\"bx--col-lg-5\">\n <h4 className=\"detailTitleText\">\n Description\n </h4>\n </div>\n <div className=\"bx--col-lg-11 aboutSectionContent\">\n <p\n className=\"ql-editor\"\n dangerouslySetInnerHTML={{\n __html:\n projectInfo.publicProjectDescription\n }}\n ></p>\n </div>\n </div>\n </div>\n )}\n\n {projectInfo &&\n projectInfo.publicImpactStatement !== '' &&\n projectInfo.publicImpactStatement !== undefined && (\n <div className=\"bx--grid bx--grid--full-width detailSection\">\n <div className=\"bx--row\">\n <div className=\"bx--col-lg-5\">\n <h4 className=\"detailTitleText\">\n Public Impact Statement\n </h4>\n </div>\n <div className=\"bx--col-lg-11 aboutSectionContent\">\n <p\n className=\"ql-editor\"\n dangerouslySetInnerHTML={{\n __html:\n projectInfo.publicImpactStatement\n }}\n ></p>\n {projectInfo &&\n projectInfo.researchGroupLink && (\n <div className=\"aboutResearchTeamLink\">\n <a\n href={\n projectInfo.researchGroupLink\n }\n alt=\"research team\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <div>\n Learn more about the\n research team\n <ArrowRight24\n style={{\n marginLeft:\n '0.5em'\n }}\n />\n </div>\n </a>\n </div>\n )}\n </div>\n </div>\n </div>\n )}\n\n {projectInfo && projectInfo.keyTeamMembers && (\n <div className=\"bx--grid bx--grid--full-width detailSection\">\n <div className=\"bx--row\">\n <div className=\"bx--col-lg-5\">\n <h4 className=\"detailTitleText\">\n Research Team\n </h4>\n </div>\n <div className=\"bx--col-lg-11 aboutSectionContent\">\n <div className=\"aboutAuthors\">\n <ul className=\"memberList\">\n {projectInfo.keyTeamMembers\n .filter(\n member =>\n member.teamRoleLabel ===\n 'Principal Investigator'\n )\n .map(member => (\n <li>\n <span className=\"memberRole\">\n {'PI'}:\n </span>{' '}\n {member.prefix &&\n member.prefix}\n \n {member.name},{' '}\n <span className=\"memberInst\">\n {member.inst.name}\n </span>\n </li>\n ))}\n {projectInfo.keyTeamMembers\n .filter(\n member =>\n member.teamRoleLabel ===\n 'Co-Principal Investigator'\n )\n .map(member => (\n <li>\n <span className=\"memberRole\">\n {'Co-PI'}:\n </span>{' '}\n {member.prefix &&\n member.prefix}\n \n {member.name},{' '}\n <span className=\"memberInst\">\n {member.inst.name}\n </span>\n </li>\n ))}\n {projectInfo.keyTeamMembers\n .filter(\n member =>\n member.teamRoleLabel ===\n 'Project Manager/Administrator'\n )\n .map(member => (\n <li>\n <span className=\"memberRole\">\n {member.userRoleLabel}:\n </span>{' '}\n {member.prefix &&\n member.prefix}\n \n {member.name},{' '}\n <span className=\"memberInst\">\n {member.inst.name}\n </span>\n </li>\n ))}\n {projectInfo.keyTeamMembers\n .filter(\n member =>\n member.teamRoleLabel ===\n 'Post-Doctorate / Research Assistant / Research Associate'\n )\n .map(member => (\n <li>\n <span className=\"memberRole\">\n {member.userRoleLabel}:\n </span>{' '}\n {member.prefix &&\n member.prefix}\n \n {member.name},{' '}\n <span className=\"memberInst\">\n {member.inst.name}\n </span>\n </li>\n ))}\n {projectInfo.keyTeamMembers\n .filter(\n member =>\n member.teamRoleLabel ===\n 'Research Student'\n )\n .map(member => (\n <li>\n <span className=\"memberRole\">\n {'Student'}:\n </span>{' '}\n {member.prefix &&\n member.prefix}\n \n {member.name},{' '}\n <span className=\"memberInst\">\n {member.inst.name}\n </span>\n </li>\n ))}\n </ul>\n <ul className=\"memberList\">\n {projectInfo.keyTeamMembers\n .filter(\n member =>\n member.teamRoleLabel ===\n 'IBM Research Commercialization Lead'\n )\n .map(member => (\n <li>\n <span className=\"memberRole\">\n {\n 'IBM Project Lead (RCL)'\n }\n :\n </span>{' '}\n {member.prefix &&\n member.prefix}\n \n {member.name},{' '}\n <span className=\"memberInst\">\n {member.inst.name}\n </span>\n </li>\n ))}\n {projectInfo.keyTeamMembers\n .filter(\n member =>\n member.teamRoleLabel ===\n 'IBM Research Commercialization Manager'\n )\n .map(member => (\n <li>\n <span className=\"memberRole\">\n {'IBM Manager (RCM)'}:\n </span>{' '}\n {member.prefix &&\n member.prefix}\n \n {member.name},{' '}\n <span className=\"memberInst\">\n {member.inst.name}\n </span>\n </li>\n ))}\n {projectInfo.keyTeamMembers\n .filter(\n member =>\n member.teamRoleLabel ===\n 'IBM Research Commercialization Sponsor'\n )\n .map(member => (\n <li>\n <span className=\"memberRole\">\n {'IBM Sponsor (RCS)'}:\n </span>{' '}\n {member.prefix &&\n member.prefix}\n \n {member.name},{' '}\n <span className=\"memberInst\">\n {member.inst.name}\n </span>\n </li>\n ))}\n {projectInfo.keyTeamMembers\n .filter(\n member =>\n member.teamRoleLabel ===\n 'IBM Research Commercialization Contributor'\n )\n .map(member => (\n <li>\n <span className=\"memberRole\">\n {\n 'IBM Contributor (RCC)'\n }\n :\n </span>{' '}\n {member.prefix &&\n member.prefix}\n \n {member.name},{' '}\n <span className=\"memberInst\">\n {member.inst.name}\n </span>\n </li>\n ))}\n </ul>\n </div>\n </div>\n </div>\n </div>\n )}\n </div>\n </>\n );\n};\n\nexport default About;\n","import React, { useState, useEffect } from 'react';\r\nimport { useParams } from 'react-router-dom';\r\nimport { useHttpClient } from '../../../hooks/http-hook';\r\nimport Banner from './Banner';\r\nimport About from './About';\r\nimport { Loading } from '@carbon/react';\r\nimport Header from '../../../components/shared/Navigation/MainNavigation';\r\n\r\nconst ProjectDetails = () => {\r\n let { projectId } = useParams();\r\n const { isLoading, sendRequest } = useHttpClient();\r\n const [projectInfo, setProjectInfo] = useState();\r\n\r\n // Get data from backend\r\n useEffect(() => {\r\n const fetchProjects = async () => {\r\n let projectResponse;\r\n\r\n let projectUrl = `${process.env.REACT_APP_BACKEND_URL}/projects/${projectId}?includeTeam=true`;\r\n\r\n try {\r\n projectResponse = await sendRequest(projectUrl);\r\n } catch (err) {\r\n return;\r\n }\r\n\r\n if (!projectResponse) {\r\n return;\r\n }\r\n\r\n setProjectInfo(projectResponse);\r\n };\r\n\r\n try {\r\n fetchProjects();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }, [sendRequest, projectId]);\r\n\r\n return (\r\n <>\r\n <Header currentTab={3} />\r\n {isLoading && <Loading />}\r\n <Banner project={projectInfo} />\r\n <About projectInfo={projectInfo} />\r\n </>\r\n );\r\n};\r\n\r\nexport default ProjectDetails;\r\n"],"names":["_ref","project","history","useHistory","_useState","useState","sampleImage","_useState2","_slicedToArray","image","setImage","useEffect","imageFile","url","callback","img","Image","src","alt","complete","onload","onerror","checkIfImageExists","concat","process","REACT_APP_BACKEND_BASENAME","exists","newLink","err","console","log","_jsx","_Fragment","children","_jsxs","style","position","zIndex","className","backgroundImage","backgroundRepeat","backgroundSize","backgroundPosition","width","height","display","onClick","push","ArrowLeft24","paddingBottom","ShareButtons","light","_id","projectName","insts","map","inst","index","length","name","projectYear","products","product","href","productUrl","rel","target","projectInfo","dropdownYears","setDropdownYears","_useState3","_useState4","selectedYear","setSelectedYear","_useState5","_useState6","currentVideo","setCurrentVideo","yearArray","youTubeIds","video","year","sort","a","b","currentVid","filter","undefined","youTubeId","title","frameBorder","allow","allowFullScreen","publicProjectDescription","dangerouslySetInnerHTML","__html","publicImpactStatement","researchGroupLink","ArrowRight24","marginLeft","keyTeamMembers","member","teamRoleLabel","prefix","userRoleLabel","projectId","useParams","_useHttpClient","useHttpClient","isLoading","sendRequest","setProjectInfo","fetchProjects","_asyncToGenerator","_regeneratorRuntime","mark","_callee","projectResponse","projectUrl","wrap","_context","prev","next","sent","t0","abrupt","stop","apply","arguments","Header","currentTab","Loading","Banner","About"],"sourceRoot":""}