{"version":3,"sources":["components/Layout/Header/Logo/Logo.module.css","components/Layout/Header/Account/Avatar.module.css","components/Search/SearchResults/SearchResultLink.module.css","components/Hero/Icons.module.css","components/Layout/Footer/Footer.module.css","pages/Handbook/HandbookPage.module.css","components/Chapters/Accordion/Accordion.module.css","components/Chapters/SideMenu/SideMenu.module.css","components/Chapters/BackToTop/BackToTop.module.css","pages/Chapter/ChapterPage.module.css","components/Layout/Header/Header.module.css","api/api.ts","auth/jwtAuth.ts","auth/useAuth.ts","auth/ProvideAuth.tsx","api/JwtFetch.ts","api/ApiFactory.ts","components/Spinner/Spinner.tsx","api/ProvideData.tsx","theme/themeNames.ts","translations/languages.ts","theme/useTheme.ts","components/Head/Head.tsx","api/ProvideHandbookInfo.tsx","auth/PrivateRoute.tsx","components/LoginForm/LoginForm.tsx","api/useHandbookData.ts","components/Layout/Header/Logo/Logo.tsx","pages/Login/LoginPage.tsx","components/Layout/Header/useSticky.tsx","helpers/debounce.ts","helpers/useIsMobile.ts","components/Layout/Header/Hamburger/Hamburger.tsx","components/Layout/Header/Account/Settings.tsx","components/Layout/Header/Account/Avatar.tsx","components/Layout/Header/Nav/Nav.tsx","components/Button/Button.tsx","components/Search/SearchResults/SearchResultLink.tsx","components/Search/SearchResults/SearchResults.tsx","static/images/icons/magnifier.svg","components/Search/SearchInput/SearchInput.tsx","components/Search/Search.tsx","components/Layout/Header/HeaderButton/HeaderButton.tsx","components/Layout/Header/Account/Account.tsx","components/Layout/Header/Header.tsx","components/Hero/Hero.tsx","components/ScrollTo/ScrollTop.tsx","components/Chapters/ListItem/Placeholder.tsx","components/Chapters/ListItem/ChapterListItem.tsx","components/Chapters/List/ChaptersList.tsx","components/Layout/Footer/Footer.tsx","pages/Handbook/HandbookPage.tsx","api/useChapterData.ts","components/Chapters/Banner/Banner.tsx","components/Chapters/Accordion/AccordionSubItem.tsx","components/Chapters/Accordion/AccordionItem.tsx","components/Chapters/Accordion/Accordion.tsx","components/Chapters/SideMenu/SideMenu.tsx","components/Chapters/Section/SectionLinks.tsx","components/Chapters/Section/SectionTariffAgreements.tsx","components/Chapters/Section/Section.tsx","components/Chapters/Chapter.tsx","components/ScrollTo/ScrollTo.tsx","components/Chapters/BackToTop/BackToTop.tsx","components/Layout/BottomNav/BottomNav.tsx","pages/Chapter/ChapterPage.tsx","pages/ErrorPage/ErrorPage.tsx","auth/PublicRoute.tsx","components/AppInsights/AppInsightsProvider.tsx","App.tsx","reportWebVitals.ts","index.tsx","pages/Login/LoginPage.module.css","components/Hero/Hero.module.css","components/Search/Search.module.css","components/Chapters/Banner/Banner.module.css","pages/ErrorPage/ErrorPage.module.css","components/Chapters/Accordion/AccordionItem.module.css","components/Chapters/Section/Section.module.css","components/Search/SearchResults/SearchResults.module.css","components/Layout/BottomNav/BottomNav.module.css","components/Chapters/ListItem/ChapterListItem.module.css","components/Layout/Header/Hamburger/Hamburger.module.css","components/Layout/Header/Nav/Nav.module.css","components/Chapters/Accordion/AccordionSubItem.module.css","components/Button/Button.module.css","components/LoginForm/LoginForm.module.css","components/Layout/Header/Account/Settings.module.css","components/Layout/Header/HeaderButton/HeaderButton.module.css","components/Chapters/List/ChaptersList.module.css","components/Chapters/Chapter.module.css","components/Spinner/Spinner.module.css","components/Search/SearchInput/SearchInput.module.css","components/Layout/Header/Account/Account.module.css"],"names":["module","exports","DigitalHandbookClient","baseUrl","http","jsonParseReviver","undefined","this","window","handbookUrl","url_","Error","encodeURIComponent","replace","fetch","method","headers","then","_response","processGet","response","status","_headers","forEach","v","k","text","_responseText","JSON","parse","throwException","Promise","resolve","HandbookInfoClient","AuthenticateUserClient","loginDto","options_","body","stringify","processPost","RefreshUserTokenClient","refreshTokenDto","ApiException","message","result","isApiException","obj","authClient","location","origin","refreshClient","ACCESS_TOKEN","USERNAME","REFRESH_TOKEN","retrieveToken","type","localStorage","getItem","saveToken","token","setItem","clearToken","removeItem","saveUserName","username","clearUserName","refreshToken","a","accessToken","post","loc","href","pathname","endsWith","search","jwtAuth","userName","password","requestedUrl","useAuth","useContext","authContext","createContext","ProvideAuth","children","auth","initUser","user","useState","setUser","isAuthenticated","setIsAuthenticated","signin","signout","useProvideAuth","retrieveUserName","Provider","value","fetchJsonWithToken","url","init","optionsWithToken","Authorization","fetchJSON","configureRefreshFetch","shouldRefreshToken","error","jwtFetch","Spinner","t","useTranslation","className","styles","content","hidden","spinner","dataContext","ProvideData","handbook","setHandbook","handbookId","useParams","useEffect","ApiFactory","create","get","fetchHandbook","themeNames","orange","dark","light","button","buttonText","roseblad","roseleaf","atlantis","bluelight","gray","default","languages","getColors","color","useTheme","infoContext","handbookIdContext","getThemeName","themeColor","handbookInfo","themeName","themeColors","document","documentElement","style","setProperty","getThemeColors","Head","Helmet","htmlAttributes","lang","language","title","ProvideHandbookInfo","theme","setTheme","loadingHandbookInfo","setLoadingHandbookInfo","setHandbookInfo","history","useHistory","updateHandbookInfo","i18next","changeLanguage","toLocaleLowerCase","updateTheme","fetchHandbookInfo","hash","state","PrivateRoute","rest","exact","render","match","to","params","from","LoginForm","useLocation","setStatus","setUserName","setPassword","triedLoggingIn","useRef","parsedSearch","queryString","id","pw","current","login","e","preventDefault","form","htmlFor","name","autoComplete","required","onChange","target","onClick","useHandbookData","chapters","getChapters","companyName","companies","hideCompanyName","name2","name1","getCompanyName","branchName","hideSecondaryName","getBranchName","Logo","logoBase64","logo","slice","src","alt","LoginPage","background","backgroundColor","coverImageAzurePath","coverImageAzureAlt","container","subheading","classNames","separator","useSticky","isSticky","setSticky","isUp","setIsUp","lastScrollTop","pageYOffset","scrollTop","debounced","func","timeoutID","wait","Number","isInteger","args","clearTimeout","context","setTimeout","apply","debounce","scrollPosition","scrollDown","scrollY","addEventListener","removeEventListener","useIsMobile","React","isMobile","setMobile","handleResize","mediaQuery","matchMedia","matches","Hamburger","isOpen","animated","setAnimated","aria-expanded","width","height","viewBox","classnames","svg","open","close","stroke","aria-hidden","fill","strokeWidth","strokeLinecap","d","transition","Settings","onLogoutClick","aria-labelledby","memo","getInitials","split","firstName","lastName","charAt","toUpperCase","Avatar","Nav","onMenuClose","accountInfo","heading","role","map","chapter","index","softLink","onKeyUp","event","length","keyCode","onBlur","Button","cssClass","SearchResultLink","section","onSearchClose","searchContext","parent","push","SearchResults","searchHits","searchTerm","isSearchOpen","position","overflowY","resultsTitle","list","striptags","customContent","createElement","innerHTML","listItem","highlightClassName","highlighted","searchWords","autoEscape","textToHighlight","childNodes","nodeValue","info","SearchInput","onSearch","inputValue","setInputValue","onSubmit","evt","MagnifierGlass","icons","loading","input","placeholder","Search","headerType","setSearchTerm","searchResult","setSearchResult","up","expanded","inputWrapper","HeaderType","CHAPTER","inputWrapperInner","searchString","hits","reduce","acc","sections","s","parentTitle","test","filter","includes","wrapper","HeaderButton","Account","aria-label","Header","isMenuOpen","setIsMenuOpen","setIsSearchOpen","isSettingsOpen","setIsSettingsOpen","isSearchTermEmpty","setIsSearchTermEmpty","onSettingsClose","HANDBOOK","sticky","inner","ButtonStyles","back","items","item","Hero","coverPhotoPath","coverPhotoAlt","isDemo","demo","media","ScrollTop","scrollTo","Placeholder","colorLight","colorDark","angle","xmlns","preserveAspectRatio","SectionLink","showSeparator","chapterId","ChapterListItem","imageAzurePath","imageAzureAlt","image","ChaptersList","updated","Footer","Date","getFullYear","HandbookPage","publishedDate","useChapterData","findIndex","x","getChapterLink","targetIndex","targetChapter","link","previous","next","Banner","imagePath","imageAlt","grid","img","trapezoid","AccordionSubItem","isCurrent","circle","AccordionItem","isExpanded","aria-controls","down","description","duration","submenu","Accordion","activeIndex","setActiveIndex","currentItemIndex","firstSectionLink","SideMenu","SectionLinks","isDocument","agreementLink","rel","SectionTariffAgreements","selectedCompany","setSelectedCompany","company","find","disabled","selected","agreements","agreement","SectionContent","organization","anyCompanyHasAgreements","some","dangerouslySetInnerHTML","__html","linkLists","links","linkItem","azureFilesList","file","showCollectiveAgreements","Section","myRef","ref","Chapter","refs","chapterContext","menu","aria-live","aria-atomic","aria-relevant","el","ScrollTo","pos","top","scrollIntoView","behavior","block","BackToTop","BottomNav","column","prev","ChapterPage","sectionRefs","ErrorPage","errorCode","PublicRoute","AppInsightsProvider","reactPlugin","ReactPlugin","ai","ApplicationInsights","config","instrumentationKey","process","extensions","extensionConfig","identifier","enableAutoRouteTracking","disableFetchTracking","enableCorsCorrelation","enableRequestHeaderTracking","enableResponseHeaderTracking","enableUnhandledPromiseRejectionTracking","loadAppInsights","trackPageView","uri","trackEvent","properties","appInsights","initAppInsights","AppInsightsContext","App","browserHistory","createBrowserHistory","basename","path","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","detection","htmlTag","interpolation","escapeValue","lng","resources","en","common","common_en","no","common_no","ReactDOM","StrictMode","I18nextProvider","i18n","getElementById"],"mappings":"2FACAA,EAAOC,QAAU,CAAC,QAAU,wB,oBCA5BD,EAAOC,QAAU,CAAC,QAAU,0B,oBCA5BD,EAAOC,QAAU,CAAC,QAAU,oC,oBCA5BD,EAAOC,QAAU,CAAC,KAAO,oBAAoB,OAAS,wB,oBCAtDD,EAAOC,QAAU,CAAC,QAAU,0B,oBCA5BD,EAAOC,QAAU,CAAC,QAAU,gC,oBCA5BD,EAAOC,QAAU,CAAC,QAAU,2BAA2B,KAAO,wBAAwB,SAAW,8B,oBCAjGD,EAAOC,QAAU,CAAC,QAAU,4B,oBCA5BD,EAAOC,QAAU,CAAC,QAAU,2BAA2B,OAAS,4B,oBCAhED,EAAOC,QAAU,CAAC,QAAU,+B,i0FCA5BD,EAAOC,QAAU,CAAC,QAAU,wBAAwB,WAAa,2BAA2B,OAAS,uBAAuB,GAAK,mBAAmB,QAAU,wBAAwB,MAAQ,sBAAsB,MAAQ,sBAAsB,KAAO,qBAAqB,QAAU,0B,+KCqG3QC,EAAb,WAKI,WAAYC,EAAkBC,GAA4E,yBAJlGA,UAIiG,OAHjGD,aAGiG,OAF/FE,sBAAmEC,EAGzEC,KAAKH,KAAOA,GAAmBI,OAC/BD,KAAKJ,aAAsBG,IAAZH,GAAqC,OAA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EAAOC,QAAU,CAAC,QAAU,8BAA8B,KAAO,2BAA2B,OAAS,6BAA6B,MAAQ,8B,mBCA1ID,EAAOC,QAAU,CAAC,QAAU,8BAA8B,QAAU,8BAA8B,QAAU,gC,mBCA5GD,EAAOC,QAAU,CAAC,QAAU,yBAAyB,KAAO,sBAAsB,KAAO,wB,mBCAzFD,EAAOC,QAAU,CAAC,QAAU,yBAAyB,QAAU,yBAAyB,WAAW,4B,mBCAnGD,EAAOC,QAAU,CAAC,QAAU,6BAA6B,OAAS,4BAA4B,MAAQ,2BAA2B,MAAQ,6B,mBCAzID,EAAOC,QAAU,CAAC,QAAU,yBAAyB,OAAS,2B","file":"static/js/main.18df0046.chunk.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"Logo_content__2ebnH\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"Avatar_content__-dzNZ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"SearchResultLink_content__258as\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"icon\":\"Icons_icon__2qXq2\",\"search\":\"Icons_search___Wk8M\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"Footer_content__1JbXM\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"HandbookPage_content__HYM_t\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"Accordion_content__CSVyd\",\"item\":\"Accordion_item__3K2CC\",\"expanded\":\"Accordion_expanded__1pYHp\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"SideMenu_content__2zyHu\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"BackToTop_content__2XamZ\",\"upDown\":\"BackToTop_upDown__3b88X\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"ChapterPage_content__MoFiq\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"Header_content__20cmf\",\"background\":\"Header_background__ze03d\",\"sticky\":\"Header_sticky__AA5sz\",\"up\":\"Header_up__26oU6\",\"wrapper\":\"Header_wrapper__1eEt_\",\"inner\":\"Header_inner__21GgJ\",\"items\":\"Header_items__2lM1h\",\"item\":\"Header_item__uy8lY\",\"chapter\":\"Header_chapter__3eN8g\"};","/* tslint:disable */\r\n/* eslint-disable */\r\n//----------------------\r\n// \r\n// Generated using the NSwag toolchain v13.11.3.0 (NJsonSchema v10.4.4.0 (Newtonsoft.Json v9.0.0.0)) (http://NSwag.org)\r\n// \r\n//----------------------\r\n// ReSharper disable InconsistentNaming\r\n\r\nexport class HandbookApiClient {\r\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\r\n private baseUrl: string;\r\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\r\n\r\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\r\n this.http = http ? http : window;\r\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"http://localhost:4824\";\r\n }\r\n\r\n get(url: string): Promise {\r\n let url_ = this.baseUrl + \"/api/handbooks/{url}\";\r\n if (url === undefined || url === null)\r\n throw new Error(\"The parameter 'url' must be defined.\");\r\n url_ = url_.replace(\"{url}\", encodeURIComponent(\"\" + url));\r\n url_ = url_.replace(/[?&]$/, \"\");\r\n\r\n let options_ = {\r\n method: \"GET\",\r\n headers: {\r\n \"Accept\": \"application/json\"\r\n }\r\n };\r\n\r\n return this.http.fetch(url_, options_).then((_response: Response) => {\r\n return this.processGet(_response);\r\n });\r\n }\r\n\r\n protected processGet(response: Response): Promise {\r\n const status = response.status;\r\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\r\n if (status === 200 || status === 206) {\r\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\r\n const fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\r\n const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\r\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\r\n } else if (status !== 200 && status !== 204) {\r\n return response.text().then((_responseText) => {\r\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\r\n });\r\n }\r\n return Promise.resolve(null);\r\n }\r\n}\r\n\r\nexport class PreviewClient {\r\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\r\n private baseUrl: string;\r\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\r\n\r\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\r\n this.http = http ? http : window;\r\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"http://localhost:4824\";\r\n }\r\n\r\n addToCache(handbook: HandbookViewModel | null | undefined): Promise {\r\n let url_ = this.baseUrl + \"/api/Preview\";\r\n url_ = url_.replace(/[?&]$/, \"\");\r\n\r\n const content_ = JSON.stringify(handbook);\r\n\r\n let options_ = {\r\n body: content_,\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n \"Accept\": \"application/json\"\r\n }\r\n };\r\n\r\n return this.http.fetch(url_, options_).then((_response: Response) => {\r\n return this.processAddToCache(_response);\r\n });\r\n }\r\n\r\n protected processAddToCache(response: Response): Promise {\r\n const status = response.status;\r\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\r\n if (status === 200 || status === 206) {\r\n const contentDisposition = response.headers ? response.headers.get(\"content-disposition\") : undefined;\r\n const fileNameMatch = contentDisposition ? /filename=\"?([^\"]*?)\"?(;|$)/g.exec(contentDisposition) : undefined;\r\n const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;\r\n return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });\r\n } else if (status !== 200 && status !== 204) {\r\n return response.text().then((_responseText) => {\r\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\r\n });\r\n }\r\n return Promise.resolve(null);\r\n }\r\n}\r\n\r\nexport class DigitalHandbookClient {\r\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\r\n private baseUrl: string;\r\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\r\n\r\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\r\n this.http = http ? http : window;\r\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"http://localhost:4824\";\r\n }\r\n\r\n get(handbookUrl: string | null): Promise {\r\n let url_ = this.baseUrl + \"/api/DigitalHandbook?\";\r\n if (handbookUrl === undefined)\r\n throw new Error(\"The parameter 'handbookUrl' must be defined.\");\r\n else if(handbookUrl !== null)\r\n url_ += \"handbookUrl=\" + encodeURIComponent(\"\" + handbookUrl) + \"&\";\r\n url_ = url_.replace(/[?&]$/, \"\");\r\n\r\n let options_ = {\r\n method: \"GET\",\r\n headers: {\r\n \"Accept\": \"application/json\"\r\n }\r\n };\r\n\r\n return this.http.fetch(url_, options_).then((_response: Response) => {\r\n return this.processGet(_response);\r\n });\r\n }\r\n\r\n protected processGet(response: Response): Promise {\r\n const status = response.status;\r\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\r\n if (status === 200) {\r\n return response.text().then((_responseText) => {\r\n let result200: any = null;\r\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver);\r\n return result200;\r\n });\r\n } else if (status !== 200 && status !== 204) {\r\n return response.text().then((_responseText) => {\r\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\r\n });\r\n }\r\n return Promise.resolve(null);\r\n }\r\n}\r\n\r\nexport class DownloadClient {\r\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\r\n private baseUrl: string;\r\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\r\n\r\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\r\n this.http = http ? http : window;\r\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"http://localhost:4824\";\r\n }\r\n\r\n get(handbookUrl: string | null, token: string | null): Promise {\r\n let url_ = this.baseUrl + \"/api/Download?\";\r\n if (handbookUrl === undefined)\r\n throw new Error(\"The parameter 'handbookUrl' must be defined.\");\r\n else if(handbookUrl !== null)\r\n url_ += \"handbookUrl=\" + encodeURIComponent(\"\" + handbookUrl) + \"&\";\r\n if (token === undefined)\r\n throw new Error(\"The parameter 'token' must be defined.\");\r\n else if(token !== null)\r\n url_ += \"token=\" + encodeURIComponent(\"\" + token) + \"&\";\r\n url_ = url_.replace(/[?&]$/, \"\");\r\n\r\n let options_ = {\r\n method: \"GET\",\r\n headers: {\r\n \"Accept\": \"application/json\"\r\n }\r\n };\r\n\r\n return this.http.fetch(url_, options_).then((_response: Response) => {\r\n return this.processGet(_response);\r\n });\r\n }\r\n\r\n protected processGet(response: Response): Promise {\r\n const status = response.status;\r\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\r\n if (status === 200) {\r\n return response.text().then((_responseText) => {\r\n let result200: any = null;\r\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver);\r\n return result200;\r\n });\r\n } else if (status !== 200 && status !== 204) {\r\n return response.text().then((_responseText) => {\r\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\r\n });\r\n }\r\n return Promise.resolve(null);\r\n }\r\n}\r\n\r\nexport class HandbookInfoClient {\r\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\r\n private baseUrl: string;\r\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\r\n\r\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\r\n this.http = http ? http : window;\r\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"http://localhost:4824\";\r\n }\r\n\r\n get(handbookUrl: string | null): Promise {\r\n let url_ = this.baseUrl + \"/api/HandbookInfo?\";\r\n if (handbookUrl === undefined)\r\n throw new Error(\"The parameter 'handbookUrl' must be defined.\");\r\n else if(handbookUrl !== null)\r\n url_ += \"handbookUrl=\" + encodeURIComponent(\"\" + handbookUrl) + \"&\";\r\n url_ = url_.replace(/[?&]$/, \"\");\r\n\r\n let options_ = {\r\n method: \"GET\",\r\n headers: {\r\n \"Accept\": \"application/json\"\r\n }\r\n };\r\n\r\n return this.http.fetch(url_, options_).then((_response: Response) => {\r\n return this.processGet(_response);\r\n });\r\n }\r\n\r\n protected processGet(response: Response): Promise {\r\n const status = response.status;\r\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\r\n if (status === 200) {\r\n return response.text().then((_responseText) => {\r\n let result200: any = null;\r\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver);\r\n return result200;\r\n });\r\n } else if (status !== 200 && status !== 204) {\r\n return response.text().then((_responseText) => {\r\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\r\n });\r\n }\r\n return Promise.resolve(null);\r\n }\r\n}\r\n\r\nexport class AuthenticateUserClient {\r\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\r\n private baseUrl: string;\r\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\r\n\r\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\r\n this.http = http ? http : window;\r\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"http://localhost:4824\";\r\n }\r\n\r\n post(loginDto: LoginDto | undefined): Promise {\r\n let url_ = this.baseUrl + \"/api/AuthenticateUser\";\r\n url_ = url_.replace(/[?&]$/, \"\");\r\n\r\n const content_ = JSON.stringify(loginDto);\r\n\r\n let options_ = {\r\n body: content_,\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n \"Accept\": \"application/json\"\r\n }\r\n };\r\n\r\n return this.http.fetch(url_, options_).then((_response: Response) => {\r\n return this.processPost(_response);\r\n });\r\n }\r\n\r\n protected processPost(response: Response): Promise {\r\n const status = response.status;\r\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\r\n if (status === 200) {\r\n return response.text().then((_responseText) => {\r\n let result200: any = null;\r\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver);\r\n return result200;\r\n });\r\n } else if (status !== 200 && status !== 204) {\r\n return response.text().then((_responseText) => {\r\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\r\n });\r\n }\r\n return Promise.resolve(null);\r\n }\r\n}\r\n\r\nexport class RefreshUserTokenClient {\r\n private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };\r\n private baseUrl: string;\r\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\r\n\r\n constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {\r\n this.http = http ? http : window;\r\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"http://localhost:4824\";\r\n }\r\n\r\n post(refreshTokenDto: RefreshTokenDto | undefined): Promise {\r\n let url_ = this.baseUrl + \"/api/RefreshUserToken\";\r\n url_ = url_.replace(/[?&]$/, \"\");\r\n\r\n const content_ = JSON.stringify(refreshTokenDto);\r\n\r\n let options_ = {\r\n body: content_,\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n \"Accept\": \"application/json\"\r\n }\r\n };\r\n\r\n return this.http.fetch(url_, options_).then((_response: Response) => {\r\n return this.processPost(_response);\r\n });\r\n }\r\n\r\n protected processPost(response: Response): Promise {\r\n const status = response.status;\r\n let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };\r\n if (status === 200) {\r\n return response.text().then((_responseText) => {\r\n let result200: any = null;\r\n result200 = _responseText === \"\" ? null : JSON.parse(_responseText, this.jsonParseReviver);\r\n return result200;\r\n });\r\n } else if (status !== 200 && status !== 204) {\r\n return response.text().then((_responseText) => {\r\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\r\n });\r\n }\r\n return Promise.resolve(null);\r\n }\r\n}\r\n\r\nexport interface HandbookViewModel {\r\n title?: string | undefined;\r\n logo?: string | undefined;\r\n companies?: CompanyViewModel[] | undefined;\r\n themeColor?: string | undefined;\r\n themeSize?: string | undefined;\r\n chapters?: ChapterViewModel[] | undefined;\r\n coverImageAzurePath?: string | undefined;\r\n coverImageAzureAlt?: string | undefined;\r\n chapterSize: number;\r\n url?: string | undefined;\r\n userName?: string | undefined;\r\n password?: string | undefined;\r\n updates?: UpdateItemViewModel[] | undefined;\r\n pdfDisclaimer?: string | undefined;\r\n publishedDate?: string | undefined;\r\n demoStarted?: string | undefined;\r\n demoEnd?: string | undefined;\r\n isDemo: boolean;\r\n hideSecondaryName: boolean;\r\n hideCompanyName: boolean;\r\n language?: string | undefined;\r\n}\r\n\r\nexport interface CompanyViewModel {\r\n id?: string | undefined;\r\n name?: string | undefined;\r\n name1?: string | undefined;\r\n name2?: string | undefined;\r\n orgNr?: string | undefined;\r\n companies?: CompanyViewModel[] | undefined;\r\n agreements?: CollectiveAgreementsViewModel[] | undefined;\r\n}\r\n\r\nexport interface CollectiveAgreementsViewModel {\r\n title?: string | undefined;\r\n description?: string | undefined;\r\n url?: string | undefined;\r\n nr?: string | undefined;\r\n}\r\n\r\nexport interface ChapterViewModel {\r\n id?: string | undefined;\r\n versionIndependentId?: string | undefined;\r\n sortIndex: number;\r\n sections?: SectionViewModel[] | undefined;\r\n heading?: string | undefined;\r\n coverImageAzurePath?: string | undefined;\r\n coverImageAzureAlt?: string | undefined;\r\n themeColor?: string | undefined;\r\n softLink?: string | undefined;\r\n}\r\n\r\nexport interface SectionViewModel {\r\n id?: string | undefined;\r\n versionIndependentId?: string | undefined;\r\n heading?: string | undefined;\r\n content?: string | undefined;\r\n customContent?: string | undefined;\r\n showCollectiveAgreements: boolean;\r\n linkLists?: LinkListViewModel[] | undefined;\r\n azureFilesList?: AzureFileItem[] | undefined;\r\n sections?: SectionViewModel[] | undefined;\r\n sortIndex: number;\r\n softLink?: string | undefined;\r\n}\r\n\r\nexport interface LinkListViewModel {\r\n id?: string | undefined;\r\n versionIndependentId?: string | undefined;\r\n heading?: string | undefined;\r\n links?: LinkItemViewModel[] | undefined;\r\n}\r\n\r\nexport interface LinkItemViewModel {\r\n title?: string | undefined;\r\n url?: string | undefined;\r\n}\r\n\r\nexport interface AzureFileItem {\r\n blobId?: string | undefined;\r\n title?: string | undefined;\r\n url?: string | undefined;\r\n versionIndependentHandbookId?: string | undefined;\r\n versionIndependentSectionId?: string | undefined;\r\n}\r\n\r\nexport interface UpdateItemViewModel {\r\n date: string;\r\n title?: string | undefined;\r\n id?: string | undefined;\r\n}\r\n\r\nexport interface HandbookInfoViewModel {\r\n logo?: string | undefined;\r\n coverImageAzurePath?: string | undefined;\r\n coverImageAzureAlt?: string | undefined;\r\n title?: string | undefined;\r\n companies?: CompanyViewModel[] | undefined;\r\n themeColor?: string | undefined;\r\n language?: string | undefined;\r\n}\r\n\r\nexport interface TokenResult {\r\n accessToken: TokenInfo;\r\n refreshToken: TokenInfo;\r\n}\r\n\r\nexport interface TokenInfo {\r\n token: string;\r\n expiresIn: number;\r\n}\r\n\r\nexport interface LoginDto {\r\n userName: string;\r\n password: string;\r\n handbookUrl: string;\r\n requestedUrl: string;\r\n}\r\n\r\nexport interface RefreshTokenDto {\r\n accessToken: string;\r\n refreshToken: string;\r\n}\r\n\r\nexport interface FileResponse {\r\n data: Blob;\r\n status: number;\r\n fileName?: string;\r\n headers?: { [name: string]: any };\r\n}\r\n\r\nexport class ApiException extends Error {\r\n message: string;\r\n status: number;\r\n response: string;\r\n headers: { [key: string]: any; };\r\n result: any;\r\n\r\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\r\n super();\r\n\r\n this.message = message;\r\n this.status = status;\r\n this.response = response;\r\n this.headers = headers;\r\n this.result = result;\r\n }\r\n\r\n protected isApiException = true;\r\n\r\n static isApiException(obj: any): obj is ApiException {\r\n return obj.isApiException === true;\r\n }\r\n}\r\n\r\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\r\n if (result !== null && result !== undefined)\r\n throw result;\r\n else\r\n throw new ApiException(message, status, response, headers, null);\r\n}","import {AuthenticateUserClient, RefreshUserTokenClient} from \"../api/api\";\r\n\r\nconst authClient = new AuthenticateUserClient(window.location.origin);\r\nconst refreshClient = new RefreshUserTokenClient(window.location.origin);\r\n\r\nconst ACCESS_TOKEN = 'access_token';\r\nconst USERNAME = 'username';\r\nconst REFRESH_TOKEN = 'refresh_token';\r\n\r\nexport const retrieveToken = (type: string = ACCESS_TOKEN) => localStorage.getItem(type);\r\nexport const saveToken = (token: string, type: string = ACCESS_TOKEN) => localStorage.setItem(type, token)\r\nexport const clearToken = (type: string = ACCESS_TOKEN) => localStorage.removeItem(type);\r\n\r\nexport const retrieveUserName = (type: string = USERNAME) => localStorage.getItem(type);\r\nexport const saveUserName = (username: string, type: string = USERNAME) => localStorage.setItem(type, username)\r\nexport const clearUserName = (type: string = USERNAME) => localStorage.removeItem(type);\r\n\r\nexport const shouldRefreshToken = (error: any) =>\r\n error.response.status === 401 &&\r\n error.body.message === 'Authorization has been denied for this request.';\r\n\r\nexport const refreshToken = async () => {\r\n try {\r\n\r\n const refreshToken = retrieveToken(REFRESH_TOKEN);\r\n const accessToken = retrieveToken();\r\n\r\n if (refreshToken && accessToken) {\r\n const result = await refreshClient.post({\r\n accessToken,\r\n refreshToken\r\n });\r\n\r\n saveToken(result.accessToken.token, ACCESS_TOKEN);\r\n saveToken(result.refreshToken.token, REFRESH_TOKEN);\r\n }\r\n } catch (e) {\r\n\r\n clearToken(ACCESS_TOKEN);\r\n clearToken(REFRESH_TOKEN);\r\n \r\n const loc = window.location;\r\n window.location.href = `${loc.origin}${loc.pathname}${loc.pathname.endsWith('/login') ? '' : '/login'}${loc.search}`;\r\n }\r\n}\r\n\r\nexport const jwtAuth = {\r\n async signin(userName: string, password: string, handbookUrl: string, requestedUrl: string) {\r\n const result = await authClient.post({\r\n password,\r\n userName,\r\n handbookUrl,\r\n requestedUrl\r\n });\r\n\r\n saveToken(result.accessToken.token, ACCESS_TOKEN);\r\n saveToken(result.refreshToken.token, REFRESH_TOKEN);\r\n saveUserName(userName, USERNAME);\r\n },\r\n async signout() {\r\n clearToken(ACCESS_TOKEN);\r\n clearToken(REFRESH_TOKEN);\r\n clearUserName(USERNAME);\r\n }\r\n};","import {useContext, useState} from \"react\";\r\nimport {authContext} from \"./ProvideAuth\";\r\nimport {jwtAuth} from \"./jwtAuth\";\r\n\r\ntype UseProvideAuth = {\r\n user: string | null;\r\n isAuthenticated: boolean;\r\n signin: any;\r\n signout: any;\r\n}\r\n\r\nexport function useProvideAuth(): UseProvideAuth {\r\n const initUser = useContext(authContext)?.user;\r\n const [user, setUser] = useState(initUser);\r\n const [isAuthenticated, setIsAuthenticated] = useState(false);\r\n\r\n const signin = async (userName: string, password: string, handbookUrl: string, requestedUrl: string) => {\r\n await jwtAuth.signin(userName, password, handbookUrl, requestedUrl);\r\n setUser(userName);\r\n setIsAuthenticated(true);\r\n };\r\n\r\n const signout = async () => {\r\n jwtAuth.signout();\r\n setUser(null);\r\n setIsAuthenticated(false);\r\n };\r\n\r\n return {\r\n isAuthenticated,\r\n user,\r\n signin,\r\n signout\r\n };\r\n}\r\n\r\nexport function useAuth(): UseProvideAuth {\r\n return useContext(authContext);\r\n}","import React, {createContext} from \"react\";\r\nimport { retrieveToken, retrieveUserName } from \"./jwtAuth\";\r\nimport { useProvideAuth } from \"./useAuth\";\r\n\r\nexport const authContext = createContext(null as any);\r\n\r\nexport function ProvideAuth({children}: { children: JSX.Element }) {\r\n const auth = useProvideAuth();\r\n const token = retrieveToken();\r\n const username = retrieveUserName();\r\n auth.isAuthenticated = token != null;\r\n auth.user = username;\r\n \r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\n","import {configureRefreshFetch, fetchJSON} from \"refresh-fetch\";\r\nimport {retrieveToken, shouldRefreshToken, refreshToken} from \"../auth/jwtAuth\";\r\n\r\nconst fetchJsonWithToken = async (url: RequestInfo, init?: RequestInit) : Promise => {\r\n\r\n const token = retrieveToken();\r\n\r\n let optionsWithToken = {};\r\n if(token) {\r\n optionsWithToken = {\r\n headers: {\r\n Authorization : `Bearer ${token}`\r\n }\r\n }\r\n }\r\n\r\n return Promise.resolve((await fetchJSON(url, optionsWithToken)).response);\r\n};\r\n\r\nexport default configureRefreshFetch({\r\n fetch: fetchJsonWithToken,\r\n shouldRefreshToken: shouldRefreshToken,\r\n refreshToken: refreshToken\r\n})","import jwtFetch from './JwtFetch';\r\n\r\nclass ApiFactory {\r\n create(type: {new(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) : T} ) {\r\n return new type(window.location.origin, {fetch:jwtFetch});\r\n }\r\n}\r\n\r\nexport default new ApiFactory();","import {useTranslation} from \"react-i18next\";\r\nimport styles from './Spinner.module.css';\r\n\r\nfunction Spinner() {\r\n const {t} = useTranslation('common');\r\n return (\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n}\r\n\r\nexport default Spinner;","import React, {createContext, useEffect, useState} from \"react\";\r\nimport {useParams} from \"react-router\";\r\nimport {useAuth} from \"../auth/useAuth\";\r\nimport {DigitalHandbookClient, HandbookViewModel} from \"./api\";\r\nimport ApiFactory from \"./ApiFactory\";\r\nimport Spinner from \"../components/Spinner/Spinner\";\r\n\r\nexport const dataContext = createContext(undefined as any);\r\n\r\nexport function ProvideData({children}: { children: JSX.Element }) {\r\n const [handbook, setHandbook] = useState(undefined);\r\n const {isAuthenticated, signout} = useAuth();\r\n const {handbookId} = useParams<{ handbookId: string }>();\r\n\r\n useEffect(() => {\r\n const fetchHandbook = async () => {\r\n try {\r\n const handbook = await ApiFactory.create(DigitalHandbookClient).get(handbookId);\r\n setHandbook(handbook);\r\n } catch (e) {\r\n signout();\r\n }\r\n }\r\n if (isAuthenticated) {\r\n fetchHandbook();\r\n }\r\n }, [isAuthenticated, handbookId]);\r\n\r\n return (\r\n \r\n {\r\n handbook\r\n ? children\r\n : \r\n }\r\n \r\n );\r\n}","export type ThemeName =\r\n | \"orange\"\r\n | \"atlantis\"\r\n | \"bluelight\"\r\n | \"roseblad\"\r\n | \"roseleaf\"\r\n | \"gray\"\r\n | \"default\";\r\n\r\nexport type ThemeProps = {\r\n dark: string,\r\n light: string,\r\n button?: string,\r\n buttonText?: string\r\n}\r\n\r\nexport const themeNames: Record = {\r\n orange: {\r\n dark: \"#E6A65D\",\r\n light: \"#EDC18E\",\r\n button: \"#222222\",\r\n buttonText: \"#ffffff\"\r\n },\r\n roseblad: {\r\n dark: \"#E6A65D\",\r\n light: \"#EDC18E\",\r\n button: \"#222222\",\r\n buttonText: \"#ffffff\"\r\n },\r\n roseleaf: {\r\n dark: \"#E6A65D\",\r\n light: \"#EDC18E\",\r\n button: \"#222222\",\r\n buttonText: \"#ffffff\"\r\n },\r\n atlantis: {\r\n dark: \"#9CDBD9\",\r\n light: \"#BAE6E4\",\r\n },\r\n bluelight: {\r\n dark: \"#5BC2E7\",\r\n light: \"#8CD4EE\",\r\n },\r\n gray: {\r\n dark: \"#b5b5b5\",\r\n light: \"#D5D3D3\",\r\n },\r\n default: {\r\n dark: \"#b5b5b5\",\r\n light: \"#D5D3D3\",\r\n },\r\n};","export const languages = {\r\n no: \"no\",\r\n en: \"en\",\r\n default: \"no\",\r\n};","import {useContext} from \"react\";\r\nimport {ThemeName, themeNames} from \"./themeNames\";\r\nimport {HandbookIdContext, handbookIdContext} from \"../api/ProvideHandbookInfo\";\r\n\r\nexport function getColors(color: ThemeName) {\r\n return themeNames[color] ?? themeNames.default\r\n}\r\n\r\nexport type ThemeColors = { dark: string, light: string };\r\n\r\ntype UseTheme = {\r\n themeName: string;\r\n themeColors: ThemeColors;\r\n}\r\n\r\nexport function useTheme(): UseTheme {\r\n const infoContext = useContext(handbookIdContext) ?? {};\r\n\r\n function getThemeName(): ThemeName {\r\n const themeColor = (infoContext.handbookInfo?.themeColor as ThemeName)\r\n return themeColor ?? \"default\";\r\n }\r\n\r\n function getThemeColors(): { dark: string, light: string } {\r\n const themeName = getThemeName();\r\n const themeColors = getColors(themeName);\r\n document.documentElement.style.setProperty('--theme-color-dark', themeColors.dark);\r\n document.documentElement.style.setProperty('--theme-color-light', themeColors.light);\r\n document.documentElement.style.setProperty('--theme-color-button', themeColors.button ?? \"#FCE385\");\r\n document.documentElement.style.setProperty('--theme-color-button-text', themeColors.buttonText ?? \"#222222\");\r\n return themeColors;\r\n }\r\n\r\n return {\r\n themeName: getThemeName(),\r\n themeColors: getThemeColors()\r\n }\r\n}\r\n\r\n","import React from \"react\";\r\nimport {Helmet} from \"react-helmet\";\r\nimport {HandbookInfoViewModel} from \"../../api/api\";\r\n\r\nfunction Head({handbookInfo}: { handbookInfo?: HandbookInfoViewModel }) {\r\n return (\r\n \r\n {handbookInfo?.title}\r\n \r\n );\r\n}\r\n\r\nexport default Head;","import React, {createContext, useEffect, useState} from \"react\";\r\nimport {useParams} from \"react-router\";\r\nimport {useHistory} from \"react-router-dom\";\r\nimport {ThemeName, themeNames, ThemeProps} from \"../theme/themeNames\";\r\nimport i18next from \"i18next\";\r\nimport {languages} from \"../translations/languages\";\r\nimport {getColors} from \"../theme/useTheme\";\r\nimport ApiFactory from \"./ApiFactory\";\r\nimport {HandbookInfoClient, HandbookInfoViewModel} from \"./api\";\r\nimport Spinner from \"../components/Spinner/Spinner\";\r\nimport Head from \"../components/Head/Head\";\r\n\r\nexport type HandbookIdContext = {\r\n theme: ThemeProps | undefined;\r\n handbookInfo: HandbookInfoViewModel | undefined;\r\n loadingHandbookInfo: boolean;\r\n}\r\n\r\nexport const handbookIdContext = createContext({} as HandbookIdContext);\r\n\r\nexport function ProvideHandbookInfo({children}: { children: JSX.Element }) {\r\n const [theme, setTheme] = useState(undefined);\r\n const [loadingHandbookInfo, setLoadingHandbookInfo] = useState(true);\r\n const [handbookInfo, setHandbookInfo] = useState(undefined);\r\n const history = useHistory();\r\n const {handbookId} = useParams<{ handbookId: string }>();\r\n\r\n function updateTheme(themeName: string) {\r\n const themeColors = getColors(themeName as ThemeName);\r\n setTheme(themeColors);\r\n }\r\n\r\n function updateLanguage(lang: string) {\r\n i18next.changeLanguage(lang.toLocaleLowerCase());\r\n }\r\n\r\n function updateHandbookInfo(handbookInfo: HandbookInfoViewModel) {\r\n setHandbookInfo(handbookInfo);\r\n updateLanguage(handbookInfo?.language ?? languages.default);\r\n updateTheme(handbookInfo?.themeColor ?? 'default')\r\n }\r\n\r\n function setFallbackHandbookInfo() {\r\n setTheme(themeNames.default);\r\n setLoadingHandbookInfo(false);\r\n }\r\n\r\n useEffect(() => {\r\n const fetchHandbookInfo = async () => {\r\n try {\r\n let info = await ApiFactory.create(HandbookInfoClient).get(handbookId);\r\n updateHandbookInfo(info);\r\n } catch (e) {\r\n history.replace({pathname: \"/404\", search: \"\", hash: \"\", state: undefined});\r\n }\r\n };\r\n\r\n if (handbookId) {\r\n setLoadingHandbookInfo(true);\r\n fetchHandbookInfo().then(() => setLoadingHandbookInfo(false));\r\n } else {\r\n setFallbackHandbookInfo();\r\n history.replace({pathname: \"/404\", search: \"\", hash: \"\", state: undefined});\r\n }\r\n }, [handbookId]);\r\n\r\n return (\r\n \r\n \r\n {\r\n loadingHandbookInfo\r\n ? \r\n : children\r\n }\r\n \r\n );\r\n}","import {Redirect, Route} from \"react-router-dom\";\r\nimport React from \"react\";\r\nimport {useAuth} from \"./useAuth\";\r\nimport {ProvideData} from \"../api/ProvideData\";\r\nimport {ProvideHandbookInfo} from \"../api/ProvideHandbookInfo\";\r\n\r\nfunction PrivateRoute({children, ...rest}: { children: JSX.Element, path: string }) {\r\n let auth = useAuth();\r\n return (\r\n {\r\n return auth.isAuthenticated ? (\r\n \r\n \r\n {children}\r\n \r\n \r\n ) : (\r\n \r\n )\r\n }}/>\r\n );\r\n}\r\n\r\nexport default PrivateRoute;","import React, {useEffect, useRef, useState} from \"react\";\r\nimport {useHistory, useLocation} from \"react-router-dom\";\r\nimport {useParams} from \"react-router\";\r\nimport {useAuth} from \"../../auth/useAuth\";\r\nimport {useTranslation} from \"react-i18next\";\r\nimport {LocationState} from \"../../pages/Login/LoginPage\";\r\nimport styles from \"./LoginForm.module.css\"\r\nimport queryString from 'query-string';\r\n\r\nfunction LoginForm() {\r\n let history = useHistory();\r\n let location = useLocation();\r\n let auth = useAuth();\r\n const {handbookId} = useParams<{ handbookId: string }>();\r\n const {t} = useTranslation('common');\r\n const [status, setStatus] = useState('');\r\n let {from} = location.state || {from: {pathname: `/handbok/${handbookId}`}};\r\n const [username, setUserName] = useState('');\r\n const [password, setPassword] = useState('');\r\n const triedLoggingIn = useRef(false);\r\n const parsedSearch = queryString.parse(location.search);\r\n\r\n useEffect(() => {\r\n if (parsedSearch && parsedSearch.id && parsedSearch.pw) {\r\n setUserName(parsedSearch.id as string);\r\n setPassword(parsedSearch.pw as string);\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if ((username && password) && !triedLoggingIn.current && (parsedSearch.id && parsedSearch.pw)) {\r\n triedLoggingIn.current = true;\r\n login();\r\n }\r\n }, [username, password]);\r\n\r\n let login = async (e?: any) => {\r\n e?.preventDefault();\r\n if (!(username && password)) return;\r\n if (handbookId) {\r\n const requestedUrl = `/handbok/${handbookId}`;\r\n try {\r\n await auth.signin(username, password, handbookId, requestedUrl);\r\n history.replace(from);\r\n } catch (e:any) {\r\n setStatus(t('login.error'));\r\n if (e.status === 400) {\r\n setStatus(t('login.error'));\r\n } else {\r\n history.replace({pathname: \"/404\", search: \"\", hash: \"\", state: undefined});\r\n }\r\n }\r\n } else {\r\n history.replace({pathname: \"/404\", search: \"\", hash: \"\", state: undefined});\r\n }\r\n };\r\n\r\n return
\r\n

{t('login.submit')}

\r\n
    \r\n
  • \r\n \r\n setUserName(e.target.value)}\r\n />\r\n
  • \r\n
  • \r\n \r\n setPassword(e.target.value)}\r\n />\r\n
  • \r\n
\r\n\r\n \r\n {t('login.submit')}\r\n \r\n\r\n {status &&

\r\n {status}\r\n

}\r\n \r\n}\r\n\r\nexport default LoginForm;","import {useContext} from \"react\";\r\nimport {ChapterViewModel, HandbookViewModel} from \"./api\";\r\nimport {dataContext} from \"./ProvideData\";\r\n\r\ntype UseHandbookData = {\r\n handbook: HandbookViewModel;\r\n chapters: ChapterViewModel[];\r\n companyName: string;\r\n branchName: string;\r\n}\r\n\r\nexport function useHandbookData(): UseHandbookData {\r\n const handbook = useContext(dataContext) ?? {};\r\n\r\n function getHandbook(): HandbookViewModel {\r\n return handbook || {};\r\n }\r\n\r\n function getChapters(): ChapterViewModel[] {\r\n const chapters = handbook.chapters;\r\n return chapters ?? [];\r\n }\r\n\r\n function getCompanyName(): string {\r\n const companyName = handbook.companies && !handbook.hideCompanyName ? (handbook.companies[0]?.name2 ? handbook.companies[0]?.name1 : handbook.companies[0]?.name) : \"\";\r\n return companyName ?? '';\r\n }\r\n\r\n function getBranchName() : string {\r\n return handbook.companies && !handbook.hideSecondaryName ? handbook.companies[0]?.name2 ?? '' : '';\r\n }\r\n\r\n return {\r\n handbook: getHandbook(),\r\n chapters: getChapters(),\r\n companyName: getCompanyName(),\r\n branchName: getBranchName()\r\n }\r\n}","import React from 'react';\r\nimport {Link} from 'react-router-dom';\r\nimport {useParams} from \"react-router\";\r\nimport {useTranslation} from \"react-i18next\";\r\nimport {useHandbookData} from \"../../../../api/useHandbookData\";\r\nimport {ParamTypes} from '../../../../pages/Handbook/HandbookPage';\r\nimport styles from './Logo.module.css';\r\n\r\ntype LogoProps = {\r\n logoBase64: string\r\n}\r\n\r\nfunction Logo({logoBase64}: LogoProps) {\r\n const {t} = useTranslation('common');\r\n const {handbookId} = useParams();\r\n const logo = logoBase64.slice(1, -1); /* removes unnecessary quotes */\r\n const {companyName} = useHandbookData();\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default Logo;\r\n","import React, {useContext} from \"react\";\r\nimport LoginForm from \"../../components/LoginForm/LoginForm\";\r\nimport classNames from \"classnames\";\r\nimport {handbookIdContext} from \"../../api/ProvideHandbookInfo\";\r\nimport styles from \"./LoginPage.module.css\";\r\nimport {useTheme} from \"../../theme/useTheme\";\r\nimport Logo from \"../../components/Layout/Header/Logo/Logo\";\r\n\r\nexport interface LocationState {\r\n from: {\r\n pathname: string;\r\n };\r\n}\r\n\r\nfunction LoginPage() {\r\n const {handbookInfo} = useContext(handbookIdContext);\r\n const {themeColors} = useTheme();\r\n\r\n return (
\r\n
\r\n
\r\n
\r\n
\r\n {handbookInfo?.coverImageAzurePath &&\r\n {handbookInfo?.coverImageAzureAlt}/}\r\n
\r\n
\r\n
\r\n
\r\n {handbookInfo?.logo && }\r\n {handbookInfo?.companies &&

{handbookInfo?.companies ? handbookInfo.companies[0].name : \"\"}

}\r\n

{handbookInfo?.title}

\r\n \r\n
\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default LoginPage;","import {useEffect, useState} from \"react\";\r\nimport {debounce} from \"../../../helpers/debounce\";\r\n\r\nfunction useSticky() {\r\n const [isSticky, setSticky] = useState(false);\r\n const [isUp, setIsUp] = useState(false);\r\n \r\n useEffect(() => {\r\n let lastScrollTop = window.pageYOffset || document.documentElement.scrollTop;\r\n\r\n const handleScroll = () => {\r\n const scrollPosition = window.pageYOffset || document.documentElement.scrollTop;\r\n const scrollDown = scrollPosition > lastScrollTop && scrollPosition > 45;\r\n\r\n if (window.scrollY > 45 && scrollDown) setSticky(true);\r\n if (window.scrollY < 90 && !scrollDown) setSticky(false);\r\n\r\n if (scrollDown) {\r\n setIsUp(true);\r\n } else {\r\n setIsUp(false);\r\n }\r\n lastScrollTop = scrollPosition <= 0 ? 0 : scrollPosition;\r\n }\r\n const debounced = debounce(handleScroll);\r\n window.addEventListener(\"scroll\", debounced);\r\n \r\n return () => {\r\n window.removeEventListener(\"scroll\", debounced);\r\n }\r\n }, [])\r\n\r\n return {isSticky, isUp}\r\n}\r\n\r\nexport default useSticky;","export function debounce(func: F, wait: number = 0): F {\r\n let timeoutID: number;\r\n\r\n if (!Number.isInteger(wait)) {\r\n wait = 300;\r\n }\r\n\r\n return function (this: any, ...args: any[]) {\r\n clearTimeout(timeoutID);\r\n const context = this;\r\n\r\n timeoutID = window.setTimeout(function () {\r\n func.apply(context, args);\r\n }, wait);\r\n } as any;\r\n};","import React from \"react\";\r\n\r\nexport default function useIsMobile() {\r\n const [isMobile, setMobile] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n function handleResize() {\r\n const mediaQuery = window.matchMedia('(max-width: 767px)');\r\n setMobile(mediaQuery.matches);\r\n }\r\n handleResize();\r\n window.addEventListener(\"resize\", handleResize);\r\n return () => {\r\n window.removeEventListener(\"resize\", handleResize);\r\n }\r\n }, []);\r\n\r\n return {isMobile};\r\n}","import classnames from 'classnames';\r\nimport {useTranslation} from \"react-i18next\";\r\nimport {useState} from 'react';\r\nimport styles from './Hamburger.module.css';\r\n\r\ntype HamburgerProps = {\r\n isOpen: boolean\r\n onClick: () => void\r\n}\r\n\r\nfunction Hamburger({isOpen, onClick}: HamburgerProps) {\r\n const [animated, setAnimated] = useState(false);\r\n const {t} = useTranslation('common');\r\n\r\n const onToggle = () => {\r\n setAnimated(true)\r\n onClick()\r\n }\r\n\r\n return (\r\n \r\n \r\n {t('menu.info')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default Hamburger;\r\n","import React from 'react';\r\nimport classnames from \"classnames\";\r\nimport {useAuth} from \"../../../../auth/useAuth\";\r\nimport {useTranslation} from \"react-i18next\";\r\nimport styles from './Settings.module.css';\r\n\r\ntype SettingsProps = {\r\n isOpen: boolean;\r\n onLogoutClick: () => void;\r\n}\r\n\r\nfunction Settings({isOpen, onLogoutClick}: SettingsProps) {\r\n let auth = useAuth();\r\n const {t} = useTranslation('common');\r\n\r\n const onClick = () => {\r\n auth.signout();\r\n onLogoutClick();\r\n }\r\n\r\n return (\r\n \r\n \r\n {t('settings.logout')}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default React.memo(Settings);","import React from 'react';\r\nimport styles from './Avatar.module.css';\r\n\r\n\r\nfunction getInitials(name: string): string {\r\n const [firstName, lastName] = name.split(' ');\r\n\r\n if (firstName && lastName) {\r\n return `${firstName.charAt(0)}${lastName.charAt(0)}`.toUpperCase();\r\n }\r\n\r\n return firstName.charAt(0).toUpperCase();\r\n}\r\n\r\ntype AvatarProps = {\r\n name: string;\r\n}\r\n\r\nconst Avatar = ({name}: AvatarProps) => {\r\n \r\n return (\r\n
\r\n {getInitials(name)}\r\n
\r\n );\r\n};\r\n\r\nexport default React.memo(Avatar);","import React from 'react';\r\nimport {useParams} from \"react-router\";\r\nimport {Link} from \"react-router-dom\";\r\nimport classnames from 'classnames';\r\nimport {useTranslation} from \"react-i18next\";\r\nimport useIsMobile from \"../../../../helpers/useIsMobile\";\r\nimport {HandbookViewModel} from \"../../../../api/api\";\r\nimport styles from './Nav.module.css';\r\nimport Settings from \"../Account/Settings\";\r\nimport Avatar from \"../Account/Avatar\";\r\n\r\n\r\ntype NavProps = {\r\n handbook: HandbookViewModel\r\n isOpen: boolean;\r\n onMenuClose: () => void;\r\n}\r\n\r\nfunction Nav({handbook, isOpen, onMenuClose}: NavProps) {\r\n const {t} = useTranslation('common');\r\n const chapters = handbook.chapters ?? [];\r\n const {handbookId} = useParams<{ handbookId: string }>();\r\n const {isMobile} = useIsMobile();\r\n\r\n const onBlur = (event: any, index: number) => {\r\n if (index + 1 === chapters.length && event.keyCode === 9) {\r\n onMenuClose();\r\n }\r\n }\r\n\r\n return (\r\n \r\n {isOpen && }\r\n \r\n );\r\n}\r\n\r\nexport default Nav;\r\n","import classnames from 'classnames';\r\nimport styles from './Button.module.css';\r\n\r\ntype ButtonProps = {\r\n color: string;\r\n text: string;\r\n cssClass?: string;\r\n onClick: () => void;\r\n}\r\n\r\nexport default function Button({color, text, cssClass, onClick}: ButtonProps) {\r\n return (\r\n \r\n {text}\r\n \r\n );\r\n}","import React, {useContext} from \"react\";\r\nimport {useHistory} from \"react-router-dom\";\r\nimport {useParams} from \"react-router\";\r\nimport {searchContext} from \"../../Layout/Header/Header\";\r\nimport styles from './SearchResultLink.module.css';\r\n\r\ntype SearchResultLinkProps = {\r\n section: any;\r\n}\r\n\r\nfunction SearchResultLink({section}: SearchResultLinkProps) {\r\n const history = useHistory();\r\n const {handbookId} = useParams<{ handbookId: string }>();\r\n const {onSearchClose} = useContext(searchContext);\r\n\r\n const onClick = (e: any) => {\r\n e.preventDefault();\r\n onSearchClose();\r\n history.push(`/handbok/${handbookId}/chapters/${section.parent}#${section.softLink}`);\r\n }\r\n\r\n return (\r\n

\r\n \r\n {`/handbok/${handbookId}/chapters/${section.parent}#${section.softLink}`}\r\n \r\n

\r\n );\r\n}\r\n\r\nexport default SearchResultLink;","import React, {useContext, useEffect} from 'react';\r\nimport Highlighter from \"react-highlight-words\";\r\nimport striptags from \"striptags\";\r\nimport {useTranslation} from \"react-i18next\";\r\nimport {SectionViewModel} from \"../../../api/api\";\r\nimport SearchResultLink from \"./SearchResultLink\";\r\nimport {searchContext} from \"../../Layout/Header/Header\";\r\nimport styles from './SearchResults.module.css';\r\n\r\ntype SearchResultsProps = {\r\n searchHits: SectionViewModel[];\r\n searchTerm: string;\r\n isOpen: boolean;\r\n}\r\n\r\nfunction SearchResults({searchHits, searchTerm}: SearchResultsProps) {\r\n const {isSearchOpen} = useContext(searchContext);\r\n const {t} = useTranslation('common');\r\n\r\n useEffect(() => {\r\n if (isSearchOpen) {\r\n document.body.style.position = 'fixed';\r\n document.body.style.overflowY = 'scroll';\r\n } else {\r\n document.body.style.position = 'static';\r\n document.body.style.overflowY = 'auto';\r\n }\r\n }, [isSearchOpen])\r\n\r\n return (\r\n
\r\n {\r\n searchTerm.length > 1 && searchHits.length > 0 && \r\n {t('search.result')} ({searchHits.length})\r\n \r\n }\r\n {searchHits.length > 0\r\n ?
    \r\n {\r\n searchHits?.map((section: any) => {\r\n const text = striptags(`${section.content || ''}\\n${section.customContent || ''}`);\r\n \r\n const e = document.createElement('textarea');\r\n e.innerHTML = text;\r\n \r\n return
  • \r\n

    {section.heading}

    \r\n {

    \r\n \r\n

    }\r\n \r\n
  • \r\n })\r\n }\r\n
\r\n : searchTerm.length > 2\r\n ?

\r\n {t('search.noResult')}: {searchTerm}\r\n

\r\n : null\r\n\r\n }\r\n
\r\n );\r\n}\r\n\r\nexport default SearchResults;\r\n","export default __webpack_public_path__ + \"static/media/magnifier.a15d0618.svg\";","import React, {useContext, useEffect, useState} from 'react';\r\nimport {useTranslation} from \"react-i18next\";\r\nimport {searchContext} from \"../../Layout/Header/Header\";\r\nimport MagnifierGlass from \"../../../static/images/icons/magnifier.svg\";\r\nimport icons from \"../../Hero/Icons.module.css\";\r\nimport styles from './SearchInput.module.css';\r\n\r\ntype SearchInputProps = {\r\n onSearch: (searchTerm: string) => void;\r\n}\r\n\r\nfunction SearchInput({onSearch}: SearchInputProps) {\r\n const {t} = useTranslation('common');\r\n const {isSearchOpen} = useContext(searchContext);\r\n const [inputValue, setInputValue] = useState('');\r\n\r\n const onTextChange = (event: any) => {\r\n const searchTerm = event.target.value || '';\r\n setInputValue(searchTerm);\r\n onSearch(searchTerm);\r\n };\r\n\r\n const onButtonSearchClick = (evt: any) => {\r\n evt.preventDefault();\r\n const searchTerm = inputValue || \"\"\r\n onSearch(searchTerm);\r\n }\r\n\r\n const onReset = () => {\r\n setInputValue('');\r\n }\r\n\r\n useEffect(() => {\r\n if (!isSearchOpen) onReset();\r\n }, [isSearchOpen])\r\n\r\n return (\r\n \r\n \"Søk\"\r\n\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default SearchInput;\r\n","import React, {useEffect, useState} from 'react';\r\nimport classnames from 'classnames';\r\nimport {HandbookViewModel, SectionViewModel} from \"../../api/api\";\r\nimport {useLocation} from \"react-router-dom\";\r\nimport SearchResults from \"./SearchResults/SearchResults\";\r\nimport SearchInput from \"./SearchInput/SearchInput\";\r\nimport {useTheme} from \"../../theme/useTheme\";\r\nimport {HeaderType} from \"../Layout/Header/Header\";\r\nimport styles from './Search.module.css';\r\n\r\ntype SearchProps = {\r\n handbook: HandbookViewModel\r\n isOpen: boolean;\r\n isUp: boolean;\r\n isSticky: boolean;\r\n onSearchClose: () => void;\r\n headerType: HeaderType;\r\n}\r\n\r\nfunction Search({handbook, isUp, isOpen, isSticky, onSearchClose, headerType}: SearchProps) {\r\n const [searchTerm, setSearchTerm] = useState('');\r\n const [searchResult, setSearchResult] = useState([]);\r\n const {pathname, hash} = useLocation();\r\n const {themeColors} = useTheme();\r\n\r\n useEffect(() => {\r\n setSearchResult([])\r\n setSearchTerm('')\r\n }, [isOpen])\r\n\r\n useEffect(() => {\r\n onSearchClose();\r\n }, [pathname, hash])\r\n\r\n const onSearch = (searchString: string) => {\r\n setSearchTerm(searchString);\r\n let hits: SectionViewModel[] | undefined = [];\r\n\r\n if (searchString.length > 2) {\r\n hits = handbook && handbook.chapters && handbook.chapters.reduce((acc: SectionViewModel[], chapter) => {\r\n let sections = chapter.sections?.map(s => {\r\n return {\r\n ...s,\r\n parent: chapter.softLink,\r\n parentTitle: chapter.heading\r\n };\r\n })\r\n let test = sections?.filter(section => section.content?.includes(searchString) || section?.customContent?.includes(searchString)) ?? [];\r\n acc = [...acc, ...test]\r\n return acc\r\n }, []);\r\n }\r\n\r\n if (hits?.length) {\r\n setSearchResult(hits)\r\n } else setSearchResult([])\r\n }\r\n\r\n return (\r\n 2\r\n }\r\n )}\r\n >\r\n {isOpen && \r\n
\r\n \r\n
\r\n }\r\n {isOpen && searchTerm.length > 1 && \r\n 0}\r\n searchHits={searchResult}\r\n />\r\n }\r\n \r\n );\r\n}\r\n\r\nexport default Search;\r\n","import React from 'react';\r\nimport classNames from \"classnames\";\r\nimport styles from './HeaderButton.module.css';\r\n\r\ntype HeaderButtonProps = {\r\n text: string;\r\n isOpen: boolean;\r\n id: string;\r\n cssClass: string;\r\n onClick: () => void;\r\n}\r\n\r\nfunction HeaderButton({text, isOpen, id, cssClass, onClick}: HeaderButtonProps) {\r\n return (\r\n \r\n \r\n {text}\r\n \r\n \r\n );\r\n}\r\n\r\nexport default HeaderButton;","import React from \"react\";\r\nimport {useAuth} from \"../../../../auth/useAuth\";\r\nimport {useTranslation} from \"react-i18next\";\r\nimport Avatar from \"./Avatar\";\r\nimport styles from './Account.module.css';\r\n\r\ntype AccountProps = {\r\n isOpen: boolean;\r\n onClick: () => void;\r\n}\r\n\r\nfunction Account({isOpen, onClick}: AccountProps) {\r\n let auth = useAuth();\r\n const {t} = useTranslation('common');\r\n\r\n const onToggle = () => {\r\n onClick();\r\n }\r\n\r\n return
\r\n \r\n \r\n \r\n \r\n
\r\n}\r\n\r\nexport default Account","import React, {createContext, useContext, useState} from 'react';\r\nimport {useParams} from \"react-router\";\r\nimport {useHistory} from 'react-router-dom';\r\nimport {useTranslation} from \"react-i18next\";\r\nimport {HandbookViewModel} from \"../../../api/api\";\r\nimport {useTheme} from \"../../../theme/useTheme\";\r\nimport useSticky from \"./useSticky\";\r\nimport useIsMobile from \"../../../helpers/useIsMobile\";\r\nimport Hamburger from './Hamburger/Hamburger';\r\nimport Logo from './Logo/Logo';\r\nimport Nav from './Nav/Nav';\r\nimport classnames from 'classnames';\r\nimport Button from '../../Button/Button';\r\nimport Search from \"../../Search/Search\";\r\nimport HeaderButton from \"./HeaderButton/HeaderButton\";\r\nimport Account from \"./Account/Account\";\r\nimport classNames from \"classnames\";\r\nimport Settings from \"./Account/Settings\";\r\nimport {handbookIdContext} from \"../../../api/ProvideHandbookInfo\";\r\nimport styles from './Header.module.css';\r\nimport ButtonStyles from './../../Button/Button.module.css';\r\n\r\nexport enum HeaderType {\r\n CHAPTER = 'chapter',\r\n HANDBOOK = 'handbook'\r\n}\r\n\r\ntype HeaderProps = {\r\n handbook: HandbookViewModel;\r\n headerType: HeaderType;\r\n ref?: any;\r\n logoBase64?: string | undefined;\r\n}\r\n\r\nexport const searchContext = createContext(undefined as any);\r\n\r\nfunction Header({handbook, headerType, logoBase64}: HeaderProps) {\r\n const [isMenuOpen, setIsMenuOpen] = useState(false);\r\n const [isSearchOpen, setIsSearchOpen] = useState(false);\r\n const [isSettingsOpen, setIsSettingsOpen] = useState(false);\r\n const [isSearchTermEmpty, setIsSearchTermEmpty] = useState(false);\r\n const history = useHistory();\r\n const {handbookId} = useParams<{ handbookId: string }>();\r\n const {themeColors} = useTheme();\r\n const {isSticky, isUp} = useSticky();\r\n const {t} = useTranslation('common');\r\n const {isMobile} = useIsMobile();\r\n const {handbookInfo} = useContext(handbookIdContext);\r\n\r\n const onMenuOpen = () => {\r\n onSearchClose();\r\n onSettingsClose();\r\n document.body.style.position = 'fixed';\r\n document.body.style.overflowY = 'scroll';\r\n setIsMenuOpen(true);\r\n };\r\n\r\n const onMenuClose = () => {\r\n document.body.style.position = `static`;\r\n document.body.style.overflowY = 'auto';\r\n setIsMenuOpen(false);\r\n };\r\n\r\n const onSettingsOpen = () => {\r\n onSearchClose();\r\n onSettingsClose();\r\n setIsSettingsOpen(true);\r\n };\r\n\r\n const onSettingsClose = () => {\r\n onSearchClose();\r\n onMenuClose();\r\n setIsSettingsOpen(false);\r\n };\r\n\r\n const onSearchOpen = () => {\r\n onMenuClose();\r\n onSettingsClose();\r\n setIsSearchOpen(true);\r\n };\r\n\r\n const onSearchClose = () => {\r\n document.body.style.position = `static`;\r\n document.body.style.overflowY = 'auto';\r\n setIsSearchOpen(false);\r\n };\r\n\r\n const onClick = () => {\r\n history.push(`/handbok/${handbookId}`);\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n {t('header.skipToMainContent')}\r\n \r\n\r\n {headerType === HeaderType.HANDBOOK && logoBase64 && }\r\n {headerType === HeaderType.CHAPTER &&\r\n }\r\n
\r\n \r\n
\r\n \r\n
\r\n {!isSearchOpen &&
\r\n \r\n
}\r\n {!isMobile &&
\r\n \r\n \r\n
}\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nexport default Header;\r\n","import React from 'react';\r\nimport {useTheme} from \"../../theme/useTheme\";\r\nimport styles from './Hero.module.css';\r\nimport {useHandbookData} from '../../api/useHandbookData';\r\n\r\ntype HeroProps = {\r\n title?: string;\r\n coverPhotoPath?: string;\r\n coverPhotoAlt?: string;\r\n companyName: string;\r\n branchName: string;\r\n}\r\n\r\nfunction Hero({title, coverPhotoPath, coverPhotoAlt, companyName, branchName}: HeroProps) {\r\n const {themeColors} = useTheme();\r\n const {handbook} = useHandbookData();\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

{companyName}{handbook?.isDemo && Demo}

\r\n

{branchName}

\r\n

{title}

\r\n
\r\n
\r\n
\r\n
\r\n {coverPhotoPath && {coverPhotoAlt}/}\r\n
\r\n
\r\n );\r\n}\r\n\r\nexport default Hero;\r\n","import {useEffect} from \"react\";\r\nimport {useLocation} from \"react-router-dom\";\r\n\r\nfunction ScrollTop() {\r\n const {pathname} = useLocation();\r\n\r\n useEffect(() => {\r\n window.scrollTo(0, 0);\r\n }, [pathname]);\r\n\r\n return null;\r\n}\r\n\r\nexport default ScrollTop;","type PlaceholderProps = {\r\n colorLight: string\r\n colorDark: string\r\n angle?: number\r\n}\r\n\r\nfunction Placeholder({colorLight, colorDark, angle = 30}: PlaceholderProps) {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default Placeholder;\r\n","import {useParams} from \"react-router\";\r\nimport {Link} from 'react-router-dom';\r\nimport {useTranslation} from \"react-i18next\";\r\nimport {SectionViewModel} from '../../../api/api';\r\nimport {ThemeColors} from \"../../../theme/useTheme\";\r\nimport Placeholder from './Placeholder';\r\nimport styles from './ChapterListItem.module.css';\r\n\r\ntype ChapterListItemProps = {\r\n heading: string;\r\n imageAzurePath: string;\r\n imageAzureAlt: string;\r\n sections: SectionViewModel[];\r\n id: string;\r\n themeColors: ThemeColors;\r\n}\r\n\r\nconst SectionLink = ({\r\n section,\r\n id,\r\n showSeparator\r\n }: { section: SectionViewModel, id: string, showSeparator: boolean }\r\n) => {\r\n const {handbookId} = useParams<{ handbookId: string }>();\r\n return (\r\n <>\r\n \r\n {section.heading}\r\n \r\n {showSeparator && /}\r\n );\r\n}\r\n\r\nfunction ChapterListItem({heading, imageAzurePath, imageAzureAlt, sections, id, themeColors}: ChapterListItemProps) {\r\n const {t} = useTranslation('common');\r\n const {handbookId} = useParams<{ handbookId: string }>();\r\n const list = sections?.map(\r\n (section, index) =>\r\n index}\r\n />\r\n );\r\n\r\n return (\r\n
  • \r\n
    \r\n
    \r\n {imageAzurePath\r\n ? {imageAzureAlt}\r\n\r\n : \r\n }\r\n
    \r\n
    \r\n
    \r\n

    \r\n {heading}\r\n

    \r\n

    {list}

    \r\n
    \r\n \r\n {t('home.chaptersList.listItem.readMore')}\r\n \r\n
    \r\n
    \r\n
  • \r\n );\r\n}\r\n\r\nexport default ChapterListItem;\r\n","import React from \"react\";\r\nimport {useTranslation} from \"react-i18next\";\r\nimport {ChapterViewModel} from \"../../../api/api\";\r\nimport {ThemeColors} from \"../../../theme/useTheme\";\r\nimport ChapterListItem from '../ListItem/ChapterListItem';\r\nimport styles from './ChaptersList.module.css';\r\n\r\ntype ChaptersListProps = {\r\n chapters?: ChapterViewModel[];\r\n updated?: string;\r\n themeColors: ThemeColors\r\n}\r\n\r\nfunction ChaptersList({chapters = [], updated, themeColors}: ChaptersListProps) {\r\n const {t} = useTranslation('common');\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n {t('home.chaptersList.lastUpdated')}: {updated}\r\n \r\n
    \r\n
      \r\n {\r\n chapters.map((chapter, index) =>\r\n )\r\n }\r\n
    \r\n
    \r\n );\r\n}\r\n\r\nexport default ChaptersList;\r\n","import styles from './Footer.module.css';\r\n\r\nfunction Footer() {\r\n return (\r\n
    \r\n

    @NHO {new Date().getFullYear()}

    \r\n
    \r\n );\r\n}\r\n\r\nexport default Footer;","import React from 'react';\r\nimport {useHandbookData} from \"../../api/useHandbookData\";\r\nimport Header, {HeaderType} from '../../components/Layout/Header/Header';\r\nimport Hero from '../../components/Hero/Hero';\r\nimport ScrollTop from \"../../components/ScrollTo/ScrollTop\";\r\nimport ChaptersList from '../../components/Chapters/List/ChaptersList';\r\nimport Footer from '../../components/Layout/Footer/Footer';\r\nimport {useTheme} from \"../../theme/useTheme\";\r\nimport styles from \"./HandbookPage.module.css\";\r\n\r\nexport interface ParamTypes {\r\n handbookId: string;\r\n}\r\n\r\nfunction HandbookPage() {\r\n const {handbook, companyName, branchName} = useHandbookData();\r\n const {themeColors} = useTheme();\r\n\r\n return (\r\n <>\r\n \r\n \r\n
    \r\n \r\n \r\n
    \r\n