{"version":3,"sources":["api/helpers/mockJsonData.js","api/helpers/requestBuilder.js","api/helpers/dataFormatter.js","api/requests/asyncRequestHandler.js","api/requests/clientDataHandler.js","api/requests/authenticatedClientDataHandler.js","api/requests/pafFileListHandler.js","api/requests/authHandler.js","api/requests/fileRequestHandler.js","api/requests/lcaFileListHandler.js","api/downloadHandler.js","components/BrandedCircularLoadingIndicator.jsx","components/LoginPortalBuildingIndicator.jsx","components/LoginProgressIndicator.jsx","components/LoginForm.jsx","actions/clientDataLogic.js","actions/index.js","containers/WrappedLoginForm.jsx","components/LoginCardBody.jsx","components/LoginPortal.jsx","components/PropDefinitions.js","components/PostingTableCell.jsx","components/BrandedLinearLoadingIndicator.jsx","components/DownloadIcon.jsx","components/DocumentList.jsx","containers/WrappedDocumentList.jsx","components/DocumentsModal.jsx","components/OpenFileListTableCell.jsx","components/PageLoadingIndicator.jsx","components/LcaGridBody.jsx","containers/WrappedLcaGridBody.jsx","components/LcaGrid.jsx","components/PafGridBody.jsx","containers/WrappedPafGridBody.jsx","components/PafGrid.jsx","containers/WrappedPafGrid.jsx","components/AuthenticatedTabbedBody.jsx","containers/WrappedTabbedBody.jsx","components/PostingDownloadLinkTableCell.jsx","components/NofGridBody.jsx","containers/WrappedNofGridBody.jsx","components/NofGrid.jsx","components/NonAuthenticatedTabbedBody.jsx","containers/WrappedNonAuthenticatedTabbedBody.jsx","components/DisplayPageBody.jsx","components/HeaderLogo.jsx","components/ErrorPrompt.jsx","components/DisplayPage.jsx","containers/WrappedDisplayPage.jsx","components/App.jsx","containers/WrappedApp.jsx","reducers/clientData.js","reducers/pafMetadata.js","reducers/fileDownload.js","reducers/errorPrompt.js","reducers/paginationContext.js","reducers/lcaMetadata.js","reducers/index.js","index.js"],"names":["fakeNormalJsonData","companyName","pageIntro","jobListings","fileId","lcaNumber","jobTitle","fileNumber","postingDate","downloadUrl","window","location","origin","pageIntroForNofListings","nofListings","fakeShellJsonData","fakeLcaFile","displayName","fakeLcaEntryData","fakePafEntryData","expiredDate","fakePafFile","fakePafIntroText","fakeCompanyMemo","companyMemo","fakeNofEntryData","buildLcaList","itemsToCreate","entriesToGenerate","returnList","counter","fakeModifiedEntry","concat","toString","push","buildPafList","files","buildNofList","processAccessCode","accessCode","parameterPrefix","indexOf","parameters","substring","entryNumber","mockData","Object","assign","pafListings","pafIntro","console","log","buildCustomSizeMockData","Number","split","forEach","arg","buildModularMockData","errorMessage","getFakeJson","Promise","resolve","result","Error","setTimeout","RequestBuilder","paginationContext","token","slice","requestUrl","this","getApiInformation","url","lcaPathParam","pafListpathParam","apiEndpoint","URL","requestObject","getRequestOptions","href","replace","postingsContext","pageContext","nofListpathParam","lcaListpathParam","fileName","searchParams","set","nofFileId","nofPathParam","attachmentKeyword","memoId","pafPathParam","lcaId","pafId","limitRows","append","nextSkipToken","getProdApi","key","getDevApi","devString","pafDataPathParam","accessToken","includes","requestOptionsBase","async","crossDomain","method","headers","apiKey","convertObjectFormat","propMap","apiObject","formattedObject","index","length","apiPropLabel","localPropLabel","applySpecialFormatting","name","value","formatDateString","date","trim","convertedDate","Date","isNaN","modifiedDateString","toLocaleDateString","year","month","day","convertResponse","responseJson","formattedCompanyData","clientData","companyDataMap","formattedData","formatCompanyData","pafMemoFileId","lcaJobListingMap","map","listing","formattedListing","buildLcaFileRequestUrl","formatLcaListings","pafMemo","pafListingMap","formatPafListings","buildMemoFileRequestUrl","nofJobListingMap","buildNofFileRequestUrl","ID","formatNofListings","jsonRequest","request","reject","fetch","then","response","ok","json","catch","handleSuccess","status","requestClientData","buildClientDataRequestObject","requestAuthenticatedClientData","idToken","buildAuthenticatedClientDataRequestObject","Authorization","pafFileListDataMap","formattedPafFileList","file","formattedFile","buildPafFileRequestUrl","parseInt","id","requiresAuth","requestPafFileList","sanitizeInput","fileList","temporaryPafFile","getFakePafFileList","error","buildPafFileListRequestObject","message","loginEndpoint","cachedIdToken","cacheExpiration","requestIdToken","currentTime","now","id_token","claims","user_claims","claimList","typ","foundClaim","find","claim","val","getClaim","performFileRequest","defaultFileName","processResponse","finally","getFilename","blob","saveBlob","newBlob","Blob","type","get","navigator","msSaveOrOpenBlob","data","createObjectURL","link","document","createElement","style","display","download","body","appendChild","click","revokeObjectURL","disposition","matches","exec","lcaFileListDataMap","formattedLcaFileList","requestLcaFileList","temporaryLcaFile","getFakeLcaFileList","buildLcaFileListRequestObject","downloadHandler","requestBrandingData","pageUrl","requestFile","fileUrl","requestBuilder","requestAuthenticatedFile","withStyles","root","color","CircularProgress","className","BrandedCircularLoadingIndicator","size","LoginForm","processingLogin","onClick","input","LoginProgressIndicator","cachedToken","sessionStorage","getItem","onSubmit","e","preventDefault","TextField","autoFocus","inputRef","node","label","Button","defaultProps","handleAuthRequirement","authPerformed","noAuthPerformed","toUpperCase","startsWith","loadPostings","dispatch","pageProcessingBegin","cleanToken","processLoginData","processDataError","clear","errorPromptTrigger","loginSuccessDataError","paginationSuccess","paginated","mergedData","pageHeaderLogo","titleBackground","process","property","hasOwnProperty","clientJson","loginSuccess","pafMetadataDownloadSuccess","pafMetadataDownloadError","fileRequestBegin","category","fileRequestSuccess","fileRequestError","filename","errorPromptClear","connect","state","setItem","loginError","performLogin","toLowerCase","LoginCardBody","loginBranding","src","loginLogo","alt","WrappedLoginForm","LoginPortalBuildingIndicator","LoginPortal","Card","Box","fileDataType","exact","string","isRequired","lcaListingsDataType","fileListDownloading","bool","arrayOf","fileListDownloadErrorMessage","operatingCompany","nofListingsDataType","pafListingsDataType","pafExpiryDate","array","errorPromptOpen","errorTime","number","theme","head","backgroundColor","palette","common","white","fontSize","TableCell","marginTop","marginBottom","height","barColorPrimary","colorPrimary","LinearProgress","DownloadIcon","downloading","styles","downloadLink","verticalAlign","marginRight","documents","paddingLeft","documentListMessage","downloadingIndicator","listStyle","DocumentList","fileMetadata","activeDownloadList","Container","BrandedLinearLoadingIndicator","iconsAndText","fileInfo","downloadInProgress","some","isDownloading","onClickHandler","Link","component","rel","ownProps","fileDownload","filter","header","DocumentsModal","title","open","toggleExpand","Dialog","aria-labelledby","aria-describedby","fullWidth","onClose","DialogActions","variant","WrappedDocumentList","OpenFileListTableCell","requestPostingFileList","useState","setOpenStatus","openModal","IconButton","customCell","whiteSpace","width","spacing","overflowX","fontFamily","customHeaderCell","tableStriped","CustomizeTableCell","classes","restProps","Cell","CustomizeHeaderCell","TableComponent","Table","LcaGridBody","Component","componentDidMount","props","rows","addLcaToLcaMetadataList","dataRow","constructor","super","filteringStateColumnExtensions","columnName","filteringEnabled","groupingStateColumnExtensions","groupingEnabled","render","lcaMetadata","progressing","downloadLcaFileMetadata","columns","getCellValue","row","lcaMeta","TableBody","TableRow","PostingTableCell","colSpan","PageLoadingIndicator","Paper","defaultValue","defaultGrouping","columnExtensions","defaultFilters","defaultCurrentPage","defaultPageSize","cellComponent","tableComponent","showGroupingControls","filesDownloading","lcaMetadataAdd","lcaMetadataDownloadBegin","lcaMetadataDownloadSuccess","lcaMetadataDownloadError","lcaMetadataRequest","defaultFilename","LcaGrid","lcaPostingRows","introMessage","WrappedLcaGridBody","padding","paddingRight","PafGridBody","addPafToPafMetadataList","pafMetadata","downloadPafFileMetadata","pafMeta","pafEntriesToDisplay","pafMetadataToDisplay","pafMetadataDownloadBegin","pafMetadataRequest","pafMetadataAdd","table","introParagraph","flexDirection","alignItems","memoDownloadLink","introParagraphStyle","linkStyle","memoDownloading","WrappedPafGridBody","PafGrid","AuthenticatedTabbedBody","bodyData","getPostings","lcaContext","pafContext","defaultIndex","WrappedPafGrid","PostingsDownloadLinkTableCell","customizePaper","PostingDownloadLinkTableCell","class","NofGridBody","NofGrid","nofPostingRows","WrappedNofGridBody","NonAuthenticatedTabbedBody","nofContext","DisplayPageBody","WrappedTabbedBody","WrappedNonAuthenticatedTabbedBody","HeaderLogo","errorSnackbar","dark","errorInfo","closeHandler","Snackbar","anchorOrigin","vertical","horizontal","autoHideDuration","SnackbarContent","ContentProps","action","aria-label","DisplayPage","pageData","resetClick","clearErrorPrompt","backgroundImage","errorPrompt","event","reason","clearFileDownloadErrorPrompt","App","React","populateBrandingData","setState","requestLoginBranding","loggedIn","WrappedDisplayPage","defaultState","currentToken","paf","doesDownloadEntryMatch","secondEntry","firstEntry","getDefaultState","lca","combineReducers","store","createStore","rootReducer","applyMiddleware","thunk","ReactDOM","WrappedApp","getElementById"],"mappings":"yYAwBA,MAAMA,EAAqB,CACzBC,YAAa,6BACbC,UAAW,oDACXC,YAAa,CACX,CACEC,OAAQ,IACRC,UAAW,kBACXC,SAAU,oBACVC,WAAY,UACZC,YAAa,mBACbC,YAAY,GAAD,OAAKC,OAAOC,SAASC,OAArB,sBAEb,CACER,OAAQ,IACRC,UAAW,kBACXC,SAAU,kBACVC,WAAY,UACZC,YAAa,mBACbC,YAAY,GAAD,OAAKC,OAAOC,SAASC,OAArB,sBAEb,CACER,OAAQ,IACRC,UAAW,kBACXC,SAAU,cACVC,WAAY,UACZC,YAAa,mBACbC,YAAY,GAAD,OAAKC,OAAOC,SAASC,OAArB,sBAEb,CACER,OAAQ,IACRC,UAAW,kBACXC,SAAU,oBACVC,WAAY,UACZC,YAAa,mBACbC,YAAY,GAAD,OAAKC,OAAOC,SAASC,OAArB,uBAGfC,wBAAyB,oDACzBC,YAAa,CACX,CACER,SAAU,oBACVE,YAAa,mBACbJ,OAAQ,IACRK,YAAY,GAAD,OAAKC,OAAOC,SAASC,OAArB,sBAEb,CACEN,SAAU,kBACVE,YAAa,mBACbJ,OAAQ,IACRK,YAAY,GAAD,OAAKC,OAAOC,SAASC,OAArB,sBAEb,CACEN,SAAU,cACVE,YAAa,mBACbJ,OAAQ,IACRK,YAAY,GAAD,OAAKC,OAAOC,SAASC,OAArB,sBAEb,CACEN,SAAU,oBACVE,YAAa,mBACbJ,OAAQ,IACRK,YAAY,GAAD,OAAKC,OAAOC,SAASC,OAArB,wBASXG,EAAoB,CACxBd,YAAa,8BAaTe,EAAc,CAClBC,YAAa,eAEbR,YAAY,GAAD,OAAKC,OAAOC,SAASC,OAArB,sBAcPM,EAAmB,CACvB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,OAC5CkN,EAGF,IACFA,EACH,CACElN,MAAOoa,EAAOpa,MACdzD,MAAO,OAIb,IxCiJuC,8BwChJrC,OAAO2Q,EAAMjK,IAAK4Y,GACZA,EAAI7b,QAAUoa,EAAOpa,MAChB,2BACF6b,GADL,IAEEvN,qBAAqB,EACrBG,6BAA8B,OAG3BoN,GAGX,IxCsIyC,gCwCrIvC,OAAO3O,EAAMjK,IAAK4Y,GACZA,EAAI7b,QAAUoa,EAAOpa,MAChB,2BACF6b,GADL,IAEEvN,qBAAqB,EACrB/R,MAAO6d,EAAO3U,WAGXoW,GAGX,IxC2HuC,8BwC1HrC,OAAO3O,EAAMjK,IAAK4Y,GACZA,EAAI7b,QAAUoa,EAAOpa,MAChB,2BACF6b,GADL,IAEEvN,qBAAqB,EACrB/R,MAAO,GACPkS,6BAA8B2L,EAAOvc,eAGlCge,GAGX,QACE,OAAO3O,ICrEE4O,eAAgB,CAC7BnZ,cACAuU,eACArC,eACAnD,gBACAiJ,eACAtc,uBCEF,MAAM0d,GAAQC,YAAYC,GAAaC,YAAgBC,MAEvDC,IAASxH,OAEP,kBAAC,IAAD,CAAUmH,MAAOA,IACf,kBAACM,GAAD,OAEFtU,SAASuU,eAAe,W","file":"static/js/main.255c3d50.chunk.js","sourcesContent":["/* eslint-disable no-console */\n\n/**\n * A generic mock dataset.\n * @type {{\n * companyName: string,\n * pageIntro: string,\n * jobListings: {\n * fileId: string,\n * lcaNumber: string,\n * jobTitle: string,\n * fileNumber: string,\n * postingDate: string,\n * downloadUrl: string,\n * }[],\n * pageIntroForNofListings: string,\n * nofListings: {\n * jobTitle: string,\n * postingDate: string,\n * fileId: string,\n * downloadUrl: string,\n * }[]\n * }}\n */\nconst fakeNormalJsonData = {\n companyName: 'Erickson Immigration Group',\n pageIntro: 'Attached please find current LCAs for the company',\n jobListings: [\n {\n fileId: '0',\n lcaNumber: 'T-123-1234-5678',\n jobTitle: 'Software Engineer',\n fileNumber: '1234567',\n postingDate: 'January 10, 2019',\n downloadUrl: `${window.location.origin}/img/eig-logo.png`,\n },\n {\n fileId: '1',\n lcaNumber: 'T-123-1234-5678',\n jobTitle: 'Product Manager',\n fileNumber: '1234567',\n postingDate: 'January 10, 2019',\n downloadUrl: `${window.location.origin}/img/eig-logo.png`,\n },\n {\n fileId: '2',\n lcaNumber: 'T-123-1234-5678',\n jobTitle: 'UX Designer',\n fileNumber: '1234567',\n postingDate: 'January 10, 2019',\n downloadUrl: `${window.location.origin}/img/eig-logo.png`,\n },\n {\n fileId: '3',\n lcaNumber: 'T-123-1234-5678',\n jobTitle: 'Marketing Manager',\n fileNumber: '1234567',\n postingDate: 'January 10, 2019',\n downloadUrl: `${window.location.origin}/img/eig-logo.png`,\n },\n ],\n pageIntroForNofListings: 'Attached please find current NOFs for the company',\n nofListings: [\n {\n jobTitle: 'Software Engineer',\n postingDate: 'January 10, 2019',\n fileId: '0',\n downloadUrl: `${window.location.origin}/img/eig-logo.png`,\n },\n {\n jobTitle: 'Product Manager',\n postingDate: 'January 10, 2019',\n fileId: '1',\n downloadUrl: `${window.location.origin}/img/eig-logo.png`,\n },\n {\n jobTitle: 'UX Designer',\n postingDate: 'January 10, 2019',\n fileId: '2',\n downloadUrl: `${window.location.origin}/img/eig-logo.png`,\n },\n {\n jobTitle: 'Marketing Manager',\n postingDate: 'January 10, 2019',\n fileId: '3',\n downloadUrl: `${window.location.origin}/img/eig-logo.png`,\n },\n ],\n};\n\n/**\n * A shell to add custom mock data to.\n * @type {{companyName: string}}\n */\nconst fakeShellJsonData = {\n companyName: 'Erickson Immigration Group',\n};\n\n/**\n * Extension to use for fake LCA files.\n * @type {string}\n */\nconst fakeLcaFileExtension = \".svg\";\n\n/**\n * A fake LCA file object.\n * @type {{displayName: string, downloadUrl: string}}\n */\nconst fakeLcaFile = {\n displayName: 'LCA Document',\n // Locally generated data\n downloadUrl: `${window.location.origin}/img/eig-logo.png`,\n};\n\n/**\n * A mock object representing an LCA entry.\n * @type {{\n * fileNumber: string,\n * jobTitle: string,\n * downloadUrl: string,\n * postingDate: string,\n * lcaNumber: string,\n * fileId: string\n * }}\n */\nconst fakeLcaEntryData = {\n fileId: '0',\n lcaNumber: 'T-123-1234-5678',\n jobTitle: 'Marketing Manager',\n fileNumber: '1234567',\n postingDate: '2019-10-17T06:53:42Z',\n // Locally generated data.\n downloadUrl: `${window.location.origin}/img/portal-header-min.jpg`,\n};\n\n/**\n * A mock object representing a PAF entry.\n * @type {{\n * fileNumber: string,\n * jobTitle: string,\n * expiredDate: string,\n * postingDate: string,\n * lcaNumber: string,\n * fileId: string\n * }}\n * @remark Expired dates currently us 'mm-dd-yyyy' format.\n */\nconst fakePafEntryData = {\n fileId: '0',\n lcaNumber: 'T-987-6543-2100',\n jobTitle: 'Junior Accountant',\n fileNumber: '8593892',\n postingDate: '2019-10-17T06:53:42Z',\n expiredDate: '2019-10-30',\n};\n\n/**\n * Extension to use for fake PAF files.\n * @type {string}\n */\nconst fakePafFileExtension = \".svg\";\n\n/**\n * A fake PAF file object.\n * @type {{displayName: string, downloadUrl: string}}\n */\nconst fakePafFile = {\n displayName: 'LCA Document',\n // Locally generated data\n downloadUrl: `${window.location.origin}/img/eig-logo.png`,\n};\n\n/**\n * A fake PAF intro message.\n * @type {string}\n */\nconst fakePafIntroText = \"The company's handbook is listed below. Please see it attached. The company confirms it obliges with all posting guidelines outlined in 20 C.F.R. and 8 C.F.R.\";\n\n/**\n * A fake company memo object.\n * @type {{companyMemo: string}}\n */\nconst fakeCompanyMemo = {\n companyMemo: `${window.location.origin}/img/cropped-eigFavicon-1-32x32.png`,\n};\n\n/**\n * A mock object representing NOF data\n * * @type {{\n * jobTitle: string,\n * postingDate: string,\n * fileId: string,\n * downloadurl: string\n * }}\n */\nconst fakeNofEntryData = {\n jobTitle: 'Marketing Manager',\n postingDate: '2019-10-17T06:53:42Z',\n fileId: '0',\n // Locally generated data.\n downloadUrl: `${window.location.origin}/img/portal-header-min.jpg`,\n};\n\n/**\n * Gets an error object.\n * @returns {{errorMessage: string}} An error object.\n */\nconst buildErrorData = () => ({ errorMessage: 'Invalid access code.' });\n\n/**\n * Generates a mock data object with a custom amount of entries.\n * @param {Number} entryNumber The number of entries to generate.\n * @return {{\n * companyName: (string | null),\n * loginLogo: (string | null),\n * pageHeaderLogo: (string | null),\n * helpContact: (string | null),\n * titleBackground: (string | null),\n * companyMemo: (string | null),\n * companyMemo: (string | null),\n * pafIntro: (string | null),\n * jobListings: (Object[] | null),\n * pafListings: (Object[] | null),\n * nofListings: (Object[] | null)\n * }} A custom mock data object.\n */\nconst buildCustomSizeMockData = (entryNumber) => {\n const mockData = {};\n Object.assign(mockData, fakeShellJsonData, fakeCompanyMemo);\n\n mockData.jobListings = [];\n mockData.pafListings = [];\n mockData.nofListings = [];\n\n let entriesToGenerate = entryNumber;\n if (entryNumber > 100) {\n entriesToGenerate = 100;\n }\n\n mockData.jobListings = buildLcaList(entriesToGenerate);\n mockData.pafListings = buildPafList(entriesToGenerate);\n mockData.nofListings = buildNofList(entriesToGenerate);\n mockData.pafIntro = fakePafIntroText;\n\n console.log(mockData);\n\n return mockData;\n};\n\n/**\n * Generates a list of mock LCA data.\n * @param {Number} itemsToCreate The number of entries to create.\n * @returns {{\n * lcaNumber: (string),\n * jobTitle: (string),\n * fileNumber: (string),\n * postingDate: (string),\n * fileId: (string),\n * downloadUrl: (string)\n * }[]} A collection of formatted LCA data.\n */\nconst buildLcaList = (itemsToCreate) => {\n let entriesToGenerate = itemsToCreate;\n\n if (entriesToGenerate > 100) {\n entriesToGenerate = 100;\n }\n\n const returnList = [];\n\n for (let counter = 0; counter < entriesToGenerate; counter += 1) {\n const fakeModifiedEntry = { ...fakeLcaEntryData };\n fakeModifiedEntry.lcaNumber = fakeModifiedEntry.lcaNumber.concat('-', counter.toString());\n fakeModifiedEntry.fileId = counter;\n returnList.push(fakeModifiedEntry);\n }\n\n return returnList;\n};\n\n/**\n * Generates a list of PAF data.\n * @param {Number} itemsToCreate The number of entries to create.\n * @returns {{\n * lcaNumber: (string | null),\n * jobTitle: (string | null),\n * fileNumber: (string | null),\n * postingDate: (string | null),\n * fileId: (string | null),\n * expiredDate: (string | null)\n * }[]} A collection of formatted PAF data.\n */\nconst buildPafList = (itemsToCreate) => {\n let entriesToGenerate = itemsToCreate;\n\n if (entriesToGenerate > 100) {\n entriesToGenerate = 100;\n }\n\n const returnList = [];\n\n for (let counter = 0; counter < entriesToGenerate; counter += 1) {\n const fakeModifiedEntry = { ...fakePafEntryData };\n fakeModifiedEntry.fileId = counter;\n // Locally generated data\n fakeModifiedEntry.files = [];\n returnList.push(fakeModifiedEntry);\n }\n\n return returnList;\n};\n\n/**\n * Generates a list of mock NOF data.\n * @param {Number} itemsToCreate The number of entries to create.\n * @returns {{\n * jobTitle: (string),\n * postingDate: (string),\n * fileId: (string),\n * }[]} A collection of formatted NOF data.\n */\nconst buildNofList = (itemsToCreate) => {\n let entriesToGenerate = itemsToCreate;\n\n if (entriesToGenerate > 100) {\n entriesToGenerate = 100;\n }\n\n const returnList = [];\n\n for (let counter = 0; counter < entriesToGenerate; counter += 1) {\n const fakeModifiedEntry = { ...fakeNofEntryData };\n fakeModifiedEntry.jobTitle = fakeModifiedEntry.jobTitle.concat('-', counter.toString());\n fakeModifiedEntry.fileId = counter;\n returnList.push(fakeModifiedEntry);\n }\n\n return returnList;\n};\n\n/**\n * Creates a mock object with customizable entry counts.\n * @param {String} parameters A string containing the parameters to use when building the data.\n * @returns {{\n * companyName: (string),\n * loginLogo: (string),\n * pageHeaderLogo: (string | null),\n * helpContact: (string),\n * titleBackground: (string | null),\n * companyMemo: (string | null),\n * pafIntro: (string | null)\n * }} Mock company data.\n */\nconst buildModularMockData = (parameters) => {\n const mockData = {};\n Object.assign(mockData, fakeShellJsonData);\n\n const parameterList = parameters.split('-');\n\n parameterList.forEach((arg) => {\n switch (arg[0]) {\n case 'l':\n mockData.jobListings = buildLcaList(Number(arg.substring(1)));\n break;\n case 'p':\n mockData.pafListings = buildPafList(Number(arg.substring(1)));\n mockData.pafIntro = fakePafIntroText;\n break;\n case 'n':\n mockData.nofListings = buildNofList(Number(arg.substring(1)));\n mockData.pageIntroForNofListings = 'Attached please find current NOFs for the company';\n break;\n case 'm':\n Object.assign(mockData, fakeCompanyMemo);\n mockData.pafIntro = fakePafIntroText;\n break;\n default:\n break;\n }\n });\n\n console.log(mockData);\n\n return mockData;\n};\n\n/**\n * Takes in an access code that contains instructions for building mock data.\n * @param {String} accessCode The access code containing instructions for building mock data.\n * @returns {{\n * companyName: string,\n * jobListings: *[],\n * pageIntro: string\n* }|{\n * companyName: string,\n * loginLogo: string,\n * pageHeaderLogo: (string|null),\n * helpContact: string,\n * titleBackground: (string|null),\n * companyMemo: (string|null),\n * pafIntro: (string|null)\n* }|{\n * errorMessage: string\n* }|{\n * companyName: (string|null),\n * loginLogo: (string|null),\n * pageHeaderLogo: (string|null),\n * helpContact: (string|null),\n * titleBackground: (string|null),\n * companyMemo: (string|null),\n * pafIntro: (string|null),\n * jobListings: (Object[]|null),\n * pafListings: (Object[]|null),\n * nofListings: (Object[]|null)\n * }} A mock data object.\n */\nconst processAccessCode = (accessCode) => {\n const parameterPrefix = accessCode.indexOf('-');\n if (parameterPrefix === -1) {\n return fakeNormalJsonData;\n }\n\n const parameters = accessCode.substring(parameterPrefix + 1);\n\n if (parameters[0] === 'c') {\n return buildCustomSizeMockData(Number(parameters.substring(1)));\n }\n\n if (parameters[0] === 'a') {\n return buildModularMockData(parameters.substring(1));\n }\n\n if (parameters[0] === 'i') {\n return buildErrorData();\n }\n\n return fakeNormalJsonData;\n};\n\n/**\n * Simulates a call for paf file info.\n * @param accessCode {string} The access code to submit with the request.\n * @return {Promise} A promise that will supply a JSON payload in string format.\n */\nexport const getFakePafFileList = (accessCode) => new Promise((resolve, reject) => {\n const parameterPrefix = accessCode.indexOf('-');\n if (parameterPrefix !== -1 && accessCode.includes('-pfe')) {\n reject(new Error('An error occurred when requesting the file list'));\n return;\n }\n\n console.log('Simulating paf file list request. Waiting to deliver mock data.');\n const fileList = [];\n\n setTimeout(() => {\n for (let counter = 0; counter < 5; counter += 1) {\n const temporaryPafFile = { ...fakePafFile };\n temporaryPafFile.displayName = temporaryPafFile.displayName.concat('-', counter, fakePafFileExtension);\n fileList.push(temporaryPafFile);\n }\n\n console.log('Delivering mock paf file list.');\n resolve(fileList);\n }, 1000);\n});\n\n/**\n * Simulates a call for lca file info.\n * @param accessCode {string} The access code to submit with the request.\n * @return {Promise} A promise that will supply a JSON payload in string format.\n */\nexport const getFakeLcaFileList = (accessCode) => new Promise((resolve, reject) => {\n const parameterPrefix = accessCode.indexOf('-');\n if (parameterPrefix !== -1 && accessCode.includes('-pfe')) {\n reject(new Error('An error occurred when requesting the file list'));\n return;\n }\n\n console.log('Simulating lca file list request. Waiting to deliver mock data.');\n const fileList = [];\n\n setTimeout(() => {\n for (let counter = 0; counter < 5; counter += 1) {\n const temporaryLcaFile = { ...fakeLcaFile };\n temporaryLcaFile.displayName = temporaryLcaFile.displayName.concat('-', counter, fakeLcaFileExtension);\n fileList.push(temporaryLcaFile);\n }\n\n console.log('Delivering mock lca file list.');\n resolve(fileList);\n }, 1000);\n});\n\n/**\n * Simulates the call for client data.\n * @param accessCode {string} The access code to submit with the request.\n * @return {Promise} A promise that will supply a JSON payload in string format.\n */\nexport const getFakeJson = (accessCode) => new Promise((resolve) => {\n console.log(`Simulating code: ${accessCode}`);\n console.log('Waiting to deliver mock client data.');\n const result = processAccessCode(accessCode);\n\n if (!result.errorMessage) {\n setTimeout(() => {\n console.log('Delivering mock client data.');\n resolve(processAccessCode(accessCode));\n }, 1000);\n } else {\n throw new Error(result.errorMessage);\n }\n});\n","export default class RequestBuilder {\n /**\n * Gets prod API information.\n * @returns {{url: string, key: string}}\n */\n static getProdApi = () => ({\n url: 'https://api.eiglaw.com',\n key: '596d3c5b01534942939c5e0811046dbd',\n });\n\n /**\n * Gets dev API information.\n * @returns {{url: string, key: string}}\n */\n static getDevApi = () => ({\n url: 'https://eigapi-dev.azure-api.net',\n key: '8a685c2f184646f4abe2de49b4f7a874',\n });\n\n /**\n * A string that can be used to identify a dev URL.\n * @type {string}\n */\n static devString = 'lcapostings-dev';\n\n /**\n * The path for LCA related data.\n * @type {string}\n */\n static lcaPathParam = '/lca';\n\n /**\n * The path for LCA List.\n * @type {string}\n */\n static lcaListpathParam = '/lcas';\n\n /**\n * The path for NoF related data.\n * @type {string}\n */\n static nofPathParam = '/nof';\n\n /**\n * The path for NOF List.\n * @type {string}\n */\n static nofListpathParam = '/nofs';\n\n /**\n * Attachment keyword to use in file request URLs.\n * @type {string}\n */\n static attachmentKeyword = '/attachment';\n\n /**\n * The relative endpoint for requesting authenticated PAF data.\n * @type {string}\n */\n static pafDataPathParam = '/postings';\n\n /**\n * The relative endpoint for requesting PAF data.\n * @type {string}\n */\n static pafPathParam = '/PAF';\n\n /**\n * The path for PAF List.\n * @type {string}\n */\n static pafListpathParam = '/pafs';\n\n \n\n /**\n * A cached token entered by the user.\n * @type {string}\n */\n static accessToken = '';\n\n /**\n * Gets API information based on the current URL.\n * @returns {{url: string, key: string}}\n */\n static getApiInformation = () => {\n if (window.location.href.includes(this.devString)) {\n return this.getDevApi();\n }\n\n return this.getProdApi();\n };\n\n /**\n * The default parameters to send with a request\n * @type {\n * function(): {\n * async: boolean,\n * headers: {\n * 'cache-control': string,\n * },\n * method: string,\n * crossDomain: boolean\n * }\n * }\n */\n static getRequestOptions = () => {\n const requestOptionsBase = {\n async: true,\n crossDomain: true,\n method: 'GET',\n headers: {\n 'cache-control': 'no-cache',\n },\n };\n\n const apiKey = this.getApiInformation().key;\n\n // Strip the API key if it isn't needed.\n if (apiKey && apiKey !== '') {\n requestOptionsBase.headers['Ocp-Apim-Subscription-Key'] = this.getApiInformation().key;\n }\n\n return requestOptionsBase;\n };\n\n /**\n * Gets a request object that requests authenticated PAF client data.\n * @param {string} accessCode The access code for the client to get data for.\n * @returns {\n * {\n * async: boolean,\n * headers: {\n * 'cache-control': string,\n * },\n * method: string,\n * crossDomain: boolean\n * }\n *}\n */\n static buildAuthenticatedClientDataRequestObject(accessCode, paginationContext) {\n\n if (accessCode.indexOf('-') > 0 ) {\n var token = '/'.concat(accessCode.slice(accessCode.indexOf('-')+1));\n }\n const requestUrl = this.getApiInformation().url.concat(\n this.lcaPathParam,\n this.pafListpathParam,\n token,\n );\n\n const apiEndpoint = new URL(requestUrl); \n\n const requestObject = this.getRequestOptions();\n requestObject.url = apiEndpoint.href;\n\n return requestObject;\n }\n\n /**\n * Gets a request object that requests client data.\n * @param {string} accessCode The access code for the client to get data for.\n * @returns {\n * {\n * async: boolean,\n * headers: {\n * 'cache-control': string,\n * },\n * method: string,\n * crossDomain: boolean\n * }\n *}\n */\n static buildClientDataRequestObject(accessCode, paginationContext) {\n accessCode = accessCode.replace('paf-', '');\n var postingsContext = '';\n if (paginationContext.pageContext !== 'lca') {\n postingsContext = this.nofListpathParam;\n }\n else {\n postingsContext = this.lcaListpathParam;\n }\n var token = '/'.concat(accessCode);\n const requestUrl = this.getApiInformation().url.concat(\n this.lcaPathParam,\n postingsContext,\n token,\n );\n const apiEndpoint = new URL(requestUrl);\n\n const requestObject = this.getRequestOptions();\n requestObject.url = apiEndpoint.href;\n\n return requestObject;\n }\n\n /**\n * Gets a URL that requests an LCA file.\n * @param {string} fileId The ID for the desired file.\n * @returns {string} A URL that requests an LCA file.\n */\n static buildLcaFileRequestUrl(fileId, fileName) {\n const requestUrl = this.getApiInformation().url.concat(\n this.lcaPathParam,\n this.lcaPathParam,\n );\n\n const apiEndpoint = new URL(requestUrl);\n apiEndpoint.searchParams.set('lcaid', fileId);\n apiEndpoint.searchParams.set('name', fileName);\n\n return apiEndpoint.href;\n }\n\n /**\n * Gets a URL that requests a NoF file.\n * @param {string} nofFileId The ID string for the NoF file to download.\n * @returns {string} A URL that can be used to request an NoF file.\n */\n static buildNofFileRequestUrl(nofFileId) {\n const requestUrl = this.getApiInformation().url.concat(\n this.lcaPathParam,\n this.nofPathParam,\n '/',\n nofFileId.toString(),\n this.attachmentKeyword,\n )\n\n const apiEndpoint = new URL(requestUrl);\n return apiEndpoint.href;\n }\n\n /**\n * Gets a URL that requests a memo file.\n * @param {string} memoId The ID for this memo file.\n * @returns {string} A URL that requests a memo file.\n */\n static buildMemoFileRequestUrl(memoId) {\n const requestUrl = this.getApiInformation().url.concat(\n this.lcaPathParam,\n this.pafPathParam,\n );\n\n const apiEndpoint = new URL(requestUrl);\n apiEndpoint.searchParams.set('clientid', memoId.toString());\n\n return apiEndpoint.href;\n }\n\n /**\n * Gets a request object that requests files relating to a LCA.\n * @param {string} lcaId The ID for the LCA.\n * @returns {\n * {\n * async: boolean,\n * headers: {\n * 'cache-control': string,\n * },\n * method: string,\n * crossDomain: boolean\n * }\n *}\n */\n static buildLcaFileListRequestObject(lcaId) {\n const requestUrl = this.getApiInformation().url.concat(\n this.lcaPathParam,\n this.lcaPathParam,\n );\n\n const apiEndpoint = new URL(requestUrl);\n apiEndpoint.searchParams.set('LCAID', lcaId);\n\n const requestObject = this.getRequestOptions();\n requestObject.url = apiEndpoint.href;\n\n return requestObject;\n }\n\n /**\n * Gets a request object that requests files relating to a PAF.\n * @param {string} pafId The ID for the PAF.\n * @returns {\n * {\n * async: boolean,\n * headers: {\n * 'cache-control': string,\n * },\n * method: string,\n * crossDomain: boolean\n * }\n *}\n */\n static buildPafFileListRequestObject(pafId) {\n const requestUrl = this.getApiInformation().url.concat(\n this.lcaPathParam,\n this.pafPathParam,\n );\n\n const apiEndpoint = new URL(requestUrl);\n apiEndpoint.searchParams.set('LCAID', pafId);\n\n const requestObject = this.getRequestOptions();\n requestObject.url = apiEndpoint.href;\n\n return requestObject;\n }\n\n /**\n * Gets a URL that requests a file for a PAF.\n * @param {string} pafId The PAF associated with the file being requested.\n * @param {string} fileName The filename for the file being requested.\n * @returns {string} A URL that requests a file for a PAF.\n */\n static buildPafFileRequestUrl(pafId, fileName) {\n const requestUrl = this.getApiInformation().url.concat(\n this.lcaPathParam,\n this.pafPathParam,\n );\n\n const apiEndpoint = new URL(requestUrl);\n apiEndpoint.searchParams.set('pafid', pafId.toString());\n apiEndpoint.searchParams.set('name', fileName);\n\n return apiEndpoint.href;\n }\n\n \n /**\n * Gets a request object with search params.\n * @param {requestUrl} requestUrl To update the search parameters.\n * @param {paginationContext} paginationContext The context for pagination.\n * @returns {\n * {\n * requestUrl: URL,\n *}\n */\n static buildSearchParametersRequestObject(requestUrl, paginationContext) {\n if (paginationContext && paginationContext.limitRows) {\n requestUrl.searchParams.append('limitRows', paginationContext.limitRows);\n if (paginationContext.nextSkipToken) {\n requestUrl.searchParams.append('skipToken', paginationContext.nextSkipToken);\n }\n if (paginationContext.pageContext) {\n requestUrl.searchParams.append('pageContext', paginationContext.pageContext);\n }\n }\n }\n}\n","import RequestBuilder from './requestBuilder';\n\n/**\n * The constant string that defines a posting date that will require special formatting.\n * @type {string}\n */\nconst postingDateVariable = 'postingDate';\n\n/**\n * The constant string that defines an expiration date that will require special formatting.\n * @type {string}\n */\nconst expiredDateVariable = 'expiredDate';\n\n/**\n * The constant string that defines an paf expiration date that will require special formatting.\n * @type {string}\n */\nconst pafExpiryDateVariable = 'pafExpiryDate';\n/**\n * Formats LCA entries.\n * @param {{\n * LastDigitsLCA: (string),\n * JobTitle: (string),\n * FileNumber: (string),\n * PostedDate: (string),\n * Location: (string),\n * OperatingCompany: (string),\n * ID: (string)\n * }[]} jobListings A collection of LCA data to format.\n * @returns {{\n * lcaNumber: (string),\n * jobTitle: (string),\n * fileNumber: (string),\n * postingDate: (string),\n * location: (string),\n * operatingCompany: (string),\n * fileId: (string)\n * }[]} A collection of formatted LCA data.\n */\nfunction formatLcaListings(jobListings) {\n if (!jobListings) {\n return [];\n }\n\n // Left side is local name, right side is expected API name.\n const lcaJobListingMap = [\n ['lcaNumber', 'LastDigitsLCA'],\n ['jobTitle', 'JobTitle'],\n ['fileNumber', 'FileNumber'],\n [postingDateVariable, 'PostedDate'],\n ['location', 'Location'],\n ['operatingCompany', 'OperatingCompany'],\n ['fileId', 'ID'],\n ];\n\n // noinspection JSValidateTypes (Map does not specify return type)\n return jobListings.map((listing) => {\n const formattedListing = convertObjectFormat(lcaJobListingMap, listing);\n\n formattedListing.downloadUrl = RequestBuilder.buildLcaFileRequestUrl(formattedListing.fileId);\n\n return formattedListing;\n });\n}\n\n/**\n * Formats PAF entries.\n * @param {{\n * LastDigitsLCA: (string),\n * JobTitle: (string),\n * FileNumber: (string),\n * PostedDate: (string),\n * Location: (string),\n * OperatingCompany: (string),\n * ID: (string),\n * ExpiredDate: (string)\n * }[]} pafListings A collection of PAF data to format.\n * @returns {{\n * lcaNumber: (string),\n * jobTitle: (string),\n * fileNumber: (string),\n * postingDate: (string),\n * location: (string),\n * operatingCompany: (string),\n * fileId: (string),\n * expiredDate: (string)\n * }[]} A collection of formatted PAF data.\n */\nfunction formatPafListings(pafListings) {\n if (!pafListings) {\n return [];\n }\n\n // Left side is local name, right side is expected API name.\n const pafListingMap = [\n ['lcaNumber', 'LastDigitsLCA'],\n ['jobTitle', 'JobTitle'],\n ['fileNumber', 'FileNumber'],\n [postingDateVariable, 'PostedDate'],\n ['fileId', 'ID'],\n [expiredDateVariable, 'ExpiredDate'],\n [pafExpiryDateVariable, 'PafExpirationDate'],\n ['location', 'Location'],\n ['operatingCompany', 'OperatingCompany'],\n ];\n\n // noinspection JSValidateTypes (Map does not specify return type)\n return pafListings.map((listing) => {\n const formattedListing = convertObjectFormat(pafListingMap, listing);\n\n formattedListing.files = [];\n\n return formattedListing;\n });\n}\n\n/**\n * Formats NOF entries.\n * @param {{\n * jobTitle: (string),\n * postedDate: (string),\n * fileId: (string),\n * Location: (string),\n * OperatingCompany: (string),\n * expiredDate: (string)\n * }[]} nofListings A collection of NOF data to format.\n * @returns {{\n * jobTitle: (string),\n * postingDate: (string),\n * location: (string),\n * operatingCompany: (string),\n * expiredDate: (string)\n * }[]} A collection of formatted NOF data.\n */\nfunction formatNofListings(nofListings) {\n if (!nofListings) {\n return [];\n }\n\n // Left side is local name, right side is expected API name.\n const nofJobListingMap = [\n ['jobTitle', 'JobTitle'],\n [postingDateVariable, 'PostedDate'],\n ['fileId', 'ID'],\n ['location', 'Location'],\n ['operatingCompany', 'OperatingCompany'],\n [expiredDateVariable, 'ExpiredDate']\n ];\n\n // noinspection JSValidateTypes (Map does not specify return type)\n return nofListings.map((listing) => {\n const formattedListing = convertObjectFormat(nofJobListingMap, listing);\n\n formattedListing.downloadUrl = RequestBuilder.buildNofFileRequestUrl(listing.ID);\n\n return formattedListing;\n });\n}\n\n/**\n * Converts expected properties from a received object into the local format.\n * @param {string[][]} propMap A collection of associated property names.\n * @param {Object} apiObject The data object received from the API.\n */\nfunction convertObjectFormat(propMap, apiObject) {\n const formattedObject = {};\n\n for (let index = 0; index < propMap.length; index += 1) {\n const apiPropLabel = propMap[index][1];\n if (apiObject[apiPropLabel]) {\n const localPropLabel = propMap[index][0];\n formattedObject[localPropLabel] = applySpecialFormatting(\n localPropLabel,\n apiObject[apiPropLabel],\n );\n }\n }\n\n return formattedObject;\n}\n\n/**\n * Formats any LCA listings found in the provided data.\n * @param {{\n * companyName: (string | null),\n * loginLogo: (string | null),\n * pageHeaderLogo: (string | null),\n * helpContact: (string | null),\n * pageIntro: (string | null),\n * titleBackground: (string | null),\n * companyMemo: (string | null),\n * pafMemo: (number | null),\n * PAFText: (string | null),\n * nofText: (string | null)\n * }} clientData Company data that hasn't been formatted.\n * @returns {{\n * companyName: (string | null),\n * loginLogo: (string | null),\n * pageHeaderLogo: (string | null),\n * helpContact: (string | null),\n * pageIntro: (string | null),\n * titleBackground: (string | null),\n * companyMemo: (string | null),\n * jobListings: (array),\n * pafIntro: (string | null),\n * pageIntroForNofListings: (string | null)\n * }} Formatted company data.\n */\nfunction formatCompanyData(clientData) {\n // Left side is local name, right side is expected API name.\n // Excludes jobListings, pafListings, nofListings as they are handled in other functions.\n const companyDataMap = [\n ['companyName', 'companyName'],\n ['loginLogo', 'loginLogo'],\n ['pageHeaderLogo', 'pageHeaderLogo'],\n ['helpContact', 'helpContact'],\n ['pageIntro', 'pageIntro'],\n ['titleBackground', 'titleBackground'],\n ['companyMemo', 'companyMemo'], \n ['pafIntro', 'PAFText'],\n ['pageIntroForNofListings', 'nofText'],\n ['nextSkipToken', 'skipToken']\n ];\n\n const formattedData = {\n jobListings: [],\n };\n\n for (let index = 0; index < companyDataMap.length; index += 1) {\n // skip formatting for jobListings , pafListings, nofListings\n // because a special function will handle that.\n if (clientData[companyDataMap[index][1]]) {\n formattedData[companyDataMap[index][0]] = clientData[companyDataMap[index][1]];\n }\n }\n\n // noinspection JSValidateTypes\n return formattedData;\n}\n\n/**\n * Builds a URL to request the PAF memo file.\n * @param {number} pafMemoFileId The ID for the PAF memo file.\n * @returns {string | null} a URL that will request the PAF memo file.\n */\nfunction buildPafMemoUrl(pafMemoFileId) {\n if (!pafMemoFileId) {\n return null;\n }\n\n return RequestBuilder.buildMemoFileRequestUrl(pafMemoFileId);\n}\n\n/**\n * Applies any special formatting that might be needed for a particular value.\n * If no formatting is needed it will return the original value.\n * @param {string} name The variable name to check for formatting needs.\n * @param {string | number} value The value to format.\n * @returns {string | number} A formatted value.\n */\nfunction applySpecialFormatting(name, value) {\n switch (name) {\n case postingDateVariable:\n case expiredDateVariable:\n return formatDateString(value);\n case pafExpiryDateVariable:\n return formatDateString(value);\n default:\n return value;\n }\n}\n\n/**\n * Formats a date string to the format for displaying on the UI.\n * A null or empty string is supplied then an empty string will be returned.\n * @param {string} date Date string to format.\n * @returns {string} A formatted date string.\n */\nfunction formatDateString(date) {\n if (!date || !date.trim()) return '';\n\n const options = { year: 'numeric', month: 'numeric', day: 'numeric' };\n\n let convertedDate = new Date(date);\n\n // noinspection JSCheckFunctionSignatures\n if (convertedDate instanceof Date && isNaN(convertedDate)) {\n // intended to convert 'mm-dd-yyyy' to 'mm/dd/yyyy' if first conversion fails.\n const modifiedDateString = date.replace('-', '/');\n convertedDate = new Date(modifiedDateString);\n }\n\n return convertedDate.toLocaleDateString('en-US', options);\n}\n\n/**\n * Formats company data from the API definition to the local definition.\n * @param {{\n * companyName: (string | null),\n * loginLogo: (string | null),\n * pageHeaderLogo: (string | null),\n * helpContact: (string | null),\n * titleBackground: (string | null),\n * companyMemo: (string | null),\n * pafMemo: (number | null),\n * PAFText: (string | null),\n * pageIntro: (string | null),\n * nofText: (string | null),\n * jobListings: (Object[] | null),\n * pafListings: (Object[] | null),\n * nofListings: (Object[] | null),\n * }} responseJson Company data object from API.\n * @return {{\n * companyName: (string | null),\n * loginLogo: (string | null),\n * pageHeaderLogo: (string | null),\n * helpContact: (string | null),\n * titleBackground: (string | null),\n * companyMemo: (string | null),\n * pafIntro: (string | null),\n * pageIntro: (string | null),\n * pageIntroForNofListings: (string | null),\n * }} A formatted company data object.\n */\nconst convertResponse = (responseJson) => {\n const formattedCompanyData = formatCompanyData(responseJson);\n\n formattedCompanyData.jobListings = formatLcaListings(responseJson.jobListings);\n\n if (responseJson.pafListings || responseJson.pafMemo) {\n formattedCompanyData.pafListings = formatPafListings(responseJson.pafListings);\n formattedCompanyData.companyMemo = buildPafMemoUrl(responseJson.pafMemo);\n } else {\n formattedCompanyData.nofListings = formatNofListings(responseJson.nofListings);\n }\n\n return formattedCompanyData;\n};\n\nexport default convertResponse;\n","import convertResponse from '../helpers/dataFormatter';\n\n/**\n * Processes a successful response\n * @param {Response} response A successful response.\n * @param {Function} resolve The function to call if the request succeeds.\n * @param {Function} reject The function to call if the request fails.\n */\nconst handleSuccess = (response, resolve, reject) => {\n response.json().then((responseJson) => {\n if (responseJson) {\n resolve(convertResponse(responseJson));\n }\n }).catch(() => {\n reject('An unknown error occurred when communicating with the server.');\n });\n};\n\n/**\n * Performs an asynchronous request for JSON data.\n * @param {Request} request The request to process.\n * @param {Function} resolve The function to call if the request succeeds.\n * @param {Function} reject The function to call if the request fails.\n */\nexport default function jsonRequest(request, resolve, reject) {\n fetch(request.url, request)\n .then((response) => {\n if (response.ok) {\n handleSuccess(response, resolve, reject);\n } else if (response.status === 401 || response.status === 404) {\n reject('Access not authorized.');\n } else {\n reject('An unknown error occurred when communicating with the server.');\n }\n })\n .catch(() => {\n reject('An unknown error occurred when communicating with the server.');\n });\n}\n","import { getFakeJson } from '../helpers/mockJsonData';\nimport jsonRequest from './asyncRequestHandler';\nimport RequestBuilder from '../helpers/requestBuilder';\n\n/**\n * Handles a request for LCA data.\n * @param accessCode {string} The access code to submit with the request.\n * @param resolve {function(*=): *} Function to execute on success.\n * @param reject {function(*=): *} Function to execute on failure/error.\n * @return {undefined} This function does not return a value.\n */\nconst requestClientData = (accessCode, paginationContext, resolve, reject) => {\n if (accessCode.indexOf('-') === 0) {\n getFakeJson(accessCode)\n .then((response) => resolve(response))\n .catch(() => {\n reject('An unknown error occurred when communicating with the server.');\n });\n return;\n }\n\n const request = RequestBuilder.buildClientDataRequestObject(accessCode, paginationContext);\n\n jsonRequest(request, resolve, reject);\n};\n\nexport default requestClientData;\n","import { getFakeJson } from '../helpers/mockJsonData';\nimport jsonRequest from './asyncRequestHandler';\nimport RequestBuilder from '../helpers/requestBuilder';\n\n/**\n * Handles an authenticated request for client data.\n * @param accessCode {string} The access code to submit with the request.\n * @param idToken {string} The authentication token to submit with the request.\n * @param resolve {function(*=): *} Function to execute on success.\n * @param reject {function(*=): *} Function to execute on failure/error.\n * @return {undefined} This function does not return a value.\n */\nconst requestAuthenticatedClientData = (accessCode, idToken, paginationContext, resolve, reject) => {\n if (accessCode.indexOf('-') === 0) {\n getFakeJson(accessCode)\n .then((response) => resolve(response))\n .catch(() => {\n reject('An unknown error occurred when communicating with the server.');\n });\n return;\n }\n\n const request = RequestBuilder.buildAuthenticatedClientDataRequestObject(accessCode, paginationContext);\n request.headers.Authorization = `Bearer ${idToken}`;\n\n jsonRequest(request, resolve, reject);\n};\n\nexport default requestAuthenticatedClientData;\n","import { getFakePafFileList } from '../helpers/mockJsonData';\nimport RequestBuilder from '../helpers/requestBuilder';\n\n/**\n * Formats company data from the API definition to the local definition.\n * @param pafId {string} The ID fo the PAF associated with this data.\n * @param responseJson {Object} Company data object from API.\n * @return {{\n * displayName: string,\n * downloadUrl: string\n * }[]} A formatted company data object.\n */\nconst convertResponse = (pafId, responseJson) => {\n // Left side is local name, right side is expected API name\n const pafFileListDataMap = [\n ['displayName', 'Name'],\n ];\n\n const formattedPafFileList = [];\n\n responseJson.forEach((file) => {\n const formattedFile = {};\n\n // Copy values based on the mapping, but only if property is defined.\n for (let index = 0; index < pafFileListDataMap.length; index += 1) {\n if (file[pafFileListDataMap[index][1]]) {\n formattedFile[pafFileListDataMap[index][0]] = file[pafFileListDataMap[index][1]];\n }\n }\n\n formattedFile.downloadUrl = RequestBuilder.buildPafFileRequestUrl(\n isNaN(Number.parseInt(pafId, 10)) ? file.id : pafId,\n formattedFile.displayName,\n formattedFile.requiresAuth = true,\n );\n\n formattedPafFileList.push(formattedFile);\n });\n\n return formattedPafFileList;\n};\n\n/**\n * Removes characters from a string that are not permitted.\n * @param accessCode {string} A string of user input.\n * @return {string} A string with only permitted characters included.\n */\nconst sanitizeInput = (accessCode) => accessCode?.replace(/[^0-9a-z-]/gi, '');\n\n/**\n * Handles processing for successful responses.\n * @param response {Response} A successful response.\n * @param pafId {string} The ID of the PAF related to this data.\n * @param resolve {function(*=): *} Function to execute on success.\n * @param reject {function(*=): *} Function to execute on failure/error.\n */\nconst handleSuccess = (response, pafId, resolve, reject) => {\n response.json().then((responseJson) => {\n if (responseJson) {\n resolve(convertResponse(pafId, responseJson));\n }\n }).catch(() => reject('An error occurred while requesting the file list.'));\n};\n\n/**\n * Handles a request for the file list for a PAF.\n * @param accessCode {string} The access code to submit with the request.\n * @param idToken {string} The authorization token to use for the request.\n * @param pafId {string} The ID of the PAF to request information for.\n * @param resolve {function(*=): *} Function to execute on success.\n * @param reject {function(*=): *} Function to execute on failure/error.\n * @return {undefined} This function does not return a value.\n */\nconst requestPafFileList = (accessCode, idToken, pafId, resolve, reject) => {\n const sanitizedCode = sanitizeInput(accessCode);\n\n if (sanitizedCode.indexOf('-') === 0) {\n getFakePafFileList(accessCode)\n .then((response) => resolve(response))\n .catch((error) => reject(error));\n return;\n }\n\n const request = RequestBuilder.buildPafFileListRequestObject(pafId);\n request.headers.Authorization = `Bearer ${idToken}`;\n\n fetch(request.url, request)\n .then((response) => {\n if (response.ok) {\n handleSuccess(response, pafId, resolve, reject);\n } else {\n reject('An error occurred while requesting the file list.');\n }\n }).catch((error) => {\n reject(error.message);\n });\n};\n\nexport default requestPafFileList;\n","/**\n * The relative endpoint that will provide current authentication info.\n * @type {string}\n */\nconst authEndpoint = '/.auth/me';\n\n/**\n * The relative endpoint that handles authenticating a user.\n * @type {string}\n */\nexport const loginEndpoint = '/.auth/login/aad?post_login_redirect_url=%2F';\n\n/**\n * The label used for the expiration time of a JWT.\n * @type {string}\n */\nconst expirationClaimLabel = 'exp';\n\n/**\n * The cached authentication token.\n * @type {string}\n */\nlet cachedIdToken;\n\n/**\n * The date/time (in milliseconds) when the current cached token expires.\n * @type {Number}\n */\nlet cacheExpiration;\n\n/**\n * Gets the value for a single claim from a collection.\n * @param {{\n * typ: string,\n * val: string,\n * }[]} claimList A collection of claims.\n * @param {string} typ The claim name to get a value for.\n * @returns {string | null} The value for a single claim.\n */\nconst getClaim = (claimList, typ) => {\n if (!claimList) {\n return null;\n }\n\n const foundClaim = claimList.find((claim) => claim.typ === typ);\n\n if (!foundClaim) {\n return null;\n }\n\n return foundClaim.val;\n};\n\n/**\n * Processes a successful response.\n * @param {Response} response A successful response.\n * @param {number} currentTime The time (in milliseconds) to compare cache expiration against.\n * @param {function} resolve Function to call on success.\n * @param {function} reject Function to call on error or failure.\n * @return {undefined} This function does not return a value.\n */\nconst handleSuccess = (response, currentTime, resolve, reject) => {\n response.json().then((responseJson) => {\n const { id_token: idToken, user_claims: claims } = responseJson[0];\n cachedIdToken = idToken;\n // JWT expiration time is stored in epoch format to the nearest second.\n // This will fill in the time for milliseconds for proper comparison.\n cacheExpiration = Number(getClaim(claims, expirationClaimLabel)) * 1000;\n if (currentTime < cacheExpiration) {\n resolve(cachedIdToken);\n } else {\n window.location.href = loginEndpoint;\n }\n }).catch((error) => reject(error));\n};\n\n/**\n * Gets an authentication token.\n * @param {Function} resolve The function to supply the authentication token to when available.\n * @param {Function} reject The function to call in the event of an error.\n * @return {undefined} This function does not return a value.\n */\nconst requestIdToken = (resolve, reject) => {\n const currentTime = Date.now();\n\n if (cachedIdToken && currentTime < cacheExpiration) {\n resolve(cachedIdToken);\n return;\n }\n\n fetch(authEndpoint)\n .then((response) => {\n if (response.ok) {\n handleSuccess(response, currentTime, resolve, reject);\n } else {\n window.location.href = loginEndpoint;\n }\n })\n .catch(() => {\n window.location.href = loginEndpoint;\n });\n};\n\nexport default requestIdToken;\n","/**\n * Executes a request and processes the result.\n * @param request {Object} The request to execute.\n * @param defaultFileName {string} The default filename to use if none is supplied.\n * @param resolve {function(*=): *} Function to execute on success.\n * @param reject {function(*=): *} Function to execute on failure/error.\n * @return {undefined} This function does not return a value.\n */\nimport requestBuilder from '../helpers/requestBuilder';\n\nfunction performFileRequest(request, defaultFileName, reject, resolve) {\n fetch(request.url, request)\n .then((response) => {\n if (response.ok) {\n return processResponse(response, defaultFileName);\n }\n\n if (response.status === 404) {\n throw new Error('Could not find file.');\n } else if (response.status === 401) {\n throw new Error('You are not authorized to view this file');\n } else {\n throw new Error('An unknown error occurred.');\n }\n })\n .catch((error) => reject(error))\n .finally(resolve);\n}\n\n/**\n * Handles a request for a file.\n * @param fileUrl {string} The URL to make the request to.\n * @param defaultFileName {string} The default filename to use if none is supplied.\n * @param resolve {function(*=): *} Function to execute on success.\n * @param reject {function(*=): *} Function to execute on failure/error.\n * @return {undefined} This function does not return a value.\n */\nexport const requestFile = (fileUrl, defaultFileName, resolve, reject) => {\n const request = {};\n\n try {\n Object.assign(request, requestBuilder.getRequestOptions());\n request.url = new URL(fileUrl);\n } catch (error) {\n reject(error);\n return;\n }\n\n performFileRequest(request, defaultFileName, reject, resolve);\n};\n\n/**\n * Handles an authenticated request for a file.\n * @param fileUrl {string} The URL to make the request to.\n * @param idToken {string} The authentication token to submit with the request.\n * @param defaultFileName {string} The default filename to use if none is supplied.\n * @param resolve {function(*=): *} Function to execute on success.\n * @param reject {function(*=): *} Function to execute on failure/error.\n * @return {undefined} This function does not return a value.\n */\nexport const requestAuthenticatedFile = (fileUrl, idToken, defaultFileName, resolve, reject) => {\n const request = {};\n\n try {\n Object.assign(request, requestBuilder.getRequestOptions());\n\n request.headers.Authorization = `Bearer ${idToken}`;\n request.url = new URL(fileUrl);\n } catch (error) {\n reject(error);\n return;\n }\n\n performFileRequest(request, defaultFileName, reject, resolve);\n};\n\n/**\n * Process the response from the file request.\n * @param response {Response} The response from the file request.\n * @param defaultFileName {string} The default filename to use if none is supplied.\n */\nconst processResponse = (response, defaultFileName) => {\n const fileName = getFilename(response, defaultFileName);\n response.blob().then((blob) => saveBlob(response, blob, fileName));\n};\n\n/**\n * Prompts the user to download the file supplied from a response.\n * @param response {Response} The response received from the file request.\n * @param blob {Blob} The blob received from the response.\n * @param fileName {string} The name to insert when the download prompt appears.\n */\nconst saveBlob = (response, blob, fileName) => {\n // It is necessary to create a new blob object with mime-type explicitly set\n // otherwise only Chrome works like it should\n const newBlob = new Blob([blob], { type: response.headers.get('content-type') });\n\n // IE doesn't allow using a blob object directly as link href\n // instead it is necessary to use msSaveOrOpenBlob\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\n window.navigator.msSaveOrOpenBlob(newBlob);\n return;\n }\n\n // For other browsers:\n // Create a link pointing to the ObjectURL containing the blob.\n const data = window.URL.createObjectURL(newBlob);\n const link = document.createElement('a');\n link.style.display = 'none';\n link.href = data;\n link.download = fileName;\n document.body.appendChild(link);\n link.click();\n setTimeout(() => window.URL.revokeObjectURL(data), 1000);\n};\n\n/**\n * Gets the filename provided with a response or returns the default provided name.\n * @param response {Response} The response from a file request.\n * @param defaultFileName {string} The filename to use if no filename is defined.\n * @returns {string} The filename to use with this file.\n */\nconst getFilename = (response, defaultFileName) => {\n const disposition = response.headers.get('Content-Disposition');\n if (disposition && disposition.indexOf('attachment') !== -1) {\n const filenameRegex = /filename[^;=\\n]*=((['\"]).*?\\2|[^;\\n]*)/;\n const matches = filenameRegex.exec(disposition);\n if (matches != null && matches[1]) {\n return matches[1].replace(/['\"]/g, '');\n }\n }\n return `${defaultFileName}`;\n};\n","import { getFakeLcaFileList } from '../helpers/mockJsonData';\nimport RequestBuilder from '../helpers/requestBuilder';\n\n/**\n * Formats company data from the API definition to the local definition.\n * @param lcaId {string} The ID fo the LCA associated with this data.\n * @param responseJson {Object} Company data object from API.\n * @return {{\n * displayName: string,\n * downloadUrl: string\n * }[]} A formatted company data object.\n */\nconst convertResponse = (lcaId, responseJson) => {\n // Left side is local name, right side is expected API name\n const lcaFileListDataMap = [\n ['displayName', 'Name'],\n ];\n\n const formattedLcaFileList = [];\n\n responseJson.forEach((file) => {\n const formattedFile = {};\n\n // Copy values based on the mapping, but only if property is defined.\n for (let index = 0; index < lcaFileListDataMap.length; index += 1) {\n if (file[lcaFileListDataMap[index][1]]) {\n formattedFile[lcaFileListDataMap[index][0]] = file[lcaFileListDataMap[index][1]];\n }\n }\n\n formattedFile.downloadUrl = RequestBuilder.buildLcaFileRequestUrl(\n isNaN(Number.parseInt(lcaId, 10)) ? file.id : lcaId,\n formattedFile.displayName,\n formattedFile.requiresAuth = false,\n );\n\n formattedLcaFileList.push(formattedFile);\n });\n\n return formattedLcaFileList;\n};\n\n/**\n * Removes characters from a string that are not permitted.\n * @param accessCode {string} A string of user input.\n * @return {string} A string with only permitted characters included.\n */\nconst sanitizeInput = (accessCode) => accessCode?.replace(/[^0-9a-z-]/gi, '');\n\n/**\n * Handles processing for successful responses.\n * @param response {Response} A successful response.\n * @param lcaId {string} The ID of the LCA related to this data.\n * @param resolve {function(*=): *} Function to execute on success.\n * @param reject {function(*=): *} Function to execute on failure/error.\n */\nconst handleSuccess = (response, lcaId, resolve, reject) => {\n response.json().then((responseJson) => {\n if (responseJson) {\n resolve(convertResponse(lcaId, responseJson));\n }\n }).catch(() => reject('An error occurred while requesting the file list.'));\n};\n\n/**\n * Handles a request for the file list for a LCA.\n * @param accessCode {string} The access code to submit with the request.\n * @param lcaId {string} The ID of the LCA to request information for.\n * @param resolve {function(*=): *} Function to execute on success.\n * @param reject {function(*=): *} Function to execute on failure/error.\n * @return {undefined} This function does not return a value.\n */\nconst requestLcaFileList = (accessCode, lcaId, resolve, reject) => {\n const sanitizedCode = sanitizeInput(accessCode);\n\n if (sanitizedCode.indexOf('-') === 0) {\n getFakeLcaFileList(accessCode)\n .then((response) => resolve(response))\n .catch((error) => reject(error));\n return;\n }\n\n const request = RequestBuilder.buildLcaFileListRequestObject(lcaId);\n\n fetch(request.url, request)\n .then((response) => {\n if (response.ok) {\n handleSuccess(response, lcaId, resolve, reject);\n } else {\n reject('An error occurred while requesting the file list.');\n }\n }).catch((error) => {\n reject(error.message);\n });\n};\n\nexport default requestLcaFileList;\n","import requestClientData from './requests/clientDataHandler';\nimport requestAuthenticatedClientData from './requests/authenticatedClientDataHandler';\nimport requestPafFileList from './requests/pafFileListHandler';\nimport requestIdToken from './requests/authHandler';\nimport { requestFile, requestAuthenticatedFile } from './requests/fileRequestHandler';\nimport requestLcaFileList from './requests/lcaFileListHandler';\n\nexport default class downloadHandler {\n /**\n * Handles a request for LCA data.\n * @param accessCode {string} The access code to submit with the request.\n * @param resolve {function(*=): *} Function to execute on success.\n * @param reject {function(*=): *} Function to execute on failure/error.\n * @return {undefined} This function does not return a value.\n */\n static requestClientData = (accessCode, paginationContext, resolve, reject) => {\n requestClientData(accessCode, paginationContext, resolve, reject);\n };\n\n /**\n * Handles a request for LCA data.\n * @param accessCode {string} The access code to submit with the request.\n * @param idToken {string} The authentication token to submit with the request.\n * @param resolve {function(*=): *} Function to execute on success.\n * @param reject {function(*=): *} Function to execute on failure/error.\n * @return {undefined} This function does not return a value.\n */\n static requestAuthenticatedClientData = (accessCode, idToken, paginationContext, resolve, reject) => {\n requestAuthenticatedClientData(accessCode, idToken, paginationContext, resolve, reject);\n };\n\n /**\n * Handles a request for the file list of a LCA.\n * @param accessCode {string} The access code to submit with the request.\n * @param lcaId {string} The ID fo the LCA to request information for.\n * @param resolve {function(*=): *} Function to execute on success.\n * @param reject {function(*=): *} Function to execute on failure/error.\n * @return {undefined} This function does not return a value.\n */\n static requestLcaFileList = (accessCode, lcaId, resolve, reject) => {\n requestLcaFileList(accessCode, lcaId, resolve, reject);\n };\n\n /**\n * Handles a request for the file list of a PAF.\n * @param accessCode {string} The access code to submit with the request.\n * @param idToken {string} The authentication token to submit with the request.\n * @param pafId {string} The ID fo the PAF to request information for.\n * @param resolve {function(*=): *} Function to execute on success.\n * @param reject {function(*=): *} Function to execute on failure/error.\n * @return {undefined} This function does not return a value.\n */\n static requestPafFileList = (accessCode, idToken, pafId, resolve, reject) => {\n requestPafFileList(accessCode, idToken, pafId, resolve, reject);\n };\n\n // noinspection JSUnusedLocalSymbols\n /**\n * Handles a file request and attempts to save the result to the computer.\n * @param pageUrl {string} The page url to use for client lookup.\n * @param resolve {function(object): *} Function to execute on success.\n * @param reject {function(string): *} Function to execute on failure/error.\n * @return {undefined} This function does not return a value.\n */\n static requestBrandingData = (pageUrl, resolve, reject) => {\n // PLACEHOLDER\n resolve({});\n };\n\n /**\n * Gets a authentication token.\n * @param resolve {function(string): *} Function to execute on success.\n * @param reject {function(string): *} Function to execute on failure/error.\n */\n static requestIdToken = (resolve, reject) => {\n requestIdToken(resolve, reject);\n };\n\n /**\n * Downloads a file and attempts to save it to the local machine.\n * @param fileUrl {string} The URL to make the request to.\n * @param defaultFileName {string} The filename to use if none is provided with the file.\n * @param resolve {function} Function to execute on success.\n * @param reject {function} Function to execute on failure/error.\n */\n static requestFile = (fileUrl, defaultFileName, resolve, reject) => {\n requestFile(fileUrl, defaultFileName, resolve, reject);\n };\n\n /**\n * Gets a file that requires authentication.\n * @param fileUrl {string} The URL to make the request to.\n * @param idToken {string} The authentication token to send with the request.\n * @param defaultFileName {string} The filename to use if none is provided with the file.\n * @param resolve {function} Function to execute on success.\n * @param reject {function} Function to execute on failure/error.\n */\n static requestAuthenticatedFile = (fileUrl, idToken, defaultFileName, resolve, reject) => {\n requestAuthenticatedFile(fileUrl, idToken, defaultFileName, resolve, reject);\n }\n}\n","import { CircularProgress, withStyles } from '@material-ui/core';\n\n/**\n * A pre-branded loading indicator.\n * @type {React.ComponentClass}\n */\nexport default withStyles({\n root: {\n color: '#58b228',\n },\n})(CircularProgress);\n","import React from 'react';\nimport BrandedCircularLoadingIndicator from './BrandedCircularLoadingIndicator';\n\n/**\n * Builds the loading circle to display when building the login portal.\n * @return {jsx} A loading indicator component.\n */\nexport default () => (\n
\n \n
\n);\n","import React from 'react';\nimport BrandedCircularLoadingIndicator from './BrandedCircularLoadingIndicator';\n\n/**\n * Builds the loading circle to display when logging in.\n * @return {jsx} A loading indicator component.\n */\nexport default () => (\n
\n \n

We are fetching your data, this might take a minute.

\n
\n);\n","import React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Button, TextField } from '@material-ui/core';\nimport LoginProgressIndicator from './LoginProgressIndicator';\n\n/**\n * Builds the login form.\n * @param processingLogin {bool} whether or not the page is loading data.\n * the access code entered.\n * @param errorMessage {string} The most recent error message to display.\n * @param onClick {function} Handles login button press.\n * @return {jsx} A login form component.\n */\nconst LoginForm = ({ processingLogin, errorMessage, onClick }) => {\n let input;\n\n if (processingLogin) {\n return ();\n }\n\n const cachedToken = sessionStorage.getItem('cachedAccessToken');\n\n if (cachedToken) {\n onClick(cachedToken);\n }\n\n return (\n
\n
\n Please provide the token provided to you to view postings for your company.\n
\n
{errorMessage}
\n {\n e.preventDefault();\n const token = input.value.trim();\n if (!token) {\n return;\n }\n onClick(token);\n }}\n >\n { input = node; }}\n className=\"accessCodeInput\"\n label=\"Enter your access code\"\n />\n \n \n
\n );\n};\nLoginForm.propTypes = {\n processingLogin: PropTypes.bool.isRequired,\n errorMessage: PropTypes.string,\n onClick: PropTypes.func.isRequired,\n};\nLoginForm.defaultProps = {\n errorMessage: null,\n};\n\nexport default LoginForm;\n","import downloadHandler from '../api/downloadHandler';\n\n/**\n * Removes characters from a string that are not permitted.\n * @param accessCode {string} A string of user input.\n * @return {string} A string with only permitted characters included.\n */\nexport const sanitizeInput = (accessCode) => accessCode?.replace(/[^0-9a-z-]/gi, '');\n\n/**\n * Determines and initiates any additional steps needed to perform a request.\n * @param {string} token The client token being used.\n * @param {Function} authPerformed A function to call if the additional authentication was needed.\n * @param {Function} noAuthPerformed A function to call if there was no additional authentication.\n */\nexport const handleAuthRequirement = (token, authPerformed, noAuthPerformed) => {\n if (token.toUpperCase().startsWith('PAF-')) {\n downloadHandler.requestIdToken(\n (response) => authPerformed(response),\n (error) => noAuthPerformed(error),\n );\n } else {\n authPerformed(null);\n }\n};\n\n// noinspection ES6ModulesDependencies,JSUnresolvedVariable\n/**\n * Builds default company data for anything not supplied by the API.\n * @returns {{companyName: string,\n * pageHeaderLogo: (string | null),\n * pageIntro: string,\n * titleBackground: string}} An object containing default company data.\n */\nexport const createDefaultClientData = () => ({\n companyName: 'Erickson Immigration Group',\n pageHeaderLogo: null,\n pageIntro: 'Here you\\'ll find your company\\'s active LCAs.',\n titleBackground: `${process.env.PUBLIC_URL}/img/portal-header-min.jpg`,\n});\n\n/**\n * Builds default page context data for anything not supplied by the API.\n * @returns {{pageContext: string,\n * skipToken: (string | null),\n * limitRows: int}} An object containing default page context data.\n */\n export const createDefaultContextData = () => ({\n pageContext: 'lca',\n nextSkipToken: null,\n limitRows: 20\n });\n","import RequestBuilder from '../api/helpers/requestBuilder';\nimport downloadHandler from '../api/downloadHandler';\nimport {\n createDefaultClientData,\n handleAuthRequirement,\n sanitizeInput,\n createDefaultContextData,\n} from './clientDataLogic';\nimport {loginEndpoint} from '../api/requests/authHandler';\n\n// Login actions\nexport const LOGIN_BEGIN = 'LOGIN_BEGIN';\nexport const LOGIN_SUCCESS = 'LOGIN_SUCCESS';\nexport const LOGIN_ERROR = 'LOGIN_ERROR';\nexport const LOGIN_RESET = 'LOGIN_RESET';\nexport const LOGIN_SUCCESS_DATA_ERROR = 'LOGIN_SUCCESS_DATA_ERROR';\n\n/**\n * Defines an action that updates state to reflect a login being performed.\n * @returns {{type: *}}\n */\nexport const loginBegin = () => ({\n type: LOGIN_BEGIN,\n});\n\n/**\n * Defines an action that updates state with login success information.\n * @param {Object} clientJson The data returned by the login.\n * @param {string} token The token used for the login.\n * @returns {{clientJson: *, type: *, token: *}}\n */\nexport const loginSuccess = (clientJson, token) => ({\n type: LOGIN_SUCCESS,\n clientJson,\n token,\n});\n\n/**\n * Defines an action that updates state with login success information, \n * but adding an error indicating API failure \n * @param {string} token The token used for the login.\n * @param {string} errorMessage The error returned by the API.\n * @returns {{errorMessage: *, type: *, token: *}}\n */\nexport const loginSuccessDataError = (token, errorMessage) => ({\n type: LOGIN_SUCCESS_DATA_ERROR,\n token,\n errorMessage\n});\n\n/**\n * Defines an action that updates state with login failure information.\n * @param {string} errorMessage The error message for this issue.\n * @returns {{errorMessage: *, type: *}}\n */\nexport const loginError = (errorMessage) => ({\n type: LOGIN_ERROR,\n errorMessage,\n});\n\n/**\n * Defines an action that resets the state.\n * @returns {{type: *}}\n */\nexport const loginReset = () => ({\n type: LOGIN_RESET,\n});\n\n/**\n * Gets a function that will perform a login with the given token.\n * @param {string} token The token to use when logging in.\n * @returns {Function} A function that can be used to perform a login.\n */\nexport const performLogin = (token, paginationContext) => (dispatch) => {\n dispatch(loginBegin());\n\n const cleanToken = sanitizeInput(token);\n if (!paginationContext) {\n paginationContext = createDefaultContextData();\n }\n RequestBuilder.accessToken = cleanToken;\n sessionStorage.setItem('cachedAccessToken', token);\n\n handleAuthRequirement(\n token,\n (idToken) => {\n downloadHandler.requestClientData(\n cleanToken,\n paginationContext,\n (response) => dispatch(processLoginData(cleanToken, response)),\n (errorMessage) => {\n sessionStorage.clear();\n return dispatch(loginError(errorMessage));\n },\n );\n },\n () => {},\n );\n};\n\n/**\n * Gets a function that will load postings data with the given token.\n * @param {string} token The token to use when logging in.\n * @returns {paginationContext} A context to get the data.\n */\nexport const loadPostings = (token, paginationContext) => (dispatch) => {\n dispatch(pageProcessingBegin());\n\n const cleanToken = sanitizeInput(token);\n if (!paginationContext) {\n paginationContext = createDefaultContextData();\n }\n RequestBuilder.accessToken = cleanToken;\n\n handleAuthRequirement(\n token,\n (idToken) => {\n if (idToken && paginationContext.pageContext === 'paf') {\n downloadHandler.requestAuthenticatedClientData(\n cleanToken,\n idToken,\n paginationContext,\n (response) => dispatch(processLoginData(cleanToken, response)),\n (errorMessage) => {\n if (errorMessage === 'Access not authorized.') {\n sessionStorage.clear();\n window.location.href = loginEndpoint;\n }\n else {\n return dispatch(processDataError(cleanToken, paginationContext, errorMessage));\n } \n },\n );\n } else {\n downloadHandler.requestClientData(\n cleanToken,\n paginationContext,\n (response) => dispatch(processLoginData(cleanToken, response)),\n (errorMessage) => {\n return dispatch(processDataError(cleanToken, paginationContext, errorMessage));\n },\n );\n }\n },\n () => {},\n );\n};\n\n/**\n * Gets a function that forwards api error to relevant components.\n * @param token {string} The token used to obtain the current data\n * @param paginationContext {paginationContext} context to process data.\n * @param errorMessage {Response} The error message returned by API.\n * @return {Function} A function that populates client data from a response.\n */\nconst processDataError = (token, paginationContext, errorMessage) => (dispatch) => {\n dispatch(errorPromptTrigger(errorMessage));\n dispatch(loginSuccessDataError(token, errorMessage));\n dispatch(paginationSuccess(null, paginationContext.paginated));\n};\n\n/**\n * Gets a function that populates client data from a response.\n * @param token {string} The token used to obtain the current data\n * @param response {Response} The response to a data request.\n * @return {Function} A function that populates client data from a response.\n */\nconst processLoginData = (token, response) => (dispatch) => {\n const mergedData = createDefaultClientData();\n\n for (const property in response) {\n // eslint-disable-next-line no-prototype-builtins\n if (response.hasOwnProperty(property)) {\n if (response[property] == null) {\n delete response[property];\n }\n }\n }\n\n Object.assign(mergedData, response);\n\n dispatch(loginSuccess(mergedData, token));\n dispatch(paginationSuccess(mergedData.nextSkipToken));\n};\n\n// LCA metadata actions\nexport const LCA_METADATA_ADD = 'LCA_METADATA_ADD';\nexport const LCA_METADATA_DOWNLOAD_BEGIN = 'LCA_METADATA_DOWNLOAD_BEGIN';\nexport const LCA_METADATA_DOWNLOAD_SUCCESS = 'LCA_METADATA_DOWNLOAD_SUCCESS';\nexport const LCA_METADATA_DOWNLOAD_ERROR = 'LCA_METADATA_DOWNLOAD_ERROR';\n\n/**\n * Defines an action that updates state to add a LCA to the list of tracked LCA metadata.\n * @param {string} lcaId The id to add to the tracking list.\n * @returns {{lcaId: *, type: *}}\n */\nexport const lcaMetadataAdd = (lcaId) => ({\n type: LCA_METADATA_ADD,\n lcaId,\n});\n\n/**\n * Defines an action that updates state to reflect a LCA metadata download in progress.\n * @param {string} lcaId The id for the LCA data being downloaded.\n * @returns {{lcaId: *, type: *}}\n */\nexport const lcaMetadataDownloadBegin = (lcaId) => ({\n type: LCA_METADATA_DOWNLOAD_BEGIN,\n lcaId,\n});\n\n/**\n * Defines an action that updates state to reflect LCA metadata being successfully downloaded.\n * @param {string} lcaId The id for the LCA that the metadata was downloaded for.\n * @param {Array} fileList The list of files to associate with the LCA.\n * @returns {{lcaId: *, type: *, fileList: *}}\n */\nexport const lcaMetadataDownloadSuccess = (lcaId, fileList) => ({\n type: LCA_METADATA_DOWNLOAD_SUCCESS,\n lcaId,\n fileList,\n});\n\n/**\n * Defines an action that updates state to reflect LCA metadata failing to download.\n * @param {string} lcaId The id for the LCA that failed to download.\n * @param {string} errorMessage The message for the error.\n * @returns {{lcaId: *, errorMessage: *, type: *}}\n */\nexport const lcaMetadataDownloadError = (lcaId, errorMessage) => ({\n type: LCA_METADATA_DOWNLOAD_ERROR,\n lcaId,\n errorMessage,\n});\n\n/**\n * Gets a function that will request LCA metadata.\n * @param {string} lcaId The id for the LCA to request metadata for.\n * @returns {Function} A function that will request LCA metadata.\n */\nexport const lcaMetadataRequest = (lcaId) => (dispatch) => {\n dispatch(lcaMetadataDownloadBegin(lcaId));\n\n downloadHandler.requestLcaFileList(\n RequestBuilder.accessToken,\n lcaId,\n (response) => dispatch(lcaMetadataDownloadSuccess(lcaId, response)),\n (error) => dispatch(lcaMetadataDownloadError(lcaId, error)),\n );\n};\n\n// PAF metadata actions\nexport const PAF_METADATA_ADD = 'PAF_METADATA_ADD';\nexport const PAF_METADATA_DOWNLOAD_BEGIN = 'PAF_METADATA_DOWNLOAD_BEGIN';\nexport const PAF_METADATA_DOWNLOAD_SUCCESS = 'PAF_METADATA_DOWNLOAD_SUCCESS';\nexport const PAF_METADATA_DOWNLOAD_ERROR = 'PAF_METADATA_DOWNLOAD_ERROR';\n\n/**\n * Defines an action that updates state to add a PAF to the list of tracked PAF metadata.\n * @param {string} pafId The id to add to the tracking list.\n * @returns {{pafId: *, type: *}}\n */\nexport const pafMetadataAdd = (pafId) => ({\n type: PAF_METADATA_ADD,\n pafId,\n});\n\n/**\n * Defines an action that updates state to reflect a PAF metadata download in progress.\n * @param {string} pafId The id for the PAF data being downloaded.\n * @returns {{pafId: *, type: *}}\n */\nexport const pafMetadataDownloadBegin = (pafId) => ({\n type: PAF_METADATA_DOWNLOAD_BEGIN,\n pafId,\n});\n\n/**\n * Defines an action that updates state to reflect PAF metadata being successfully downloaded.\n * @param {string} pafId The id for the PAF that the metadata was downloaded for.\n * @param {Array} fileList The list of files to associate with the PAF.\n * @returns {{pafId: *, type: *, fileList: *}}\n */\nexport const pafMetadataDownloadSuccess = (pafId, fileList) => ({\n type: PAF_METADATA_DOWNLOAD_SUCCESS,\n pafId,\n fileList,\n});\n\n/**\n * Defines an action that updates state to reflect PAF metadata failing to download.\n * @param {string} pafId The id for the PAF that failed to download.\n * @param {string} errorMessage The message for the error.\n * @returns {{pafId: *, errorMessage: *, type: *}}\n */\nexport const pafMetadataDownloadError = (pafId, errorMessage) => ({\n type: PAF_METADATA_DOWNLOAD_ERROR,\n pafId,\n errorMessage,\n});\n\n/**\n * Gets a function that will request PAF metadata.\n * @param {string} pafId The id for the PAF to request metadata for.\n * @returns {Function} A function that will request PAF metadata.\n */\nexport const pafMetadataRequest = (pafId) => (dispatch) => {\n dispatch(pafMetadataDownloadBegin(pafId));\n\n if (RequestBuilder.accessToken.indexOf('-') === 0) {\n // Ignore idToken because this is a simulated request.\n downloadHandler.requestPafFileList(\n RequestBuilder.accessToken,\n '',\n pafId,\n (response) => dispatch(pafMetadataDownloadSuccess(pafId, response)),\n (error) => dispatch(pafMetadataDownloadError(pafId, error)),\n );\n\n return;\n }\n\n downloadHandler.requestIdToken(\n (idToken) => {\n downloadHandler.requestPafFileList(\n RequestBuilder.accessToken,\n idToken,\n pafId,\n (response) => dispatch(pafMetadataDownloadSuccess(pafId, response)),\n (error) => dispatch(pafMetadataDownloadError(pafId, error)),\n );\n },\n (error) => dispatch(pafMetadataDownloadError(pafId, error)),\n );\n};\n\n// File request actions\nexport const FILE_REQUEST_BEGIN = 'FILE_REQUEST_BEGIN';\nexport const FILE_REQUEST_SUCCESS = 'FILE_REQUEST_SUCCESS';\nexport const FILE_REQUEST_ERROR = 'FILE_REQUEST_ERROR';\n\n/**\n * Defines an action that updates state to reflect a file request starting.\n * @param {string} category The type of file being requested.\n * @param {string} fileId The ID for the file being requested.\n * @param {string} fileName The name of the file being requested.\n * @returns {{\n * category: string,\n * fileId: string,\n * fileName: string,\n * type: *\n * }}\n */\nexport const fileRequestBegin = (category, fileId, fileName, location) => ({\n type: FILE_REQUEST_BEGIN,\n category,\n fileId,\n fileName,\n location\n});\n\n/**\n * Defines an action that updates state to reflect a file successfully downloading.\n * @param {string} category The type of file that was downloaded.\n * @param {string} fileId The ID for the file that was downloaded.\n * @param {string} fileName The name of the file that was downloaded.\n * @returns {{\n * category: string,\n * fileId: string,\n * fileName: string,\n * type: *\n * }}\n */\nexport const fileRequestSuccess = (category, fileId, fileName) => ({\n type: FILE_REQUEST_SUCCESS,\n category,\n fileId,\n fileName,\n});\n\n/**\n * Defines an action that updates state to reflect a file failing to download.\n * @param {string} category The type of file that failed to download.\n * @param {string} fileId The ID for the file that failed to download.\n * @param {string} fileName The name of the file that failed to download.\n * @returns {{\n * category: string,\n * fileId: string,\n * fileName: string,\n * type: *\n * }}\n */\nexport const fileRequestError = (category, fileId, fileName) => ({\n type: FILE_REQUEST_ERROR,\n category,\n fileId,\n fileName,\n});\n\n/**\n * Gets a function that will perform a file download.\n * @param {string} fileUrl The url for the file to download.\n * @param {string} category The type of file to be downloaded.\n * @param {string} fileId The ID for the file to be downloaded.\n * @param {string} filename The name of the file to be downloaded.\n * @returns {Function} A function that will perform a PAF file download.\n */\nexport const requestFile = (fileUrl, category, fileId, filename, location) => (dispatch) => {\n dispatch(fileRequestBegin(category, fileId, filename, location));\n\n if (RequestBuilder.accessToken.indexOf('-') === 0) {\n // Ignore idToken and set a fake wait time because this is a simulated call.\n setTimeout(() => {\n downloadHandler.requestFile(\n fileUrl,\n filename,\n () => dispatch(fileRequestSuccess(category, fileId, filename)),\n () => {\n dispatch(errorPromptTrigger(`An error occurred while downloading the file ${filename}`));\n dispatch(fileRequestError(category, fileId, filename));\n },\n );\n },\n 1000);\n\n return;\n }\n\n downloadHandler.requestFile(\n fileUrl,\n filename,\n () => dispatch(fileRequestSuccess(category, fileId, filename)),\n () => {\n dispatch(errorPromptTrigger(`An error occurred while downloading the file ${filename}`));\n dispatch(fileRequestError(category, fileId, filename));\n },\n );\n};\n\n/**\n * Gets a function that will perform a PAF file download.\n * @param {string} fileUrl The url for the file to download.\n * @param {string} category The type of file to be downloaded.\n * @param {string} pafId The id of the PAF associated with the file to download.\n * @param {string} filename The name of the file to be downloaded.\n * @returns {Function} A function that will perform a PAF file download.\n */\nexport const requestAuthenticatedFile = (fileUrl, category, pafId, filename) => (dispatch) => {\n dispatch(fileRequestBegin(category, pafId, filename));\n\n if (RequestBuilder.accessToken.indexOf('-') === 0) {\n // Ignore idToken and set a fake wait time because this is a simulated call.\n setTimeout(() => {\n downloadHandler.requestAuthenticatedFile(\n fileUrl,\n '',\n filename,\n () => dispatch(fileRequestSuccess(category, pafId, filename)),\n () => {\n dispatch(errorPromptTrigger(`An error occurred while downloading the file ${filename}`));\n dispatch(fileRequestError(category, pafId, filename));\n },\n );\n },\n 1000);\n\n return;\n }\n\n downloadHandler.requestIdToken(\n (idToken) => {\n downloadHandler.requestAuthenticatedFile(\n fileUrl,\n idToken,\n filename,\n () => dispatch(fileRequestSuccess(category, pafId, filename)),\n () => {\n dispatch(errorPromptTrigger(`An error occurred while downloading the file ${filename}`));\n dispatch(fileRequestError(category, pafId, filename));\n },\n );\n },\n () => dispatch(fileRequestError(category, pafId, filename)),\n );\n};\n\n/**\n * Gets a function that will perform a PAF file download.\n * @param {string} fileUrl The url for the file to download.\n * @param {string} category The type of file to be downloaded.\n * @param {string} pafId The id of the PAF associated with the file to download.\n * @param {string} filename The name of the file to be downloaded.\n * @returns {Function} A function that will perform a PAF file download.\n */\nexport const requestUnauthenticatedFile = (fileUrl, category, pafId, filename) => (dispatch) => {\n dispatch(fileRequestBegin(category, pafId, filename));\n\n downloadHandler.requestIdToken(\n (idToken) => {\n downloadHandler.requestAuthenticatedFile(\n fileUrl,\n idToken,\n filename,\n () => dispatch(fileRequestSuccess(category, pafId, filename)),\n () => {\n dispatch(errorPromptTrigger(`An error occurred while downloading the file ${filename}`));\n dispatch(fileRequestError(category, pafId, filename));\n },\n );\n },\n () => dispatch(fileRequestError(category, pafId, filename)),\n );\n};\n\n/**\n * Dismisses the error notification prompt.\n * @param {object} event Information about the event that triggered this function.\n * @param {string} reason A string describing the reason this function was triggered.\n * @returns {Function} A function that will dismiss the error notification prompt.\n */\nexport const clearFileDownloadErrorPrompt = (event, reason) => (dispatch) => {\n if (reason === 'clickaway') {\n return;\n }\n\n dispatch(errorPromptClear());\n};\n\n// Error prompt actions\nexport const ERROR_PROMPT_TRIGGER = 'ERROR_PROMPT_TRIGGER';\nexport const ERROR_PROMPT_CLEAR = 'ERROR_PROMPT_CLEAR';\n\n/**\n * Defines an action that updates state to reflect an error prompt triggering.\n * @param {string} errorMessage The message to display in the error prompt.\n * @returns {{type: *, errorMessage: string}}\n */\nexport const errorPromptTrigger = (errorMessage) => ({\n type: ERROR_PROMPT_TRIGGER,\n errorMessage,\n});\n\n/**\n * Defines an action that updates state to reflect an error prompt being cleared.\n * @returns {{type: *}}\n */\nexport const errorPromptClear = () => ({\n type: ERROR_PROMPT_CLEAR,\n});\n\n// Pagination actions\nexport const SET_PAGINATION_CONTEXT = 'SET_PAGINATION_CONTEXT';\nexport const PAGINATION_SUCCESS = 'PAGINATION_SUCCESS';\nexport const PAGINATION_RESET = 'PAGINATION_RESET';\nexport const PAGE_PROGRESS_BEGIN = 'PAGE_PROGRESS_BEGIN';\n\n/**\n * Defines an action that updates state to reflect the pagination context.\n * @returns {{paginationContext: *}}\n */\nexport const setPaginationContext = (paginationContext) => ({\n type: SET_PAGINATION_CONTEXT,\n ...paginationContext\n});\n\n/**\n * Defines an action that updates state with login success information.\n * @param {string} nextSkipToken The data returned by the login.\n * @param {string} currentSkipToken The current skip token.\n * @returns {{currentSkipToken: *, nextSkipToken: *}}\n */\nexport const paginationSuccess = (nextSkipToken, paginated) => ({\n type: PAGINATION_SUCCESS,\n nextSkipToken,\n paginated\n});\n\n/**\n * Defines an action that starts progressing the data to retrieve.\n * @returns {{type: *}}\n */\nexport const pageProcessingBegin = () => ({\n type: PAGE_PROGRESS_BEGIN\n});\n\n/**\n * Defines an action that resets the state.\n * @returns {{type: *}}\n */\nexport const paginationReset = () => ({\n type: PAGINATION_RESET\n});","import { connect } from 'react-redux';\nimport LoginForm from '../components/LoginForm';\nimport { performLogin } from '../actions';\n\n/**\n * Gets the props to send to the wrapped component.\n * @param {{\n * clientData: {\n * errorMessage: {\n * errorMessage: string,\n * processingLogin: boolean\n * }\n * }\n * }} state The current state.\n * @returns {{errorMessage: *, processingLogin: *}} The props to send to the wrapped component.\n */\nconst mapStateToProps = (state) => ({\n errorMessage: state.clientData.errorMessage,\n processingLogin: state.clientData.processingLogin,\n});\n\n/**\n * Gets the functions to supply to the wrapped component.\n * @param {function} dispatch A function that wraps another function in Redux state flow.\n * @returns {{onClick: (function(*=): *)}} The functions to supply to the wrapped component.\n */\nconst mapDispatchToProps = (dispatch) => ({\n onClick: (token) => dispatch(performLogin(token.toLowerCase())),\n});\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(LoginForm);\n","import React from 'react';\nimport * as PropTypes from 'prop-types';\nimport LoginPortalBuildingIndicator from './LoginPortalBuildingIndicator';\nimport WrappedLoginForm from '../containers/WrappedLoginForm';\n\n/**\n * Builds the login card body.\n * @param loginBranding {Object} An object containing branding information for the login page.\n * @return {jsx} A login card body component.\n */\nconst LoginCardBody = ({ loginBranding }) => {\n if (loginBranding) {\n return (\n <>\n
\n \n
\n \n \n );\n }\n\n return ();\n};\nLoginCardBody.propTypes = {\n loginBranding: PropTypes.shape({\n loginLogo: PropTypes.string,\n }),\n};\nLoginCardBody.defaultProps = {\n loginBranding: null,\n};\n\nexport default LoginCardBody;\n","import React from 'react';\nimport { Box, Card } from '@material-ui/core';\nimport * as PropTypes from 'prop-types';\nimport LoginCardBody from './LoginCardBody';\n\n/**\n * Builds the login portal.\n * @param loginBranding {Object} An object containing branding information for the login page.\n * @return {jsx} A login portal component.\n */\nconst LoginPortal = ({ loginBranding }) => (\n
\n \n \n \n \n \n
\n);\nLoginPortal.propTypes = {\n loginBranding: PropTypes.shape({\n loginLogo: PropTypes.string,\n }),\n};\nLoginPortal.defaultProps = {\n loginBranding: null,\n};\n\nexport default LoginPortal;\n","import {\n arrayOf, exact, number, string, array, bool,\n} from 'prop-types';\n\nexport const fileDataType = exact({\n downloadUrl: string.isRequired,\n displayName: string.isRequired,\n});\n\nexport const lcaMetadataDataType = exact({\n fileListDownloading: bool,\n files: arrayOf(fileDataType),\n fileListDownloadErrorMessage: string,\n lcaId: string.isRequired,\n});\n\nexport const lcaListingsDataType = arrayOf(exact({\n fileId: string.isRequired,\n lcaNumber: string.isRequired,\n jobTitle: string.isRequired,\n fileNumber: string.isRequired,\n postingDate: string.isRequired,\n location: string,\n operatingCompany: string,\n downloadUrl: string.isRequired\n}));\n\nexport const nofListingsDataType = arrayOf(exact({\n jobTitle: string.isRequired,\n postingDate: string.isRequired,\n expiredDate: string.isRequired,\n fileId: string.isRequired,\n downloadUrl: string.isRequired,\n}));\n\nexport const pafListingsDataType = arrayOf(exact({\n fileNumber: string.isRequired,\n jobTitle: string.isRequired,\n expiredDate: string,\n postingDate: string.isRequired,\n pafExpiryDate: string.isRequired,\n lcaNumber: string.isRequired,\n location: string,\n operatingCompany: string,\n fileId: string.isRequired,\n files: array.isRequired,\n}));\n\nexport const postingMetadataDataType = exact({\n fileListDownloading: bool,\n files: arrayOf(fileDataType),\n fileListDownloadErrorMessage: string,\n lcaId: string,\n pafId: string,\n});\n\nexport const errorPromptDataType = exact({\n errorPromptOpen: bool,\n errorMessage: string,\n errorTime: number,\n});\n\nexport const clientInfoDataType = exact({\n pageHeaderLogo: string,\n companyName: string.isRequired,\n titleBackground: string.isRequired,\n pageIntro: string,\n jobListings: lcaListingsDataType,\n nofListings: nofListingsDataType,\n companyMemo: string,\n pafIntro: string,\n pageIntroForNofListings: string,\n pafListings: pafListingsDataType,\n pafMemo: string,\n nextSkipToken: string\n});\n","import { TableCell, withStyles } from '@material-ui/core';\n\n/**\n * Gets style options to apply to the component.\n * @param {Object} theme Theme styles to apply.\n * @returns {{\n * head: {\n * backgroundColor: string,\n * color: *,\n * fontSize: number\n * },\n * body: {\n * color: string,\n * fontSize: number\n * }\n * }}\n */\nconst style = (theme) => ({\n head: {\n backgroundColor: '#6B6B6B',\n color: theme.palette.common.white,\n fontSize: 18,\n },\n body: {\n fontSize: 14,\n color: '#6B6B6B',\n },\n});\n\n/**\n * A customized table cell for the grid.\n */\nexport default withStyles(style)(TableCell);\n","import { LinearProgress, withStyles } from '@material-ui/core';\n\n/**\n * A pre-branded loading indicator.\n * @type {React.ComponentClass}\n */\nexport default withStyles({\n root: {\n marginTop: '20px',\n marginBottom: '30px',\n height: '20px',\n },\n barColorPrimary: {\n backgroundColor: '#58b228',\n },\n colorPrimary: {\n backgroundColor: '#FFFFFF',\n },\n})(LinearProgress);\n","import React from 'react';\nimport * as PropTypes from 'prop-types';\nimport BrandedCircularLoadingIndicator from './BrandedCircularLoadingIndicator';\n\n/**\n * Displays a download icon or a loading icon depending on download status.\n * @param {bool} downloading True if downloading, otherwise false.\n * @returns {jsx} An icon to accompany a download link.\n * @constructor\n */\nconst DownloadIcon = ({ downloading }) => {\n if (downloading) {\n return ;\n }\n return ;\n};\nDownloadIcon.propTypes = {\n downloading: PropTypes.bool.isRequired,\n};\n\nexport default DownloadIcon;\n","import React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Container, Link } from '@material-ui/core';\nimport BrandedLinearLoadingIndicator from './BrandedLinearLoadingIndicator';\nimport DownloadIcon from './DownloadIcon';\nimport { postingMetadataDataType } from './PropDefinitions';\n\n/**\n * Styling options for this component.\n * @type {{\n * documents: {paddingLeft: string},\n * documentListMessage: {paddingLeft: string},\n * downloadingIndicator: {\n * marginBottom: string,\n * marginTop: string,\n * height: string\n * }\n * }}\n */\nconst styles = {\n fileName: {\n fontSize: '16px',\n color: 'rgba(0, 0, 0, 0.87)',\n },\n downloadLink: {\n fontSize: '12px',\n color: 'grey',\n verticalAlign: 'text-bottom',\n marginRight: '8px'\n },\n documents: {\n paddingLeft: '60px',\n },\n documentListMessage: {\n paddingLeft: '30px',\n },\n downloadingIndicator: {\n marginTop: '20px',\n marginBottom: '30px',\n height: '20px',\n },\n listStyle: {\n display: 'flex'\n }\n};\n\n/**\n * Checks if a given file is among the active downloads.\n * @param {string} id The ID associated with the download.\n * @param {string} fileName The filename associated with the download.\n * @param {{\n * category: string,\n * fileId: string,\n * fileName: string,\n * }[]} activeDownloadList A collection of the current file downloads.\n * @returns {boolean} True if the file is currently downloading, otherwise false.\n */\n// eslint-disable-next-line arrow-body-style\nconst isDownloading = (id, fileName, activeDownloadList) => {\n // eslint-disable-next-line arrow-body-style\n return activeDownloadList.some((file) => {\n return file.fileId === id && file.fileName === fileName;\n });\n};\n\n/**\n * Display a list of documents or the progress of downloading a list of documents for a PAF.\n * @param {{\n * fileListDownloading: bool,\n * files: {\n * downloadUrl: string,\n * displayName: string,\n * }[],\n * fileListDownloadErrorMessage: string,\n * pafId: string,\n * } | null} fileMetadata An object containing data for the file list.\n * @param {{\n * category: string,\n * fileId: string,\n * fileName: string,\n * }[]} activeDownloadList A list of files actively being downloaded.\n * @param {function} requestFile The function to call when requesting a file.\n * @return {JSX.Element} Document information for a PAF\n */\nconst DocumentList = ({ fileMetadata, activeDownloadList, requestFile }) => {\n if (fileMetadata.fileListDownloading) {\n return (\n \n

\n Retrieving file list...\n

\n \n
\n );\n }\n\n if (fileMetadata.fileListDownloadErrorMessage) {\n const errorMessage = `Error Occurred: ${fileMetadata.fileListDownloadErrorMessage}`;\n\n return (\n \n

{errorMessage}

\n
\n );\n }\n\n if (fileMetadata.files.length === 0) {\n return (\n \n

No files found for this entry.

\n
\n );\n }\n\n let message = 'Below are the attachments added to this Public Access File';\n if (!fileMetadata.files[0].requiresAuth) {\n message = 'Below are the attachments added to this Labor Condition Application';\n }\n\n return (\n
\n

\n {message}\n

\n
\n
    \n {fileMetadata.files.map((fileInfo) => {\n const { displayName, downloadUrl, requiresAuth } = fileInfo;\n const { pafId } = fileMetadata;\n const downloadInProgress = isDownloading(pafId, displayName, activeDownloadList);\n\n let onClickHandler = () => { requestFile(downloadUrl, pafId, displayName, requiresAuth); };\n\n if (downloadInProgress) {\n // Do nothing on click if download is active.\n onClickHandler = () => {};\n }\n\n return (\n
  • \n \n \n    \n {displayName}\n \n    \n onClickHandler()}\n style={styles.downloadLink}\n >\n
    \n \n Download \n \n \n
    \n \n
  • \n );\n })}\n
\n
\n
\n );\n};\nDocumentList.propTypes = {\n fileMetadata: postingMetadataDataType.isRequired,\n activeDownloadList: PropTypes.arrayOf(PropTypes.object).isRequired,\n requestFile: PropTypes.func.isRequired,\n};\n\nexport default DocumentList;\n","import { connect } from 'react-redux';\nimport { requestAuthenticatedFile } from '../actions';\nimport DocumentList from '../components/DocumentList';\nimport { requestFile } from '../actions/index';\n\n/**\n * Identifier for downloads initiated by this control.\n * @type {string}\n */\nconst downloadCategory = 'paf-attachment';\n\n/**\n * Gets the props to supply to the wrapped component.\n * @param {{\n * fileDownload: {\n * category: string,\n * fileId: string,\n * filename: string,\n * }\n * }} state The current state.\n * @param {{fileMetadata: Array}} ownProps The properties that were submitted to this component.\n * @returns {{\n * fileMetadata: Array,\n * activeDownloadList: Array,\n * }} The props to supply to the wrapped component.\n */\nconst mapStateToProps = (state, ownProps) => ({\n fileMetadata: ownProps.fileMetadata,\n activeDownloadList: state.fileDownload.filter((download) => download.category === downloadCategory),\n});\n\n/**\n * Gets the functions to supply to the wrapped component.\n * @param {function} dispatch A function that wraps another function in Redux state flow.\n * @returns {{\n * requestFile: (function(*=, *=, *=, *=): *)\n * }} The functions to supply to the wrapped component\n */\nconst mapDispatchToProps = (dispatch) => ({\n requestFile: (fileUrl, pafId, filename, requiresAuth) => {\n if (requiresAuth) {\n return dispatch(requestAuthenticatedFile(fileUrl, downloadCategory, pafId, filename));\n }\n return dispatch(requestFile(fileUrl, downloadCategory, pafId, filename));\n },\n});\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(DocumentList);\n","import React from 'react';\nimport {\n Button, Dialog, DialogActions, Container\n} from '@material-ui/core';\nimport * as PropTypes from 'prop-types';\nimport WrappedDocumentList from '../containers/WrappedDocumentList';\nimport BrandedLinearLoadingIndicator from './BrandedLinearLoadingIndicator';\n\n/**\n * Styles to use with this component.\n * @type {{\n * header: {paddingLeft: string},\n * iconsAndText: {color: string}\n * }}\n */\nconst styles = {\n iconsAndText: {\n color: '#6B6B6B',\n },\n header: {\n paddingLeft: '30px',\n },\n};\n\n/**\n * Display a list of documents or the progress of downloading a list of documents for a PAF.\n * @param title {string} Title for the modal.\n * @param jobTitle {string} Job title to display.\n * @param open {bool} Whether or not the modal is open.\n * @param fileMetadata {null | object} An object containing data for the file list.\n * @param toggleExpand {function} The function to call to close the modal.\n * @return {JSX} Document information for a PAF\n */\nconst DocumentsModal = ({\n title, jobTitle, open, fileMetadata, toggleExpand,\n}) => {\n if (fileMetadata.files == null) {\n return (\n {\n }}\n >\n
\n
\n
\n \n

{title}

\n

[{jobTitle}]

\n
\n
\n
\n \n

\n Retrieving file list...\n

\n \n
\n
\n
\n \n \n \n \n )\n }\n return (\n {\n }}\n >\n
\n
\n
\n \n

\n {title}\n

\n

\n [\n {jobTitle}\n ]\n

\n
\n
\n
\n \n
\n
\n \n \n \n \n)};\n\nDocumentsModal.propTypes = {\n title: PropTypes.string.isRequired,\n jobTitle: PropTypes.string.isRequired,\n open: PropTypes.bool.isRequired,\n toggleExpand: PropTypes.func.isRequired,\n fileMetadata: PropTypes.shape({\n files: PropTypes.arrayOf(PropTypes.object),\n fileListDownloadErrorMessage: PropTypes.string,\n fileListDownloading: PropTypes.bool,\n lcaId: PropTypes.string,\n pafId: PropTypes.string,\n }),\n};\n\nDocumentsModal.defaultProps = {\n fileMetadata: {\n files: [],\n fileListDownloadErrorMessage: null,\n fileListDownloading: false,\n },\n};\n\nexport default DocumentsModal;\n","import React, { useState } from 'react';\nimport * as PropTypes from 'prop-types';\nimport { IconButton } from '@material-ui/core';\nimport DocumentsModal from './DocumentsModal';\nimport { postingMetadataDataType } from './PropDefinitions';\n\n/**\n * Creates a table cell meant for displaying download links with a graphic displayed.\n * @param lcaNumber {string} LCA number for this paf entry.\n * @param jobTitle {string} Job title for this paf entry.\n * @param fileId {string} ID for this PAF entry.\n * @param fileMetadata {null | Object} List of known files for this PAF entry.\n * @param requestPafFileList {Function} The function to call when requesting PAF file list data.\n * @return {undefined} This function does not return a value.\n */\nconst OpenFileListTableCell = ({\n lcaNumber, jobTitle, fileId, fileMetadata, requestPostingFileList,\n}) => {\n const [open, setOpenStatus] = useState(false);\n\n const openModal = () => {\n if (!open && fileMetadata && (!fileMetadata.files || fileMetadata.files.length === 0)) {\n requestPostingFileList(fileId);\n }\n\n setOpenStatus(!open);\n };\n\n return (\n
\n openModal()}>\n \n \n \n
\n );\n};\nOpenFileListTableCell.propTypes = {\n lcaNumber: PropTypes.string.isRequired,\n jobTitle: PropTypes.string,\n fileId: PropTypes.string.isRequired,\n fileMetadata: postingMetadataDataType,\n requestPostingFileList: PropTypes.func.isRequired,\n};\nOpenFileListTableCell.defaultProps = {\n jobTitle: '',\n fileMetadata: {},\n};\n\nexport default OpenFileListTableCell;\n","import React from 'react';\nimport BrandedCircularLoadingIndicator from './BrandedCircularLoadingIndicator';\n\n/**\n * Builds the loading circle to display when building the login portal.\n * @return {jsx} A loading indicator component.\n */\nexport default () => (\n
\n \n
\n);\n","import React, { Component } from 'react';\nimport * as PropTypes from 'prop-types';\nimport { TableBody, TableRow, withStyles } from '@material-ui/core';\nimport Paper from '@material-ui/core/Paper';\nimport {\n Grid, Table, TableHeaderRow, PagingPanel, TableFilterRow, TableGroupRow,\n GroupingPanel, DragDropProvider, Toolbar, SearchPanel,\n} from '@devexpress/dx-react-grid-material-ui';\nimport {\n PagingState, IntegratedPaging, FilteringState, IntegratedFiltering,\n GroupingState, IntegratedGrouping, SearchState,\n} from '@devexpress/dx-react-grid';\nimport PostingTableCell from './PostingTableCell';\nimport OpenFileListTableCell from './OpenFileListTableCell';\nimport { lcaListingsDataType, postingMetadataDataType } from './PropDefinitions';\nimport PageLoadingIndicator from './PageLoadingIndicator';\n\n/**\n * Gets the styles to apply to this component.\n * @returns {{\n * tableStriped: {\n * color: string,\n * '& tbody tr:nth-of-type(odd)': {\n * backgroundColor: string\n * }\n * },\n * customCell: {\n * whiteSpace: string,\n * width: string,\n * marginTop: theme.spacing(3),\n * overflowX: string,\n * fontSize: int,\n * color: string,\n * fontFamily: string\n * },\n * customHeaderCell: {\n * whiteSpace: string,\n * height: string,\n * backgroundColor: string,\n * overflowX: string,\n * fontSize: int,\n * color: string,\n * fontFamily: string\n * }\n * }}\n */\nconst styles = (theme) => ({\n customCell: {\n whiteSpace: 'normal',\n width: '100%',\n marginTop: theme.spacing(3),\n overflowX: 'auto',\n fontSize: 12,\n color: '#6B6B6B',\n fontFamily: '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif',\n },\n customHeaderCell: {\n whiteSpace: 'normal',\n height: 40,\n backgroundColor: '#6B6B6B',\n color: theme.palette.common.white,\n fontSize: 16,\n fontFamily: '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif',\n },\n tableStriped: {\n '& tbody tr:nth-of-type(odd)': {\n backgroundColor: '#f5f5f5',\n },\n color: '#9F9F9F',\n },\n});\n\nconst CustomTableCellBase = ({ classes, ...restProps }) => (\n \n);\n\nconst CustomHeaderCellBase = ({ classes, ...restProps }) => (\n \n);\n\nconst TableComponentBase = ({ classes, ...restProps }) => (\n \n);\n\nexport const CustomizeTableCell = withStyles(styles)(CustomTableCellBase);\nexport const CustomizeHeaderCell = withStyles(styles)(CustomHeaderCellBase);\nexport const TableComponent = withStyles(styles, { name: 'TableComponent' })(TableComponentBase);\n\nclass LcaGridBody extends Component {\n componentDidMount() {\n const { rows, addLcaToLcaMetadataList } = this.props;\n\n if (!rows) return;\n\n rows.forEach((dataRow) => {\n addLcaToLcaMetadataList(dataRow.fileId);\n });\n }\n\n constructor(props) {\n super(props);\n this.state = {\n filteringStateColumnExtensions: [\n { columnName: '', filteringEnabled: false }\n ],\n groupingStateColumnExtensions: [\n { columnName: '', groupingEnabled: false },\n ]\n }\n }\n\n /**\n * Renders the component.\n * @returns {jsx} The LCA grid body.\n */\n render() {\n const { rows, lcaMetadata, progressing, downloadLcaFileMetadata } = this.props;\n\n const defaultColumnWidths = [\n { columnName: 'lcaNumber', width: 'auto' },\n { columnName: 'jobTitle', width: 'auto' },\n { columnName: 'fileNumber', width: 'auto' },\n { columnName: 'postingDate', width: '75px' },\n { columnName: 'location', width: 'auto' },\n { columnName: 'operatingCompany', width: 'auto' },\n { columnName: '', width: '50px' },\n ];\n\n const { filteringStateColumnExtensions } = this.state;\n\n const { groupingStateColumnExtensions } = this.state;\n\n const columns = [\n { name: 'lcaNumber', title: 'LCA Number' },\n { name: 'jobTitle', title: 'Job Title' },\n { name: 'fileNumber', title: 'File Number' },\n { name: 'postingDate', title: 'Posting Date' },\n { name: 'location', title: 'Location' },\n { name: 'operatingCompany', title: 'Operating Company' },\n {\n name: '',\n getCellValue: (row) => (\n lcaMeta.lcaId === row.fileId)}\n requestPostingFileList={downloadLcaFileMetadata}\n />\n ),\n },\n ];\n\n if (progressing) {\n return (\n \n \n \n \n \n \n \n );\n }\n\n return (\n \n \n \n \n \n \n \n\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n );\n }\n}\n\nLcaGridBody.propTypes = {\n rows: lcaListingsDataType.isRequired,\n filesDownloading: PropTypes.arrayOf(PropTypes.object).isRequired,\n lcaMetadata: PropTypes.arrayOf(postingMetadataDataType),\n progressing: PropTypes.bool,\n requestFile: PropTypes.func.isRequired,\n addLcaToLcaMetadataList: PropTypes.func.isRequired,\n downloadLcaFileMetadata: PropTypes.func.isRequired,\n};\n\nLcaGridBody.defaultProps = {\n lcaMetadata: [],\n};\n\nexport default withStyles(styles)(LcaGridBody);\n","import { connect } from 'react-redux';\nimport { requestFile, lcaMetadataRequest } from '../actions';\nimport LcaGridBody from '../components/LcaGridBody';\nimport { lcaMetadataAdd } from '../actions/index';\n\n/**\n * Identifier for downloads initiated by this control.\n * @type {string}\n */\nconst downloadCategory = 'lca';\n\n/**\n * Gets the props to send to the wrapped component.\n * @param {{\n * fileDownload: {\n * category: string,\n * fileId: string,\n * filename: string,\n * location: string\n * }[]\n * }} state The current state.\n * @param {{rows: Array}} ownProps The props provided to this component.\n * @returns {{\n * rows: Array,\n * filesDownloading: Array,\n * }} The props to send to the wrapped component.\n */\nconst mapStateToProps = (state, ownProps) => ({\n rows: ownProps.rows,\n filesDownloading: state.fileDownload.filter((download) => download.category === downloadCategory),\n progressing: state.paginationContext.progressing,\n lcaMetadata: state.lcaMetadata,\n});\n\n/**\n * Gets the functions to supply to the wrapped component.\n * @param {function} dispatch A function that wraps another function in Redux state flow.\n * @returns {{\n * requestFile: function,\n * }} The functions to supply to the wrapped component.\n */\nconst mapDispatchToProps = (dispatch) => ({\n addLcaToLcaMetadataList: (lcaId) => dispatch(lcaMetadataAdd(lcaId)),\n downloadLcaFileMetadata: (lcaId) => dispatch(lcaMetadataRequest(lcaId)),\n requestFile: (fileUrl, fileId, defaultFilename, location) => {\n return dispatch(requestFile(fileUrl, downloadCategory, fileId, defaultFilename, location));\n },\n});\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(LcaGridBody);\n","import React from 'react';\nimport * as PropTypes from 'prop-types';\nimport WrappedLcaGridBody from '../containers/WrappedLcaGridBody';\nimport { lcaListingsDataType } from './PropDefinitions';\n\n/**\n * Builds the grid of the LCA page.\n * @param classes {Object} contains a collection of class styles to use.\n * @param lcaPostingRows {Array} The array to populate the grid with.\n * @param introMessage {string} The message to display before the table body.\n * @return {undefined} This function does not return a value.\n */\nconst LcaGrid = ({\n lcaPostingRows, introMessage,\n}) => { \n return (\n <>\n

{introMessage}

\n \n \n );\n};\nLcaGrid.propTypes = { \n lcaPostingRows: lcaListingsDataType.isRequired,\n introMessage: PropTypes.string.isRequired,\n};\n\nexport default (LcaGrid);\n","import React, { Component } from 'react';\nimport * as PropTypes from 'prop-types';\nimport { TableBody, TableRow, withStyles } from '@material-ui/core';\nimport PostingTableCell from './PostingTableCell';\nimport OpenFileListTableCell from './OpenFileListTableCell';\nimport { pafListingsDataType, postingMetadataDataType } from './PropDefinitions';\nimport PageLoadingIndicator from './PageLoadingIndicator';\nimport Paper from '@material-ui/core/Paper';\nimport { Grid, Table, TableHeaderRow, PagingPanel, TableFilterRow, TableGroupRow,\n GroupingPanel, DragDropProvider, Toolbar, SearchPanel } from '@devexpress/dx-react-grid-material-ui';\nimport { PagingState, IntegratedPaging, FilteringState, IntegratedFiltering,\n GroupingState, IntegratedGrouping, SearchState } from '@devexpress/dx-react-grid';\n\n/**\n * Gets the styles to apply to this component.\n * @returns {{\n * tableStriped: {\n * color: string,\n * '& tbody tr:nth-of-type(odd)': {\n * backgroundColor: string\n * }\n * },\n * customCell: {\n * whiteSpace: string,\n * width: string,\n * marginTop: theme.spacing(3),\n * overflowX: string,\n * fontSize: int,\n * color: string,\n * fontFamily: string\n * },\n * customHeaderCell: {\n * whiteSpace: string,\n * height: string,\n * backgroundColor: string,\n * overflowX: string,\n * fontSize: int,\n * color: string,\n * fontFamily: string\n * }\n * }}\n */\nconst styles = (theme) => ({ \n customCell: {\n whiteSpace: \"normal\",\n width: '100%',\n marginTop: theme.spacing(1),\n overflowX: 'auto',\n fontSize: 12,\n padding: '8px',\n color: '#6B6B6B',\n fontFamily: '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif'\n },\n customHeaderCell: {\n whiteSpace: \"normal\",\n height: 40,\n backgroundColor: '#6B6B6B',\n color: theme.palette.common.white,\n fontSize: 15,\n fontFamily: '\"Arial\"',\n paddingLeft: 1,\n paddingRight: 2\n },\n tableStriped: {\n '& tbody tr:nth-of-type(odd)': {\n backgroundColor: '#f5f5f5',\n },\n color: '#9F9F9F'\n },\n});\n\nconst CustomTableCellBase = ({ classes, ...restProps }) => (\n \n);\n\nconst CustomHeaderCellBase = ({ classes, ...restProps }) => ( \n \n);\n\nconst TableComponentBase = ({ classes, ...restProps }) => (\n \n);\n\nexport const CustomizeTableCell = withStyles(styles)(CustomTableCellBase);\nexport const CustomizeHeaderCell = withStyles(styles)(CustomHeaderCellBase);\nexport const TableComponent = withStyles(styles, { name: 'TableComponent' })(TableComponentBase);\n\n/**\n * The grid body to display on the PAF page.\n */\nclass PafGridBody extends Component {\n /**\n * Sets up initial values when component mounts.\n */\n componentDidMount() {\n const { pafListings, addPafToPafMetadataList } = this.props;\n\n if (!pafListings) return;\n\n pafListings.forEach((dataRow) => {\n addPafToPafMetadataList(dataRow.fileId);\n });\n }\n\n constructor(props) {\n super(props);\n this.state = { \n filteringStateColumnExtensions: [\n { columnName: '', filteringEnabled: false }\n ],\n groupingStateColumnExtensions: [\n { columnName: '', groupingEnabled: false },\n ]\n }\n }\n\n /**\n * Renders the component.\n * @returns {jsx} The PAF grid body.\n */\n render() {\n const {\n pafListings, pafMetadata, downloadPafFileMetadata, progressing, addPafToPafMetadataList\n } = this.props;\n\n const defaultColumnWidths = [\n { columnName: 'lcaNumber', width: 'auto' },\n { columnName: 'jobTitle', width: 'auto' },\n { columnName: 'fileNumber', width: '70px' },\n { columnName: 'postingDate', width: '75px' },\n { columnName: 'postingExpirationDate', width: '75px' },\n { columnName: 'pafExpirationDate', width: '75px' },\n { columnName: 'location', width: 'auto' },\n { columnName: 'operatingCompany', width: 'auto' },\n { columnName: '', width: '45px' }\n ];\n\n const columns = [\n { name: 'lcaNumber', title: 'LCA Number' },\n { name: 'jobTitle', title: 'Job Title' },\n { name: 'fileNumber', title: 'File Number' },\n { name: 'postingDate', title: 'Posting Date' },\n { name: 'postingExpirationDate', title: 'Posting Exp', getCellValue: row => (row.expiredDate) },\n { name: 'pafExpirationDate', title: 'PAF Exp', getCellValue: row => (row.pafExpiryDate) },\n { name: 'location', title: 'Location', getCellValue: row => (row.location ? row.location : null) },\n { name: 'operatingCompany', title: 'Operating Company',\n getCellValue: row => (row.operatingCompany ? row.operatingCompany : null) },\n { name: '', title: '', \n getCellValue: row => pafMeta.pafId === row.fileId)}\n requestPostingFileList={downloadPafFileMetadata} />},\n ];\n\n let pafEntriesToDisplay = pafListings;\n let pafMetadataToDisplay = pafMetadata;\n\n if (!pafListings) {\n pafEntriesToDisplay = [];\n } else {\n pafListings.forEach((dataRow) => {\n addPafToPafMetadataList(dataRow.fileId);\n });\n }\n\n if (!pafMetadata) {\n pafMetadataToDisplay = [];\n }\n\n if (progressing) {\n return (\n \n \n \n \n \n \n );\n } \n\n return (\n \n \n \n \n \n \n\n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n );\n }\n}\n\nPafGridBody.propTypes = {\n pafListings: pafListingsDataType.isRequired,\n pafMetadata: PropTypes.arrayOf(postingMetadataDataType),\n downloadPafFileMetadata: PropTypes.func.isRequired,\n progressing: PropTypes.bool,\n addPafToPafMetadataList: PropTypes.func.isRequired,\n};\n\nPafGridBody.defaultProps = {\n pafMetadata: [],\n};\n\nexport default withStyles(styles)(PafGridBody);\n","import { connect } from 'react-redux';\nimport { pafMetadataAdd, pafMetadataRequest } from '../actions';\nimport PafGridBody from '../components/PafGridBody';\n\n/**\n * Gets the props to send to the wrapped component.\n * @param {{pafMetadata: Object[]}} state The current state.\n * @param {{pafListings: Object[]}} ownProps The props provided to this component.\n * @returns {{\n * pafMetadata: Object[],\n * pafListings: Object[]\n * }} The props to send to the wrapped component.\n */\nconst mapStateToProps = (state, ownProps) => ({\n pafListings: ownProps.pafListings,\n pafMetadata: state.pafMetadata,\n progressing: state.paginationContext.progressing\n});\n\n/**\n * Gets the functions to supply to the wrapped component.\n * @param {function} dispatch A function that wraps another function in Redux state flow.\n * @returns {{\n * addPafToPafMetadataList: (function(*=): *),\n * downloadPafFileMetadata: (function(*=): *)\n * }} The functions to supply to the wrapped component.\n */\nconst mapDispatchToProps = (dispatch) => ({\n downloadPafFileMetadata: (pafId) => dispatch(pafMetadataRequest(pafId)),\n addPafToPafMetadataList: (pafId) => dispatch(pafMetadataAdd(pafId)),\n});\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(PafGridBody);\n","import React from 'react';\nimport { Link, withStyles } from '@material-ui/core';\nimport * as PropTypes from 'prop-types';\nimport WrappedPafGridBody from '../containers/WrappedPafGridBody';\nimport DownloadIcon from './DownloadIcon';\nimport { pafListingsDataType } from './PropDefinitions';\n\n/**\n * Style options to use with this component.\n * @param {Object} theme Theme styles to apply.\n * @returns {{\n * head: {height: number},\n * table: {\n * overflowX: string,\n * width: string,\n * marginTop: number\n * },\n * introParagraph: {\n * color: string,\n * },\n * link: {\n * color: string,\n * fontSize: string,\n * }\n * }}\n */\nconst styles = (theme) => ({\n table: {\n width: '100%',\n marginTop: theme.spacing(3),\n overflowX: 'auto',\n },\n head: {\n height: 40,\n },\n introParagraph: {\n color: '#6B6B6B',\n },\n link: {\n color: '#6B6B6B',\n fontSize: '18px',\n display: 'flex',\n flexDirection: 'row',\n marginBottom: '10px',\n alignItems: 'center'\n },\n});\n\n/**\n * Checks if a given file is among the active downloads.\n * @param {(string | null)} id The ID associated with the download.\n * @param {string} fileName The filename associated with the download.\n * @param {{\n * category: string,\n * fileId: string,\n * fileName: string,\n * }[]} activeDownloadList A collection of the current file downloads.\n * @returns {boolean} True if the file is currently downloading, otherwise false.\n */\n// eslint-disable-next-line arrow-body-style\nconst isDownloading = (id, fileName, activeDownloadList) => {\n // eslint-disable-next-line arrow-body-style\n return activeDownloadList.some((file) => {\n return file.fileId === id && file.fileName === fileName;\n });\n};\n\n/**\n * Builds the grid of the LCA page.\n * @param {Object} classes contains a collection of class styles to use.\n * @param {Array} pafListings The array to populate the grid with.\n * @param {string} introMessage Message to display at the beginning of the section.\n * @param {string} memoDownloadLink URL to download the PAF memo.\n * @param {{\n * entryId: string,\n * fileName: string\n * }[]} activeDownloadList List of files currently being downloaded.\n * @param {(function(*=, *=, *=): *)} requestFile A function to download a file.\n * @return {jsx} The grid representing the table of PAF data.\n */\nconst PafGrid = ({\n classes, pafListings, introMessage, memoDownloadLink, activeDownloadList, requestFile, errorMessage\n}) => {\n const {\n introParagraph: introParagraphStyle, link: linkStyle,\n } = classes;\n\n if (pafListings == null) {\n introMessage = errorMessage ? '' : 'Loading...';\n pafListings = [];\n }\n\n const defaultName = 'memo.pdf';\n\n let onClickHandler = requestFile;\n // eslint-disable-next-line arrow-body-style\n const memoDownloading = isDownloading(null, defaultName, activeDownloadList);\n\n if (memoDownloading) {\n // Do nothing on click if download is active.\n onClickHandler = () => {};\n }\n\n return (\n <>\n

{introMessage}

\n
\n onClickHandler(memoDownloadLink, null, defaultName)}\n className={linkStyle}\n >\n Download company memo\n   \n \n \n
\n \n \n );\n};\nPafGrid.propTypes = {\n classes: PropTypes.shape({\n table: PropTypes.string,\n head: PropTypes.string,\n introParagraph: PropTypes.string,\n link: PropTypes.string,\n }).isRequired,\n pafListings: pafListingsDataType.isRequired,\n introMessage: PropTypes.string.isRequired,\n memoDownloadLink: PropTypes.string.isRequired,\n activeDownloadList: PropTypes.arrayOf(PropTypes.object).isRequired,\n requestFile: PropTypes.func.isRequired,\n errorMessage: PropTypes.string\n};\n\nexport default withStyles(styles)(PafGrid);\n","import { connect } from 'react-redux';\nimport { requestAuthenticatedFile } from '../actions';\nimport PafGrid from '../components/PafGrid';\n\n/**\n * Identifier for downloads initiated by this control.\n * @type {string}\n */\nconst downloadCategory = 'paf-memo';\n\n/**\n * Gets the props to supply to the wrapped component.\n * @param {{\n * fileDownload: {\n * category: string,\n * entryId: string,\n * fileName: string,\n * }[],\n * }} state The current state.\n * @param {{\n * pafListings: Object[],\n * introMessage: string,\n * memoDownloadLink: string,\n * }} ownProps The properties that were submitted to this component.\n * @returns {{\n * pafListings: Object[],\n * introMessage: string,\n * memoDownloadLink: string,\n * activeDownloadList: {\n * category: string,\n * entryId: string,\n * fileName: string,\n * }[],\n * }} The props to supply to the wrapped component.\n */\nconst mapStateToProps = (state, ownProps) => ({\n pafListings: ownProps.pafListings,\n introMessage: ownProps.introMessage,\n memoDownloadLink: ownProps.memoDownloadLink,\n activeDownloadList: state.fileDownload.filter((download) => download.category === downloadCategory),\n errorMessage: state.clientData?.errorMessage\n});\n\n/**\n * Gets the functions to supply to the wrapped component.\n * @param {function} dispatch A function that wraps another function in Redux state flow.\n * @returns {{\n * requestFile: (function(string=, string=, string=): *)\n * }} The functions to supply to the wrapped component\n */\nconst mapDispatchToProps = (dispatch) => ({\n // eslint-disable-next-line arrow-body-style\n requestFile: (fileUrl, pafId, filename) => {\n return dispatch(requestAuthenticatedFile(fileUrl, downloadCategory, pafId, filename));\n },\n});\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(PafGrid);\n","import React from 'react';\nimport {\n Tab, TabList, TabPanel, Tabs,\n} from 'react-tabs';\nimport LcaGrid from './LcaGrid';\nimport WrappedPafGrid from '../containers/WrappedPafGrid';\nimport { clientInfoDataType } from './PropDefinitions';\nimport * as PropTypes from 'prop-types';\n\n/**\n * The styles to apply to this component.\n * @type {{iconsAndText: {color: string}}}\n */\nconst styles = {\n iconsAndText: {\n color: '#6B6B6B',\n },\n};\n\n/**\n * Builds a tabbed version of the display page body.\n * @param bodyData {*} The data to populate the page with.\n * @return {jsx} A tabbed version of the display page body.\n */\nconst AuthenticatedTabbedBody = ({ bodyData, limitRows, getPostings }) => {\n const lcaContext = {\n pageContext: \"lca\",\n limitRows,\n nextSkipToken: null,\n paginated: false\n };\n const pafContext = {\n pageContext: \"paf\",\n limitRows,\n nextSkipToken: null,\n paginated: false\n };\n\n const cachedToken = sessionStorage.getItem('cachedAccessToken');\n return (\n \n
\n
\n \n \n getPostings(cachedToken, lcaContext)}>\n

\n \n   Active LCAs\n

\n
\n
\n getPostings(cachedToken, pafContext)}>\n

\n  \n   Public Access Files\n

\n
\n
\n\n \n \n \n \n \n \n
\n );\n};\nAuthenticatedTabbedBody.propTypes = {\n bodyData: clientInfoDataType.isRequired,\n limitRows: PropTypes.number,\n getPostings: PropTypes.func.isRequired\n};\n\nexport default AuthenticatedTabbedBody;\n","import { connect } from 'react-redux';\nimport AuthenticatedTabbedBody from '../components/AuthenticatedTabbedBody';\nimport { loadPostings } from '../actions';\n\n/**\n * Gets the props to send to the wrapped component.\n * @param {{\n * bodyData:Object \n * }} state The current state.\n * @returns {{bodyData: Object}} The props to supply to the wrapped component.\n */\nconst mapStateToProps = (state, ownProps) => ({\n bodyData: ownProps.bodyData,\n limitRows: state.paginationContext.limitRows\n});\n\n/**\n * Gets the functions to send to the wrapped component.\n * @param {function} dispatch A function that wraps another function in Redux state flow.\n * @returns {{\n * getPostings: (function(string=, Object=): *)\n * }} The functions to supply to the wrapped component.\n */\nconst mapDispatchToProps = (dispatch) => ({ \n getPostings: (token, paginationContext) => dispatch(loadPostings(token, paginationContext))\n});\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(AuthenticatedTabbedBody);\n","import React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { IconButton } from '@material-ui/core';\nimport BrandedCircularLoadingIndicator from './BrandedCircularLoadingIndicator';\n\n/**\n * Creates a table cell meant for displaying download links with a graphic displayed.\n * @param {function(*=): *} requestFile A function that performs a file request.\n * @param {boolean} downloadInProgress Whether the file download is already in progress.\n * @return {jsx} A table cell with a download link inside.\n */\nfunction PostingsDownloadLinkTableCell({ requestFile, downloadInProgress }) {\n if (downloadInProgress) {\n return ;\n }\n\n return ( \n
\n requestFile()}>\n \n \n
\n );\n}\nPostingsDownloadLinkTableCell.propTypes = {\n requestFile: PropTypes.func.isRequired,\n downloadInProgress: PropTypes.bool.isRequired,\n};\n\nexport default PostingsDownloadLinkTableCell;\n","import React, { useState } from 'react';\nimport * as PropTypes from 'prop-types';\nimport { TableBody, TableRow, withStyles } from '@material-ui/core';\nimport PostingTableCell from './PostingTableCell';\nimport PostingDownloadLinkTableCell from './PostingDownloadLinkTableCell';\nimport { nofListingsDataType } from './PropDefinitions';\nimport PageLoadingIndicator from './PageLoadingIndicator';\nimport Paper from '@material-ui/core/Paper';\nimport { Grid, Table, TableHeaderRow, PagingPanel, TableFilterRow, TableGroupRow,\n GroupingPanel, DragDropProvider, Toolbar, SearchPanel } from '@devexpress/dx-react-grid-material-ui';\nimport { PagingState, IntegratedPaging, FilteringState, IntegratedFiltering,\n GroupingState, IntegratedGrouping, SearchState } from '@devexpress/dx-react-grid';\n\n/**\n * Gets the styles that should be applied to this component.\n * @param {Object} theme Contains theme styling info.\n * @returns {{\n * tableStriped: {\n * color: string,\n * '& tbody tr:nth-of-type(odd)': {\n * backgroundColor: string\n * }\n * },\n * customCell: {\n * whiteSpace: string,\n * width: string,\n * marginTop: theme.spacing(3),\n * overflowX: string,\n * fontSize: int,\n * color: string,\n * fontFamily: string\n * },\n * customHeaderCell: {\n * whiteSpace: string,\n * height: string,\n * backgroundColor: string,\n * overflowX: string,\n * fontSize: int,\n * color: string,\n * fontFamily: string\n * }\n * }}\n */\nconst styles = (theme) => ({\n customCell: {\n whiteSpace: \"normal\",\n width: '100%',\n marginTop: theme.spacing(3),\n overflowX: 'auto',\n fontSize: 14,\n color: '#6B6B6B',\n fontFamily: '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif'\n },\n customHeaderCell: {\n whiteSpace: \"normal\",\n height: 40,\n backgroundColor: '#6B6B6B',\n color: theme.palette.common.white,\n fontSize: 16,\n fontFamily: '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif',\n },\n tableStriped: {\n '& tbody tr:nth-of-type(odd)': {\n backgroundColor: '#f5f5f5',\n },\n color: '#9F9F9F'\n },\n customizePaper: {\n backgroundColor: '#f5f5f5'\n }\n});\n\nconst CustomTableCellBase = ({ classes, ...restProps }) => (\n \n);\n\nconst CustomHeaderCellBase = ({ classes, ...restProps }) => ( \n \n);\n\nconst TableComponentBase = ({ classes, ...restProps }) => (\n \n);\n\nexport const CustomizeTableCell = withStyles(styles)(CustomTableCellBase);\nexport const CustomizeHeaderCell = withStyles(styles)(CustomHeaderCellBase);\nexport const TableComponent = withStyles(styles, { name: 'TableComponent' })(TableComponentBase);\n\n/**\n * Builds the grid body of the NOF page.\n * @param {object} classes contains a collection of class styles to use.\n * @param {Array} rows The array to populate the grid with.\n * @param {{\n * category: string,\n * fileId: string,\n * filename: string,\n * }[]} filesDownloading A list of files currently being downloaded.\n * @param {function} requestFile A function that will download a given file.\n * @return {JSX.Element} The grid body of the NOF page.\n */\nconst NofGridBody = ({\n rows, filesDownloading, progressing, requestFile,\n}) => {\n \n const defaultColumnWidths = [\n { columnName: 'jobTitle', width: 'auto' },\n { columnName: 'postingDate', width: 'auto' },\n { columnName: 'expirationDate', width: 'auto' },\n { columnName: '', width: '50px' }\n ];\n\n const columns = [ \n { name: 'jobTitle', title: 'Job Title' },\n { name: 'postingDate', title: 'Posting Date' },\n { name: 'expirationDate', title: 'Expiration Date', getCellValue: row => (row.expiredDate) }, \n { name: '', title: '', \n getCellValue: row => requestFile(row.downloadUrl, row.fileId, row.jobTitle)}\n downloadInProgress={filesDownloading.some((download) => download.fileId === row.fileId)}\n /> },\n ];\n\n const filteringStateColumnExtensions = [{ columnName: '', filteringEnabled: false }];\n\n const [groupingStateColumnExtensions] = useState([\n { columnName: '', groupingEnabled: false } \n ]);\n\n if (progressing) {\n return (\n \n \n \n \n \n \n );\n }\n\n return (\n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n );\n};\nNofGridBody.propTypes = {\n classes: PropTypes.shape({\n row: PropTypes.string,\n }).isRequired,\n rows: nofListingsDataType.isRequired,\n filesDownloading: PropTypes.arrayOf(PropTypes.string).isRequired,\n progressing: PropTypes.bool,\n requestFile: PropTypes.func.isRequired,\n};\n\nexport default withStyles(styles)(NofGridBody);\n","import { connect } from 'react-redux';\nimport { requestFile } from '../actions';\nimport NofGridBody from '../components/NofGridBody';\n\n/**\n * Identifier for downloads initiated by this control.\n * @type {string}\n */\nconst downloadCategory = 'nof';\n\n/**\n * Gets the props to send to the wrapped component.\n * @param {{\n * fileDownload: {\n * category: string,\n * fileId: string,\n * filename: string,\n * }\n * }} state The current state.\n * @param {{rows: Array}} ownProps The props provided to this component.\n * @returns {{\n * rows: Array,\n * filesDownloading: Array,\n * }} The props to send to the wrapped component.\n */\nconst mapStateToProps = (state, ownProps) => ({\n rows: ownProps.rows,\n filesDownloading: state.fileDownload.filter((download) => download.category === downloadCategory),\n progressing: state.paginationContext.progressing\n});\n\n/**\n * Gets the functions to supply to the wrapped component.\n * @param {function} dispatch A function that wraps another function in Redux state flow.\n * @returns {{\n * requestFile: function,\n * }} The functions to supply to the wrapped component.\n */\nconst mapDispatchToProps = (dispatch) => ({\n requestFile: (fileUrl, fileId, defaultFilename) => dispatch(requestFile(fileUrl, downloadCategory, fileId, defaultFilename)),\n});\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(NofGridBody);\n","import React from 'react';\nimport * as PropTypes from 'prop-types';\nimport WrappedNofGridBody from '../containers/WrappedNofGridBody';\nimport { nofListingsDataType } from './PropDefinitions';\n\n/**\n * Builds the grid of the Nof page.\n * @param classes {Object} contains a collection of class styles to use.\n * @param nofPostingRows {Array} The array to populate the grid with.\n * @param introMessage {string} The message to display before the table body.\n * @return {undefined} This function does not return a value.\n */\nconst NofGrid = ({\n nofPostingRows, introMessage,\n}) => {\n \n return (\n <>\n

{introMessage}

\n \n \n );\n};\nNofGrid.propTypes = {\n nofPostingRows: nofListingsDataType.isRequired,\n introMessage: PropTypes.string,\n};\n\nexport default (NofGrid);\n","import React from 'react';\nimport {\n Tab, TabList, TabPanel, Tabs,\n} from 'react-tabs';\nimport LcaGrid from './LcaGrid';\nimport NofGrid from './NofGrid';\nimport { clientInfoDataType } from './PropDefinitions';\n\n/**\n * The styles to apply to this component.\n * @type {{iconsAndText: {color: string}}}\n */\nconst styles = {\n iconsAndText: {\n color: '#6B6B6B',\n },\n};\n\n/**\n * Builds a tabbed version of the display page body.\n * @param bodyData {*} The data to populate the page with.\n * @return {jsx} A tabbed version of the display page body.\n */\nconst NonAuthenticatedTabbedBody = ({ bodyData, limitRows, getPostings }) => {\n const lcaContext = {\n pageContext: \"lca\",\n limitRows,\n nextSkipToken: null,\n paginated: false\n };\n const nofContext = {\n pageContext: \"nof\",\n limitRows,\n nextSkipToken: null,\n paginated: false\n };\n\n const cachedToken = sessionStorage.getItem('cachedAccessToken');\n return (\n \n
\n
\n \n \n getPostings(cachedToken, lcaContext)}>\n \n \n   Active LCAs\n \n \n \n getPostings(cachedToken, nofContext)}>\n \n  \n   Active NOFs\n \n \n \n\n \n \n \n \n \n \n
\n );\n};\n\nNonAuthenticatedTabbedBody.propTypes = {\n bodyData: clientInfoDataType.isRequired,\n};\n\nexport default NonAuthenticatedTabbedBody;\n","import { connect } from 'react-redux';\nimport NonAuthenticatedTabbedBody from '../components/NonAuthenticatedTabbedBody';\nimport { loadPostings } from '../actions';\n\n/**\n * Gets the props to send to the wrapped component.\n * @param {{\n * bodyData:Object \n * }} state The current state.\n * @returns {{bodyData: Object}} The props to supply to the wrapped component.\n */\nconst mapStateToProps = (state, ownProps) => ({\n bodyData: ownProps.bodyData,\n limitRows: state.paginationContext.limitRows\n});\n\n/**\n * Gets the functions to send to the wrapped component.\n * @param {function} dispatch A function that wraps another function in Redux state flow.\n * @returns {{\n * getPostings: (function(string=, Object=): *)\n * }} The functions to supply to the wrapped component.\n */\nconst mapDispatchToProps = (dispatch) => ({ \n getPostings: (token, paginationContext) => dispatch(loadPostings(token, paginationContext))\n});\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(NonAuthenticatedTabbedBody);\n","import React from 'react';\nimport { clientInfoDataType } from './PropDefinitions';\nimport WrappedTabbedBody from '../containers/WrappedTabbedBody';\nimport WrappedNonAuthenticatedTabbedBody from '../containers/WrappedNonAuthenticatedTabbedBody';\n\n/**\n * Builds the body of the display page.\n * @param {*} bodyData The data to populate the page with.\n * @return {jsx} The body of the display page.\n */\nconst DisplayPageBody = ({ bodyData }) => {\n if (sessionStorage.getItem('cachedAccessToken')?.toLowerCase().includes('paf')) {\n return ();\n }\n\n return ();\n};\nDisplayPageBody.propTypes = {\n bodyData: clientInfoDataType.isRequired\n};\n\nexport default DisplayPageBody;\n","import * as PropTypes from 'prop-types';\nimport React from 'react';\n\n/**\n * A company logo or name to appear in the header.\n * @param {string | null} pageHeaderLogo The url for the header logo.\n * @param {string | null} companyName The company name to display if no logo is provided.\n * @returns {JSX} A UI element that displays company branding info in the header.\n * @constructor\n */\nexport default function HeaderLogo({ pageHeaderLogo, companyName }) {\n if (pageHeaderLogo) {\n return {companyName};\n }\n return

{companyName}

;\n}\nHeaderLogo.propTypes = {\n pageHeaderLogo: PropTypes.string,\n companyName: PropTypes.string.isRequired,\n};\nHeaderLogo.defaultProps = {\n pageHeaderLogo: null,\n};\n","import React from 'react';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport IconButton from '@material-ui/core/IconButton';\nimport * as PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport SnackbarContent from '@material-ui/core/SnackbarContent';\nimport { errorPromptDataType } from './PropDefinitions';\n\nconst styles = (theme) => ({\n errorSnackbar: {\n backgroundColor: theme.palette.error.dark,\n },\n message: {\n display: 'flex',\n alignItems: 'center',\n },\n});\n\n/**\n * Displays an error prompt in the bottom right corner of the screen.\n * @param {Object} classes An object defining css classes.\n * @param {{\n * errorPromptOpen: boolean,\n * errorMessage: string,\n * errorTime: number,\n * }}\n * @param {function} closeHandler The function to call when the prompt should close.\n * @return {jsx} A prompt that notifies users of errors.\n */\nfunction ErrorPrompt({\n classes, errorInfo, closeHandler,\n}) {\n const { errorPromptOpen, errorMessage, errorTime } = errorInfo || {};\n\n return (\n \n \n \n  \n {errorMessage}\n \n )}\n action={[\n \n \n ,\n ]}\n />\n \n );\n}\nErrorPrompt.propTypes = {\n classes: PropTypes.shape({\n errorSnackbar: PropTypes.string,\n message: PropTypes.string,\n }).isRequired,\n errorInfo: errorPromptDataType.isRequired,\n closeHandler: PropTypes.func.isRequired,\n};\n\nexport default withStyles(styles)(ErrorPrompt);\n","import React from 'react';\nimport { Button, Card } from '@material-ui/core';\nimport * as PropTypes from 'prop-types';\nimport 'react-tabs/style/react-tabs.css';\nimport DisplayPageBody from './DisplayPageBody';\nimport HeaderLogo from './HeaderLogo';\nimport ErrorPrompt from './ErrorPrompt';\nimport { clientInfoDataType, errorPromptDataType } from './PropDefinitions';\n\n/**\n * Builds the main content display page.\n * @param {{\n * pageHeaderLogo: string,\n * companyName: string,\n * titleBackground: string,\n * pageIntro: string,\n * }} pageData The data to populate the page with.\n * @param {{\n * errorPromptOpen: boolean,\n * errorMessage: string,\n * errorTime: number,\n * }} errorInfo Information for the error prompt component.\n * @param {Function} resetClick The function to call when the user logs out.\n * @param {\n * function(Object=, string=): *\n * } clearErrorPrompt The function to call to dismiss the error prompt.\n * @return {undefined} this function does not return a value.\n */\nconst DisplayPage = ({\n pageData, errorInfo, resetClick, clearErrorPrompt,\n}) => (\n <>\n
\n \n \n \n \n \n \n \n \n \n \n
\n

{pageData.companyName}

\n

Postings Portal

\n
\n
\n
\n
\n \n
\n
\n \n \n \n \n);\nDisplayPage.propTypes = {\n pageData: clientInfoDataType.isRequired,\n errorInfo: errorPromptDataType.isRequired,\n resetClick: PropTypes.func.isRequired,\n clearErrorPrompt: PropTypes.func.isRequired,\n};\n\nexport default DisplayPage;\n","import { connect } from 'react-redux';\nimport { clearFileDownloadErrorPrompt, loginReset } from '../actions';\nimport DisplayPage from '../components/DisplayPage';\n\n/**\n * Gets the props to send to the wrapped component.\n * @param {{\n * clientData: {\n * clientJson: Object,\n * },\n * errorPrompt: {\n * errorPromptOpen: boolean,\n * errorMessage: string,\n * errorTime: number,\n * }\n * }} state The current state.\n * @returns {{pageData: Object}} The props to supply to the wrapped component.\n */\nconst mapStateToProps = (state) => ({\n pageData: state.clientData.clientJson,\n errorInfo: state.errorPrompt,\n});\n\n/**\n * Gets the functions to send to the wrapped component.\n * @param {function} dispatch A function that wraps another function in Redux state flow.\n * @returns {{\n * resetClick: (function(): *),\n * clearErrorPrompt: (function(Object=, string=): *)\n * }} The functions to supply to the wrapped component.\n */\nconst mapDispatchToProps = (dispatch) => ({\n resetClick: () => {\n sessionStorage.clear();\n return dispatch(loginReset());\n },\n clearErrorPrompt: (event, reason) => dispatch(clearFileDownloadErrorPrompt(event, reason)),\n});\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(DisplayPage);\n","import React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport downloadHandler from '../api/downloadHandler';\nimport LoginPortal from './LoginPortal';\nimport WrappedDisplayPage from '../containers/WrappedDisplayPage';\n\n// noinspection JSUnresolvedVariable,ES6ModulesDependencies\n/**\n * Builds default login portal branding for anything not supplied by the API.\n * @returns {{loginLogo: string}} An object containing default login branding.\n */\nconst createDefaultLoginBranding = () => ({\n loginLogo: `${process.env.PUBLIC_URL}/img/eig-logo.png`,\n});\n\nclass App extends React.Component {\n /**\n * Constructor for the app.\n * @param props {Object} Properties provided to this class.\n * @return {undefined} This function does not return a value.\n */\n constructor(props) {\n super(props);\n this.state = {\n loginBranding: null,\n };\n }\n\n /**\n * Fires when component mounts.\n * @return {undefined} This function does not return a value.\n */\n componentDidMount() {\n this.requestLoginBranding();\n }\n\n /**\n * Populates client data from a response.\n * @param response {object} The response to a data request.\n * @return {undefined} This function does not return a value.\n */\n populateBrandingData = (response) => {\n const mergedData = createDefaultLoginBranding();\n\n for (const property in response) {\n // eslint-disable-next-line no-prototype-builtins\n if (response.hasOwnProperty(property)) {\n if (response[property] != null) {\n mergedData[property] = response[property];\n }\n }\n }\n\n this.setState({ loginBranding: mergedData });\n };\n\n /**\n * Calls the web api requesting branding data.\n * @returns {undefined} This method does not return a value.\n */\n requestLoginBranding = () => {\n this.setState({ loginBranding: null });\n\n downloadHandler.requestBrandingData(\n window.location.href,\n (response) => this.populateBrandingData(response),\n null,\n );\n };\n\n /**\n * Renders the contents of the page.\n * @returns {undefined} This method does not return a value.\n */\n render() {\n const { loggedIn } = this.props;\n const { loginBranding } = this.state;\n\n if (!loggedIn) {\n return (\n \n );\n }\n\n return (\n \n );\n }\n}\nApp.propTypes = {\n loggedIn: PropTypes.bool,\n};\nApp.defaultProps = {\n loggedIn: true,\n};\n\nexport default connect()(App);\n","import { connect } from 'react-redux';\nimport App from '../components/App';\n\n/**\n * Gets the props to send to wrapped component.\n * @param {{ clientData: { loggedIn: boolean }}} state The current state.\n * @returns {{loggedIn: boolean}} The props to send to the wrapped component.\n */\nconst mapStateToProps = (state) => ({\n loggedIn: state.clientData.loggedIn,\n});\n\nexport default connect(\n mapStateToProps,\n)(App);\n","import {\n LOGIN_BEGIN, LOGIN_ERROR, LOGIN_RESET, LOGIN_SUCCESS, LOGIN_SUCCESS_DATA_ERROR\n} from '../actions';\n\n/**\n * Returns a new state depending on the provided action.\n * @param {{\n * currentToken: string | null,\n * clientJson: Object | null,\n * loggedIn: boolean,\n * errorMessage: string | null,\n * processingLogin: boolean\n * }} state The current state.\n * @param {{\n * type: string,\n * clientJson: Object,\n * token: string,\n * errorMessage: string,\n * }} action An object containing parameters and the action to perform.\n * @returns {{\n * currentToken: string | null,\n * clientJson: Object | null,\n * loggedIn: boolean,\n * errorMessage: string | null,\n * processingLogin: boolean\n * }} The new state to apply.\n */\nconst clientData = (state = defaultState(), action) => {\n switch (action.type) {\n // Updates state to reflect a login in progress.\n case LOGIN_BEGIN:\n return {\n ...state,\n processingLogin: true,\n clientJson: null,\n currentToken: null,\n errorMessage: null,\n loggedIn: false,\n };\n // Updates state with data from successful login.\n case LOGIN_SUCCESS:\n return {\n ...state,\n processingLogin: false,\n clientJson: action.clientJson,\n currentToken: action.token,\n loggedIn: true,\n };\n // Updates state with data from successful login, but failure to fetch api data\n case LOGIN_SUCCESS_DATA_ERROR:\n return {\n ...state, \n processingLogin: false,\n errorMessage: action.errorMessage,\n currentToken: action.token,\n loggedIn: true,\n };\n // Updates state with the error information from the failed login.\n case LOGIN_ERROR:\n return {\n ...state,\n processingLogin: false,\n errorMessage: action.errorMessage,\n };\n // Restores the default state.\n case LOGIN_RESET:\n return defaultState();\n // Makes no changes to the state.\n default:\n return state;\n }\n};\n\n/**\n * The default state to use.\n * @returns {{\n * currentToken: null,\n * clientJson: null,\n * loggedIn: boolean,\n * errorMessage: null,\n * processingLogin: boolean\n * }} A new instance of the default state.\n */\nconst defaultState = () => ({\n loggedIn: false,\n clientJson: null,\n currentToken: null,\n processingLogin: false,\n errorMessage: null,\n});\n\nexport default clientData;\n","import {\n PAF_METADATA_DOWNLOAD_BEGIN,\n PAF_METADATA_DOWNLOAD_SUCCESS,\n PAF_METADATA_DOWNLOAD_ERROR,\n PAF_METADATA_ADD,\n} from '../actions';\n\n/**\n * Returns a new state depending on the provided action.\n * @param {{\n * pafId: string,\n * files: Object[],\n * fileListDownloading: boolean,\n * fileListDownloadErrorMessage: string,\n * }[]} state The current state.\n * @param {{\n * type: string,\n * pafId: string,\n * fileList: Object[],\n * errorMessage: string,\n * }} action An object containing parameters and the action to perform.\n * @returns {{\n * pafId: string,\n * files: Object[],\n * }[]} The new state to apply.\n */\nconst pafMetadata = (state = [], action) => {\n switch (action.type) {\n // Add a PAF to the list of known PAFs.\n case PAF_METADATA_ADD:\n if (state.find((pafMeta) => pafMeta.pafId === action.pafId)) {\n return state;\n }\n\n return [\n ...state,\n {\n pafId: action.pafId,\n files: null,\n },\n ];\n // Mark a PAF as having its metadata downloaded.\n case PAF_METADATA_DOWNLOAD_BEGIN:\n return state.map((paf) => {\n if (paf.pafId === action.pafId) {\n return {\n ...paf,\n fileListDownloading: true,\n fileListDownloadErrorMessage: null,\n };\n }\n return paf;\n });\n // Update a PAF entry with its metadata.\n case PAF_METADATA_DOWNLOAD_SUCCESS:\n return state.map((paf) => {\n if (paf.pafId === action.pafId) {\n return {\n ...paf,\n fileListDownloading: false,\n files: action.fileList,\n };\n }\n return paf;\n });\n // Updates a PAF as having failed to download its metadata.\n case PAF_METADATA_DOWNLOAD_ERROR:\n return state.map((paf) => {\n if (paf.pafId === action.pafId) {\n return {\n ...paf,\n fileListDownloading: false,\n files: [],\n fileListDownloadErrorMessage: action.errorMessage,\n };\n }\n return paf;\n });\n // Makes no changes to the state.\n default:\n return state;\n }\n};\n\nexport default pafMetadata;\n","import {\n FILE_REQUEST_BEGIN,\n FILE_REQUEST_SUCCESS,\n FILE_REQUEST_ERROR,\n} from '../actions';\n\n/**\n * Returns a new state depending on the provided action.\n * @param {{\n * category: string,\n * fileId: string,\n * fileName: string,\n * }[]} state The current state.\n * @param {{\n * type: string,\n * category: string,\n * fileId: string,\n * fileName: string,\n * }} action An object containing parameters and the action to perform.\n * @returns {{\n * category: string,\n * fileId: string,\n * fileName: string,\n * }[]} The new state to use.\n */\nconst fileDownload = (state = [], action) => {\n switch (action.type) {\n case FILE_REQUEST_BEGIN:\n return [\n ...state,\n {\n category: action.category,\n fileId: action.fileId,\n fileName: action.fileName,\n location: action.location\n },\n ];\n case FILE_REQUEST_SUCCESS:\n case FILE_REQUEST_ERROR:\n return state.filter((file) => doesDownloadEntryMatch(file, action));\n default:\n return state;\n }\n};\n\n/**\n * Checks if two download entries match\n * @param {{\n * category: string,\n * fileId: string,\n * fileName: string,\n * }} firstEntry The first entry to compare.\n * @param {{\n * category: string,\n * fileId: string,\n * fileName: string,\n * }} secondEntry The second entry to compare.\n * @returns {boolean} True if entries match, otherwise false.\n */\nfunction doesDownloadEntryMatch(firstEntry, secondEntry) {\n return firstEntry.category !== secondEntry.category &&\n firstEntry.fileId !== secondEntry.fileId &&\n firstEntry.fileName !== secondEntry.fileName;\n}\n\nexport default fileDownload;\n","import { ERROR_PROMPT_TRIGGER, ERROR_PROMPT_CLEAR } from '../actions';\n\n/**\n * Returns a new state depending on the provided action.\n * @param {{\n * errorMessage: string,\n * errorPromptOpen: boolean,\n * errorTime: number,\n * }} state The current state.\n * @param {{\n * type: string,\n * errorMessage: string,\n * }} action An object containing parameters and the action to perform.\n * @returns {{\n * errorMessage: string,\n * errorPromptOpen: boolean,\n * errorTime: number,\n * }} The new state to use.\n */\nconst errorPrompt = (state = getDefaultState(), action) => {\n switch (action.type) {\n case ERROR_PROMPT_TRIGGER:\n return {\n errorPromptOpen: true,\n errorMessage: action.errorMessage,\n errorTime: Date.now(),\n };\n case ERROR_PROMPT_CLEAR:\n return getDefaultState();\n default:\n return state;\n }\n};\n\n/**\n * The default state for this reducer.\n * @returns {{\n * errorMessage: string,\n * errorPromptOpen: boolean,\n * errorTime: number\n * }} A new instance of the default state.\n */\nconst getDefaultState = () => ({\n errorPromptOpen: false,\n errorMessage: '',\n errorTime: Date.now(),\n});\n\nexport default errorPrompt;\n","import {\n SET_PAGINATION_CONTEXT, PAGINATION_SUCCESS, PAGINATION_RESET, PAGE_PROGRESS_BEGIN\n} from '../actions';\n\n/**\n * Returns a new state depending on the provided action.\n * @param {{\n * previousSkipToken: null,\n * nextSkipToken: null,\n * pageContext: all/lca/paf,\n * limitRows: 20,\n * errorMessage: string\n * }} state The current state.\n * @param {{\n * previousSkipToken: string,\n * nextSkipToken: string,\n * pageContext: string,\n * errorMessage: string,\n * }} action An object containing parameters and the action to perform.\n * @returns {{\n * previousSkipToken: string | null,\n * nextSkipToken: Object | null,\n * pageContext: all/lca/paf,\n * errorMessage: string | null,\n * limitRows: int\n * }} The new state to apply.\n */\nconst paginationContext = (state = defaultState(), action) => {\n switch (action.type) {\n // Updates state to set pagination context.\n case SET_PAGINATION_CONTEXT:\n return {\n ...state,\n pageContext: action.pageContext,\n nextSkipToken: action.nextSkipToken,\n paginated: action.paginated,\n errorMessage: null\n };\n // Updates state with data from successful page navigation.\n case PAGINATION_SUCCESS:\n return {\n ...state,\n nextSkipToken: action.nextSkipToken,\n paginated: action.paginated,\n progressing: false\n };\n // Updates state with data from successful page navigation.\n case PAGE_PROGRESS_BEGIN:\n return {\n ...state,\n progressing: true\n };\n // Restores the default state.\n case PAGINATION_RESET:\n return defaultState();\n // Makes no changes to the state.\n default:\n return state;\n }\n};\n\n/**\n * The default state to use.\n * @returns {{\n * progressing: false\n * nextSkipToken: null,\n * pageContext: all/lca/paf,\n * limitRows: 20,\n * paginated: bool\n * errorMessage: string\n * }} A new instance of the default state.\n */\nconst defaultState = () => ({\n progressing: false,\n nextSkipToken: null,\n pageContext: 'lca',\n limitRows: 20,\n paginated: false,\n errorMessage: null,\n});\n\nexport default paginationContext;\n","import {\n LCA_METADATA_DOWNLOAD_BEGIN,\n LCA_METADATA_DOWNLOAD_SUCCESS,\n LCA_METADATA_DOWNLOAD_ERROR,\n LCA_METADATA_ADD,\n} from '../actions';\n\n/**\n * Returns a new state depending on the provided action.\n * @param {{\n * lcaId: string,\n * files: Object[],\n * fileListDownloading: boolean,\n * fileListDownloadErrorMessage: string,\n * }[]} state The current state.\n * @param {{\n * type: string,\n * lcaId: string,\n * fileList: Object[],\n * errorMessage: string,\n * }} action An object containing parameters and the action to perform.\n * @returns {{\n * lcaId: string,\n * files: Object[],\n * }[]} The new state to apply.\n */\nconst lcaMetadata = (state = [], action) => {\n switch (action.type) {\n // Add a LCA to the list of known LCAs.\n case LCA_METADATA_ADD:\n if (state.find((lcaMeta) => lcaMeta.lcaId === action.lcaId)) {\n return state;\n }\n\n return [\n ...state,\n {\n lcaId: action.lcaId,\n files: null,\n },\n ];\n // Mark a LCA as having its metadata downloaded.\n case LCA_METADATA_DOWNLOAD_BEGIN:\n return state.map((lca) => {\n if (lca.lcaId === action.lcaId) {\n return {\n ...lca,\n fileListDownloading: true,\n fileListDownloadErrorMessage: null,\n };\n }\n return lca;\n });\n // Update a LCA entry with its metadata.\n case LCA_METADATA_DOWNLOAD_SUCCESS:\n return state.map((lca) => {\n if (lca.lcaId === action.lcaId) {\n return {\n ...lca,\n fileListDownloading: false,\n files: action.fileList,\n };\n }\n return lca;\n });\n // Updates a LCA as having failed to download its metadata.\n case LCA_METADATA_DOWNLOAD_ERROR:\n return state.map((lca) => {\n if (lca.lcaId === action.lcaId) {\n return {\n ...lca,\n fileListDownloading: false,\n files: [],\n fileListDownloadErrorMessage: action.errorMessage,\n };\n }\n return lca;\n });\n // Makes no changes to the state.\n default:\n return state;\n }\n};\n\nexport default lcaMetadata;\n","import { combineReducers } from 'redux';\nimport clientData from './clientData';\nimport pafMetadata from './pafMetadata';\nimport fileDownload from './fileDownload';\nimport errorPrompt from './errorPrompt';\nimport paginationContext from './paginationContext';\nimport lcaMetadata from './lcaMetadata';\n\n/**\n * Combines reducers into a single object.\n */\nexport default combineReducers({\n clientData,\n pafMetadata,\n lcaMetadata,\n fileDownload,\n errorPrompt,\n paginationContext,\n});\n","import './index.css';\nimport 'font-awesome/css/font-awesome.min.css';\nimport 'font-awesome/fonts/fontawesome-webfont.eot';\nimport 'font-awesome/fonts/fontawesome-webfont.svg';\nimport 'font-awesome/fonts/fontawesome-webfont.ttf';\nimport 'font-awesome/fonts/fontawesome-webfont.woff';\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\nimport './LoginPortalStyles.css';\nimport './LcaDisplayPageStyles.css';\nimport './JobGridStyles.css';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { applyMiddleware, createStore } from 'redux';\nimport thunk from 'redux-thunk';\nimport WrappedApp from './containers/WrappedApp';\nimport rootReducer from './reducers';\n\nconst store = createStore(rootReducer, applyMiddleware(thunk));\n\nReactDOM.render(\n // eslint-disable-next-line react/jsx-filename-extension\n \n \n ,\n document.getElementById('root'),\n);\n"],"sourceRoot":""}