Commit 03fefdc6 authored by Mathias Engelbrecht Pilegård's avatar Mathias Engelbrecht Pilegård
Browse files

reimplemented issue assignment selection directory with pure css

parent 50cfc658
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\";\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n\n const DirectoryItems = () => {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"projectsDirectoryContainer\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"projectsDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"A\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"A\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 26\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", rootDirectoryObjects[0].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: personalProjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n className: \"directoryItem\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"project-diagram\",\n className: \"project-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"#\",\n children: [\"\\xA0 \", personalProjects[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 17\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"projectsDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"B\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"B\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 26\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", rootDirectoryObjects[1].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: sharedProjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n className: \"directoryItem\",\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"subSubDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: `B-${index}`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: `B-${index}`,\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 43\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", sharedProjects[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 19\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 19\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: sharedProjects[index].teams.map(team => /*#__PURE__*/_jsxDEV(\"li\", {\n className: \"directoryItem\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"users\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 23\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"#\",\n children: [\"\\xA0 \", team.name, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 23\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 23\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 21\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 17\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 45\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(DirectoryItems, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 80,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 79,\n columnNumber: 5\n }, this);\n};\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","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GE,QAAC,eAAD;AAAiB,oBAAA,IAAI,EAAC,eAAtB;AAAsC,oBAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,0BAHF;AAAA;AAAA;AAAA;AAAA;AAAA,wBADD;AAFH;AAAA;AAAA;AAAA;AAAA,sBAN4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAA9B;AAAA;AAAA;AAAA;AAAA,kBADD;AADH;AAAA;AAAA;AAAA;AAAA,gBANF;AAAA;AAAA;AAAA;AAAA;AAAA,cAnBF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF;AAqDD,GAtDD;;AAwDA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,2BACE,QAAC,cAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA9ED;;KAAMN,M;AAgFN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const DirectoryItems = () => {\r\n return (\r\n <div className=\"projectsDirectoryContainer\">\r\n\r\n <div className=\"projectsDirectory\">\r\n <input type=\"checkbox\" id=\"A\" />\r\n <label for=\"A\"><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {rootDirectoryObjects[0].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul>\r\n {personalProjects.map((elements, index) => (\r\n <li className=\"directoryItem\">\r\n <FontAwesomeIcon icon=\"project-diagram\" className=\"project-icon\"></FontAwesomeIcon>\r\n <a href=\"#\">&nbsp; {personalProjects[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n\r\n <div className=\"projectsDirectory\">\r\n <input type=\"checkbox\" id=\"B\" />\r\n <label for=\"B\"><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {rootDirectoryObjects[1].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul>\r\n {sharedProjects.map((elements, index) => (\r\n <li className=\"directoryItem\"><div className=\"subSubDirectory\">\r\n <input type=\"checkbox\" id={`B-${index}`} />\r\n <label for={`B-${index}`}><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {sharedProjects[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul>\r\n\r\n {sharedProjects[index].teams.map(team => (\r\n <li className=\"directoryItem\">\r\n <FontAwesomeIcon icon=\"users\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a href=\"#\">&nbsp; {team.name} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </li>\r\n ))}\r\n\r\n </ul>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <DirectoryItems />\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState, useRef, createRef, useEffect } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n // Directory data\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }]; // Directory references\n\n const rootDirectoryRefs = useRef([]);\n rootDirectoryRefs.current = rootDirectoryObjects.map((ref, index) => rootDirectoryRefs.current[index] = /*#__PURE__*/createRef()); // Directory states\n\n const initialState = rootDirectoryRefs.map(index => rootDirectoryRefs.current[index] = false);\n const [isActive, setIsActive] = useState(initialState);\n\n const onClick = index => {\n console.log(rootDirectoryRefs.current[index]);\n };\n\n const RootDirectoryItems = directoryObjects => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: directoryObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n ref: rootDirectoryRefs.current[index],\n className: isActive ? 'active' : 'inactive',\n onClick: () => onClick(index),\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directoryObjects[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 15\n }, this)]\n }, [index], true, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n ref: rootDirectoryRefs,\n className: isActive ? 'active' : 'inactive',\n onClick: onClick,\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 15\n }, this)]\n }, [index], true, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 72,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"XZsfm/l8T09rLF4bqK/X99cGpU4=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","useRef","createRef","useEffect","FontAwesomeIcon","Assign","rootDirectoryObjects","id","personalProjects","type","sharedProjects","teams","name","rootDirectoryRefs","current","map","ref","index","initialState","isActive","setIsActive","onClick","console","log","RootDirectoryItems","directoryObjects","elements","SubDirectoryItems","directory"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,MAA1B,EAAkCC,SAAlC,EAA6CC,SAA7C,QAA8D,OAA9D;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB;AACA,QAAMC,oBAAoB,GAAG,CAC3B;AAAEC,IAAAA,EAAE,EAAE;AAAN,GAD2B,EAE3B;AAAEA,IAAAA,EAAE,EAAE;AAAN,GAF2B,CAA7B;AAKA,QAAMC,gBAAgB,GAAG,CACvB;AAAED,IAAAA,EAAE,EAAE,OAAN;AAAeE,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAEF,IAAAA,EAAE,EAAE,YAAN;AAAoBE,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEH,IAAAA,EAAE,EAAE,UAAN;AAAkBE,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD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A;AAAA;AAAA;AAAA,UADF;AAKD,CAvED;;GAAMD,M;;KAAAA,M;AAyEN,eAAeA,MAAf","sourcesContent":["import React, { useState, useRef, createRef, useEffect } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n // Directory data\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n // Directory references\r\n const rootDirectoryRefs = useRef([])\r\n rootDirectoryRefs.current = rootDirectoryObjects.map(\r\n (ref, index) => rootDirectoryRefs.current[index] = createRef()\r\n )\r\n\r\n // Directory states\r\n const initialState = rootDirectoryRefs.map(\r\n (index) => rootDirectoryRefs.current[index] = false\r\n )\r\n const [isActive, setIsActive] = useState(initialState);\r\n const onClick = (index) => {\r\n console.log(rootDirectoryRefs.current[index])\r\n\r\n }\r\n\r\n const RootDirectoryItems = (directoryObjects) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {directoryObjects.map((elements, index) => (\r\n <li>\r\n <div ref={rootDirectoryRefs.current[index]} key={[index]} className={isActive ? 'active' : 'inactive'} onClick={() => onClick(index)} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directoryObjects[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))\r\n }\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div ref={rootDirectoryRefs} key={[index]} className={isActive ? 'active' : 'inactive'} onClick={onClick} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\";\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nimport { Fragment as _Fragment } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n\n const DirectoryItems = () => {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"projectsDirectoryContainer\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"projectsDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"A\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"A\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 26\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", rootDirectoryObjects[0].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"personalProjects\",\n children: personalProjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n className: \"directoryItem\",\n children: /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"#\",\n children: [\" \", personalProjects[index].id, \" \"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 45\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"projectsDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"B\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"B\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 26\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", rootDirectoryObjects[1].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: sharedProjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n className: \"directoryItem\",\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"subSubDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: `B-${index}`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: `B-${index}`,\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 43\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", sharedProjects[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 48,\n columnNumber: 19\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 19\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: /*#__PURE__*/_jsxDEV(_Fragment, {\n children: sharedProjects[index].teams.map(team => /*#__PURE__*/_jsxDEV(\"li\", {\n className: \"directoryItem\",\n children: /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"#\",\n children: team.name\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 53\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 23\n }, this))\n }, void 0, false)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 17\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 45\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(DirectoryItems, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 5\n }, this);\n};\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","rootDirectoryObjects","DirectoryItems","map","elements","index","team"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AAC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esContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const DirectoryItems = () => {\r\n return (\r\n <div className=\"projectsDirectoryContainer\">\r\n <div className=\"projectsDirectory\">\r\n <input type=\"checkbox\" id=\"A\" />\r\n <label for=\"A\"><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {rootDirectoryObjects[0].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul className=\"personalProjects\">\r\n {personalProjects.map((elements, index) => (\r\n <li className=\"directoryItem\"><a href=\"#\"> {personalProjects[index].id} </a></li>\r\n ))}\r\n </ul>\r\n </div>\r\n <div className=\"projectsDirectory\">\r\n <input type=\"checkbox\" id=\"B\" />\r\n <label for=\"B\"><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {rootDirectoryObjects[1].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul>\r\n {sharedProjects.map((elements, index) => (\r\n <li className=\"directoryItem\"><div className=\"subSubDirectory\">\r\n <input type=\"checkbox\" id={`B-${index}`} />\r\n <label for={`B-${index}`}><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {sharedProjects[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul>\r\n <>\r\n {sharedProjects[index].teams.map(team => (\r\n <li className=\"directoryItem\"><a href=\"#\">{team.name}</a></li>\r\n ))}\r\n </>\r\n </ul>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <DirectoryItems />\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState, useRef, createRef, useEffect } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const directoryRefs = useRef([]);\n directoryRefs.current = [rootDirectoryObjects.length].map((ref, index) => directoryRefs.current[index] = /*#__PURE__*/createRef());\n const [isActive, setIsActive] = useState(false);\n\n const onClick = () => setIsActive(!isActive);\n\n useEffect(() => {\n const pageClickEvent = (e, index) => {\n if (directoryRefs.current[index] !== null && !directoryRefs.current[index].contains(e.target)) {\n setIsActive(!isActive);\n }\n };\n\n console.log(directoryRefs); // If the item is active (ie open) then listen for clicks\n\n if (isActive) {\n window.addEventListener('click', pageClickEvent);\n }\n\n return () => {\n window.removeEventListener('click', pageClickEvent);\n };\n }, [isActive]);\n\n const RootDirectoryItems = directoryObjects => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: directoryObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n ref: directoryRefs.current[index],\n className: isActive ? 'active' : 'inactive',\n onClick: onClick,\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directoryObjects[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 15\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n ref: directoryRefs,\n className: isActive ? 'active' : 'inactive',\n onClick: onClick,\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 72,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 73,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 74,\n columnNumber: 15\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 71,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 83,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"fE3Gsvy23dxOvR2TVECxNZgDjvg=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","useRef","createRef","useEffect","FontAwesomeIcon","Assign","rootDirectoryObjects","id","personalProjects","type","sharedProjects","teams","name","directoryRefs","current","length","map","ref","index","isActive","setIsActive","onClick","pageClickEvent","e","contains","target","console","log","window","addEventListener","removeEventListener","RootDirectoryItems","directoryObjects","elements","SubDirectoryItems","directory"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,MAA1B,EAAkCC,SAAlC,EAA6CC,SAA7C,QAA8D,OAA9D;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,g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A;AAAA,YADF;AAaD,GAdD;;AAgBA,QAAM2B,iBAAiB,GAAIC,SAAD,IAAe;AACvC,wBACE;AAAI,MAAA,SAAS,EAAC,sBAAd;AAAA,gBACGA,SAAS,CAACnB,GAAV,CAAc,CAACiB,QAAD,EAAWf,KAAX,kBACb;AAAA,+BACE;AAAK,UAAA,GAAG,EAAEL,aAAV;AAAyB,UAAA,SAAS,EAAEM,QAAQ,GAAG,QAAH,GAAc,UAA1D;AAAsE,UAAA,OAAO,EAAEE,OAA/E;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWc,SAAS,CAACjB,KAAD,CAAT,CAAiBX,EAA5B;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGwB,kBAAkB,CAACzB,oBAAD;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAlFD;;GAAMD,M;;KAAAA,M;AAoFN,eAAeA,MAAf","sourcesContent":["import React, { useState, useRef, createRef, useEffect } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const directoryRefs = useRef([])\r\n\r\n directoryRefs.current = [rootDirectoryObjects.length].map(\r\n (ref, index) => directoryRefs.current[index] = createRef()\r\n )\r\n\r\n const [isActive, setIsActive] = useState(false);\r\n const onClick = () => setIsActive(!isActive);\r\n\r\n useEffect(() => {\r\n const pageClickEvent = (e, index) => {\r\n if (directoryRefs.current[index] !== null && !directoryRefs.current[index].contains(e.target)) {\r\n setIsActive(!isActive)\r\n }\r\n };\r\n\r\n console.log(directoryRefs)\r\n\r\n // If the item is active (ie open) then listen for clicks\r\n if (isActive) {\r\n window.addEventListener('click', pageClickEvent)\r\n }\r\n\r\n return () => {\r\n window.removeEventListener('click', pageClickEvent)\r\n }\r\n\r\n }, [isActive]);\r\n\r\n const RootDirectoryItems = (directoryObjects) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {directoryObjects.map((elements, index) => (\r\n <li>\r\n <div ref={directoryRefs.current[index]} className={isActive ? 'active' : 'inactive'} onClick={onClick} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directoryObjects[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div ref={directoryRefs} className={isActive ? 'active' : 'inactive'} onClick={onClick} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [appState, changeState] = useState({\n activeObjects: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n const newArray = [];\n newArray.concat(directory[index]);\n\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = parentDirectories => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 76,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"G9VHBYFRMM2vunD5OUCIV/YwKNw=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","appState","changeState","activeObjects","rootDirectoryObjects","toggleActive","directory","index","newArray","concat","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,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Z;AAAgC,WAAnH;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWD,SAAS,CAACC,KAAD,CAAT,CAAiBX,EAA5B;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAUW,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGI,kBAAkB,CAACV,QAAQ,CAACG,oBAAV;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA3ED;;GAAMV,M;;KAAAA,M;AA6EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n const newArray = []\r\n newArray.concat(directory[index])\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [rootDirectory, changeRootDirectoryState] = useState({\n activeRootDirectoryObject: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n const [subDirectory, changeSubDirectoryState] = useState({\n activeSubDirectoryObject: [],\n subDirectoryObjects: [personalProjects, sharedProjects]\n });\n\n const toggleActive = (directory, index) => {\n console.log(directory[index]);\n\n if (directory[index] === rootDirectory.rootDirectoryObjects[index]) {\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: null\n });\n } else {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: directory[index]\n });\n console.log(\"rootDirectory set to active\" + \" \" + rootDirectory.activeRootDirectoryObject.id);\n }\n } else {\n console.log(subDirectory.subDirectoryObjects[index].id);\n\n if (directory[index] === subDirectory.activeSubDirectoryObject[index]) {\n changeSubDirectoryState({ ...subDirectory,\n activeSubDirectoryObject: null\n });\n } else {\n changeSubDirectoryState({ ...subDirectory,\n activeSubDirectoryObject: directory[index]\n });\n console.log(\"subDirectory set to active\" + \" \" + subDirectory.activeSubDirectoryObject.id);\n }\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = parentDirectories => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 13\n }, this), parentDirectories[index] === rootDirectory.activeRootDirectoryObject ? SubDirectoryItems(subDirectory.subDirectoryObjects[index]) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 80,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 81,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 82,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 79,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 78,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 76,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectory.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 91,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"iGoe9GTgUyRwalL5Oja9aYXeNzs=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","rootDirectory","changeRootDirectoryState","activeRootDirectoryObject","rootDirectoryObjects","subDirectory","changeSubDirectoryState","activeSubDirectoryObject","subDirectoryObjects","toggleActive","directory","index","console","log","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAA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AA,gCAAWD,SAAS,CAACC,KAAD,CAAT,CAAiBf,EAA5B;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAUe,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGI,kBAAkB,CAACd,aAAa,CAACG,oBAAf;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA1FD;;GAAMV,M;;KAAAA,M;AA4FN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [rootDirectory, changeRootDirectoryState] = useState({\r\n activeRootDirectoryObject: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const [subDirectory, changeSubDirectoryState] = useState({\r\n activeSubDirectoryObject: [],\r\n subDirectoryObjects: [personalProjects, sharedProjects]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n console.log(directory[index])\r\n if (directory[index] === rootDirectory.rootDirectoryObjects[index]) {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: null })\r\n }\r\n else {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: (directory[index]) })\r\n console.log(\"rootDirectory set to active\" + \" \" + rootDirectory.activeRootDirectoryObject.id)\r\n }\r\n }\r\n else {\r\n console.log(subDirectory.subDirectoryObjects[index].id)\r\n if (directory[index] === subDirectory.activeSubDirectoryObject[index]) {\r\n changeSubDirectoryState({ ...subDirectory, activeSubDirectoryObject: null })\r\n }\r\n else {\r\n changeSubDirectoryState({ ...subDirectory, activeSubDirectoryObject: (directory[index]) })\r\n console.log(\"subDirectory set to active\" + \" \" + subDirectory.activeSubDirectoryObject.id)\r\n }\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {parentDirectories[index] === rootDirectory.activeRootDirectoryObject ?\r\n SubDirectoryItems(subDirectory.subDirectoryObjects[index]) :\r\n null}\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(rootDirectory.rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState, useRef, createRef, useEffect } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n // Directory data\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }]; // Directory references\n\n const rootDirectoryRefs = useRef([]);\n rootDirectoryRefs.current = rootDirectoryObjects.map((ref, index) => rootDirectoryRefs.current[index] = /*#__PURE__*/createRef()); // Directory states\n\n const [isActive, setIsActive] = useState(false);\n\n const onClick = index => {\n console.log(rootDirectoryRefs.current[index]);\n };\n\n const RootDirectoryItems = directoryObjects => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: directoryObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n ref: rootDirectoryRefs.current[index],\n className: isActive ? 'active' : 'inactive',\n onClick: onClick(index),\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directoryObjects[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 15\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n ref: rootDirectoryRefs,\n className: isActive ? 'active' : 'inactive',\n onClick: onClick,\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 15\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"MJDv9q+kWhlGbDVTmxVjrQjz+R8=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","useRef","createRef","useEffect","FontAwesomeIcon","Assign","rootDirectoryObjects","id","personalProjects","type","sharedProjects","teams","name","rootDirectoryRefs","current","map","ref","index","isActive","setIsActive","onClick","console","log","RootDirectoryItems","directoryObjects","elements","SubDirectoryItems","directory"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,MAA1B,EAAkCC,SAAlC,EAA6CC,SAA7C,QAA8D,OAA9D;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB;AACA,QAAMC,oBAAoB,GAAG,CAC3B;AAAEC,IAAAA,EAAE,EAAE;AAAN,GAD2B,EAE3B;AAAEA,IAAAA,EAAE,EAAE;AAAN,GAF2B,CAA7B;AAKA,QAAMC,gBAAgB,GAAG,CACvB;AAAED,IAAAA,EAAE,EAAE,OAAN;AAAeE,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAEF,IAAAA,EAAE,EAAE,YAAN;AAAoBE,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,Q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F;AAKD,CAlED;;GAAMD,M;;KAAAA,M;AAoEN,eAAeA,MAAf","sourcesContent":["import React, { useState, useRef, createRef, useEffect } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n // Directory data\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n // Directory references\r\n const rootDirectoryRefs = useRef([])\r\n rootDirectoryRefs.current = rootDirectoryObjects.map(\r\n (ref, index) => rootDirectoryRefs.current[index] = createRef()\r\n )\r\n\r\n // Directory states\r\n const [isActive, setIsActive] = useState(false);\r\n const onClick = (index) => {\r\n console.log(rootDirectoryRefs.current[index])\r\n }\r\n\r\n const RootDirectoryItems = (directoryObjects) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {directoryObjects.map((elements, index) => (\r\n <li>\r\n <div ref={rootDirectoryRefs.current[index]} className={isActive ? 'active' : 'inactive'} onClick={onClick(index)} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directoryObjects[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div ref={rootDirectoryRefs} className={isActive ? 'active' : 'inactive'} onClick={onClick} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [appState, changeState] = useState({\n activeRootDirectoryObject: [],\n activeSubDirectoryObject: [],\n activeProjectObject: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.rootDirectoryObjects[index]) {\n if (directory[index] === appState.activeRootDirectoryObject) {\n changeState({ ...appState,\n activeRootDirectoryObject: null\n });\n } else {\n changeState({ ...appState,\n activeRootDirectoryObject: directory[index]\n });\n }\n } else if (directory[index] === personalProjects[index]) {\n console.log(\"hej\");\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeRootDirectoryObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = parentDirectories => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 48,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeRootDirectoryObject ? parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 71,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 72,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 81,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"DOjFs1VZyqyP9LfCSVECR/RhZsQ=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","appState","changeState","activeRootDirectoryObject","activeSubDirectoryObject","activeProjectObject","rootDirectoryObjects","toggleActive","directory","index","console","log","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,g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con } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [appState, changeState] = useState({\r\n activeRootDirectoryObject: [],\r\n activeSubDirectoryObject: [],\r\n activeProjectObject: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.rootDirectoryObjects[index]) {\r\n if (directory[index] === appState.activeRootDirectoryObject) {\r\n changeState({ ...appState, activeRootDirectoryObject: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeRootDirectoryObject: (directory[index]) })\r\n }\r\n } else if (directory[index] === personalProjects[index]) {\r\n console.log(\"hej\")\r\n }\r\n\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeRootDirectoryObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeRootDirectoryObject ?\r\n parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [appState, changeState] = useState({\n activeObjects: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n const newArray = [];\n\n if (directory[index] === appState.activeObjects[index]) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n newArray.push(directory[index]);\n changeState({ ...appState,\n activeObjects: newArray\n });\n console.log(appState.activeObjects);\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = parentDirectories => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"G9VHBYFRMM2vunD5OUCIV/YwKNw=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","appState","changeState","activeObjects","rootDirectoryObjects","toggleActive","directory","index","newArray","push","console","log","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC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F,GAEE,IATN;AAAA;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAkBD,GAnBD;;AAqBA,QAAMmB,iBAAiB,GAAIX,SAAD,IAAe;AACvC,wBACE;AAAI,MAAA,SAAS,EAAC,sBAAd;AAAA,gBACGA,SAAS,CAACS,GAAV,CAAc,CAACC,QAAD,EAAWT,KAAX,kBACb;AAAA,+BACE;AAAiB,UAAA,SAAS,EAAEK,kBAAkB,CAACN,SAAD,EAAYC,KAAZ,CAA9C;AAAkE,UAAA,OAAO,EAAE,MAAM;AAAEF,YAAAA,YAAY,CAACC,SAAD,EAAYC,KAAZ,CAAZ;AAAgC,WAAnH;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWD,SAAS,CAACC,KAAD,CAAT,CAAiBX,EAA5B;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAUW,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGM,kBAAkB,CAACZ,QAAQ,CAACG,oBAAV;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA5ED;;GAAMV,M;;KAAAA,M;AA8EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n const newArray = []\r\n if (directory[index] === appState.activeObjects[index]) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n newArray.push(directory[index])\r\n changeState({ ...appState, activeObjects: newArray })\r\n console.log(appState.activeObjects)\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [rootDirectoryState, changeRootDirectoryState] = useState({\n activeRootDirectoryObject: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === rootDirectoryState.activeRootDirectoryObject[index]) {\n changeRootDirectoryState({ ...rootDirectoryState,\n activeRootDirectoryObject: null\n });\n } else {\n changeRootDirectoryState({ ...rootDirectoryState,\n activeRootDirectoryObject: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === rootDirectoryState.activeRootDirectoryObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = parentDirectories => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 13\n }, this), parentDirectories[index] === rootDirectoryState.activeRootDirectoryObject ? parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectoryState.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 75,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"9i5h1PzN0cFgCmgEUn0ANzja/sU=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","rootDirectoryState","changeRootDirectoryState","activeRootDirectoryObject","rootDirectoryObjects","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE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AAA,+BACE;AAAiB,UAAA,SAAS,EAAEC,kBAAkB,CAACF,SAAD,EAAYC,KAAZ,CAA9C;AAAkE,UAAA,OAAO,EAAE,MAAM;AAAEF,YAAAA,YAAY,CAACC,SAAD,EAAYC,KAAZ,CAAZ;AAAgC,WAAnH;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWD,SAAS,CAACC,KAAD,CAAT,CAAiBX,EAA5B;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAUW,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGE,kBAAkB,CAACR,kBAAkB,CAACG,oBAApB;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA1ED;;GAAMV,M;;KAAAA,M;AA4EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [rootDirectoryState, changeRootDirectoryState] = useState({\r\n activeRootDirectoryObject: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === rootDirectoryState.activeRootDirectoryObject[index]) {\r\n changeRootDirectoryState({ ...rootDirectoryState, activeRootDirectoryObject: null })\r\n }\r\n else {\r\n changeRootDirectoryState({ ...rootDirectoryState, activeRootDirectoryObject: (directory[index]) })\r\n\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === rootDirectoryState.activeRootDirectoryObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === rootDirectoryState.activeRootDirectoryObject ?\r\n parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(rootDirectoryState.rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [appState, changeState] = useState({\n activeRootDirectoryObject: [],\n activeSubDirectoryObject: [],\n activeProjectObject: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n console.log(directory[index]);\n\n if (directory[index] === appState.rootDirectoryObjects[index]) {\n if (directory[index] === appState.activeRootDirectoryObject) {\n changeState({ ...appState,\n activeRootDirectoryObject: null\n });\n } else {\n changeState({ ...appState,\n activeRootDirectoryObject: directory[index]\n });\n }\n }\n\n if (directory[index] === personalProjects[index]) {\n console.log(\"hej\");\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeRootDirectoryObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = directoryObjects => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: directoryObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directoryObjects, index),\n onClick: () => {\n toggleActive(directoryObjects, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directoryObjects[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 15\n }, this), console.log(directoryObjects[index]), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 13\n }, this), directoryObjects[index] === appState.activeRootDirectoryObject ? directoryObjects[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 48,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 72,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 73,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 74,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 71,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 83,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"DOjFs1VZyqyP9LfCSVECR/RhZsQ=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","appState","changeState","activeRootDirectoryObject","activeSubDirectoryObject","activeProjectObject","rootDirectoryObjects","toggleActive","directory","index","console","log","toggleActiveStyles","RootDirectoryItems","directoryObjects","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFu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,CAACtB,gBAAD,CAAjD,GAAsEsB,iBAAiB,CAACnB,cAAD,CADzF,GAEE,IAVN;AAAA;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAmBD,GApBD;;AAsBA,QAAMmB,iBAAiB,GAAIT,SAAD,IAAe;AACvC,wBACE;AAAI,MAAA,SAAS,EAAC,sBAAd;AAAA,gBACGA,SAAS,CAACO,GAAV,CAAc,CAACC,QAAD,EAAWP,KAAX,kBACb;AAAA,+BACE;AAAiB,UAAA,SAAS,EAAEG,kBAAkB,CAACJ,SAAD,EAAYC,KAAZ,CAA9C;AAAkE,UAAA,OAAO,EAAE,MAAM;AAAEF,YAAAA,YAAY,CAACC,SAAD,EAAYC,KAAZ,CAAZ;AAAgC,WAAnH;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWD,SAAS,CAACC,KAAD,CAAT,CAAiBb,EAA5B;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAUa,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGI,kBAAkB,CAACZ,QAAQ,CAACK,oBAAV;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAlFD;;GAAMZ,M;;KAAAA,M;AAoFN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [appState, changeState] = useState({\r\n activeRootDirectoryObject: [],\r\n activeSubDirectoryObject: [],\r\n activeProjectObject: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n console.log(directory[index])\r\n if (directory[index] === appState.rootDirectoryObjects[index]) {\r\n if (directory[index] === appState.activeRootDirectoryObject) {\r\n changeState({ ...appState, activeRootDirectoryObject: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeRootDirectoryObject: (directory[index]) })\r\n }\r\n } if (directory[index] === personalProjects[index]) {\r\n console.log(\"hej\")\r\n }\r\n\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeRootDirectoryObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (directoryObjects) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {directoryObjects.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directoryObjects, index)} onClick={() => { toggleActive(directoryObjects, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directoryObjects[index].id} &nbsp;</a>\r\n {console.log(directoryObjects[index])}\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n directoryObjects[index] === appState.activeRootDirectoryObject ?\r\n directoryObjects[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState, useRef, createRef, useEffect } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n // Directory data\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }]; // Directory references\n\n const rootDirectoryRefs = useRef([]);\n rootDirectoryRefs.current = rootDirectoryObjects.map((ref, index) => rootDirectoryRefs.current[index] = /*#__PURE__*/createRef()); // Directory states\n\n const [isActive, setIsActive] = useState(false);\n\n const onClick = index => {\n console.log(rootDirectoryRefs.current[index]);\n setIsActive(rootDirectoryRefs.current[index] === !isActive);\n };\n\n const RootDirectoryItems = directoryObjects => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: directoryObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n ref: rootDirectoryRefs.current[index],\n className: isActive ? 'active' : 'inactive',\n onClick: () => onClick(index),\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directoryObjects[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 15\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n ref: rootDirectoryRefs,\n className: isActive ? 'active' : 'inactive',\n onClick: onClick,\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 15\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"MJDv9q+kWhlGbDVTmxVjrQjz+R8=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","useRef","createRef","useEffect","FontAwesomeIcon","Assign","rootDirectoryObjects","id","personalProjects","type","sharedProjects","teams","name","rootDirectoryRefs","current","map","ref","index","isActive","setIsActive","onClick","console","log","RootDirectoryItems","directoryObjects","elements","SubDirectoryItems","directory"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,MAA1B,EAAkCC,SAAlC,EAA6CC,SAA7C,QAA8D,OAA9D;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB;AACA,QA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AAS,CAACV,KAAD,CAAT,CAAiBV,EAA5B;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGgB,kBAAkB,CAACjB,oBAAD;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CApED;;GAAMD,M;;KAAAA,M;AAsEN,eAAeA,MAAf","sourcesContent":["import React, { useState, useRef, createRef, useEffect } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n // Directory data\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n // Directory references\r\n const rootDirectoryRefs = useRef([])\r\n rootDirectoryRefs.current = rootDirectoryObjects.map(\r\n (ref, index) => rootDirectoryRefs.current[index] = createRef()\r\n )\r\n\r\n // Directory states\r\n const [isActive, setIsActive] = useState(false);\r\n const onClick = (index) => {\r\n console.log(rootDirectoryRefs.current[index])\r\n setIsActive(rootDirectoryRefs.current[index] === !isActive)\r\n }\r\n\r\n const RootDirectoryItems = (directoryObjects) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {directoryObjects.map((elements, index) => (\r\n <li>\r\n <div ref={rootDirectoryRefs.current[index]} className={isActive ? 'active' : 'inactive'} onClick={() => onClick(index)} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directoryObjects[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))\r\n }\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div ref={rootDirectoryRefs} className={isActive ? 'active' : 'inactive'} onClick={onClick} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [appState, changeState] = useState({\n activeObjects: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n const newArray = [];\n\n if (directory[index] === appState.activeObjects[index]) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n newArray.push(directory[index]);\n changeState({ ...appState,\n activeObjects: newArray\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = parentDirectories => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"G9VHBYFRMM2vunD5OUCIV/YwKNw=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","appState","changeState","activeObjects","rootDirectoryObjects","toggleActive","directory","index","newArray","push","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAKA,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BV,QAAQ,CAAC;AACvCW,IAAAA,aAAa,EAAE,EADwB;AAEvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAER,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B;AAFiB,GAAD,CAAxC;;AAKA,QAAMS,YAAY,GAAG,CAACC,SAAD,EAAYC,KAAZ,KAAsB;AACzC,UAAMC,QAAQ,GAAG,EAAjB;;AACA,QAAIF,SAAS,CAACC,KAAD,CAAT,KAAqBN,QAAQ,CAACE,aAAT,CAAuB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AA8EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n const newArray = []\r\n if (directory[index] === appState.activeObjects[index]) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n newArray.push(directory[index])\r\n changeState({ ...appState, activeObjects: newArray })\r\n\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [appState, changeState] = useState({\n activeObjects: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n const newArray = [];\n\n if (directory[index] === newArray[index]) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n newArray.push(directory[index]);\n changeState({ ...appState,\n activeObjects: newArray\n });\n console.log(appState.activeObjects[index]);\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = parentDirectories => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"G9VHBYFRMM2vunD5OUCIV/YwKNw=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","appState","changeState","activeObjects","rootDirectoryObjects","toggleActive","directory","index","newArray","push","console","log","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC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AA;AAAA;AAAA;AAAA,YADF;AAkBD,GAnBD;;AAqBA,QAAMmB,iBAAiB,GAAIX,SAAD,IAAe;AACvC,wBACE;AAAI,MAAA,SAAS,EAAC,sBAAd;AAAA,gBACGA,SAAS,CAACS,GAAV,CAAc,CAACC,QAAD,EAAWT,KAAX,kBACb;AAAA,+BACE;AAAiB,UAAA,SAAS,EAAEK,kBAAkB,CAACN,SAAD,EAAYC,KAAZ,CAA9C;AAAkE,UAAA,OAAO,EAAE,MAAM;AAAEF,YAAAA,YAAY,CAACC,SAAD,EAAYC,KAAZ,CAAZ;AAAgC,WAAnH;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWD,SAAS,CAACC,KAAD,CAAT,CAAiBX,EAA5B;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAUW,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGM,kBAAkB,CAACZ,QAAQ,CAACG,oBAAV;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA5ED;;GAAMV,M;;KAAAA,M;AA8EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n const newArray = []\r\n if (directory[index] === newArray[index]) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n newArray.push(directory[index])\r\n changeState({ ...appState, activeObjects: newArray })\r\n console.log(appState.activeObjects[index])\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [rootDirectory, changeRootDirectoryState] = useState({\n activeRootDirectoryObject: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory === rootDirectory.rootDirectoryObjects) {\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: null\n });\n } else {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: directory[index]\n });\n }\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = parentDirectories => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 48,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 13\n }, this), parentDirectories[index] === rootDirectory.activeRootDirectoryObject ? parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectory.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 78,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"bwYPm+P+PaM+kOinhNzF4qe0M0s=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","rootDirectory","changeRootDirectoryState","activeRootDirectoryObject","rootDirectoryObjects","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAA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kBACb;AAAA,+BACE;AAAiB,UAAA,SAAS,EAAEC,kBAAkB,CAACF,SAAD,EAAYC,KAAZ,CAA9C;AAAkE,UAAA,OAAO,EAAE,MAAM;AAAEF,YAAAA,YAAY,CAACC,SAAD,EAAYC,KAAZ,CAAZ;AAAgC,WAAnH;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWD,SAAS,CAACC,KAAD,CAAT,CAAiBX,EAA5B;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAUW,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGE,kBAAkB,CAACR,aAAa,CAACG,oBAAf;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA7ED;;GAAMV,M;;KAAAA,M;AA+EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [rootDirectory, changeRootDirectoryState] = useState({\r\n activeRootDirectoryObject: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory === rootDirectory.rootDirectoryObjects) {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: null })\r\n }\r\n else {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: (directory[index]) })\r\n\r\n }\r\n }\r\n\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === rootDirectory.activeRootDirectoryObject ?\r\n parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(rootDirectory.rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\";\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n\n const DirectoryItems = () => {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"subDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"A\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"A\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 26\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", rootDirectoryObjects[0].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: personalProjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"#\",\n children: [\" \", personalProjects[index].id, \" \"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 19\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"subDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"B\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"B\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 26\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", rootDirectoryObjects[1].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: sharedProjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"subSubDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"B-A\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"B-A\",\n children: sharedProjects[index].id\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"#\",\n children: sharedProjects[index].teams\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 23\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 19\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 17\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 19\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(DirectoryItems, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 5\n }, this);\n};\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","rootDirectoryObjects","DirectoryItems","map","elements","index"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAMA,QAAMC,oBAAoB,GAAG,CAC3B;AAAEL,IAAAA,EAAE,EAAE;AAAN,GAD2B,EAE3B;AAAEA,IAAAA,EAAE,EAAE;AAAN,GAF2B,CAA7B;;AAKA,QAAMM,cAAc,GAAG,MAAM;AAC3B,wBACE;AAAK,MAAA,SAAS,EAAC,eAAf;AAAA,8BACE;AAAK,QAAA,SAAS,EAA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BADF,eAEE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,gBAFF,eAME;AAAA,oBACGE,cAAc,CAACK,GAAf,CAAmB,CAACC,QAAD,EAAWC,KAAX,kBAClB;AAAA,mCAAI;AAAK,cAAA,SAAS,EAAC,iBAAf;AAAA,sCACF;AAAO,gBAAA,IAAI,EAAC,UAAZ;AAAuB,gBAAA,EAAE,EAAC;AAA1B;AAAA;AAAA;AAAA;AAAA,sBADE,eAEF;AAAO,gBAAA,GAAG,EAAC,KAAX;AAAA,0BAAkBP,cAAc,CAACO,KAAD,CAAd,CAAsBT;AAAxC;AAAA;AAAA;AAAA;AAAA,sBAFE,eAIF;AAAA,uCACE;AAAA,yCAAI;AAAG,oBAAA,IAAI,EAAC,GAAR;AAAA,8BAAaE,cAAc,CAACO,KAAD,CAAd,CAAsBN;AAAnC;AAAA;AAAA;AAAA;AAAA;AAAJ;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,sBAJE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAJ;AAAA;AAAA;AAAA;AAAA,kBADD;AADH;AAAA;AAAA;AAAA;AAAA,gBANF;AAAA;AAAA;AAAA;AAAA;AAAA,cAbF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF;AAoCD,GArCD;;AAuCA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,2BACE,QAAC,cAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA7DD;;KAAML,M;AA+DN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const DirectoryItems = () => {\r\n return (\r\n <div className=\"rootDirectory\">\r\n <div className=\"subDirectory\">\r\n <input type=\"checkbox\" id=\"A\" />\r\n <label for=\"A\"><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {rootDirectoryObjects[0].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul>\r\n {personalProjects.map((elements, index) => (\r\n <li><a href=\"#\"> {personalProjects[index].id} </a></li>\r\n ))}\r\n </ul>\r\n </div>\r\n <div className=\"subDirectory\">\r\n <input type=\"checkbox\" id=\"B\" />\r\n <label for=\"B\"><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {rootDirectoryObjects[1].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul>\r\n {sharedProjects.map((elements, index) => (\r\n <li><div className=\"subSubDirectory\">\r\n <input type=\"checkbox\" id=\"B-A\" />\r\n <label for=\"B-A\">{sharedProjects[index].id}</label>\r\n\r\n <ul>\r\n <li><a href=\"#\">{sharedProjects[index].teams}</a></li>\r\n </ul>\r\n </div></li>\r\n ))}\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <DirectoryItems />\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [rootDirectory, changeRootDirectoryState] = useState({\n activeRootDirectoryObject: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n const [subDirectory, changeSubDirectoryState] = useState({\n activeSubDirectoryObject: [],\n subDirectoryObjects: [personalProjects, sharedProjects]\n });\n\n const toggleActive = (directory, index) => {\n console.log(\"toggle item active\" + \" \" + directory[index].id);\n\n if (directory === rootDirectory.rootDirectoryObjects) {\n console.log(\"active directory is a rootDirectory\");\n\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: null\n });\n } else {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: directory[index]\n });\n }\n } else {\n console.log(\"active directory is a subDirectory\");\n\n if (directory[index] === subDirectory.activeSubDirectoryObject[index]) {\n changeSubDirectoryState({ ...subDirectory,\n activeSubDirectoryObject: null\n });\n } else {\n changeSubDirectoryState({ ...subDirectory,\n activeRootDirectoryObject: directory[index]\n });\n console.log(\"subDirectory set to active\");\n }\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = parentDirectories => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 13\n }, this), parentDirectories[index] === rootDirectory.activeRootDirectoryObject ? SubDirectoryItems(subDirectory.subDirectoryObjects[index]) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 80,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 81,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 82,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 79,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 78,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 76,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectory.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 91,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"iGoe9GTgUyRwalL5Oja9aYXeNzs=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","rootDirectory","changeRootDirectoryState","activeRootDirectoryObject","rootDirectoryObjects","subDirectory","changeSubDirectoryState","activeSubDirectoryObject","subDirectoryObjects","toggleActive","directory","index","console","log","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAA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AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAUe,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGI,kBAAkB,CAACd,aAAa,CAACG,oBAAf;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA1FD;;GAAMV,M;;KAAAA,M;AA4FN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [rootDirectory, changeRootDirectoryState] = useState({\r\n activeRootDirectoryObject: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const [subDirectory, changeSubDirectoryState] = useState({\r\n activeSubDirectoryObject: [],\r\n subDirectoryObjects: [personalProjects, sharedProjects]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n console.log(\"toggle item active\" + \" \" + directory[index].id)\r\n if (directory === rootDirectory.rootDirectoryObjects) {\r\n console.log(\"active directory is a rootDirectory\")\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: null })\r\n }\r\n else {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: (directory[index]) })\r\n }\r\n }\r\n else {\r\n console.log(\"active directory is a subDirectory\")\r\n if (directory[index] === subDirectory.activeSubDirectoryObject[index]) {\r\n changeSubDirectoryState({ ...subDirectory, activeSubDirectoryObject: null })\r\n }\r\n else {\r\n changeSubDirectoryState({ ...subDirectory, activeRootDirectoryObject: (directory[index]) })\r\n console.log(\"subDirectory set to active\")\r\n }\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {parentDirectories[index] === rootDirectory.activeRootDirectoryObject ?\r\n SubDirectoryItems(subDirectory.subDirectoryObjects[index]) :\r\n null}\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(rootDirectory.rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = props => {\n _s();\n\n const [open, setOpen] = useState(false);\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n\n const SubDirectoryItem = props => {\n /*#__PURE__*/\n _jsxDEV(\"ul\", {\n className: \"subDirectoryItem\",\n children: /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"SubDirectoryItem\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", props.text, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 5\n }, this);\n };\n\n const RootDirectoryItem = props => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"directoryItem\",\n children: /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"DirectoryItem\",\n onClick: () => setOpen(!open),\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", props.text, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 11\n }, this), open && props.children]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: [/*#__PURE__*/_jsxDEV(RootDirectoryItem, {\n text: rootDirectoryObjects[0].id\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(RootDirectoryItem, {\n text: rootDirectoryObjects[1].id,\n children: /*#__PURE__*/_jsxDEV(SubDirectoryItem, {\n text: personalProjects[0].id\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"xG1TONbKtDWtdOTrXaTAsNhPg/Q=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","props","open","setOpen","personalProjects","id","type","sharedProjects","teams","name","rootDirectoryObjects","SubDirectoryItem","text","RootDirectoryItem","children"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAIC,KAAD,IAAW;AAAA;;AACxB,QAAM,CAACC,IAAD,EAAOC,OAAP,IAAkBL,QAAQ,CAAC,KAAD,CAAhC;AAEA,QAAMM,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IA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I,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,EAMGV,IAAI,IAAID,KAAK,CAACa,QANjB;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YADF;AAYD,GAbD;;AAeA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,4BACE,QAAC,iBAAD;AAAmB,MAAA,IAAI,EAAEJ,oBAAoB,CAAC,CAAD,CAApB,CAAwBL;AAAjD;AAAA;AAAA;AAAA;AAAA,YADF,eAEE,QAAC,iBAAD;AAAmB,MAAA,IAAI,EAAEK,oBAAoB,CAAC,CAAD,CAApB,CAAwBL,EAAjD;AAAA,6BACE,QAAC,gBAAD;AAAkB,QAAA,IAAI,EAAED,gBAAgB,CAAC,CAAD,CAAhB,CAAoBC;AAA5C;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YAFF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAQD,CArDD;;GAAML,M;;KAAAA,M;AAuDN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = (props) => {\r\n const [open, setOpen] = useState(false)\r\n\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const SubDirectoryItem = (props) => {\r\n < ul className=\"subDirectoryItem\" >\r\n <li>\r\n <div className={\"SubDirectoryItem\"}>\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {props.text} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n </ul >\r\n }\r\n\r\n const RootDirectoryItem = (props) => {\r\n return (\r\n < ul className=\"directoryItem\" >\r\n <li>\r\n <div className={\"DirectoryItem\"} onClick={() => setOpen(!open)}>\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {props.text} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {open && props.children}\r\n </li>\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <RootDirectoryItem text={rootDirectoryObjects[0].id} />\r\n <RootDirectoryItem text={rootDirectoryObjects[1].id}>\r\n <SubDirectoryItem text={personalProjects[0].id} />\r\n </RootDirectoryItem>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\";\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nimport { Fragment as _Fragment } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n\n const DirectoryItems = () => {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"projectsDirectoryContainer\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"projectsDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"A\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"A\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 26\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", rootDirectoryObjects[0].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: personalProjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n className: \"directoryItem\",\n children: /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"#\",\n children: [\" \", personalProjects[index].id, \" \"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 45\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"projectsDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"B\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"B\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 26\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", rootDirectoryObjects[1].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: sharedProjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n className: \"directoryItem\",\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"subSubDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"B-A\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"B-A\",\n children: sharedProjects[index].id\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: /*#__PURE__*/_jsxDEV(_Fragment, {\n children: sharedProjects[index].teams.map(team => /*#__PURE__*/_jsxDEV(\"li\", {\n className: \"directoryItem\",\n children: /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"#\",\n children: team.name\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 53\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 23\n }, this))\n }, void 0, false)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 48,\n columnNumber: 17\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 45\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(DirectoryItems, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 5\n }, this);\n};\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","rootDirectoryObjects","DirectoryItems","map","elements","index","team"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AACnB,QAAMC,gBAAgB,GAAG,CACvB;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,EAAC,KAAX;AAAA,0BAAkBP,cAAc,CAACO,KAAD,CAAd,CAAsBT;AAAxC;AAAA;AAAA;AAAA;AAAA,sBAF4B,eAG5B;AAAA,uCACE;AAAA,4BACGE,cAAc,CAACO,KAAD,CAAd,CAAsBN,KAAtB,CAA4BI,GAA5B,CAAgCG,IAAI,iBACnC;AAAI,oBAAA,SAAS,EAAC,eAAd;AAAA,2CAA8B;AAAG,sBAAA,IAAI,EAAC,GAAR;AAAA,gCAAaA,IAAI,CAACN;AAAlB;AAAA;AAAA;AAAA;AAAA;AAA9B;AAAA;AAAA;AAAA;AAAA,0BADD;AADH;AADF;AAAA;AAAA;AAAA;AAAA,sBAH4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAA9B;AAAA;AAAA;AAAA;AAAA,kBADD;AADH;AAAA;AAAA;AAAA;AAAA,gBANF;AAAA;AAAA;AAAA;AAAA;AAAA,cAbF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF;AAwCD,GAzCD;;AA2CA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,2BACE,QAAC,cAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAjED;;KAAMN,M;AAmEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const DirectoryItems = () => {\r\n return (\r\n <div className=\"projectsDirectoryContainer\">\r\n <div className=\"projectsDirectory\">\r\n <input type=\"checkbox\" id=\"A\" />\r\n <label for=\"A\"><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {rootDirectoryObjects[0].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul>\r\n {personalProjects.map((elements, index) => (\r\n <li className=\"directoryItem\"><a href=\"#\"> {personalProjects[index].id} </a></li>\r\n ))}\r\n </ul>\r\n </div>\r\n <div className=\"projectsDirectory\">\r\n <input type=\"checkbox\" id=\"B\" />\r\n <label for=\"B\"><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {rootDirectoryObjects[1].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul>\r\n {sharedProjects.map((elements, index) => (\r\n <li className=\"directoryItem\"><div className=\"subSubDirectory\">\r\n <input type=\"checkbox\" id=\"B-A\" />\r\n <label for=\"B-A\">{sharedProjects[index].id}</label>\r\n <ul>\r\n <>\r\n {sharedProjects[index].teams.map(team => (\r\n <li className=\"directoryItem\"><a href=\"#\">{team.name}</a></li>\r\n ))}\r\n </>\r\n\r\n </ul>\r\n </div></li>\r\n ))}\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <DirectoryItems />\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport addOneClass from 'dom-helpers/addClass';\nimport removeOneClass from 'dom-helpers/removeClass';\nimport React from 'react';\nimport Transition from './Transition';\nimport { classNamesShape } from './utils/PropTypes';\n\nvar _addClass = function addClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return addOneClass(node, c);\n });\n};\n\nvar removeClass = function removeClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return removeOneClass(node, c);\n });\n};\n/**\n * A transition component inspired by the excellent\n * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should\n * use it if you're using CSS transitions or animations. It's built upon the\n * [`Transition`](https://reactcommunity.org/react-transition-group/transition)\n * component, so it inherits all of its props.\n *\n * `CSSTransition` applies a pair of class names during the `appear`, `enter`,\n * and `exit` states of the transition. The first class is applied and then a\n * second `*-active` class in order to activate the CSS transition. After the\n * transition, matching `*-done` class names are applied to persist the\n * transition state.\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <CSSTransition in={inProp} timeout={200} classNames=\"my-node\">\n * <div>\n * {\"I'll receive my-node-* classes\"}\n * </div>\n * </CSSTransition>\n * <button type=\"button\" onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the `in` prop is set to `true`, the child component will first receive\n * the class `example-enter`, then the `example-enter-active` will be added in\n * the next tick. `CSSTransition` [forces a\n * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * between before adding the `example-enter-active`. This is an important trick\n * because it allows us to transition between `example-enter` and\n * `example-enter-active` even though they were added immediately one after\n * another. Most notably, this is what makes it possible for us to animate\n * _appearance_.\n *\n * ```css\n * .my-node-enter {\n * opacity: 0;\n * }\n * .my-node-enter-active {\n * opacity: 1;\n * transition: opacity 200ms;\n * }\n * .my-node-exit {\n * opacity: 1;\n * }\n * .my-node-exit-active {\n * opacity: 0;\n * transition: opacity 200ms;\n * }\n * ```\n *\n * `*-active` classes represent which styles you want to animate **to**, so it's\n * important to add `transition` declaration only to them, otherwise transitions\n * might not behave as intended! This might not be obvious when the transitions\n * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in\n * the example above (minus `transition`), but it becomes apparent in more\n * complex transitions.\n *\n * **Note**: If you're using the\n * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)\n * prop, make sure to define styles for `.appear-*` classes as well.\n */\n\n\nvar CSSTransition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(CSSTransition, _React$Component);\n\n function CSSTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.appliedClasses = {\n appear: {},\n enter: {},\n exit: {}\n };\n\n _this.onEnter = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument[0],\n appearing = _this$resolveArgument[1];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, appearing ? 'appear' : 'enter', 'base');\n\n if (_this.props.onEnter) {\n _this.props.onEnter(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntering = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument2[0],\n appearing = _this$resolveArgument2[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.addClass(node, type, 'active');\n\n if (_this.props.onEntering) {\n _this.props.onEntering(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntered = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument3[0],\n appearing = _this$resolveArgument3[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.removeClasses(node, type);\n\n _this.addClass(node, type, 'done');\n\n if (_this.props.onEntered) {\n _this.props.onEntered(maybeNode, maybeAppearing);\n }\n };\n\n _this.onExit = function (maybeNode) {\n var _this$resolveArgument4 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument4[0];\n\n _this.removeClasses(node, 'appear');\n\n _this.removeClasses(node, 'enter');\n\n _this.addClass(node, 'exit', 'base');\n\n if (_this.props.onExit) {\n _this.props.onExit(maybeNode);\n }\n };\n\n _this.onExiting = function (maybeNode) {\n var _this$resolveArgument5 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument5[0];\n\n _this.addClass(node, 'exit', 'active');\n\n if (_this.props.onExiting) {\n _this.props.onExiting(maybeNode);\n }\n };\n\n _this.onExited = function (maybeNode) {\n var _this$resolveArgument6 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument6[0];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, 'exit', 'done');\n\n if (_this.props.onExited) {\n _this.props.onExited(maybeNode);\n }\n };\n\n _this.resolveArguments = function (maybeNode, maybeAppearing) {\n return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`\n : [maybeNode, maybeAppearing];\n };\n\n _this.getClassNames = function (type) {\n var classNames = _this.props.classNames;\n var isStringClassNames = typeof classNames === 'string';\n var prefix = isStringClassNames && classNames ? classNames + \"-\" : '';\n var baseClassName = isStringClassNames ? \"\" + prefix + type : classNames[type];\n var activeClassName = isStringClassNames ? baseClassName + \"-active\" : classNames[type + \"Active\"];\n var doneClassName = isStringClassNames ? baseClassName + \"-done\" : classNames[type + \"Done\"];\n return {\n baseClassName: baseClassName,\n activeClassName: activeClassName,\n doneClassName: doneClassName\n };\n };\n\n return _this;\n }\n\n var _proto = CSSTransition.prototype;\n\n _proto.addClass = function addClass(node, type, phase) {\n var className = this.getClassNames(type)[phase + \"ClassName\"];\n\n var _this$getClassNames = this.getClassNames('enter'),\n doneClassName = _this$getClassNames.doneClassName;\n\n if (type === 'appear' && phase === 'done' && doneClassName) {\n className += \" \" + doneClassName;\n } // This is to force a repaint,\n // which is necessary in order to transition styles when adding a class name.\n\n\n if (phase === 'active') {\n /* eslint-disable no-unused-expressions */\n node && node.scrollTop;\n }\n\n if (className) {\n this.appliedClasses[type][phase] = className;\n\n _addClass(node, className);\n }\n };\n\n _proto.removeClasses = function removeClasses(node, type) {\n var _this$appliedClasses$ = this.appliedClasses[type],\n baseClassName = _this$appliedClasses$.base,\n activeClassName = _this$appliedClasses$.active,\n doneClassName = _this$appliedClasses$.done;\n this.appliedClasses[type] = {};\n\n if (baseClassName) {\n removeClass(node, baseClassName);\n }\n\n if (activeClassName) {\n removeClass(node, activeClassName);\n }\n\n if (doneClassName) {\n removeClass(node, doneClassName);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n _ = _this$props.classNames,\n props = _objectWithoutPropertiesLoose(_this$props, [\"classNames\"]);\n\n return /*#__PURE__*/React.createElement(Transition, _extends({}, props, {\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onEntering: this.onEntering,\n onExit: this.onExit,\n onExiting: this.onExiting,\n onExited: this.onExited\n }));\n };\n\n return CSSTransition;\n}(React.Component);\n\nCSSTransition.defaultProps = {\n classNames: ''\n};\nCSSTransition.propTypes = process.env.NODE_ENV !== \"production\" ? _extends({}, Transition.propTypes, {\n /**\n * The animation classNames applied to the component as it appears, enters,\n * exits or has finished the transition. A single name can be provided, which\n * will be suffixed for each stage, e.g. `classNames=\"fade\"` applies:\n *\n * - `fade-appear`, `fade-appear-active`, `fade-appear-done`\n * - `fade-enter`, `fade-enter-active`, `fade-enter-done`\n * - `fade-exit`, `fade-exit-active`, `fade-exit-done`\n *\n * A few details to note about how these classes are applied:\n *\n * 1. They are _joined_ with the ones that are already defined on the child\n * component, so if you want to add some base styles, you can use\n * `className` without worrying that it will be overridden.\n *\n * 2. If the transition component mounts with `in={false}`, no classes are\n * applied yet. You might be expecting `*-exit-done`, but if you think\n * about it, a component cannot finish exiting if it hasn't entered yet.\n *\n * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This\n * allows you to define different behavior for when appearing is done and\n * when regular entering is done, using selectors like\n * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply\n * an epic entrance animation when element first appears in the DOM using\n * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can\n * simply use `fade-enter-done` for defining both cases.\n *\n * Each individual classNames can also be specified independently like:\n *\n * ```js\n * classNames={{\n * appear: 'my-appear',\n * appearActive: 'my-active-appear',\n * appearDone: 'my-done-appear',\n * enter: 'my-enter',\n * enterActive: 'my-active-enter',\n * enterDone: 'my-done-enter',\n * exit: 'my-exit',\n * exitActive: 'my-active-exit',\n * exitDone: 'my-done-exit',\n * }}\n * ```\n *\n * If you want to set these classes using CSS Modules:\n *\n * ```js\n * import styles from './styles.css';\n * ```\n *\n * you might want to use camelCase in your CSS file, that way could simply\n * spread them instead of listing them one by one:\n *\n * ```js\n * classNames={{ ...styles }}\n * ```\n *\n * @type {string | {\n * appear?: string,\n * appearActive?: string,\n * appearDone?: string,\n * enter?: string,\n * enterActive?: string,\n * enterDone?: string,\n * exit?: string,\n * exitActive?: string,\n * exitDone?: string,\n * }}\n */\n classNames: classNamesShape,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEnter: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter-active' or\n * 'appear-active' class is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or\n * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntered: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExit: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit-active' is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExiting: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' classes\n * are **removed** and the `exit-done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExited: PropTypes.func\n}) : {};\nexport default CSSTransition;","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/node_modules/react-transition-group/esm/CSSTransition.js"],"names":["_extends","_objectWithoutPropertiesLoose","_inheritsLoose","PropTypes","addOneClass","removeOneClass","React","Transition","classNamesShape","_addClass","addClass","node","classes","split","forEach","c","removeClass","CSSTransition","_React$Component","_this","_len","arguments","length","args","Array","_key","call","apply","concat","appliedClasses","appear","enter","exit","onEnter","maybeNode","maybeAppearing","_this$resolveArgument","resolveArguments","appearing","removeClasses","props","onEntering","_this$resolveArgument2","type","onEntered","_this$resolveArgument3","onExit","_this$resolveArgument4","onExiting","_this$resolveArgument5","onExited","_this$resolveArgument6","nodeRef","current","getClassNames","classNames","isStringClassNames","prefix","baseClassName","activeClassName","doneClassName","_proto","prototype","phase","className","_this$getClassNames","scrollTop","_this$appliedClasses$","base","active","done","render","_this$props","_","createElement","Component","defaultProps","propTypes","process","env","NODE_ENV","func"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,6BAAP,MAA0C,yDAA1C;AACA,OAAOC,cAAP,MAA2B,0CAA3B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,WAAP,MAAwB,sBAAxB;AACA,OAAOC,cAAP,MAA2B,yBAA3B;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,UAAP,M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AE9B,SAAS,CAAC8E,IA/EgF;;AAiFnG;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACExC,EAAAA,UAAU,EAAEtC,SAAS,CAAC8E,IAzF6E;;AA2FnG;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACErC,EAAAA,SAAS,EAAEzC,SAAS,CAAC8E,IAnG8E;;AAqGnG;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACEnC,EAAAA,MAAM,EAAE3C,SAAS,CAAC8E,IA7GiF;;AA+GnG;AACF;AACA;AACA;AACA;AACA;AACA;AACEjC,EAAAA,SAAS,EAAE7C,SAAS,CAAC8E,IAtH8E;;AAwHnG;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACE/B,EAAAA,QAAQ,EAAE/C,SAAS,CAAC8E;AAhI+E,CAA3B,CAAhD,GAiIrB,EAjIL;AAkIA,eAAehE,aAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport addOneClass from 'dom-helpers/addClass';\nimport removeOneClass from 'dom-helpers/removeClass';\nimport React from 'react';\nimport Transition from './Transition';\nimport { classNamesShape } from './utils/PropTypes';\n\nvar _addClass = function addClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return addOneClass(node, c);\n });\n};\n\nvar removeClass = function removeClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return removeOneClass(node, c);\n });\n};\n/**\n * A transition component inspired by the excellent\n * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should\n * use it if you're using CSS transitions or animations. It's built upon the\n * [`Transition`](https://reactcommunity.org/react-transition-group/transition)\n * component, so it inherits all of its props.\n *\n * `CSSTransition` applies a pair of class names during the `appear`, `enter`,\n * and `exit` states of the transition. The first class is applied and then a\n * second `*-active` class in order to activate the CSS transition. After the\n * transition, matching `*-done` class names are applied to persist the\n * transition state.\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <CSSTransition in={inProp} timeout={200} classNames=\"my-node\">\n * <div>\n * {\"I'll receive my-node-* classes\"}\n * </div>\n * </CSSTransition>\n * <button type=\"button\" onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the `in` prop is set to `true`, the child component will first receive\n * the class `example-enter`, then the `example-enter-active` will be added in\n * the next tick. `CSSTransition` [forces a\n * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * between before adding the `example-enter-active`. This is an important trick\n * because it allows us to transition between `example-enter` and\n * `example-enter-active` even though they were added immediately one after\n * another. Most notably, this is what makes it possible for us to animate\n * _appearance_.\n *\n * ```css\n * .my-node-enter {\n * opacity: 0;\n * }\n * .my-node-enter-active {\n * opacity: 1;\n * transition: opacity 200ms;\n * }\n * .my-node-exit {\n * opacity: 1;\n * }\n * .my-node-exit-active {\n * opacity: 0;\n * transition: opacity 200ms;\n * }\n * ```\n *\n * `*-active` classes represent which styles you want to animate **to**, so it's\n * important to add `transition` declaration only to them, otherwise transitions\n * might not behave as intended! This might not be obvious when the transitions\n * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in\n * the example above (minus `transition`), but it becomes apparent in more\n * complex transitions.\n *\n * **Note**: If you're using the\n * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)\n * prop, make sure to define styles for `.appear-*` classes as well.\n */\n\n\nvar CSSTransition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(CSSTransition, _React$Component);\n\n function CSSTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.appliedClasses = {\n appear: {},\n enter: {},\n exit: {}\n };\n\n _this.onEnter = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument[0],\n appearing = _this$resolveArgument[1];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, appearing ? 'appear' : 'enter', 'base');\n\n if (_this.props.onEnter) {\n _this.props.onEnter(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntering = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument2[0],\n appearing = _this$resolveArgument2[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.addClass(node, type, 'active');\n\n if (_this.props.onEntering) {\n _this.props.onEntering(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntered = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument3[0],\n appearing = _this$resolveArgument3[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.removeClasses(node, type);\n\n _this.addClass(node, type, 'done');\n\n if (_this.props.onEntered) {\n _this.props.onEntered(maybeNode, maybeAppearing);\n }\n };\n\n _this.onExit = function (maybeNode) {\n var _this$resolveArgument4 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument4[0];\n\n _this.removeClasses(node, 'appear');\n\n _this.removeClasses(node, 'enter');\n\n _this.addClass(node, 'exit', 'base');\n\n if (_this.props.onExit) {\n _this.props.onExit(maybeNode);\n }\n };\n\n _this.onExiting = function (maybeNode) {\n var _this$resolveArgument5 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument5[0];\n\n _this.addClass(node, 'exit', 'active');\n\n if (_this.props.onExiting) {\n _this.props.onExiting(maybeNode);\n }\n };\n\n _this.onExited = function (maybeNode) {\n var _this$resolveArgument6 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument6[0];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, 'exit', 'done');\n\n if (_this.props.onExited) {\n _this.props.onExited(maybeNode);\n }\n };\n\n _this.resolveArguments = function (maybeNode, maybeAppearing) {\n return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`\n : [maybeNode, maybeAppearing];\n };\n\n _this.getClassNames = function (type) {\n var classNames = _this.props.classNames;\n var isStringClassNames = typeof classNames === 'string';\n var prefix = isStringClassNames && classNames ? classNames + \"-\" : '';\n var baseClassName = isStringClassNames ? \"\" + prefix + type : classNames[type];\n var activeClassName = isStringClassNames ? baseClassName + \"-active\" : classNames[type + \"Active\"];\n var doneClassName = isStringClassNames ? baseClassName + \"-done\" : classNames[type + \"Done\"];\n return {\n baseClassName: baseClassName,\n activeClassName: activeClassName,\n doneClassName: doneClassName\n };\n };\n\n return _this;\n }\n\n var _proto = CSSTransition.prototype;\n\n _proto.addClass = function addClass(node, type, phase) {\n var className = this.getClassNames(type)[phase + \"ClassName\"];\n\n var _this$getClassNames = this.getClassNames('enter'),\n doneClassName = _this$getClassNames.doneClassName;\n\n if (type === 'appear' && phase === 'done' && doneClassName) {\n className += \" \" + doneClassName;\n } // This is to force a repaint,\n // which is necessary in order to transition styles when adding a class name.\n\n\n if (phase === 'active') {\n /* eslint-disable no-unused-expressions */\n node && node.scrollTop;\n }\n\n if (className) {\n this.appliedClasses[type][phase] = className;\n\n _addClass(node, className);\n }\n };\n\n _proto.removeClasses = function removeClasses(node, type) {\n var _this$appliedClasses$ = this.appliedClasses[type],\n baseClassName = _this$appliedClasses$.base,\n activeClassName = _this$appliedClasses$.active,\n doneClassName = _this$appliedClasses$.done;\n this.appliedClasses[type] = {};\n\n if (baseClassName) {\n removeClass(node, baseClassName);\n }\n\n if (activeClassName) {\n removeClass(node, activeClassName);\n }\n\n if (doneClassName) {\n removeClass(node, doneClassName);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n _ = _this$props.classNames,\n props = _objectWithoutPropertiesLoose(_this$props, [\"classNames\"]);\n\n return /*#__PURE__*/React.createElement(Transition, _extends({}, props, {\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onEntering: this.onEntering,\n onExit: this.onExit,\n onExiting: this.onExiting,\n onExited: this.onExited\n }));\n };\n\n return CSSTransition;\n}(React.Component);\n\nCSSTransition.defaultProps = {\n classNames: ''\n};\nCSSTransition.propTypes = process.env.NODE_ENV !== \"production\" ? _extends({}, Transition.propTypes, {\n /**\n * The animation classNames applied to the component as it appears, enters,\n * exits or has finished the transition. A single name can be provided, which\n * will be suffixed for each stage, e.g. `classNames=\"fade\"` applies:\n *\n * - `fade-appear`, `fade-appear-active`, `fade-appear-done`\n * - `fade-enter`, `fade-enter-active`, `fade-enter-done`\n * - `fade-exit`, `fade-exit-active`, `fade-exit-done`\n *\n * A few details to note about how these classes are applied:\n *\n * 1. They are _joined_ with the ones that are already defined on the child\n * component, so if you want to add some base styles, you can use\n * `className` without worrying that it will be overridden.\n *\n * 2. If the transition component mounts with `in={false}`, no classes are\n * applied yet. You might be expecting `*-exit-done`, but if you think\n * about it, a component cannot finish exiting if it hasn't entered yet.\n *\n * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This\n * allows you to define different behavior for when appearing is done and\n * when regular entering is done, using selectors like\n * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply\n * an epic entrance animation when element first appears in the DOM using\n * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can\n * simply use `fade-enter-done` for defining both cases.\n *\n * Each individual classNames can also be specified independently like:\n *\n * ```js\n * classNames={{\n * appear: 'my-appear',\n * appearActive: 'my-active-appear',\n * appearDone: 'my-done-appear',\n * enter: 'my-enter',\n * enterActive: 'my-active-enter',\n * enterDone: 'my-done-enter',\n * exit: 'my-exit',\n * exitActive: 'my-active-exit',\n * exitDone: 'my-done-exit',\n * }}\n * ```\n *\n * If you want to set these classes using CSS Modules:\n *\n * ```js\n * import styles from './styles.css';\n * ```\n *\n * you might want to use camelCase in your CSS file, that way could simply\n * spread them instead of listing them one by one:\n *\n * ```js\n * classNames={{ ...styles }}\n * ```\n *\n * @type {string | {\n * appear?: string,\n * appearActive?: string,\n * appearDone?: string,\n * enter?: string,\n * enterActive?: string,\n * enterDone?: string,\n * exit?: string,\n * exitActive?: string,\n * exitDone?: string,\n * }}\n */\n classNames: classNamesShape,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEnter: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter-active' or\n * 'appear-active' class is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or\n * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntered: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExit: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit-active' is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExiting: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' classes\n * are **removed** and the `exit-done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExited: PropTypes.func\n}) : {};\nexport default CSSTransition;"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment