{"version":3,"sources":["hooks/useLogin.ts","types/alerts.ts","types/deviceTypes.ts","hooks/useCurrentUserInfo.ts","assets/images/logo-full.svg","assets/images/logo-short.svg","components/app-logo/AppLogo.tsx","providers/AuthProvider.tsx","constants/languages.ts","utils/dateFunctions.ts","constants/paths.ts","apis/auth.ts","providers/DeviceTypeProvider.tsx","components/side-menu/components/ProfileButton.tsx","hooks/useCurrentInstance.ts","components/side-menu/components/LanguageSelector.tsx","providers/InstanceProvider.tsx","apis/instance.ts","components/alerts/Snackbar.tsx","providers/AlertProvider.tsx","apis/userInfo.ts","providers/UserInfoProvider.tsx","utils/objectFunctions.ts","utils/redirectFunctions.ts","components/controls/progress/Progress.tsx","components/controls/tag/Tag.tsx","types/education.ts","utils/enumFunctions.ts","components/controls/date-pickers/DatePicker.tsx","components/dialogs/ButtonDialog.tsx","components/controls/select/Select.tsx","components/controls/select/TagMultiselect.tsx","components/form/FormDatePicker.tsx","components/page/Drawer.tsx","components/form/Form.tsx","components/form/FormTextField.tsx","components/form/FormSelect.tsx","components/form/FormTagSelect.tsx","components/form/FormInstrumentLanguagesSelect.tsx","components/form/FormInstrumentNormsSelect.tsx","containers/customer/hooks/useInstrumentNormsList.ts","components/form/FormEditor.tsx","components/dialogs/ConfirmationDialog.tsx","components/form/FormDrawer.tsx","components/form/FormCustomerRolesSelect.tsx","containers/customer/hooks/useCustomerRolesList.tsx","components/controls/button/Button.tsx","styles/colors.ts","styles/backgrounds.ts","styles/typography.ts","styles/borders.ts","styles/themes.ts","styles/shadows.ts","styles/z-indexes.ts","styles/breakpoints.ts","apis/api.ts","constants/urls.ts","types/errors.ts","containers/login/LoginForm.tsx","components/page/PanePageLayout.tsx","containers/login/Login.tsx","components/side-menu/SideMenu.tsx","components/side-menu/TopMenu.tsx","components/side-menu/components/SideMenuLink.tsx","components/side-menu/components/MoreMenuItems.tsx","components/side-menu/FooterMenu.tsx","utils/getNavigationLinks.tsx","components/page/CommonFooter.tsx","containers/Layout.tsx","containers/registration/components/RegistrationCompanyForm.tsx","containers/registration/components/RegistrationUserForm.tsx","containers/registration/components/RegistrationContent.tsx","containers/registration/Registration.tsx","containers/complete-registration/components/CompleteRegistrationForm.tsx","containers/complete-registration/CompleteRegistration.tsx","containers/confirm-email/ConfirmEmail.tsx","components/routes/PrivateRoute.tsx","components/routes/PublicRoute.tsx","containers/forgot-password/RecoverPasswordForm.tsx","containers/forgot-password/SetNewPasswordForm.tsx","containers/forgot-password/ForgotPassword.tsx","App.tsx","AppWrapper.tsx","utils/InstanceLanguageDetector.ts","i18n.tsx","index.tsx","hooks/useCurrentUser.ts","assets/icons/sessions.svg","assets/icons/activeSessions.svg","assets/icons/batches.svg","assets/icons/manual.svg","assets/icons/export.svg","assets/icons/aseba.svg","components/icons/icons.tsx","hooks/useShowAlert.ts","components/page/FullScreenLoading.tsx"],"names":["useLogin","dispatch","useContext","AuthDispatchContext","login","useCallback","credentials","a","authLogin","loginResult","type","payload","logout","authLogout","AlertType","DeviceType","useCurrentUserInfo","userInfo","UserInfoContext","user","AppLogoWrapper","styled","div","colors","background","ImageLogo","img","$visible","ShortImageLogo","AppLogo","short","rest","t","useTranslation","src","logoFull","alt","draggable","logoShort","initialAuthState","isLoading","AuthReducer","state","action","AuthContext","createContext","AuthProvider","children","useReducer","authState","useEffect","getCurrentUser","Provider","value","defaultLng","supportedLngs","code","name","supportedLngsCodes","map","lng","dateLocales","en","enGB","hr","sr","dateTimeFormat","dateFormat","format","date","formatDate","getDateFormatString","getDateTimeFormatString","paths","app","customer","admin","registration","assessment","completeRegistration","confirmEmail","forgotPassword","changePassword","requests","companies","users","administrators","instruments","instances","emailHistory","profile","dashboard","results","sessions","credits","respondents","batches","templates","createSession","manualInput","get","response","json","post","DeviceTypeContext","Mobile","DeviceTypeProvider","useState","deviceType","setDeviceType","useLayoutEffect","selectDeviceType","window","innerWidth","breakpoints","Desktop","addEventListener","removeEventListener","useDeviceType","ProfileWrapper","ProfileButton","collapsed","props","useCurrentUser","showError","useShowAlert","history","useHistory","anchorEl","setAnchorEl","handleLogout","role","aria-controls","aria-haspopup","aria-label","tabIndex","onClick","evt","currentTarget","onKeyDown","key","variant","component","firstName","lastName","id","elevation","open","Boolean","onClose","location","pathname","push","useCurrentInstance","instanceInfo","InstanceContext","StyledSelect","Select","accentPrimaryText","LanguageSelector","i18n","supportedInstanceLanguages","availableLanguages","filter","includes","languages","onChange","event","changeLanguage","target","lang","MenuItem","substring","toUpperCase","InstanceProvider","instance","setInstance","defaultLanguage","getCurrentInstance","storageInstanceInfo","sessionStorage","getItem","JSON","parse","setItem","stringify","toLowerCase","Snackbar","onExited","message","shouldAutoHide","handleClose","reason","alertSeverity","Error","Warning","anchorOrigin","vertical","horizontal","autoHideDuration","Alert","severity","IconButton","size","color","Close","AlertContext","AlertProvider","snackPack","setSnackPack","setOpen","messageInfo","setMessageInfo","showAlert","prev","Date","getTime","handleExited","undefined","length","slice","useSnackbarAlert","getCustomerUserInfo","getAdministratorInfo","getUserInfoByRole","UserInfoProvider","setInfo","setLoading","errorTimeout","setTimeout","clearTimeout","FullScreenLoading","trimObjectProperties","obj","trimmedObject","Object","keys","forEach","prop","trim","generateNakladaSlapRedirectUrl","origin","encodeURIComponent","ProgressWrapper","$overlay","zIndex","overContent","Progress","overlay","StyledChip","Chip","tag","defaultBorder","fieldBorderRadius","primary","Tag","label","Education","enumKeysAsTranslatedSelectOptions","e","translateFn","arrayObjects","entries","Number","isNaN","DatePicker","placeholder","autoOk","inputVariant","startOfDay","invalidDateMessage","maxDateMessage","minDateMessage","CloseButton","IconContent","DialogContent","StyledDialogTitle","DialogTitle","icon","DescriptionContent","ButtonDialog","title","description","buttons","closeIcon","fullWidth","maxWidth","aria-labelledby","aria-describedby","disableTypography","options","multiple","helperText","required","disabled","error","labelId","option","TagMultiselect","onBlur","freeTagInput","getOptionLabel","filterSelectedOptions","renderInput","params","renderTags","getTagProps","tagValue","index","val","disableClearable","openText","noOptionsText","freeSolo","FormDatePicker","useField","meta","helpers","setValue","setTouched","touched","wrapper","css","StyledMuiDrawer","MuiDrawer","width","DrawerHeader","header","secondaryText","ContentSection","section","Drawer","anchor","defaultProps","StyledForm","FormikForm","StyledInputSection","inputSectionPadding","StyledButtonSection","singleButton","Form","onSave","onCancel","initialValues","validationSchema","buttonLabels","enableReinitialize","onSubmit","noValidate","Button","cancel","isSubmitting","save","FormTextField","silentErrors","field","TextField","FormSelect","FormTagSelect","reduce","arr","find","opt","tags","FormInstrumentLanguagesSelect","instrumentId","withLabel","languageOptions","language","FormInstrumentNormsSelect","languageId","useSWR","data","norms","useInstrumentNormsList","normOptions","norm","some","n","EditorWrapper","danger","text","editor","border","hoverBorder","fontSize","mainText","stringHtmlToEditorState","stringHtml","contentBlock","htmlToDraft","contentState","ContentState","createFromBlockArray","contentBlocks","EditorState","createWithContent","createEmpty","Editor","initialEditorState","editorState","setEditorState","setFormikValue","trimmedEditorContent","currentEditorState","currentContent","getCurrentContent","getBlockMap","accumulator","block","getKey","getText","trimmedLeft","trimLeft","trimmedRight","trimRight","offset","textToReplaceLeft","SelectionState","anchorKey","focusKey","anchorOffset","focusOffset","leftTrimmedContent","Modifier","replaceText","textToReplaceRight","trimEditorContent","getPlainText","draftToHtml","convertToRaw","shouldHidePlaceHolder","first","getType","toolbar","inline","list","onEditorStateChange","stripPastedStyles","FormHelperText","margin","ConfirmationDialog","onContinue","FormDrawer","confirmationDrawer","setConfirmationDrawer","formikProps","dirty","setErrors","values","resetForm","ValidationError","validationError","errors","FormCustomerRolesSelect","roles","useCustomerRolesList","roleOptions","fontWeight","bold","primaryButton","hover","backgrounds","gradientBlue","secondaryButton","tertiaryButton","hoverText","handleButtonColor","textButton","uiKitColors","appBackground","headerText","footer","warning","accentBackground","accentSecondaryText","lightBorder","sideMenuHeaderBorder","table","focus","decorativeShadow","firstLayer","secondLayer","checkbox","checked","menu","shadow","tab","selectedBackground","optionList","hoverBackground","icons","manual","aseba","progress","questionList","active","activeText","failConfirmation","image","gradientDarkBlue","gradientLightBlue","gradientGreen","base","h1","h2","h3","h4","h5","h6","subtitle1","sideMenuMainHeader","sideMenuSecondaryHeader","tableHeader","fontFamily","regular","borderRadius","createBreakpoints","defaultTheme","createMuiTheme","palette","main","typography","body1","MuiButton","disableElevation","MuiListItemText","MuiTextField","overrides","MuiPaper","root","rounded","elevation2","boxShadow","MuiTabs","minHeight","flexContainer","flexWrap","gap","indicator","backgroundColor","MuiTab","textTransform","padding","letterSpacing","up","minWidth","opacity","MuiTableRow","MuiTableCell","borderBottom","stickyHeader","head","whiteSpace","overflow","textOverflow","body","paddingCheckbox","paper","MuiInputLabel","MuiInput","underline","borderBottomWidth","borderBottomColor","MuiOutlinedInput","borderColor","MuiChip","height","sizeSmall","MuiPickerDTTabs","tabs","MuiPickersToolbar","MuiPickersYear","MuiFormLabel","asterisk","MuiCheckbox","MuiFormControlLabel","MuiMenuItem","dense","paddingTop","paddingBottom","MuiDialogActions","spacing","justifyContent","marginLeft","MuiDialogTitle","textAlign","lineHeight","MuiDialogContent","MuiFormHelperText","marginDense","marginBottom","marginTop","MuiSnackbar","MuiAlert","standardError","standardWarning","neatPseudoShadow","basicShadow","dialogs","sm","md","lg","xl","xxl","device","acc","style","handleErrors","ok","status","ErrorCodes","statusText","Forbidden","fetcher","url","then","normalizeUrl","startsWith","makeHeaders","method","isMultipart","headers","Headers","append","join","fetch","FormData","del","Severity","LoginForm","onLogin","loginSchema","yup","username","password","validateOnBlur","validateOnChange","autoComplete","to","Logo","LoginHeader","ContentWrapper","PageContainer","Paper","PanePageLayout","heading","square","Typography","RegisterLabel","p","SignInError","Login","loginError","setError","handleLogin","errorMessage","SideMenuSection","SideMenuLogoHeader","CollapseButtonWrapper","CollapseButton","NavigationMenuList","List","StyledLanguageSelector","StyledProfileButton","SideMenuLink","React","forwardRef","ref","toString","href","rel","SideMenu","isCollapsible","navigationLinks","isCollapsed","setCollapsed","forwardedAs","ChevronRight","ChevronLeft","as","path","ListItem","button","exact","ListItemIcon","ListItemText","TopMenuSection","StyledSelector","ButtonSection","AppLogoHeader","StyledIconButton","CreateSessionLink","ManualInputLink","TopMenu","canStartAssessment","c","Menu","MoreListItem","hidden","MoreItemIcon","MoreMenuItems","disableGutters","keepMounted","Footer","FooterMenu","visibleNavs","setVisibleNavs","navListRef","useRef","listItemRef","moreItemsRef","measureItems","current","navListWidth","offsetWidth","moreMenuWidth","listItemWidth","getNavigationLinks","links","info","canManageAdministrators","canImportInstruments","canManageRespondents","canViewResults","canManageBatches","canManageEmailTemplates","canManageMessageTemplates","canManageUsers","StyledLink","CommonFooter","Trans","i18nKey","ns","StyledMain","$mobile","StyledMenu","StyledTopMenu","StyledFooterMenu","MainContentWrapper","DesktopFooter","MobileLayout","useLocation","isAdminMenu","isWizard","DesktopLayout","ApplicationLayout","AssessmentLayout","InputSection","StyledButton","CityInfo","RegistrationCompanyForm","RegistrationUserForm","onBackClick","educationOptions","phoneRegExp","yearRegExp","trimmedString","FormHeading","RegistrationContent","handleSubmit","page","onSetPage","organizationName","vatId","address","city","zipCode","phone","fax","email","adminUser","nakladaSlapId","occupation","workingPlace","education","graduatedFrom","graduationYear","contractNumber","companyValidationSchema","max","count","matches","userValidationSchema","LoginLabel","Registration","setPage","handleRegister","CompleteRegistrationForm","onSetPassword","newPassword","confirmPassword","completeRegistrationSchema","min","when","is","oneOf","inputProps","readOnly","ExplanationText","CompleteRegistration","passwordError","search","queryString","decode","token","useRegistrationParams","handleSetPassword","registrationParameters","EmailConfirmError","ConfirmEmail","emailConfirmError","setSubmitting","oldEmail","from","newEmail","useEmailConfirmationParams","handleConfirmEmail","PrivateRoute","redirectPath","validRole","PublicRoute","restrictedForAuth","pathByRole","RecoverPasswordForm","onRecover","recoverPasswordSchema","SetNewPasswordForm","PasswordRecoveryError","ForgotPassword","recoverPasswordError","linkSentTo","setLinkSent","useForgotPasswordParams","handleRecoverPassword","parameters","AdminRoot","lazy","CustomerRoot","Assessment","App","onError","err","reload","fallback","AppWrapper","utils","DateFnsUtils","locale","localStorageAvailable","hasLocalStorageSupport","localStorage","testKey","removeItem","InstanceLanguageDetector","services","lookupLocalStorage","async","this","callback","found","console","navigator","i","use","Backend","initReactI18next","init","debug","process","fallbackLng","load","cleanCode","defaultNS","interpolation","escapeValue","backend","backends","LocalStorageBackend","HttpBackend","backendOptions","prefix","defaultVersion","loadPath","detection","react","useSuspense","GlobalStyle","createGlobalStyle","ReactDOM","render","StrictMode","StylesProvider","injectFirst","theme","document","getElementById","_path","_path2","_extends","assign","arguments","source","prototype","hasOwnProperty","call","apply","_objectWithoutProperties","excluded","sourceKeys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","SvgSessions","_ref","svgRef","titleId","xmlns","x","y","viewBox","xmlSpace","d","ForwardRef","SvgActiveSessions","xmlnsXlink","enableBackground","_path3","_polygon","_polygon2","_path4","_path5","_path6","SvgBatches","points","_g","_g2","SvgManual","fill","SvgExport","SvgAseba","transform","customIconStyle","Dashboard","DashboardIcon","Respondents","PeopleAlt","Sessions","SessionsIcon","ActiveSessions","ActiveSessionsIcon","Results","InsertChart","Credits","Payment","Batches","BatchesIcon","Templates","Mail","Users","Person","Manual","ManualIcon","Tags","LocalOffer","Export","ExportIcon","Aseba","AsebaIcon","showWarning","Wrapper","dotPulse","keyframes","dotPulseBefore","dotPulseAfter","DotPulse"],"mappings":"wLA0BeA,IAnBE,WACf,IAAMC,EAAWC,qBAAWC,KAe5B,MAAO,CAAEC,MAbKC,sBAAW,uCACvB,WAAOC,GAAP,eAAAC,EAAA,sEAC4BC,YAAUF,GADtC,OACQG,EADR,OAEER,EAAS,CAAES,KAAM,gBAAiBC,QAASF,IAF7C,2CADuB,sDAKvB,CAACR,IAQaW,OALDP,sBAAW,sBAAC,sBAAAE,EAAA,sEACnBM,cADmB,OAEzBZ,EAAS,CAAES,KAAM,WAFQ,2CAGxB,CAACT,O,iCCrBC,IAAKa,EAAZ,kC,SAAYA,O,iBAAAA,I,qBAAAA,I,sBAAAA,M,uCCAL,I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AOuO,QAIPvO,IAAOuO,SAInDktB,EAAgBF,YAAH,+OAE+Bv7B,IAAOuO,QAGPvO,IAAOuO,QAIPvO,IAAOuO,SAInDmtB,EAAW57B,IAAOC,IAAV,wxBAMQC,IAAOuO,QAClBvO,IAAOuO,QACiBvO,IAAOuO,QAC3B+sB,EAYSt7B,IAAOuO,QAClBvO,IAAOuO,QAI8BvO,IAAOuO,QACxCitB,EAKiCx7B,IAAOuO,QACxCktB,GAaFzuB,IARe,WAC5B,OACE,cAACquB,EAAD,UACE,cAACK,EAAD,S","file":"static/js/main.231ed012.chunk.js","sourcesContent":["import { useCallback, useContext } from 'react';\r\n\r\nimport { AuthDispatchContext } from 'providers/AuthProvider';\r\nimport { Credentials } from 'types/auth';\r\n\r\nimport { login as authLogin, logout as authLogout } from 'apis/auth';\r\n\r\nconst useLogin = () => {\r\n const dispatch = useContext(AuthDispatchContext);\r\n\r\n const login = useCallback(\r\n async (credentials: Credentials) => {\r\n const loginResult = await authLogin(credentials);\r\n dispatch({ type: 'LOGIN_SUCCESS', payload: loginResult });\r\n },\r\n [dispatch]\r\n );\r\n\r\n const logout = useCallback(async () => {\r\n await authLogout();\r\n dispatch({ type: 'LOGOUT' });\r\n }, [dispatch]);\r\n\r\n return { login, logout };\r\n};\r\n\r\nexport default useLogin;\r\n","export enum AlertType {\r\n Error,\r\n Warning,\r\n Success,\r\n}\r\n\r\nexport interface SnackbarMessage {\r\n message: string;\r\n key: number;\r\n type?: AlertType;\r\n shouldAutoHide?: boolean;\r\n}\r\n","export enum DeviceType {\r\n Desktop,\r\n Mobile,\r\n}\r\n","import { useContext } from 'react';\r\n\r\nimport { UserInfoContext } from 'providers/UserInfoProvider';\r\nimport {\r\n AdministratorInformation,\r\n BaseInformation,\r\n CustomerUserInformation,\r\n} from 'types/userInfo';\r\n\r\nconst useCurrentUserInfo = <\r\n T extends CustomerUserInformation | AdministratorInformation | BaseInformation\r\n>() => {\r\n const userInfo = useContext(UserInfoContext);\r\n\r\n return { user: null === userInfo ? null : (userInfo as T) };\r\n};\r\n\r\nexport default useCurrentUserInfo;\r\n","export default __webpack_public_path__ + \"static/media/logo-full.f9d2bf46.svg\";","export default __webpack_public_path__ + \"static/media/logo-short.c02a2753.svg\";","import React, { FC } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\n\r\nimport logoFull from 'assets/images/logo-full.svg';\r\nimport logoShort from 'assets/images/logo-short.svg';\r\nimport { colors } from 'styles';\r\n\r\nconst AppLogoWrapper = styled.div`\r\n display: flex;\r\n align-items: flex-start;\r\n background: ${colors.background};\r\n`;\r\n\r\nconst ImageLogo = styled.img<{ $visible: boolean }>`\r\n ${({ $visible }) => ($visible ? `display: block;` : `display none;`)}\r\n width: 147px;\r\n height: 33px;\r\n`;\r\n\r\nconst ShortImageLogo = styled.img<{ $visible: boolean }>`\r\n ${({ $visible }) => ($visible ? `display: block;` : `display none;`)}\r\n width: 31px;\r\n height: 31px;\r\n margin: 1px;\r\n`; // dirty hacks\r\n\r\ntype AppLogoProps = {\r\n short?: boolean;\r\n};\r\n\r\nconst AppLogo: FC<\r\n AppLogoProps & React.ComponentPropsWithoutRef\r\n> = ({ short, ...rest }) => {\r\n const { t } = useTranslation('common');\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default AppLogo;\r\n","import { createContext, FC, useEffect, useReducer } from 'react';\r\nimport { getCurrentUser } from 'apis/auth';\r\nimport { AuthAction, AuthState } from 'types/auth';\r\n\r\nimport FullScreenLoading from 'components/page/FullScreenLoading';\r\n\r\nconst initialAuthState: AuthState = {\r\n user: null,\r\n isLoading: true,\r\n};\r\n\r\nconst AuthReducer = (state: AuthState, action: AuthAction) => {\r\n switch (action.type) {\r\n case 'LOGIN_SUCCESS': {\r\n return {\r\n ...state,\r\n user: action.payload,\r\n };\r\n }\r\n case 'LOGOUT': {\r\n return {\r\n ...state,\r\n user: null,\r\n };\r\n }\r\n case 'CURRENTUSER_LOADING': {\r\n return {\r\n ...state,\r\n user: null,\r\n isLoading: true,\r\n };\r\n }\r\n case 'CURRENTUSER_SUCCESS': {\r\n return {\r\n ...state,\r\n user: action.payload,\r\n isLoading: false,\r\n };\r\n }\r\n case 'CURRENTUSER_ERROR': {\r\n return {\r\n ...state,\r\n user: null,\r\n isLoading: false,\r\n };\r\n }\r\n }\r\n};\r\n\r\nexport const AuthContext = createContext(initialAuthState);\r\nexport const AuthDispatchContext = createContext((action: AuthAction) => {});\r\n\r\nexport const AuthProvider: FC = ({ children }) => {\r\n const [authState, dispatch] = useReducer(AuthReducer, initialAuthState);\r\n\r\n useEffect(() => {\r\n (async () => {\r\n dispatch({ type: 'CURRENTUSER_LOADING' });\r\n\r\n try {\r\n const user = await getCurrentUser();\r\n dispatch({ type: 'CURRENTUSER_SUCCESS', payload: user });\r\n } catch (e) {\r\n dispatch({ type: 'CURRENTUSER_ERROR' });\r\n }\r\n })();\r\n }, []);\r\n\r\n return (\r\n <>\r\n \r\n \r\n {authState.isLoading ? : children}\r\n \r\n \r\n \r\n );\r\n};\r\n","export const defaultLng = 'en';\r\n\r\ntype Language = {\r\n code: string;\r\n name: string;\r\n};\r\n\r\nexport const supportedLngs: Language[] = [\r\n { code: 'en', name: 'English' },\r\n { code: 'hr', name: 'Hrvatski' },\r\n { code: 'sr', name: 'Српски' },\r\n];\r\n\r\nexport const supportedLngsCodes = supportedLngs.map((lng) => lng.code);\r\n","import { format as formatDate } from 'date-fns';\r\nimport { enGB, hr, sr } from 'date-fns/locale';\r\n// import i18n from 'i18next';\r\n\r\nexport {\r\n parseISO,\r\n isValid,\r\n formatISO,\r\n isWithinInterval,\r\n isSameDay,\r\n startOfDay,\r\n isBefore,\r\n isAfter,\r\n} from 'date-fns';\r\n\r\nexport const dateLocales: { [id: string]: Locale } = {\r\n en: enGB,\r\n hr: hr,\r\n sr: sr,\r\n};\r\n\r\nexport const dateTimeFormat = 'd.M.yyyy. H:mm:ss';\r\n\r\nconst dateFormat = 'd.M.yyyy';\r\n\r\n//delete unused date translation\r\nexport const format = (\r\n date: number | Date,\r\n format: string = dateFormat\r\n): string => {\r\n // return formatDate(date, format, {\r\n // locale: dateLocales[i18n.languages[0]],\r\n // });\r\n return formatDate(date, format);\r\n};\r\n\r\nexport const getDateFormatString = (): string => {\r\n // return dateLocales[i18n.languages[0]].formatLong?.date({ width: 'short' });\r\n return 'dd.MM.yyyy';\r\n};\r\n\r\nexport const getDateTimeFormatString = (): string => {\r\n return 'dd.MM.yyyy HH:mm';\r\n};\r\n","export const paths = {\r\n app: {\r\n customer: '/',\r\n admin: '/admin',\r\n login: '/login',\r\n registration: '/registration',\r\n assessment: '/assessment',\r\n completeRegistration: '/complete-registration',\r\n confirmEmail: '/confirm-email',\r\n forgotPassword: '/forgot-password',\r\n changePassword: '/change-password',\r\n },\r\n admin: {\r\n requests: '/admin/requests',\r\n companies: '/admin/companies',\r\n users: '/admin/users',\r\n administrators: '/admin/administrators',\r\n instruments: '/admin/instruments',\r\n instances: '/admin/instances',\r\n emailHistory: '/admin/email-history',\r\n profile: '/admin/profile',\r\n },\r\n customer: {\r\n dashboard: '/',\r\n results: '/results',\r\n sessions: '/sessions',\r\n credits: '/credits',\r\n respondents: '/respondents',\r\n batches: '/batches',\r\n templates: '/templates',\r\n users: '/users',\r\n createSession: '/create-session',\r\n manualInput: '/manual-input',\r\n profile: '/profile',\r\n },\r\n};\r\n","import { Credentials, CurrentUser, LoginResult } from 'types/auth';\r\nimport { get, post } from 'apis/api';\r\n\r\nasync function getCurrentUser() {\r\n const response = await get('/authentication/current');\r\n return (await response.json()) as CurrentUser;\r\n}\r\n\r\nasync function login(credentials: Credentials) {\r\n const response = await post('/authentication/logon', credentials);\r\n return (await response.json()) as LoginResult;\r\n}\r\n\r\nasync function logout() {\r\n await get('/authentication/logout');\r\n}\r\n\r\nexport { getCurrentUser, login, logout };\r\n","import { createContext, useContext, useLayoutEffect, useState } from 'react';\r\nimport { DeviceType } from 'types/deviceTypes';\r\n\r\nimport { breakpoints } from 'styles';\r\n\r\nconst DeviceTypeContext = createContext(DeviceType.Mobile);\r\n\r\nexport const DeviceTypeProvider = ({\r\n children,\r\n}: {\r\n children: React.ReactNode;\r\n}) => {\r\n const [deviceType, setDeviceType] = useState(DeviceType.Mobile);\r\n\r\n useLayoutEffect(() => {\r\n const selectDeviceType = () =>\r\n setDeviceType(\r\n window.innerWidth >= breakpoints['lg']\r\n ? DeviceType.Desktop\r\n : DeviceType.Mobile\r\n );\r\n\r\n selectDeviceType();\r\n window.addEventListener('resize', selectDeviceType);\r\n\r\n return () => window.removeEventListener('resize', selectDeviceType);\r\n }, []);\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nexport const useDeviceType = () => useContext(DeviceTypeContext);\r\n","import { FC, ReactElement, useState } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useHistory } from 'react-router-dom';\r\nimport styled from 'styled-components';\r\n\r\nimport { Menu, MenuItem, Typography } from '@material-ui/core';\r\nimport { AccountCircle } from '@material-ui/icons';\r\n\r\nimport useCurrentUser from 'hooks/useCurrentUser';\r\nimport useCurrentUserInfo from 'hooks/useCurrentUserInfo';\r\nimport useLogin from 'hooks/useLogin';\r\n\r\nimport { useShowAlert } from 'hooks/useShowAlert';\r\nimport { BaseInformation } from 'types/userInfo';\r\nimport { paths } from 'constants/paths';\r\n\r\nconst ProfileWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n cursor: pointer;\r\n outline: none;\r\n\r\n &:focus {\r\n background-color: rgba(0, 0, 0, 0.08);\r\n }\r\n\r\n & * ~ * {\r\n margin-left: 0.5rem;\r\n }\r\n\r\n & .MuiTypography-root {\r\n word-break: break-word;\r\n }\r\n`;\r\n\r\nconst ProfileButton: FC<{ collapsed: boolean }> = ({\r\n collapsed,\r\n ...props\r\n}): ReactElement => {\r\n const { t } = useTranslation('common');\r\n const { user } = useCurrentUser();\r\n const { user: userInfo } = useCurrentUserInfo();\r\n const { logout } = useLogin();\r\n const { showError } = useShowAlert();\r\n const history = useHistory();\r\n\r\n const [anchorEl, setAnchorEl] = useState(null);\r\n\r\n const handleLogout = async () => {\r\n try {\r\n setAnchorEl(null);\r\n await logout();\r\n } catch (e) {\r\n showError();\r\n }\r\n };\r\n\r\n const openProfilePage = () => {\r\n history.push(\r\n user?.role === 'Customer' ? paths.customer.profile : paths.admin.profile\r\n );\r\n setAnchorEl(null);\r\n };\r\n\r\n return (\r\n <>\r\n setAnchorEl(evt.currentTarget)}\r\n onKeyDown={(evt) =>\r\n evt.key === 'Enter' && setAnchorEl(evt.currentTarget)\r\n }\r\n {...props}\r\n >\r\n \r\n {!collapsed && userInfo && (\r\n {`${userInfo.firstName} ${userInfo.lastName}`}\r\n )}\r\n \r\n setAnchorEl(null)}\r\n >\r\n {history.location.pathname !== paths.admin.profile &&\r\n history.location.pathname !== paths.customer.profile ? (\r\n \r\n {t('Profile.PersonalInformation')}\r\n \r\n ) : null}\r\n {t('Login.LogoutButton')}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default ProfileButton;\r\n","import { InstanceContext } from 'providers/InstanceProvider';\r\nimport { useContext } from 'react';\r\n\r\nconst useCurrentInstance = () => {\r\n const instanceInfo = useContext(InstanceContext);\r\n return { instanceInfo };\r\n};\r\n\r\nexport default useCurrentInstance;\r\n","import { FC, ReactElement, ReactNode } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\n\r\nimport { MenuItem, Select } from '@material-ui/core';\r\nimport { colors } from 'styles';\r\nimport { supportedLngs } from 'constants/languages';\r\nimport useCurrentInstance from 'hooks/useCurrentInstance';\r\n\r\nconst StyledSelect = styled(Select)`\r\n color: ${colors.accentPrimaryText};\r\n\r\n & .MuiSelect-icon {\r\n color: ${colors.accentPrimaryText};\r\n }\r\n\r\n &:before {\r\n display: none;\r\n }\r\n`;\r\n\r\ntype LanguageSelectorProps = {\r\n collapsed: boolean;\r\n children?: ReactNode;\r\n};\r\n\r\nconst LanguageSelector: FC = ({\r\n collapsed,\r\n ...props\r\n}): ReactElement => {\r\n const { i18n } = useTranslation();\r\n const { instanceInfo } = useCurrentInstance();\r\n\r\n const supportedInstanceLanguages =\r\n instanceInfo && instanceInfo.availableLanguages\r\n ? supportedLngs.filter((lng) =>\r\n instanceInfo.availableLanguages.includes(lng.code)\r\n )\r\n : [supportedLngs[0]];\r\n\r\n const handleLanguageChange = (\r\n event: React.ChangeEvent<{ name?: string; value: unknown }>\r\n ) => {\r\n i18n.changeLanguage(event.target.value as string);\r\n };\r\n\r\n return (\r\n \r\n {supportedInstanceLanguages.map((lang) => (\r\n \r\n {collapsed ? lang.name.substring(0, 2).toUpperCase() : lang.name}\r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\nexport default LanguageSelector;\r\n","import { FC, createContext, useEffect, useState } from 'react';\r\n\r\nimport { getCurrentInstance } from 'apis/instance';\r\nimport { InstanceInformation } from 'types/instances';\r\n\r\nimport FullScreenLoading from 'components/page/FullScreenLoading';\r\n\r\nexport const InstanceContext = createContext(null);\r\n\r\nexport const InstanceProvider: FC = ({ children }) => {\r\n const [instance, setInstance] = useState(null);\r\n\r\n useEffect(() => {\r\n (async () => {\r\n var instanceInfo = {\r\n defaultLanguage: 'en',\r\n availableLanguages: ['en'],\r\n } as InstanceInformation;\r\n\r\n try {\r\n instanceInfo = await getCurrentInstance();\r\n setInstance(instanceInfo);\r\n } catch {\r\n setInstance(instanceInfo);\r\n }\r\n })();\r\n }, []);\r\n\r\n return (\r\n <>\r\n \r\n {instance ? children : }\r\n \r\n \r\n );\r\n};\r\n","import { InstanceInformation } from 'types/instances';\r\nimport { get } from 'apis/api';\r\n\r\nasync function getCurrentInstance() {\r\n let instanceInfo: InstanceInformation | undefined;\r\n\r\n const storageInstanceInfo = sessionStorage.getItem('current-instance');\r\n if (storageInstanceInfo) {\r\n try {\r\n instanceInfo = JSON.parse(storageInstanceInfo) as InstanceInformation;\r\n } catch {}\r\n }\r\n\r\n if (!instanceInfo || !instanceInfo.defaultLanguage) {\r\n const response = await get('/instances/current');\r\n instanceInfo = (await response.json()) as InstanceInformation;\r\n }\r\n\r\n sessionStorage.setItem('current-instance', JSON.stringify(instanceInfo));\r\n\r\n return {\r\n defaultLanguage: instanceInfo.defaultLanguage.toLowerCase(),\r\n availableLanguages: instanceInfo.availableLanguages.map((lang) =>\r\n lang.toLowerCase()\r\n ),\r\n } as InstanceInformation;\r\n}\r\n\r\nexport { getCurrentInstance };\r\n","import { useTranslation } from 'react-i18next';\r\n\r\nimport { Snackbar as MuiSnackbar, IconButton } from '@material-ui/core';\r\nimport { Close as CloseIcon } from '@material-ui/icons';\r\nimport { Alert } from '@material-ui/lab';\r\nimport { AlertType } from 'types/alerts';\r\n\r\ntype SnackbarProps = {\r\n open: boolean;\r\n onClose(): void;\r\n onExited?(): void;\r\n message?: string;\r\n type?: AlertType;\r\n shouldAutoHide?: boolean;\r\n};\r\n\r\nconst Snackbar = ({\r\n open,\r\n onClose,\r\n onExited,\r\n message,\r\n type,\r\n shouldAutoHide = true,\r\n}: SnackbarProps) => {\r\n const { t } = useTranslation('common');\r\n\r\n const handleClose = (\r\n event: React.SyntheticEvent | MouseEvent,\r\n reason?: string\r\n ) => {\r\n if (reason === 'clickaway') {\r\n return;\r\n }\r\n onClose();\r\n };\r\n\r\n let alertSeverity: 'error' | 'warning' = 'error';\r\n switch (type) {\r\n case AlertType.Error:\r\n alertSeverity = 'error';\r\n break;\r\n case AlertType.Warning:\r\n alertSeverity = 'warning';\r\n break;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n }\r\n >\r\n {message}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default Snackbar;\r\n","import { createContext, useState, useEffect, useCallback } from 'react';\r\nimport { AlertType, SnackbarMessage } from 'types/alerts';\r\nimport Snackbar from 'components/alerts/Snackbar';\r\n\r\nexport const AlertContext = createContext(\r\n (message: string, type?: AlertType, shouldAutoHide?: boolean) => {}\r\n);\r\n\r\ntype AlertProviderProps = {\r\n children: React.ReactNode;\r\n};\r\n\r\nconst useSnackbarAlert = () => {\r\n const [snackPack, setSnackPack] = useState([]);\r\n const [open, setOpen] = useState(false);\r\n const [messageInfo, setMessageInfo] = useState();\r\n\r\n const showAlert = useCallback(\r\n (\r\n message: string,\r\n type: AlertType = AlertType.Error,\r\n shouldAutoHide: boolean = true\r\n ) => {\r\n setSnackPack((prev) => [\r\n ...prev,\r\n { message, key: new Date().getTime(), type, shouldAutoHide },\r\n ]);\r\n },\r\n []\r\n );\r\n\r\n const handleExited = useCallback(() => {\r\n setMessageInfo(undefined);\r\n }, []);\r\n\r\n const handleClose = useCallback(() => {\r\n setOpen(false);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (snackPack.length && !messageInfo) {\r\n setMessageInfo({ ...snackPack[0] });\r\n setSnackPack((prev) => prev.slice(1));\r\n setOpen(true);\r\n } else if (snackPack.length && messageInfo && open) {\r\n setOpen(false);\r\n }\r\n }, [snackPack, messageInfo, open]);\r\n\r\n return {\r\n open,\r\n message: messageInfo,\r\n showAlert,\r\n handleExited,\r\n handleClose,\r\n };\r\n};\r\n\r\nexport const AlertProvider = ({ children }: AlertProviderProps) => {\r\n const {\r\n open,\r\n message,\r\n showAlert,\r\n handleClose,\r\n handleExited,\r\n } = useSnackbarAlert();\r\n\r\n return (\r\n <>\r\n \r\n {children}\r\n \r\n \r\n \r\n );\r\n};\r\n","import {\r\n AdministratorInformation,\r\n CustomerUserInformation,\r\n} from 'types/userInfo';\r\nimport { get } from 'apis/api';\r\n\r\nasync function getCustomerUserInfo() {\r\n const response = await get('/users/information');\r\n return (await response.json()) as CustomerUserInformation;\r\n}\r\n\r\nasync function getAdministratorInfo() {\r\n const response = await get('/administrators/information');\r\n return (await response.json()) as AdministratorInformation;\r\n}\r\n\r\nexport { getCustomerUserInfo, getAdministratorInfo };\r\n","import { useEffect, useState, FC, createContext } from 'react';\r\n\r\nimport useCurrentUser from 'hooks/useCurrentUser';\r\nimport useLogin from 'hooks/useLogin';\r\nimport {\r\n AdministratorInformation,\r\n CustomerUserInformation,\r\n} from 'types/userInfo';\r\nimport { Role } from 'types/auth';\r\nimport { getAdministratorInfo, getCustomerUserInfo } from 'apis/userInfo';\r\nimport { useShowAlert } from 'hooks/useShowAlert';\r\n\r\nimport FullScreenLoading from 'components/page/FullScreenLoading';\r\n\r\ntype UserInfo = AdministratorInformation | CustomerUserInformation | null;\r\n\r\nconst getUserInfoByRole = async (role: Role) => {\r\n switch (role) {\r\n case 'Administrator':\r\n return await getAdministratorInfo();\r\n case 'Customer':\r\n return await getCustomerUserInfo();\r\n }\r\n};\r\n\r\nexport const UserInfoContext = createContext(null);\r\n\r\nexport const UserInfoProvider: FC = ({ children }) => {\r\n const [userInfo, setInfo] = useState(null);\r\n const [isLoading, setLoading] = useState(false);\r\n\r\n const { user } = useCurrentUser();\r\n const { showError } = useShowAlert();\r\n const { logout } = useLogin();\r\n\r\n useEffect(() => {\r\n let errorTimeout: ReturnType;\r\n (async () => {\r\n if (user) {\r\n try {\r\n setLoading(true);\r\n const userInfo = await getUserInfoByRole(user.role);\r\n setInfo(userInfo);\r\n setLoading(false);\r\n } catch (e) {\r\n showError(e);\r\n setInfo(null);\r\n\r\n errorTimeout = setTimeout(async () => {\r\n await logout();\r\n setLoading(false);\r\n }, 3000);\r\n }\r\n }\r\n })();\r\n\r\n return () => {\r\n errorTimeout && clearTimeout(errorTimeout);\r\n };\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [user]);\r\n\r\n return (\r\n \r\n {!isLoading ? children : }\r\n \r\n );\r\n};\r\n","export const trimObjectProperties = (obj: any) => {\r\n const trimmedObject = { ...obj };\r\n\r\n Object.keys(trimmedObject).forEach((prop) => {\r\n if (typeof trimmedObject[prop] === 'string')\r\n trimmedObject[prop] = trimmedObject[prop].trim();\r\n });\r\n\r\n return trimmedObject;\r\n};\r\n","export function generateNakladaSlapRedirectUrl(\r\n action: 'ASEBA' | 'manual' | 'credits'\r\n) {\r\n const origin = encodeURIComponent(window.location.origin);\r\n return `https://www.nakladaslap.com/redirect/?to=${action}&ref=${origin}`;\r\n}\r\n","import { FC, ReactElement } from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { CircularProgress } from '@material-ui/core';\r\nimport { colors, zIndex } from 'styles';\r\n\r\nconst ProgressWrapper = styled.div<{ $overlay?: boolean }>`\r\n display: flex;\r\n padding: 1rem;\r\n align-items: center;\r\n justify-content: center;\r\n\r\n ${({ $overlay }) =>\r\n $overlay &&\r\n `\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n left: 0;\r\n z-index: ${zIndex.overContent};\r\n background: ${colors.background}7F;\r\n `}\r\n`;\r\n\r\nconst Progress: FC<{ overlay?: boolean }> = ({ overlay }): ReactElement => (\r\n \r\n \r\n \r\n);\r\n\r\nexport default Progress;\r\n","import { FC, ReactElement } from 'react';\r\nimport styled from 'styled-components';\r\nimport { colors, defaultBorder, fieldBorderRadius } from 'styles';\r\n\r\nimport { Chip, ChipProps } from '@material-ui/core';\r\n\r\nconst StyledChip = styled(Chip)`\r\n color: ${colors.tag.color};\r\n background: ${colors.tag.background};\r\n border: ${defaultBorder};\r\n border-radius: ${fieldBorderRadius};\r\n max-width: 100%;\r\n\r\n & .MuiChip-deleteIcon {\r\n color: ${colors.primary};\r\n }\r\n`;\r\n\r\ntype TagProps = {\r\n name: string;\r\n};\r\n\r\nconst Tag: FC = ({ name, ...rest }): ReactElement => {\r\n return ;\r\n};\r\n\r\nexport default Tag;\r\n","export enum Education {\r\n PrimarySchool = 0,\r\n SecondarySchool,\r\n BachelorDegree,\r\n HigherEducation,\r\n MasterDegree,\r\n DoctorDegree,\r\n}\r\n","import { SelectOption } from 'components/controls/select/Select';\r\n\r\ntype StandardEnumLike = {\r\n [id: string]: T | string;\r\n [num: number]: string;\r\n};\r\n\r\nexport function enumKeysAsTranslatedSelectOptions<\r\n E extends StandardEnumLike\r\n>(e: E, translateFn: (key: string) => string): SelectOption[] {\r\n const arrayObjects: SelectOption[] = [];\r\n for (const [key, value] of Object.entries(e)) {\r\n if (!Number.isNaN(Number(key))) {\r\n continue;\r\n }\r\n arrayObjects.push({ value, name: translateFn(key) });\r\n }\r\n return arrayObjects;\r\n}\r\n","import { FC, ReactElement } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nimport {\r\n KeyboardDatePicker,\r\n KeyboardDatePickerProps,\r\n} from '@material-ui/pickers';\r\n\r\nimport { getDateFormatString, startOfDay } from 'utils/dateFunctions';\r\n\r\ntype PickerProps = {\r\n id?: string;\r\n value: Date | null;\r\n onChange: (date: Date | null) => void;\r\n label?: string;\r\n format?: string;\r\n variant?: 'standard' | 'filled' | 'outlined';\r\n size?: 'medium' | 'small';\r\n};\r\n\r\nexport type DatePickerProps = PickerProps &\r\n Omit;\r\n\r\nconst DatePicker: FC = ({\r\n id,\r\n value,\r\n onChange,\r\n label,\r\n format = getDateFormatString(),\r\n variant,\r\n size = 'medium',\r\n placeholder,\r\n ...rest\r\n}): ReactElement => {\r\n const { t } = useTranslation('common');\r\n\r\n return (\r\n onChange(date && startOfDay(date))}\r\n label={label}\r\n format={format}\r\n placeholder={placeholder || format}\r\n invalidDateMessage={t('Dates.InvalidDateFormatError')}\r\n maxDateMessage={t('Dates.MaxDateError')}\r\n minDateMessage={t('Dates.MinDateError')}\r\n {...rest}\r\n />\r\n );\r\n};\r\n\r\nexport default DatePicker;\r\n","import {\r\n Dialog,\r\n DialogContent,\r\n DialogContentText,\r\n DialogActions,\r\n DialogTitle,\r\n IconButton,\r\n} from '@material-ui/core';\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport { Close as CloseIcon } from '@material-ui/icons';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nconst CloseButton = styled(IconButton)`\r\n position: absolute;\r\n right: 0.625rem;\r\n top: 0.625rem;\r\n`;\r\n\r\nconst IconContent = styled(DialogContent)`\r\n margin-top: 0.5rem;\r\n padding: 0;\r\n`;\r\n\r\nconst StyledDialogTitle = styled(DialogTitle)`\r\n ${(props: { icon?: React.ReactNode }) =>\r\n `padding-top: ${props.icon ? '0.75rem' : '2.5rem'}; \r\n`};\r\n padding-bottom: 0.5rem;\r\n`;\r\n\r\nconst DescriptionContent = styled(DialogContent)`\r\n padding-bottom: 0;\r\n`;\r\n\r\ntype ButtonDialogProps = {\r\n open: boolean;\r\n title?: string;\r\n description?: React.ReactNode;\r\n icon?: React.ReactNode;\r\n buttons: React.ReactNode;\r\n onClose?: () => void;\r\n closeIcon?: boolean;\r\n};\r\n\r\nconst ButtonDialog = ({\r\n open,\r\n title,\r\n description,\r\n buttons,\r\n onClose,\r\n icon,\r\n closeIcon,\r\n}: ButtonDialogProps) => {\r\n const { t } = useTranslation('common');\r\n return (\r\n \r\n {closeIcon ? (\r\n \r\n \r\n \r\n ) : null}\r\n {icon ? (\r\n \r\n {icon}\r\n \r\n ) : null}\r\n \r\n {title}\r\n \r\n \r\n {description ? (\r\n \r\n {description}\r\n \r\n ) : null}\r\n \r\n {buttons}\r\n \r\n );\r\n};\r\n\r\nexport default ButtonDialog;\r\n","import { FC, ReactElement, ReactNode } from 'react';\r\n\r\nimport {\r\n FormControl,\r\n FormHelperText,\r\n InputLabel,\r\n MenuItem,\r\n Select as MuiSelect,\r\n SelectProps as MuiSelectProps,\r\n} from '@material-ui/core';\r\n\r\nexport interface SelectOption {\r\n value: string | number;\r\n name: string;\r\n}\r\n\r\ntype SelectOptionProps = {\r\n options: SelectOption[];\r\n size?: 'small' | 'medium';\r\n};\r\n\r\ntype SelectValueProps =\r\n | {\r\n multiple: false;\r\n onChange(value: SelectOption['value']): void;\r\n value: SelectOption['value'];\r\n }\r\n | {\r\n multiple: true;\r\n onChange(value: SelectOption['value'][]): void;\r\n value: SelectOption['value'][];\r\n };\r\n\r\nexport type SelectProps = { helperText?: ReactNode } & SelectOptionProps &\r\n SelectValueProps &\r\n Omit;\r\n\r\nconst Select: FC = ({\r\n value,\r\n onChange,\r\n options,\r\n multiple = false,\r\n variant = 'outlined',\r\n id = 'select-control',\r\n label,\r\n size,\r\n helperText,\r\n required,\r\n disabled,\r\n error,\r\n ...rest\r\n}): ReactElement => {\r\n return (\r\n \r\n {label}\r\n {\r\n onChange(\r\n event.target.value as (string | number) & (string | number)[]\r\n );\r\n }}\r\n >\r\n {options.map((option) => (\r\n \r\n {option.name}\r\n \r\n ))}\r\n \r\n {helperText && {helperText}}\r\n \r\n );\r\n};\r\n\r\nexport default Select;\r\n","import { FC, ReactElement } from 'react';\r\n\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { TextField } from '@material-ui/core';\r\n\r\nimport { Tag } from 'types/tags';\r\n\r\nimport TagComponent from '../tag/Tag';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nexport type TagMultiselectProps = {\r\n value: Tag[];\r\n options: Tag[];\r\n onChange(tags: Tag[]): void;\r\n\r\n id?: string;\r\n variant?: 'standard' | 'filled' | 'outlined';\r\n size?: 'medium' | 'small';\r\n label?: string;\r\n onBlur?(): void;\r\n freeTagInput?: boolean;\r\n};\r\n\r\nconst TagMultiselect: FC = ({\r\n value,\r\n options,\r\n onChange,\r\n\r\n id,\r\n variant,\r\n size,\r\n label,\r\n onBlur,\r\n freeTagInput = false,\r\n}): ReactElement => {\r\n const { t } = useTranslation('common');\r\n\r\n return (\r\n option.name}\r\n filterSelectedOptions\r\n renderInput={(params) => (\r\n \r\n )}\r\n renderTags={(value, getTagProps) =>\r\n value.map((tagValue, index) => (\r\n \r\n ))\r\n }\r\n value={value}\r\n onChange={(event, value) => {\r\n onChange(\r\n value.map((val) =>\r\n typeof val === 'string'\r\n ? ({ id: 0, name: val } as Tag)\r\n : (val as Tag)\r\n )\r\n );\r\n }}\r\n disableClearable\r\n openText={t('Tags.OpenTagsListButton')}\r\n noOptionsText={t('Tags.NoTagsText')}\r\n freeSolo={freeTagInput}\r\n />\r\n );\r\n};\r\n\r\nexport default TagMultiselect;\r\n","import { FC, ReactElement } from 'react';\r\nimport { useField } from 'formik';\r\n\r\nimport DatePicker, {\r\n DatePickerProps,\r\n} from 'components/controls/date-pickers/DatePicker';\r\n\r\nconst FormDatePicker: FC<\r\n { name: string } & Omit<\r\n DatePickerProps,\r\n 'name' | 'value' | 'onChange' | 'onBlur'\r\n >\r\n> = ({ name, ...rest }): ReactElement => {\r\n const [, meta, helpers] = useField(name);\r\n\r\n const { setValue, setTouched } = helpers;\r\n const { error, touched, value } = meta;\r\n\r\n return (\r\n {\r\n setValue(date);\r\n }}\r\n onBlur={() => setTouched(true)}\r\n error={Boolean(touched && error)}\r\n helperText={touched && error}\r\n />\r\n );\r\n};\r\n\r\nexport default FormDatePicker;\r\n","import { FC, ReactElement } from 'react';\r\nimport styled, { css } from 'styled-components';\r\n\r\nimport { Drawer as MuiDrawer, IconButton, Typography } from '@material-ui/core';\r\nimport { Close } from '@material-ui/icons';\r\n\r\nimport { colors, defaultBorder } from 'styles';\r\n\r\nconst wrapper = css`\r\n padding: 1rem 2rem;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n\r\n & > * ~ * {\r\n margin-left: 0.5rem;\r\n }\r\n`;\r\n\r\nconst StyledMuiDrawer = styled(MuiDrawer)`\r\n & .MuiDrawer-paper {\r\n width: ${(props: { width?: string }) =>\r\n props.width ? props.width : 'default'};\r\n }\r\n`;\r\n\r\nconst DrawerHeader = styled.header`\r\n ${wrapper};\r\n border-bottom: ${defaultBorder};\r\n flex: 0 0 auto;\r\n & .MuiButtonBase-root {\r\n color: ${colors.secondaryText};\r\n }\r\n`;\r\n\r\nconst ContentSection = styled.section`\r\n min-height: 0;\r\n flex: 1 1 auto;\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\ntype DrawerProps = {\r\n header: string;\r\n onClose?(): void;\r\n open?: boolean;\r\n children?: React.ReactNode;\r\n width?: string;\r\n};\r\n\r\nconst Drawer: FC = ({\r\n open,\r\n header,\r\n onClose,\r\n children,\r\n ...rest\r\n}): ReactElement => {\r\n return (\r\n \r\n \r\n {header}\r\n onClose && onClose()}>\r\n \r\n \r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nDrawer.defaultProps = {\r\n open: false,\r\n onClose: () => {},\r\n};\r\n\r\nexport default Drawer;\r\n","import { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\nimport { Formik, FormikProps, Form as FormikForm } from 'formik';\r\nimport * as yup from 'yup';\r\n\r\nimport { defaultBorder } from 'styles';\r\n\r\nimport Button from 'components/controls/button/Button';\r\n\r\nconst StyledForm = styled(FormikForm)`\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n height: 100%;\r\n`;\r\n\r\ntype inputSectionProps = {\r\n inputSectionPadding: boolean;\r\n};\r\n\r\nconst StyledInputSection = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n overflow-y: auto;\r\n padding: 2rem\r\n ${(props: inputSectionProps) =>\r\n props.inputSectionPadding ? '1.5rem' : '0'};\r\n & .MuiFormControl-root {\r\n margin-bottom: 2rem;\r\n }\r\n`;\r\n\r\ntype buttonSectionProps = {\r\n singleButton: boolean;\r\n};\r\n\r\nconst StyledButtonSection = styled.div`\r\n display: flex;\r\n padding-top: 1rem;\r\n justify-content: ${(props: buttonSectionProps) =>\r\n props.singleButton ? 'center' : 'space-between'};\r\n\r\n border-top: ${defaultBorder};\r\n padding: 1rem 1.5rem;\r\n\r\n & button ~ button {\r\n margin-left: 1rem;\r\n }\r\n`;\r\n\r\ntype FormProps = {\r\n onSave(values: T): void;\r\n onCancel?(): void;\r\n initialValues: T;\r\n validationSchema: yup.SchemaOf;\r\n children(props: FormikProps): React.ReactNode;\r\n inputSectionPadding?: boolean;\r\n buttonLabels?: {\r\n save?: string;\r\n cancel?: string;\r\n };\r\n};\r\n\r\nconst Form = ({\r\n onSave,\r\n onCancel,\r\n initialValues,\r\n validationSchema,\r\n children,\r\n inputSectionPadding = true,\r\n buttonLabels,\r\n ...rest\r\n}: FormProps) => {\r\n const { t } = useTranslation('common');\r\n\r\n return (\r\n \r\n {(props) => (\r\n \r\n \r\n {children({\r\n ...props,\r\n })}\r\n \r\n \r\n {onCancel && (\r\n \r\n )}\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default Form;\r\n","import { FC, ReactElement } from 'react';\r\nimport { useField } from 'formik';\r\nimport { TextField, TextFieldProps } from '@material-ui/core';\r\n\r\nconst FormTextField: FC<\r\n { name: string; silentErrors?: boolean } & Omit<\r\n TextFieldProps,\r\n 'name' | 'value' | 'onChange' | 'onBlur'\r\n >\r\n> = ({ name, silentErrors, ...rest }): ReactElement => {\r\n const [field, meta] = useField(name);\r\n\r\n const { error, touched } = meta;\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default FormTextField;\r\n","import { FC, ReactElement } from 'react';\r\nimport { useField } from 'formik';\r\n\r\nimport Select, {\r\n SelectOption,\r\n SelectProps,\r\n} from 'components/controls/select/Select';\r\n\r\nconst FormSelect: FC<\r\n { name: string; onChange?: () => void } & Omit<\r\n SelectProps,\r\n 'name' | 'value' | 'onBlur' | 'onChange' | 'multiple'\r\n >\r\n> = ({ name, onChange, ...rest }): ReactElement => {\r\n const [, meta, helpers] = useField(name);\r\n\r\n const { setValue, setTouched } = helpers;\r\n const { error, touched, value } = meta;\r\n\r\n return (\r\n {\r\n setValue(val);\r\n onChange && onChange();\r\n }}\r\n onBlur={() => setTouched(true)}\r\n id={`form-field-${name}`}\r\n multiple={false}\r\n error={Boolean(touched && error)}\r\n helperText={touched && error}\r\n />\r\n );\r\n};\r\n\r\nexport default FormSelect;\r\n","import { FC, ReactElement } from 'react';\r\nimport { useField } from 'formik';\r\n\r\nimport { Tag } from 'types/tags';\r\n\r\nimport TagMultiselect, {\r\n TagMultiselectProps,\r\n} from 'components/controls/select/TagMultiselect';\r\n\r\nconst FormTagSelect: FC<\r\n { name: string } & Omit<\r\n TagMultiselectProps,\r\n 'name' | 'value' | 'onChange' | 'onBlur' | 'multiple'\r\n >\r\n> = ({ name, options, ...rest }): ReactElement => {\r\n const [, meta, helpers] = useField(name);\r\n\r\n const { setValue, setTouched } = helpers;\r\n const { value } = meta;\r\n\r\n return (\r\n ((arr, val) => {\r\n const tag = options.find((opt) => opt.id === val);\r\n tag && arr.push(tag);\r\n return arr;\r\n }, [])}\r\n onChange={(tags) => setValue(tags.map((tag) => tag.id))}\r\n onBlur={() => setTouched(true)}\r\n />\r\n );\r\n};\r\n\r\nexport default FormTagSelect;\r\n","import { FC, ReactElement, useEffect } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useField } from 'formik';\r\n\r\nimport { SelectOption } from 'components/controls/select/Select';\r\nimport { FormSelect } from 'components/form';\r\n\r\ntype FormSelectInstrumentLanguagesProps = {\r\n name: string;\r\n languages: string[];\r\n disabled?: boolean;\r\n onChange?: () => void;\r\n onClick?: () => void;\r\n instrumentId?: number;\r\n withLabel?: boolean;\r\n};\r\n\r\nconst FormInstrumentLanguagesSelect: FC = ({\r\n name,\r\n languages,\r\n disabled,\r\n onChange,\r\n onClick,\r\n instrumentId,\r\n withLabel,\r\n}): ReactElement => {\r\n const { t } = useTranslation(['common', 'customer']);\r\n\r\n const languageOptions = languages.map((language) => ({\r\n value: language,\r\n name: language ? t(`Languages.${language.toLowerCase()}`) : '',\r\n }));\r\n\r\n const [, meta, helpers] = useField(name);\r\n\r\n const { setValue } = helpers;\r\n const { value } = meta;\r\n\r\n useEffect(() => {\r\n if (!disabled && languageOptions[0] && value === '') {\r\n setValue(languageOptions[0].value);\r\n }\r\n }, [value, languageOptions, disabled, setValue, name, instrumentId]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default FormInstrumentLanguagesSelect;\r\n","import { FC, ReactElement, useEffect } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useField } from 'formik';\r\n\r\nimport { SelectOption } from 'components/controls/select/Select';\r\nimport { useInstrumentNormsList } from 'containers/customer/hooks/useInstrumentNormsList';\r\nimport { FormSelect } from 'components/form';\r\n\r\ntype FormSelectInstrumentNormsProps = {\r\n name: string;\r\n instrumentId: number;\r\n languageId: string;\r\n disabled?: boolean;\r\n onChange?: () => void;\r\n onClick?: () => void;\r\n withLabel?: boolean;\r\n};\r\n\r\nconst FormInstrumentNormsSelect: FC = ({\r\n name,\r\n instrumentId,\r\n languageId,\r\n disabled,\r\n onChange,\r\n onClick,\r\n withLabel,\r\n}): ReactElement => {\r\n const { t } = useTranslation(['common', 'customer']);\r\n const { isLoading, norms } = useInstrumentNormsList(instrumentId, languageId);\r\n const normOptions = norms\r\n ? norms.map((norm) => ({ value: norm.id, name: norm.name }))\r\n : [];\r\n\r\n const [, meta, helpers] = useField(name);\r\n\r\n const { setValue } = helpers;\r\n const { value } = meta;\r\n\r\n useEffect(() => {\r\n if (\r\n !disabled &&\r\n norms?.length &&\r\n (value === '' || !norms.some((n) => n.id === Number(value)))\r\n ) {\r\n setValue(norms[0].id);\r\n }\r\n }, [norms, value, disabled, setValue, name, instrumentId, languageId]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default FormInstrumentNormsSelect;\r\n","import useSWR from 'swr';\r\n\r\nimport { Norm } from 'types/norm';\r\n\r\nexport const useInstrumentNormsList = (id: number, languageId: string) => {\r\n const { data, error } = useSWR(\r\n id && languageId ? `/instruments/${id}/norms?lang=${languageId}` : null\r\n );\r\n return {\r\n norms: data,\r\n isLoading: !data && !error,\r\n };\r\n};\r\n","import { Editor as DraftEditor } from 'react-draft-wysiwyg';\r\nimport { useField } from 'formik';\r\nimport { FC, ReactElement, useState, useEffect } from 'react';\r\nimport { fieldBorderRadius, colors, fontSize } from 'styles';\r\nimport styled from 'styled-components';\r\nimport { FormHelperText } from '@material-ui/core';\r\nimport draftToHtml from 'draftjs-to-html';\r\nimport {\r\n EditorState,\r\n convertToRaw,\r\n ContentState,\r\n SelectionState,\r\n Modifier,\r\n} from 'draft-js';\r\nimport htmlToDraft from 'html-to-draftjs';\r\n\r\ntype EditorWrapperProps = {\r\n required: boolean;\r\n};\r\n\r\nconst EditorWrapper = styled.div`\r\n .rdw-editor-main {\r\n height: 10rem;\r\n border: 1px solid\r\n ${({ required }: EditorWrapperProps) =>\r\n required ? colors.danger.text : colors.editor.border};\r\n border-radius: ${fieldBorderRadius};\r\n padding: 0rem 1rem;\r\n &:hover {\r\n border: 1px solid\r\n ${({ required }: EditorWrapperProps) =>\r\n required ? colors.danger.text : colors.editor.hoverBorder};\r\n }\r\n &:focus-within {\r\n border: 2px solid\r\n ${({ required }: EditorWrapperProps) =>\r\n required ? colors.danger.text : colors.editor.hoverBorder};\r\n }\r\n }\r\n\r\n .DraftEditor-root {\r\n font-size: ${fontSize.mainText};\r\n height: auto;\r\n }\r\n .public-DraftEditor-content {\r\n margin-top: 0.75rem;\r\n }\r\n\r\n .public-DraftStyleDefault-block {\r\n margin: 0.5rem 0;\r\n }\r\n\r\n .public-DraftEditorPlaceholder-root {\r\n display: flex;\r\n color: ${({ required }: EditorWrapperProps) =>\r\n required ? colors.danger.text : colors.editor.placeholder};\r\n &::after {\r\n content: '*';\r\n color: ${colors.danger.text};\r\n }\r\n }\r\n\r\n .Mui-required {\r\n color: ${colors.danger.text};\r\n margin-left: 1rem;\r\n }\r\n`;\r\n\r\nconst stringHtmlToEditorState = (stringHtml: string): EditorState => {\r\n const contentBlock = htmlToDraft(stringHtml);\r\n if (contentBlock) {\r\n const contentState = ContentState.createFromBlockArray(\r\n contentBlock.contentBlocks\r\n );\r\n const editorState = EditorState.createWithContent(contentState);\r\n return editorState;\r\n }\r\n return EditorState.createEmpty();\r\n};\r\n\r\nconst trimEditorContent = (currentEditorState: EditorState) => {\r\n const currentContent = currentEditorState.getCurrentContent();\r\n const newContent = currentContent\r\n .getBlockMap()\r\n .reduce((accumulator, block) => {\r\n if (block) {\r\n const key = block.getKey();\r\n const text = block.getText();\r\n const trimmedLeft = text.trimLeft();\r\n const trimmedRight = text.trimRight();\r\n const offset = text.length - trimmedLeft.length;\r\n\r\n const textToReplaceLeft = new SelectionState({\r\n anchorKey: key,\r\n focusKey: key,\r\n anchorOffset: 0,\r\n focusOffset: offset,\r\n });\r\n\r\n const leftTrimmedContent = Modifier.replaceText(\r\n accumulator as ContentState,\r\n textToReplaceLeft,\r\n ''\r\n );\r\n\r\n const textToReplaceRight = new SelectionState({\r\n anchorKey: key,\r\n focusKey: key,\r\n anchorOffset: trimmedRight.length - offset,\r\n focusOffset: text.length - offset,\r\n });\r\n\r\n return Modifier.replaceText(leftTrimmedContent, textToReplaceRight, '');\r\n }\r\n return currentContent;\r\n }, currentContent);\r\n\r\n return newContent;\r\n};\r\n\r\ntype EditorProps = {\r\n name: string;\r\n placeholder: string;\r\n required?: boolean;\r\n};\r\n\r\n//TODO: console warning\r\nconst Editor: FC = ({\r\n name,\r\n placeholder,\r\n required,\r\n}): ReactElement => {\r\n const [, meta, helpers] = useField(name);\r\n\r\n const { value, error, touched } = meta;\r\n const { setValue, setTouched } = helpers;\r\n\r\n const initialEditorState = stringHtmlToEditorState(value);\r\n\r\n const [editorState, setEditorState] = useState(\r\n initialEditorState\r\n );\r\n\r\n const setFormikValue = () => {\r\n const trimmedEditorContent = trimEditorContent(editorState);\r\n setValue(\r\n trimmedEditorContent.getPlainText().trim()\r\n ? draftToHtml(convertToRaw(trimmedEditorContent))\r\n : ''\r\n );\r\n };\r\n\r\n useEffect(() => {\r\n setEditorState(stringHtmlToEditorState(value));\r\n }, [value]);\r\n\r\n const shouldHidePlaceHolder = ![\r\n 'ordered-list-item',\r\n 'unordered-list-item',\r\n ].includes(editorState.getCurrentContent().getBlockMap().first().getType());\r\n\r\n return (\r\n \r\n {\r\n setTouched(true);\r\n setFormikValue();\r\n }}\r\n editorState={editorState}\r\n onEditorStateChange={(editorState) => setEditorState(editorState)}\r\n placeholder={shouldHidePlaceHolder ? placeholder + ' ' : undefined}\r\n stripPastedStyles={true}\r\n />\r\n {required && error && touched ? (\r\n \r\n {error}\r\n \r\n ) : null}\r\n \r\n );\r\n};\r\n\r\nexport default Editor;\r\n","import { FC, ReactElement } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport ButtonDialog from './ButtonDialog';\r\nimport Button from 'components/controls/button/Button';\r\n\r\ntype ConfirmationDialogProps = {\r\n open: boolean;\r\n title: string;\r\n description?: string;\r\n onCancel(): void;\r\n onContinue(): void;\r\n onClose?(): void;\r\n};\r\n\r\nconst ConfirmationDialog: FC = ({\r\n onCancel,\r\n onContinue,\r\n ...rest\r\n}): ReactElement => {\r\n const { t } = useTranslation('common');\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n }\r\n {...rest}\r\n />\r\n );\r\n};\r\n\r\nexport default ConfirmationDialog;\r\n","import { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\nimport { Formik, FormikProps, Form as FormikForm } from 'formik';\r\nimport * as yup from 'yup';\r\nimport { useState } from 'react';\r\n\r\nimport { defaultBorder } from 'styles';\r\n\r\nimport ConfirmationDialog from 'components/dialogs/ConfirmationDialog';\r\nimport Button from 'components/controls/button/Button';\r\nimport Drawer from 'components/page/Drawer';\r\nimport { useShowAlert } from 'hooks/useShowAlert';\r\nimport { ValidationError } from 'types/errors';\r\n\r\nconst StyledForm = styled(FormikForm)`\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n height: 100%;\r\n`;\r\n\r\ntype inputSectionProps = {\r\n inputSectionPadding: boolean;\r\n};\r\n\r\nconst StyledInputSection = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n overflow-y: auto;\r\n padding: 2rem\r\n ${(props: inputSectionProps) =>\r\n props.inputSectionPadding ? '1.5rem' : '0'};\r\n & .MuiFormControl-root {\r\n margin-bottom: 2rem;\r\n }\r\n`;\r\n\r\nconst StyledButtonSection = styled.div`\r\n display: flex;\r\n padding-top: 1rem;\r\n justify-content: space-between;\r\n border-top: ${defaultBorder};\r\n padding: 1rem 1.5rem;\r\n\r\n & button ~ button {\r\n margin-left: 1rem;\r\n }\r\n`;\r\n\r\ntype FormDrawerProps = {\r\n onSave(values: T): Promise;\r\n onClose(): void;\r\n initialValues: T;\r\n validationSchema: yup.SchemaOf;\r\n children(props: FormikProps): React.ReactNode;\r\n inputSectionPadding?: boolean;\r\n open: boolean;\r\n header: string;\r\n width?: string;\r\n};\r\n\r\nconst FormDrawer = ({\r\n onSave,\r\n onClose,\r\n initialValues,\r\n validationSchema,\r\n children,\r\n inputSectionPadding = true,\r\n open,\r\n header,\r\n width,\r\n}: FormDrawerProps) => {\r\n const { t } = useTranslation('common');\r\n const { showError } = useShowAlert();\r\n\r\n const [confirmationDrawer, setConfirmationDrawer] = useState(false);\r\n\r\n const handleClose = (formikProps: FormikProps) => {\r\n if (formikProps.dirty) {\r\n setConfirmationDrawer(true);\r\n } else {\r\n onClose();\r\n formikProps.setErrors({});\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n {\r\n try {\r\n await onSave(values);\r\n helpers.resetForm();\r\n } catch (err) {\r\n if (err instanceof ValidationError) {\r\n const validationError = err as ValidationError;\r\n if (validationError.errors.length) {\r\n showError(t(`ServerErrors.${validationError.errors[0].code}`));\r\n }\r\n } else {\r\n showError(err);\r\n }\r\n }\r\n }}\r\n validationSchema={validationSchema}\r\n >\r\n {(props) => (\r\n <>\r\n handleClose(props)}\r\n >\r\n \r\n \r\n {children({\r\n ...props,\r\n })}\r\n \r\n \r\n \r\n\r\n \r\n {t('Save')}\r\n \r\n \r\n \r\n \r\n setConfirmationDrawer(false)}\r\n onClose={() => setConfirmationDrawer(false)}\r\n onContinue={() => {\r\n props.resetForm();\r\n setConfirmationDrawer(false);\r\n onClose();\r\n }}\r\n />\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default FormDrawer;\r\n","import { FC, ReactElement } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nimport { useCustomerRolesList } from 'containers/customer/hooks/useCustomerRolesList';\r\nimport { FormSelect } from 'components/form';\r\n\r\ntype FormRolesSelectProps = {\r\n name: string;\r\n disabled?: boolean;\r\n};\r\n\r\nconst FormCustomerRolesSelect: FC = ({\r\n name,\r\n disabled,\r\n}): ReactElement => {\r\n const { t } = useTranslation(['common', 'customer']);\r\n const { isLoading, roles } = useCustomerRolesList();\r\n\r\n const roleOptions = roles\r\n ? roles.map((role) => ({\r\n value: role.id,\r\n name: t(`common:Roles.${role.name}`),\r\n }))\r\n : [];\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default FormCustomerRolesSelect;\r\n","import useSWR from 'swr';\r\n\r\nimport { Roles } from 'types/users';\r\n\r\nexport const useCustomerRolesList = () => {\r\n const { data, error } = useSWR(`users/roles`);\r\n\r\n return {\r\n roles: data,\r\n isLoading: !data && !error,\r\n };\r\n};\r\n","import styled from 'styled-components';\r\n\r\nimport {\r\n Button as MaterialButton,\r\n ButtonProps as MaterialButtonProps,\r\n} from '@material-ui/core';\r\n\r\nimport { backgrounds, colors, fontWeight } from 'styles';\r\n\r\ntype ButtonColor =\r\n | 'default'\r\n | 'inherit'\r\n | 'primary'\r\n | 'secondary'\r\n | 'tertiary'\r\n | 'danger';\r\n\r\ninterface ButtonProps extends Omit {\r\n color?: ButtonColor;\r\n component?: string | React.ElementType;\r\n}\r\n\r\nconst handleButtonColor = (color: ButtonColor, disabled?: boolean) => {\r\n switch (color) {\r\n case 'primary':\r\n return `\r\n background-color: ${colors.primaryButton.background}\r\n ;\r\n color: ${colors.primaryButton.text};\r\n &:hover {\r\n background-color: ${colors.primaryButton.hover};\r\n }\r\n `;\r\n case 'secondary':\r\n return `\r\n ${!disabled && `background: ${backgrounds.gradientBlue};`}\r\n color: ${colors.secondaryButton.text};\r\n &:hover {\r\n background: ${backgrounds.gradientBlue};\r\n }\r\n `;\r\n case 'tertiary':\r\n return `\r\n background-color: ${colors.tertiaryButton.background};\r\n color: ${colors.tertiaryButton.text};\r\n &:hover {\r\n background-color: ${colors.tertiaryButton.hover};\r\n }\r\n `;\r\n case 'danger':\r\n return `\r\n background-color: ${colors.danger.background};\r\n color: ${colors.danger.text};\r\n ${!disabled && `border: 1px solid ${colors.danger.border};`}\r\n &:hover {\r\n background-color: ${colors.danger.hover};\r\n color: ${colors.danger.hoverText};\r\n }\r\n `;\r\n }\r\n};\r\n\r\nconst Button = styled((props: ButtonProps) => {\r\n const { color, ...rest } = props;\r\n return ;\r\n})`\r\n font-weight: ${fontWeight.bold};\r\n text-transform: none;\r\n & .MuiButton-label > * ~ * {\r\n margin-left: 0.5em;\r\n }\r\n\r\n ${(props) =>\r\n props.variant !== 'text'\r\n ? `\r\n min-width: 8rem;\r\n &:hover {\r\n box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 12%),\r\n 0px 4px 5px 0px rgba(0, 0, 0, 14%),\r\n 0px 2px 4px -1px rgba(0, 0, 0, 20%);\r\n }\r\n ${handleButtonColor(props.color ?? 'primary', props.disabled)}\r\n `\r\n : `\r\n &:hover {\r\n background: none;\r\n text-decoration: underline;\r\n color: ${colors.textButton.hoverText}\r\n }`}\r\n`;\r\n\r\nButton.defaultProps = {\r\n color: 'primary',\r\n};\r\n\r\nexport default Button;\r\n","const uiKitColors = {\r\n backgroundBlue: '#e6eff6',\r\n primaryBlue: '#009fdb',\r\n darkBlue: '#033888',\r\n lightBlue: '#f5fafd',\r\n primaryWhite: '#ffffff',\r\n lightWhite: 'rgba(255, 255, 255, 0.7)',\r\n red: '#ff505f',\r\n lightRed: '#fff1f2',\r\n darkGrey: '#8e97a4',\r\n\r\n primaryGrey: '#797e8a',\r\n secondaryGrey: '#a0a3aa',\r\n borderGrey: '#C9CBD2',\r\n\r\n black: '#253343',\r\n};\r\n\r\nexport const colors = {\r\n appBackground: uiKitColors.backgroundBlue,\r\n mainText: uiKitColors.primaryGrey,\r\n headerText: uiKitColors.black,\r\n secondaryText: uiKitColors.secondaryGrey,\r\n footer: '#f5fafd',\r\n\r\n background: uiKitColors.primaryWhite,\r\n primary: uiKitColors.darkBlue,\r\n error: uiKitColors.red,\r\n warning: '#ff9800',\r\n disabled: '#e4e6eb',\r\n\r\n accentBackground: uiKitColors.darkBlue,\r\n accentPrimaryText: uiKitColors.primaryWhite,\r\n accentSecondaryText: uiKitColors.lightWhite,\r\n\r\n primaryButton: {\r\n background: uiKitColors.darkBlue,\r\n text: uiKitColors.primaryWhite,\r\n hover: '#042558',\r\n },\r\n secondaryButton: {\r\n text: uiKitColors.primaryWhite,\r\n },\r\n tertiaryButton: {\r\n background: 'rgba(0, 159, 219, 0.1)',\r\n text: uiKitColors.primaryBlue,\r\n hover: '#c1ecfc',\r\n },\r\n textButton: {\r\n text: uiKitColors.primaryBlue,\r\n hoverText: uiKitColors.primaryBlue,\r\n },\r\n danger: {\r\n background: uiKitColors.primaryWhite,\r\n text: uiKitColors.red,\r\n border: uiKitColors.red,\r\n hover: uiKitColors.red,\r\n hoverText: uiKitColors.primaryWhite,\r\n },\r\n\r\n lightBorder: '#d8e7f2',\r\n sideMenuHeaderBorder: '#ffffff19',\r\n\r\n table: {\r\n background: uiKitColors.lightBlue,\r\n headerText: uiKitColors.darkGrey,\r\n },\r\n\r\n tag: {\r\n background: '#eef5fb',\r\n color: uiKitColors.darkBlue,\r\n\r\n filter: {\r\n border: uiKitColors.borderGrey,\r\n color: uiKitColors.primaryGrey,\r\n focus: '#f0f0f0',\r\n },\r\n },\r\n\r\n decorativeShadow: {\r\n firstLayer: '#cbe1f1',\r\n secondLayer: '#cbe1f17f',\r\n },\r\n\r\n checkbox: {\r\n color: uiKitColors.primaryGrey,\r\n checked: uiKitColors.darkBlue,\r\n },\r\n\r\n menu: {\r\n border: uiKitColors.borderGrey,\r\n shadow: '#e0e0e0',\r\n },\r\n\r\n tab: {\r\n color: uiKitColors.primaryBlue,\r\n border: uiKitColors.primaryBlue,\r\n selectedBackground: uiKitColors.primaryBlue,\r\n },\r\n\r\n editor: {\r\n color: uiKitColors.primaryGrey,\r\n border: uiKitColors.borderGrey,\r\n hoverBorder: uiKitColors.darkBlue,\r\n placeholder: 'rgba(0, 0, 0, 0.54)',\r\n },\r\n\r\n optionList: {\r\n border: uiKitColors.borderGrey,\r\n hoverBorder: uiKitColors.darkBlue,\r\n hoverBackground: '#009fdb1a',\r\n },\r\n\r\n icons: {\r\n dashboard: '#E3D500',\r\n respondents: '#965AC5',\r\n sessions: '#D59726',\r\n results: '#d33f21',\r\n credits: '#28bdbb',\r\n batches: '#78c583',\r\n templates: '#62a0fb',\r\n users: '#b995f9',\r\n manual: '#03aae9',\r\n tags: '#ED6E78',\r\n aseba: '#2da9e1',\r\n },\r\n\r\n progress: {\r\n background: '#009fdb1a',\r\n value: '#60d46b',\r\n },\r\n\r\n questionList: {\r\n active: uiKitColors.primaryBlue,\r\n background: '#009fdb1a',\r\n activeText: uiKitColors.primaryWhite,\r\n text: uiKitColors.black,\r\n },\r\n\r\n failConfirmation: {\r\n image: uiKitColors.primaryBlue,\r\n },\r\n};\r\n","const background = {\r\n gradientDarkBlue:\r\n 'linear-gradient(258.96deg, #005DC2 -1.19%, #003589 88.14%);',\r\n gradientBlue: 'linear-gradient(258.96deg, #07B3F4 -1.19%, #0065DB 88.14%);',\r\n gradientLightBlue:\r\n 'linear-gradient(141.56deg, #019FDB 19.01%, #03ACEC 77.88%);',\r\n gradientGreen: 'linear-gradient(140.46deg, #8ce272 5.14%, #02d290 95.16%);',\r\n};\r\n\r\nexport default background;\r\n","const fontSize = {\r\n base: '16px',\r\n\r\n mainText: '0.875rem',\r\n\r\n h1: '1.5rem',\r\n h2: '1.25rem',\r\n h3: '1.125rem',\r\n h4: '1rem',\r\n h5: '1rem',\r\n h6: '0.875rem',\r\n\r\n subtitle1: '0.75rem',\r\n\r\n sideMenuMainHeader: '1.25rem',\r\n sideMenuSecondaryHeader: '0.75rem',\r\n\r\n tableHeader: '0.625rem',\r\n};\r\n\r\nconst fontFamily =\r\n \"'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif\";\r\n\r\nconst fontWeight = {\r\n regular: 400,\r\n bold: 700,\r\n};\r\n\r\nexport { fontSize, fontFamily, fontWeight };\r\n","import { colors } from './colors';\r\n\r\nexport const borderRadius = '8px';\r\n\r\nexport const fieldBorderRadius = '4px';\r\n\r\nexport const defaultBorder = `1px solid ${colors.lightBorder}`;\r\n","import { createMuiTheme } from '@material-ui/core/styles';\r\nimport createBreakpoints from '@material-ui/core/styles/createBreakpoints';\r\n\r\nimport { colors } from './colors';\r\nimport { fontFamily, fontSize, fontWeight } from './typography';\r\nimport { borderRadius, defaultBorder, fieldBorderRadius } from './borders';\r\n\r\nimport { AlertClassKey } from '@material-ui/lab/Alert';\r\ndeclare module '@material-ui/core/styles/overrides' {\r\n export interface ComponentNameToClassKey {\r\n MuiAlert: AlertClassKey;\r\n }\r\n}\r\n\r\nconst breakpoints = createBreakpoints({});\r\n\r\nexport const defaultTheme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: colors.primary,\r\n },\r\n error: {\r\n main: colors.error,\r\n },\r\n },\r\n typography: {\r\n h1: {\r\n fontSize: fontSize.h1,\r\n fontWeight: fontWeight.bold,\r\n color: colors.headerText,\r\n },\r\n h2: {\r\n fontSize: fontSize.h2,\r\n fontWeight: fontWeight.bold,\r\n },\r\n h3: {\r\n fontSize: fontSize.h3,\r\n fontWeight: fontWeight.bold,\r\n },\r\n h4: {\r\n fontSize: fontSize.h4,\r\n fontWeight: fontWeight.bold,\r\n },\r\n h5: {\r\n fontSize: fontSize.h5,\r\n fontWeight: fontWeight.regular,\r\n },\r\n h6: {\r\n fontSize: fontSize.h6,\r\n fontWeight: fontWeight.bold,\r\n },\r\n subtitle1: {\r\n fontSize: fontSize.subtitle1,\r\n },\r\n body1: {\r\n fontSize: fontSize.mainText,\r\n },\r\n fontFamily,\r\n },\r\n props: {\r\n MuiButton: {\r\n disableElevation: true,\r\n variant: 'contained',\r\n },\r\n MuiListItemText: {\r\n disableTypography: true,\r\n },\r\n MuiTextField: {\r\n variant: 'outlined',\r\n },\r\n },\r\n overrides: {\r\n MuiPaper: {\r\n root: {\r\n color: colors.mainText,\r\n },\r\n rounded: {\r\n borderRadius: borderRadius,\r\n },\r\n elevation2: {\r\n borderRadius: fieldBorderRadius,\r\n border: `1px solid ${colors.menu.border}`,\r\n boxShadow: `0px 1px 5px ${colors.menu.shadow}`,\r\n },\r\n },\r\n MuiTabs: {\r\n root: {\r\n color: colors.tab.color,\r\n minHeight: '2rem',\r\n },\r\n flexContainer: {\r\n flexWrap: 'wrap',\r\n gap: '0.5rem',\r\n },\r\n indicator: {\r\n backgroundColor: 'transparent',\r\n },\r\n },\r\n MuiTab: {\r\n root: {\r\n textTransform: 'none',\r\n borderRadius: '1rem',\r\n minHeight: '2rem',\r\n padding: '0 0.875rem',\r\n border: `1px solid ${colors.tab.border}`,\r\n letterSpacing: '0.4px',\r\n fontWeight: fontWeight.bold,\r\n [breakpoints.up('sm')]: {\r\n minWidth: '5em',\r\n },\r\n '&:hover': {\r\n opacity: 1,\r\n },\r\n '&$selected': {\r\n background: colors.tab.selectedBackground,\r\n color: colors.primaryButton.text,\r\n border: `none`,\r\n },\r\n },\r\n },\r\n MuiTableRow: {\r\n root: {\r\n background: colors.table.background,\r\n '&:nth-of-type(odd)': {\r\n background: colors.background,\r\n },\r\n },\r\n },\r\n MuiTableCell: {\r\n root: {\r\n padding: '1rem',\r\n borderBottom: defaultBorder,\r\n },\r\n stickyHeader: {\r\n backgroundColor: colors.table.background,\r\n },\r\n head: {\r\n background: colors.table.background,\r\n color: colors.table.headerText,\r\n textTransform: 'uppercase',\r\n fontSize: fontSize.tableHeader,\r\n fontWeight: fontWeight.bold,\r\n letterSpacing: '0.1em',\r\n whiteSpace: 'pre',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n padding: '0.5rem 1rem',\r\n '& .MuiFormControlLabel-label': {\r\n fontSize: fontSize.tableHeader,\r\n },\r\n },\r\n body: {\r\n color: 'inherit',\r\n whiteSpace: 'pre',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n },\r\n paddingCheckbox: {\r\n overflow: 'visible',\r\n },\r\n },\r\n MuiDrawer: {\r\n paper: {\r\n color: colors.headerText,\r\n width: '25rem',\r\n maxWidth: '100%',\r\n },\r\n },\r\n MuiInputLabel: {\r\n root: {\r\n fontSize: fontSize.mainText,\r\n },\r\n },\r\n MuiInput: {\r\n root: {\r\n fontSize: fontSize.mainText,\r\n },\r\n underline: {\r\n '&:after': {\r\n borderBottomWidth: '1px',\r\n },\r\n '&:hover:not(.Mui-disabled):before': {\r\n borderBottomColor: colors.primary,\r\n },\r\n },\r\n },\r\n MuiOutlinedInput: {\r\n root: {\r\n fontSize: fontSize.mainText,\r\n '&:hover:not(.Mui-error) .MuiOutlinedInput-notchedOutline': {\r\n borderColor: colors.primary,\r\n },\r\n },\r\n },\r\n MuiChip: {\r\n root: {\r\n fontSize: fontSize.mainText,\r\n height: '2em',\r\n },\r\n sizeSmall: {\r\n height: '1.5em',\r\n },\r\n },\r\n MuiPickerDTTabs: {\r\n tabs: {\r\n '& .MuiTab-root.Mui-selected': {\r\n background: 'none',\r\n },\r\n },\r\n },\r\n MuiPickersToolbar: {\r\n toolbar: {\r\n '& h4.MuiPickersToolbarText-toolbarTxt': {\r\n // HACK: month selector font size\r\n fontSize: fontSize.h1,\r\n },\r\n '& h6.MuiPickersToolbarText-toolbarTxt': {\r\n // HACK: year selector font size\r\n fontSize: fontSize.h2,\r\n },\r\n },\r\n },\r\n MuiPickersYear: {\r\n root: {\r\n fontSize: fontSize.mainText,\r\n },\r\n },\r\n MuiFormLabel: {\r\n asterisk: {\r\n color: colors.danger.text,\r\n },\r\n },\r\n MuiCheckbox: {\r\n root: {\r\n color: colors.checkbox.color,\r\n '&$checked': {\r\n color: colors.checkbox.checked,\r\n },\r\n },\r\n },\r\n MuiFormControlLabel: {\r\n root: {\r\n color: colors.mainText,\r\n },\r\n },\r\n MuiMenuItem: {\r\n dense: {\r\n paddingTop: '0.1rem',\r\n paddingBottom: '0.1rem',\r\n },\r\n },\r\n MuiDialogActions: {\r\n spacing: {\r\n justifyContent: 'center',\r\n padding: '0.5rem 0 2rem',\r\n gap: '1rem',\r\n flexWrap: 'wrap-reverse',\r\n '&>:not(:first-child)': {\r\n marginLeft: '0',\r\n },\r\n },\r\n },\r\n MuiDialogTitle: {\r\n root: {\r\n textAlign: 'center',\r\n paddingTop: '2.5rem',\r\n fontSize: fontSize.h2,\r\n color: colors.headerText,\r\n fontWeight: fontWeight.bold,\r\n lineHeight: '1.5rem',\r\n },\r\n },\r\n MuiDialogContent: {\r\n root: {\r\n textAlign: 'center',\r\n },\r\n },\r\n MuiFormHelperText: {\r\n marginDense: {\r\n marginBottom: '-1rem',\r\n marginTop: '0rem',\r\n lineHeight: 'normal',\r\n },\r\n },\r\n MuiSnackbar: {\r\n root: {\r\n marginBottom: '3rem',\r\n },\r\n },\r\n MuiAlert: {\r\n standardError: {\r\n backgroundColor: colors.error,\r\n color: colors.accentPrimaryText,\r\n fontWeight: fontWeight.bold,\r\n '& > .MuiAlert-icon': {\r\n color: colors.accentPrimaryText,\r\n },\r\n },\r\n standardWarning: {\r\n backgroundColor: colors.warning,\r\n color: colors.accentPrimaryText,\r\n fontWeight: fontWeight.bold,\r\n '& > .MuiAlert-icon': {\r\n color: colors.accentPrimaryText,\r\n },\r\n },\r\n message: {\r\n whiteSpace: 'pre-line',\r\n },\r\n },\r\n },\r\n});\r\n","import { borderRadius } from './borders';\r\nimport { colors } from './colors';\r\n\r\nexport const neatPseudoShadow = `\r\n position: relative;\r\n\r\n &:before,\r\n &:after {\r\n content: '';\r\n border-radius: ${borderRadius};\r\n position: absolute;\r\n background-color: transparent;\r\n }\r\n\r\n &:before {\r\n top: 0;\r\n bottom: 0;\r\n left: 0.5rem;\r\n right: 0.5rem;\r\n z-index: -1;\r\n box-shadow: 0 0.5rem 0 0 ${colors.decorativeShadow.firstLayer};\r\n }\r\n\r\n &:after {\r\n top: 0;\r\n bottom: 0;\r\n left: 1rem;\r\n right: 1rem;\r\n z-index: -2;\r\n box-shadow: 0 1rem 0 0 ${colors.decorativeShadow.secondLayer};\r\n }\r\n`;\r\n\r\nexport const basicShadow = `\r\n box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.12);\r\n`;\r\n","export const zIndex = {\r\n base: 0,\r\n overContent: 100,\r\n dialogs: 1300,\r\n};\r\n","export const size = {\r\n sm: 576,\r\n md: 768,\r\n lg: 992,\r\n xl: 1280,\r\n xxl: 1600,\r\n};\r\n\r\nexport const device = (Object.keys(size) as Array).reduce(\r\n (acc, key) => {\r\n acc[key] = (style: String) =>\r\n `@media (min-width: ${size[key]}px) { ${style} }`;\r\n return acc;\r\n },\r\n {} as { [index: string]: Function }\r\n);\r\n","import i18n from 'i18next';\r\n\r\nimport { apiBaseUrl } from 'constants/urls';\r\nimport { ErrorCodes, ValidationError } from 'types/errors';\r\n\r\nconst credentials =\r\n process.env.NODE_ENV === 'development' ? 'include' : 'same-origin';\r\n\r\nconst handleErrors = async (response: Response) => {\r\n if (!response.ok) {\r\n if (response.status === ErrorCodes.ValidationError) {\r\n const error = new ValidationError(response.statusText);\r\n error.errors = (await response.json()).errors;\r\n throw error;\r\n } else if (response.status === ErrorCodes.Forbidden) {\r\n const error = new Error(response.statusText);\r\n error.status = response.status;\r\n throw error;\r\n }\r\n throw new Error(response.statusText);\r\n }\r\n return response;\r\n};\r\n\r\nexport const fetcher = (url: string) =>\r\n get(url).then((response) => response.json());\r\n\r\nconst normalizeUrl = (url: string): string =>\r\n url.startsWith('http')\r\n ? url\r\n : apiBaseUrl + (url.startsWith('/') ? url : `/${url}`);\r\n\r\nconst makeHeaders = (\r\n method: 'get' | 'post' | 'delete',\r\n isMultipart: boolean = false\r\n): HeadersInit => {\r\n const headers = new Headers();\r\n headers.append('Accept', 'application/json');\r\n if (i18n.languages && i18n.languages.length) {\r\n headers.append('Accept-Language', i18n.languages.join(','));\r\n }\r\n\r\n if ((method === 'post' || method === 'delete') && !isMultipart) {\r\n headers.append('Content-Type', 'application/json');\r\n }\r\n\r\n return headers;\r\n};\r\n\r\nexport const get = async (url: string) => {\r\n return fetch(normalizeUrl(url), {\r\n headers: makeHeaders('get'),\r\n credentials,\r\n }).then(handleErrors);\r\n};\r\n\r\nexport const post = async (url: string, data?: object) => {\r\n const isMultipart = data instanceof FormData;\r\n\r\n return fetch(normalizeUrl(url), {\r\n method: 'post',\r\n headers: makeHeaders('post', isMultipart),\r\n body: data && (isMultipart ? (data as FormData) : JSON.stringify(data)),\r\n credentials,\r\n }).then(handleErrors);\r\n};\r\n\r\nexport const del = async (url: string, data?: object) => {\r\n return fetch(normalizeUrl(url), {\r\n method: 'delete',\r\n headers: makeHeaders('delete'),\r\n body: data ? JSON.stringify(data) : null,\r\n credentials,\r\n }).then(handleErrors);\r\n};\r\n","export const apiBaseUrl =\r\n process.env.NODE_ENV === 'development'\r\n ? 'https://localhost:44363/api'\r\n : '/api';\r\n","export enum ErrorCodes {\r\n ValidationError = 400,\r\n Forbidden = 403,\r\n}\r\n\r\ninterface ValidationParameterDictionary {\r\n [param: string]: string;\r\n}\r\n\r\ninterface ValidationErrorType {\r\n code: string;\r\n propertyName?: string;\r\n parameters?: ValidationParameterDictionary;\r\n}\r\n\r\nexport class ValidationError extends Error {\r\n errors: ValidationErrorType[];\r\n\r\n constructor(message?: string) {\r\n super(message);\r\n\r\n this.errors = [];\r\n }\r\n}\r\n\r\nexport enum Severity {\r\n Error,\r\n Warning,\r\n}\r\n\r\nexport interface ImportValidationError {\r\n severity: Severity;\r\n code: string;\r\n path?: string;\r\n languageId?: string;\r\n message?: string;\r\n}\r\n","import { FC, ReactElement } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { Link } from 'react-router-dom';\r\nimport { Formik, Form as FormikForm } from 'formik';\r\nimport styled from 'styled-components';\r\nimport * as yup from 'yup';\r\n\r\nimport { FormTextField } from 'components/form';\r\nimport Button from 'components/controls/button/Button';\r\n\r\nimport { Credentials } from 'types/auth';\r\nimport { paths } from 'constants/paths';\r\n\r\nconst StyledForm = styled(FormikForm)`\r\n display: flex;\r\n flex-direction: column;\r\n min-width: 16rem;\r\n\r\n & .MuiTextField-root,\r\n .MuiButton-root {\r\n margin-top: 1.5rem;\r\n }\r\n\r\n & a {\r\n margin-top: 0.5rem;\r\n color: inherit;\r\n align-self: flex-start;\r\n }\r\n`;\r\n\r\ntype LoginFormProps = {\r\n onLogin: (credentials: Credentials) => void;\r\n};\r\n\r\nconst LoginForm: FC = ({ onLogin }): ReactElement => {\r\n const { t } = useTranslation('common');\r\n\r\n const initialValues: Credentials = {\r\n username: '',\r\n password: '',\r\n };\r\n\r\n const loginSchema: yup.SchemaOf = yup.object({\r\n username: yup.string().required(),\r\n password: yup.string().required(),\r\n });\r\n\r\n return (\r\n \r\n {({ isSubmitting }) => (\r\n \r\n \r\n \r\n \r\n {t('Login.ForgotPasswordLink')}\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default LoginForm;\r\n","import { ReactNode } from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { Paper, Typography } from '@material-ui/core';\r\n\r\nimport { colors, fontWeight, fontSize } from 'styles';\r\nimport AppLogo from 'components/app-logo/AppLogo';\r\n\r\nconst Logo = styled(AppLogo)``;\r\n\r\nconst LoginHeader = styled.header`\r\n & ${Logo} {\r\n display: inline-flex;\r\n padding: 1rem;\r\n }\r\n\r\n background: ${colors.accentBackground};\r\n`;\r\n\r\nconst ContentWrapper = styled.div`\r\n height: 100%;\r\n display: flex;\r\n overflow: hidden auto;\r\n padding: 1rem;\r\n`;\r\n\r\nconst PageContainer = styled(Paper)`\r\n display: flex;\r\n flex-direction: column;\r\n margin: auto;\r\n padding: 2rem 1rem 1.5rem 1rem;\r\n font-size: ${fontSize.mainText};\r\n min-height: 0;\r\n min-width: 30%;\r\n\r\n & .MuiTypography-h1 {\r\n font-weight: ${fontWeight.regular};\r\n text-align: center;\r\n }\r\n`;\r\n\r\nconst PanePageLayout = ({\r\n heading,\r\n children,\r\n ...rest\r\n}: {\r\n heading?: string;\r\n children: ReactNode;\r\n}) => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n {heading && {heading}}\r\n {children}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PanePageLayout;\r\n","import { useState } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\n\r\nimport { colors, fontWeight } from 'styles';\r\nimport useLogin from 'hooks/useLogin';\r\nimport { Credentials } from 'types/auth';\r\nimport { ValidationError } from 'types/errors';\r\nimport { paths } from 'constants/paths';\r\n\r\nimport LoginForm from './LoginForm';\r\nimport PanePageLayout from 'components/page/PanePageLayout';\r\n\r\nconst RegisterLabel = styled.p`\r\n margin: 0.5rem 0 0;\r\n text-align: center;\r\n\r\n & a {\r\n color: ${colors.primary};\r\n font-weight: ${fontWeight.bold};\r\n text-decoration: none;\r\n }\r\n`;\r\n\r\nconst SignInError = styled.p`\r\n margin: 0.5rem 0 0;\r\n text-align: center;\r\n color: ${colors.error};\r\n`;\r\n\r\nconst Login = () => {\r\n const { t } = useTranslation('common');\r\n const [loginError, setError] = useState(null);\r\n\r\n const { login } = useLogin();\r\n\r\n const handleLogin = async (credentials: Credentials) => {\r\n try {\r\n setError(null);\r\n await login(credentials);\r\n } catch (err) {\r\n let errorMessage;\r\n\r\n if (err instanceof ValidationError) {\r\n const validationError = err as ValidationError;\r\n\r\n if (validationError.errors.length) {\r\n errorMessage = t(`ServerErrors.${validationError.errors[0].code}`);\r\n }\r\n }\r\n\r\n setError(errorMessage ?? t('Errors.FailedToLogIn'));\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {loginError && {loginError}}\r\n \r\n {t('Login.FirstTimeLabel')} \r\n {t('Login.RegisterLink')}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default Login;\r\n","import React, { FC, useState } from 'react';\r\nimport { NavLink, NavLinkProps } from 'react-router-dom';\r\nimport styled from 'styled-components';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nimport {\r\n List,\r\n ListItem,\r\n ListItemIcon,\r\n ListItemText,\r\n IconButton,\r\n} from '@material-ui/core';\r\nimport { ChevronLeft, ChevronRight } from '@material-ui/icons';\r\n\r\nimport { NavigationLink } from 'types/navigationLink';\r\nimport { colors, defaultBorder, fontWeight, zIndex } from 'styles';\r\n\r\nimport LanguageSelector from './components/LanguageSelector';\r\nimport AppLogo from 'components/app-logo/AppLogo';\r\nimport ProfileButton from './components/ProfileButton';\r\n\r\ntype SideMenuSectionProps = {\r\n collapsed: boolean;\r\n};\r\n\r\nconst SideMenuSection = styled.section`\r\n width: ${(props: SideMenuSectionProps) =>\r\n props.collapsed ? '3.5rem' : '13.375rem'};\r\n background-color: ${colors.accentBackground};\r\n color: ${colors.accentPrimaryText};\r\n\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst SideMenuLogoHeader = styled(AppLogo)`\r\n padding: 1rem;\r\n\r\n .MuiTypography-subtitle1 {\r\n color: ${colors.accentSecondaryText};\r\n }\r\n`;\r\n\r\nconst CollapseButtonWrapper = styled.div`\r\n position: relative;\r\n border-bottom: 1px solid ${colors.sideMenuHeaderBorder};\r\n`;\r\n\r\nconst CollapseButton = styled(IconButton)`\r\n border: ${defaultBorder};\r\n background-color: ${colors.background};\r\n color: ${colors.primary};\r\n padding: 0;\r\n\r\n position: absolute;\r\n right: -0.75rem;\r\n top: -0.75rem;\r\n z-index: ${zIndex.overContent};\r\n\r\n &:hover {\r\n background-color: ${colors.background};\r\n }\r\n`;\r\n\r\nconst NavigationMenuList = styled(List)`\r\n margin: 1rem 0;\r\n\r\n & .MuiListItemIcon-root,\r\n .MuiListItemText-root {\r\n color: ${colors.accentSecondaryText};\r\n }\r\n\r\n & .MuiListItemIcon-root {\r\n min-width: 1.5rem;\r\n padding-right: 0.75rem;\r\n margin-top: 4px;\r\n margin-bottom: 4px;\r\n }\r\n\r\n & > .active .MuiListItemIcon-root,\r\n > .active .MuiListItemText-root {\r\n color: ${colors.accentPrimaryText};\r\n font-weight: ${fontWeight.bold};\r\n }\r\n`;\r\n\r\nconst StyledLanguageSelector = styled(LanguageSelector)`\r\n align-self: flex-start;\r\n margin: ${({ collapsed }) =>\r\n collapsed ? 'auto 0.5rem 0 0.5rem' : 'auto 1rem 0 1rem'};\r\n`;\r\n\r\nconst StyledProfileButton = styled(ProfileButton)`\r\n margin: 0.5rem 1rem 6rem;\r\n`;\r\n\r\ntype SideMenuProps = {\r\n isCollapsible: boolean;\r\n navigationLinks: NavigationLink[];\r\n};\r\n\r\nconst SideMenuLink = React.forwardRef(\r\n ({ to, ...rest }: NavLinkProps, ref) =>\r\n to.toString().startsWith('http') ? (\r\n // eslint-disable-next-line jsx-a11y/anchor-has-content\r\n \r\n ) : (\r\n \r\n )\r\n);\r\n\r\nconst SideMenu: FC = ({\r\n isCollapsible,\r\n navigationLinks,\r\n ...props\r\n}) => {\r\n const { t } = useTranslation('common');\r\n\r\n const [isCollapsed, setCollapsed] = useState(false);\r\n\r\n return (\r\n \r\n \r\n {isCollapsible && (\r\n \r\n {\r\n setCollapsed((collapsed) => !collapsed);\r\n }}\r\n >\r\n {isCollapsed ? : }\r\n \r\n \r\n )}\r\n \r\n {navigationLinks.map(({ path, name, icon }) => (\r\n \r\n {icon && {icon}}\r\n {!isCollapsed && {t(`Menu.${name}`)}}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default SideMenu;\r\n","import React, { useState } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\n\r\nimport { Menu } from '@material-ui/icons';\r\nimport { IconButton } from '@material-ui/core';\r\n\r\nimport { colors, defaultBorder, zIndex } from 'styles';\r\n\r\nimport Button from 'components/controls/button/Button';\r\nimport LanguageSelector from './components/LanguageSelector';\r\nimport ProfileButton from './components/ProfileButton';\r\nimport { Link, LinkProps } from 'react-router-dom';\r\nimport { paths } from 'constants/paths';\r\nimport AppLogo from 'components/app-logo/AppLogo';\r\n\r\nimport useCurrentUserInfo from 'hooks/useCurrentUserInfo';\r\nimport { CustomerUserInformation } from 'types/userInfo';\r\n\r\nconst TopMenuSection = styled.section`\r\n padding: 0 1rem;\r\n height: 4.5rem;\r\n background-color: ${colors.background};\r\n color: ${colors.mainText};\r\n\r\n display: flex;\r\n align-items: center;\r\n position: relative;\r\n gap: 1rem;\r\n\r\n & .MuiInputBase-input {\r\n padding-top: 0;\r\n padding-bottom: 0;\r\n }\r\n`;\r\n\r\nconst StyledSelector = styled(LanguageSelector)`\r\n color: ${colors.mainText};\r\n margin-left: auto;\r\n\r\n & .MuiSelect-icon {\r\n color: ${colors.mainText};\r\n }\r\n`;\r\n\r\nconst ButtonSection = styled.div`\r\n position: absolute;\r\n width: 100%;\r\n top: 100%;\r\n left: 0;\r\n z-index: ${zIndex.overContent};\r\n padding: 0 1rem 1rem;\r\n display: flex;\r\n gap: 0.5rem;\r\n background-color: ${colors.background};\r\n border-bottom: ${defaultBorder};\r\n`;\r\n\r\nconst AppLogoHeader = styled(AppLogo)`\r\n align-items: center;\r\n justify-content: center;\r\n flex: 0 0 auto;\r\n`;\r\n\r\nconst StyledIconButton = styled(IconButton)`\r\n color: ${colors.textButton.text};\r\n padding: 0;\r\n`;\r\n\r\nconst CreateSessionLink = React.forwardRef>(\r\n (props, ref) => (\r\n \r\n )\r\n);\r\n\r\nconst ManualInputLink = React.forwardRef>(\r\n (props, ref) => \r\n);\r\n\r\nconst TopMenu = ({ ...rest }) => {\r\n const { t } = useTranslation(['customer', 'common']);\r\n const [collapsed, setCollapsed] = useState(true);\r\n const { user } = useCurrentUserInfo();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {user?.canStartAssessment && (\r\n setCollapsed((c) => !c)}\r\n >\r\n \r\n \r\n )}\r\n {!collapsed && (\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default TopMenu;\r\n","import React from 'react';\r\nimport { NavLink, NavLinkProps } from 'react-router-dom';\r\n\r\nconst SideMenuLink = React.forwardRef(\r\n ({ to, ...rest }: NavLinkProps, ref) =>\r\n to.toString().startsWith('http') ? (\r\n // eslint-disable-next-line jsx-a11y/anchor-has-content\r\n \r\n ) : (\r\n \r\n )\r\n);\r\n\r\nexport default SideMenuLink;\r\n","import React, { useState } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\n\r\nimport { ListItem, ListItemIcon, Menu, MenuItem } from '@material-ui/core';\r\nimport { Menu as MenuIcon } from '@material-ui/icons';\r\n\r\nimport { colors } from 'styles';\r\nimport { NavigationLink } from 'types/navigationLink';\r\n\r\nimport SideMenuLink from './SideMenuLink';\r\n\r\nconst MoreListItem = styled(ListItem)`\r\n ${(props) => props.hidden && 'visibility: hidden'}\r\n`;\r\n\r\nconst MoreItemIcon = styled(ListItemIcon)`\r\n color: ${colors.accentPrimaryText};\r\n`;\r\n\r\nconst MoreMenuItems = React.forwardRef<\r\n HTMLDivElement,\r\n { navigationLinks: NavigationLink[] }\r\n>(({ navigationLinks }, ref) => {\r\n const { t } = useTranslation('common');\r\n\r\n const [anchorEl, setAnchorEl] = useState(null);\r\n\r\n const handleClick = (event: React.MouseEvent) => {\r\n setAnchorEl(event.currentTarget);\r\n };\r\n\r\n const handleClose = () => {\r\n setAnchorEl(null);\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n );\r\n});\r\n\r\nexport default MoreMenuItems;\r\n","import { useEffect, useRef, useState } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\n\r\nimport { List, ListItem, ListItemIcon } from '@material-ui/core';\r\n\r\nimport { colors } from 'styles';\r\nimport { NavigationLink } from 'types/navigationLink';\r\n\r\nimport SideMenuLink from './components/SideMenuLink';\r\nimport MoreMenuItems from './components/MoreMenuItems';\r\n\r\nconst Footer = styled.footer`\r\n height: 3.5rem;\r\n background-color: ${colors.accentBackground};\r\n color: ${colors.accentPrimaryText};\r\n\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst NavigationMenuList = styled(List)`\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n overflow: hidden;\r\n\r\n display: flex;\r\n justify-content: space-around;\r\n\r\n & .MuiListItem-root {\r\n width: auto;\r\n padding: 0.75rem;\r\n }\r\n\r\n & .MuiListItemIcon-root {\r\n min-width: 1.5rem;\r\n }\r\n`;\r\n\r\nconst FooterMenu = ({\r\n navigationLinks,\r\n ...rest\r\n}: {\r\n navigationLinks: NavigationLink[];\r\n}) => {\r\n useTranslation(['customer', 'common']); // HACK: verify that translations loaded, so we are not under suspense\r\n\r\n const [visibleNavs, setVisibleNavs] = useState(1);\r\n\r\n const navListRef = useRef(null);\r\n const listItemRef = useRef(null);\r\n const moreItemsRef = useRef(null);\r\n\r\n useEffect(() => {\r\n // does not blink. opt for useLayoutEffect?\r\n const measureItems = () => {\r\n if (navListRef.current && listItemRef.current && moreItemsRef.current) {\r\n const navListWidth = navListRef.current.offsetWidth;\r\n const moreMenuWidth = moreItemsRef.current.offsetWidth;\r\n const listItemWidth = listItemRef.current.offsetWidth;\r\n\r\n setVisibleNavs((navListWidth - moreMenuWidth) / listItemWidth);\r\n }\r\n };\r\n\r\n measureItems();\r\n window.addEventListener('resize', measureItems);\r\n\r\n return () => window.removeEventListener('resize', measureItems);\r\n }, [navigationLinks]);\r\n\r\n return (\r\n
\r\n \r\n {navigationLinks.length && (\r\n \r\n {navigationLinks[0].icon && (\r\n {navigationLinks[0].icon}\r\n )}\r\n \r\n )}\r\n\r\n {navigationLinks.slice(1, visibleNavs).map(({ path, icon }) => (\r\n \r\n {icon && {icon}}\r\n \r\n ))}\r\n {visibleNavs > 0 && (\r\n \r\n )}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default FooterMenu;\r\n","import { NavigationLink } from 'types/navigationLink';\r\nimport { Role } from 'types/auth';\r\nimport {\r\n AdministratorInformation,\r\n CustomerUserInformation,\r\n} from 'types/userInfo';\r\n\r\nimport { paths } from 'constants/paths';\r\n\r\nimport {\r\n Aseba,\r\n Batches,\r\n Credits,\r\n Dashboard,\r\n Manual,\r\n Respondents,\r\n Results,\r\n Sessions,\r\n Templates,\r\n Users,\r\n} from 'components/icons/icons';\r\n\r\nimport { generateNakladaSlapRedirectUrl } from './redirectFunctions';\r\n\r\nexport const getNavigationLinks = (\r\n role: Role,\r\n userInfo: CustomerUserInformation | AdministratorInformation\r\n) => {\r\n let links: Array = [];\r\n\r\n if (role === 'Administrator') {\r\n const info = userInfo as AdministratorInformation;\r\n\r\n links = [\r\n { name: 'Requests', path: paths.admin.requests },\r\n { name: 'Companies', path: paths.admin.companies },\r\n { name: 'CustomerUsers', path: paths.admin.users },\r\n ];\r\n\r\n if (info.canManageAdministrators) {\r\n links.push({ name: 'Administrators', path: paths.admin.administrators });\r\n }\r\n\r\n if (info.canImportInstruments) {\r\n links.push({ name: 'Instruments', path: paths.admin.instruments });\r\n }\r\n\r\n links.push({ name: 'Instances', path: paths.admin.instances });\r\n\r\n if (info.canManageAdministrators && info.canImportInstruments) {\r\n links.push({ name: 'EmailHistory', path: paths.admin.emailHistory });\r\n }\r\n } else if (role === 'Customer') {\r\n const info = userInfo as CustomerUserInformation;\r\n\r\n links = [\r\n {\r\n name: 'Dashboard',\r\n path: paths.customer.dashboard,\r\n icon: ,\r\n },\r\n ];\r\n\r\n if (info.canManageRespondents) {\r\n links.push({\r\n name: 'Respondents',\r\n path: paths.customer.respondents,\r\n icon: ,\r\n });\r\n }\r\n\r\n if (info.canStartAssessment) {\r\n links.push({\r\n name: 'Sessions',\r\n path: paths.customer.sessions,\r\n icon: ,\r\n });\r\n }\r\n\r\n if (info.canViewResults) {\r\n links.push({\r\n name: 'Results',\r\n path: paths.customer.results,\r\n icon: ,\r\n });\r\n }\r\n\r\n links.push({\r\n name: 'Credits',\r\n path: paths.customer.credits,\r\n icon: ,\r\n });\r\n\r\n if (info.canManageBatches) {\r\n links.push({\r\n name: 'Batches',\r\n path: paths.customer.batches,\r\n icon: ,\r\n });\r\n }\r\n\r\n if (info.canManageEmailTemplates || info.canManageMessageTemplates) {\r\n links.push({\r\n name: 'Templates',\r\n path: paths.customer.templates,\r\n icon: ,\r\n });\r\n }\r\n\r\n if (info.canManageUsers) {\r\n links.push({\r\n name: 'Users',\r\n path: paths.customer.users,\r\n icon: ,\r\n });\r\n }\r\n\r\n links.push({\r\n name: 'Manual',\r\n path: generateNakladaSlapRedirectUrl('manual'),\r\n icon: ,\r\n });\r\n\r\n links.push({\r\n name: 'ASEBA',\r\n path: generateNakladaSlapRedirectUrl('ASEBA'),\r\n icon: ,\r\n });\r\n }\r\n\r\n return links;\r\n};\r\n","import { Trans } from 'react-i18next';\r\nimport styled from 'styled-components';\r\nimport { colors, fontSize } from 'styles';\r\n\r\nconst StyledLink = styled.a`\r\n color: ${colors.primary};\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n text-transform: uppercase;\r\n text-decoration: none;\r\n`;\r\n\r\nconst CommonFooter = styled(({ ...rest }) => {\r\n return (\r\n
\r\n \r\n Copyright © 2021{' '}\r\n \r\n Naklada Slap\r\n \r\n , privately owned and operated since 1985. All rights reserved.\r\n \r\n
\r\n );\r\n})`\r\n background-color: ${colors.footer};\r\n font-size: ${fontSize.mainText};\r\n padding: 0.25rem;\r\n text-align: center;\r\n`;\r\n\r\nexport default CommonFooter;\r\n","import { ReactNode } from 'react';\r\nimport { useLocation } from 'react-router-dom';\r\n\r\nimport styled from 'styled-components';\r\n\r\nimport { useDeviceType } from 'providers/DeviceTypeProvider';\r\nimport useCurrentUser from 'hooks/useCurrentUser';\r\nimport useCurrentUserInfo from 'hooks/useCurrentUserInfo';\r\n\r\nimport {\r\n AdministratorInformation,\r\n CustomerUserInformation,\r\n} from 'types/userInfo';\r\nimport { DeviceType } from 'types/deviceTypes';\r\n\r\nimport SideMenu from 'components/side-menu/SideMenu';\r\nimport TopMenu from 'components/side-menu/TopMenu';\r\nimport FooterMenu from 'components/side-menu/FooterMenu';\r\n\r\nimport { getNavigationLinks } from 'utils/getNavigationLinks';\r\nimport CommonFooter from 'components/page/CommonFooter';\r\nimport { paths } from 'constants/paths';\r\n\r\nconst StyledMain = styled.main<{ $mobile: boolean }>`\r\n height: 100%;\r\n\r\n display: flex;\r\n overflow: hidden;\r\n ${(prop) => (prop.$mobile ? 'flex-direction: column' : 'flex-direction: row')}\r\n`;\r\n\r\nconst StyledMenu = styled(SideMenu)`\r\n flex: 0 0 auto;\r\n`;\r\n\r\nconst StyledTopMenu = styled(TopMenu)`\r\n flex: 0 0 auto;\r\n`;\r\n\r\nconst StyledFooterMenu = styled(FooterMenu)`\r\n flex: 0 0 auto;\r\n`;\r\n\r\nconst MainContentWrapper = styled.div`\r\n flex: 1 1 auto;\r\n overflow: hidden;\r\n\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst DesktopFooter = styled(CommonFooter)`\r\n flex: 0 0 auto;\r\n margin-top: auto;\r\n`;\r\n\r\nconst MobileLayout = ({ children }: { children: ReactNode }) => {\r\n const { user } = useCurrentUser();\r\n const { user: userInfo } = useCurrentUserInfo<\r\n CustomerUserInformation | AdministratorInformation\r\n >();\r\n const location = useLocation();\r\n\r\n const isAdminMenu = user?.role === 'Administrator';\r\n const isWizard =\r\n location.pathname.startsWith(paths.customer.manualInput) ||\r\n location.pathname.startsWith(paths.customer.createSession);\r\n\r\n return (\r\n \r\n {user && userInfo && !isAdminMenu && !isWizard && }\r\n {children}\r\n {user && userInfo && !isWizard && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nconst DesktopLayout = ({ children }: { children: ReactNode }) => {\r\n const { user } = useCurrentUser();\r\n const { user: userInfo } = useCurrentUserInfo<\r\n CustomerUserInformation | AdministratorInformation\r\n >();\r\n const isAdminMenu = user?.role === 'Administrator';\r\n\r\n return (\r\n \r\n {user && userInfo && (\r\n \r\n )}\r\n \r\n {children}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst ApplicationLayout = ({ children }: { children: ReactNode }) => {\r\n const { user } = useCurrentUser();\r\n const deviceType = useDeviceType();\r\n\r\n return (\r\n <>\r\n {deviceType === DeviceType.Desktop || user?.role === 'Administrator' ? (\r\n {children}\r\n ) : (\r\n {children}\r\n )}\r\n \r\n );\r\n};\r\n\r\nconst AssessmentLayout = ({ children }: { children: ReactNode }) => {\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nexport { ApplicationLayout, AssessmentLayout };\r\n","import { FC, ReactElement } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\n\r\nimport { FormTextField } from 'components/form';\r\nimport Button from 'components/controls/button/Button';\r\n\r\nconst InputSection = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n overflow-y: auto;\r\n padding: 0 1rem 0 1rem;\r\n`;\r\n\r\nconst StyledButton = styled(Button)`\r\n margin: 0 1rem 0 1rem;\r\n`;\r\n\r\nconst CityInfo = styled.div`\r\n display: flex;\r\n gap: 1rem;\r\n & :nth-child(1) {\r\n flex: 2;\r\n }\r\n & :nth-child(2) {\r\n flex: 1;\r\n }\r\n`;\r\n\r\nconst RegistrationCompanyForm: FC = (): ReactElement => {\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\n \r\n \r\n {t('Registration.NextButtonLabel')}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default RegistrationCompanyForm;\r\n","import { FC, ReactElement } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\n\r\nimport { FormTextField, FormSelect } from 'components/form';\r\nimport Button from 'components/controls/button/Button';\r\nimport Progress from 'components/controls/progress/Progress';\r\n\r\nimport { Education } from 'types/education';\r\nimport { enumKeysAsTranslatedSelectOptions } from 'utils/enumFunctions';\r\n\r\nconst InputSection = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n overflow-y: auto;\r\n padding: 0 1rem 0 1rem;\r\n position: relative;\r\n`;\r\n\r\nconst ButtonSection = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n & :nth-child(1) {\r\n flex: 1;\r\n }\r\n & :nth-child(2) {\r\n margin-left: 1rem;\r\n flex: 1;\r\n }\r\n padding: 0 1rem 0 1rem;\r\n`;\r\n\r\ntype RegistrationUserFormProps = {\r\n onBackClick(): void;\r\n isSubmitting: boolean;\r\n};\r\n\r\nconst RegistrationUserForm: FC = ({\r\n onBackClick,\r\n isSubmitting,\r\n}): ReactElement => {\r\n const { t } = useTranslation('common');\r\n\r\n const educationOptions = enumKeysAsTranslatedSelectOptions(\r\n Education,\r\n (key: string) => t(`Education.${key}`)\r\n );\r\n\r\n return (\r\n <>\r\n \r\n {isSubmitting && }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default RegistrationUserForm;\r\n","import { FC, ReactElement } from 'react';\r\nimport styled from 'styled-components';\r\nimport * as yup from 'yup';\r\nimport { Formik, Form as FormikForm } from 'formik';\r\nimport { fontWeight, colors, fontSize } from 'styles';\r\nimport { Typography } from '@material-ui/core';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nimport RegistrationCompanyForm from './RegistrationCompanyForm';\r\nimport RegistrationUserForm from './RegistrationUserForm';\r\n\r\nimport { Registration } from 'types/registration';\r\nimport { trimObjectProperties } from 'utils/objectFunctions';\r\n\r\nconst phoneRegExp = /^[+]?[-\\s.0-9]*?[(]{0,1}[0-9]+[)]{0,1}[-\\s./0-9]*$/;\r\n\r\nconst yearRegExp = /^(19|20)\\d{2}$/;\r\n\r\nconst trimmedString = yup.string().trim();\r\n\r\nconst StyledForm = styled(FormikForm)`\r\n display: flex;\r\n flex-direction: column;\r\n min-height: 0;\r\n min-width: 16rem;\r\n\r\n & .MuiTypography-h2 {\r\n font-weight: ${fontWeight.regular};\r\n text-align: center;\r\n font-size: ${fontSize.h6};\r\n margin-top: 0.625rem;\r\n }\r\n\r\n & .MuiFormControl-root,\r\n .MuiButton-root {\r\n margin-top: 1.25rem;\r\n }\r\n`;\r\n\r\nconst FormHeading = styled.div`\r\n font-weight: ${fontWeight.bold};\r\n letter-spacing: 1.25px;\r\n text-transform: uppercase;\r\n color: ${colors.headerText};\r\n margin-top: 0.625rem;\r\n`;\r\n\r\ntype RegistrationContentProps = {\r\n handleSubmit(values: Registration): Promise;\r\n page: 'company' | 'user';\r\n onSetPage(page: 'company' | 'user'): void;\r\n};\r\n\r\nconst RegistrationContent: FC = ({\r\n handleSubmit,\r\n page,\r\n onSetPage,\r\n}): ReactElement => {\r\n const { t } = useTranslation('common');\r\n\r\n const initialValues: Registration = {\r\n organizationName: '',\r\n vatId: '',\r\n address: '',\r\n city: '',\r\n zipCode: '',\r\n phone: '',\r\n fax: '',\r\n email: '',\r\n adminUser: {\r\n nakladaSlapId: '',\r\n firstName: '',\r\n lastName: '',\r\n email: '',\r\n occupation: '',\r\n workingPlace: '',\r\n education: '',\r\n graduatedFrom: '',\r\n graduationYear: undefined,\r\n phone: '',\r\n contractNumber: '',\r\n },\r\n };\r\n\r\n const companyValidationSchema = yup.object({\r\n organizationName: trimmedString\r\n .required(t('Errors.Required'))\r\n .max(100, t('Errors.MaxCharacters', { count: 100 })),\r\n vatId: trimmedString\r\n .required(t('Errors.Required'))\r\n .max(20, t('Errors.MaxCharacters', { count: 20 })),\r\n address: trimmedString\r\n .required(t('Errors.Required'))\r\n .max(200, t('Errors.MaxCharacters', { count: 200 })),\r\n city: trimmedString\r\n .required(t('Errors.Required'))\r\n .max(100, t('Errors.MaxCharacters', { count: 100 })),\r\n zipCode: trimmedString\r\n .required(t('Errors.Required'))\r\n .max(20, t('Errors.MaxCharacters', { count: 20 })),\r\n phone: trimmedString\r\n .required(t('Errors.Required'))\r\n .max(50, t('Errors.MaxCharacters', { count: 50 }))\r\n .matches(phoneRegExp, t('Errors.NotValidPhoneNumber')),\r\n fax: trimmedString.max(50, t('Errors.MaxCharacters', { count: 50 })),\r\n email: trimmedString\r\n .required(t('Errors.Required'))\r\n .email(t('Errors.NotValidEmail'))\r\n .max(254, t('Errors.MaxCharacters', { count: 254 })),\r\n });\r\n\r\n const userValidationSchema = yup.object({\r\n adminUser: yup.object({\r\n nakladaSlapId: trimmedString.max(\r\n 32,\r\n t('Errors.MaxCharacters', { count: 32 })\r\n ),\r\n firstName: trimmedString\r\n .required(t('Errors.Required'))\r\n .max(100, t('Errors.MaxCharacters', { count: 100 })),\r\n lastName: trimmedString\r\n .required(t('Errors.Required'))\r\n .max(100, t('Errors.MaxCharacters', { count: 100 })),\r\n email: trimmedString\r\n .required(t('Errors.Required'))\r\n .email(t('Errors.NotValidEmail'))\r\n .max(254, t('Errors.MaxCharacters', { count: 254 })),\r\n occupation: trimmedString.max(\r\n 100,\r\n t('Errors.MaxCharacters', { count: 100 })\r\n ),\r\n workingPlace: trimmedString.max(\r\n 100,\r\n t('Errors.MaxCharacters', { count: 100 })\r\n ),\r\n education: yup.number().required(t('Errors.Required')),\r\n graduatedFrom: trimmedString.max(\r\n 200,\r\n t('Errors.MaxCharacters', { count: 200 })\r\n ),\r\n graduationYear: trimmedString.matches(\r\n yearRegExp,\r\n t('common:Errors.NotValidDate')\r\n ),\r\n phone: trimmedString\r\n .max(50, t('Errors.MaxCharacters', { count: 50 }))\r\n .matches(phoneRegExp, t('Errors.NotValidPhoneNumber')),\r\n contractNumber: trimmedString,\r\n }),\r\n });\r\n\r\n return (\r\n \r\n handleSubmit({\r\n ...trimObjectProperties(values),\r\n adminUser: {\r\n ...trimObjectProperties(values.adminUser),\r\n graduationYear: values.adminUser.graduationYear || undefined,\r\n },\r\n })\r\n }\r\n >\r\n {({ isSubmitting }) => (\r\n \r\n {page === 'company' ? (\r\n <>\r\n \r\n
1/2
\r\n \r\n {t('Registration.CompanyInfoHeading')}\r\n \r\n
\r\n \r\n \r\n ) : (\r\n <>\r\n \r\n
2/2
\r\n {t('Registration.UserInfoHeading')}\r\n
\r\n onSetPage('company')}\r\n isSubmitting={isSubmitting}\r\n />\r\n \r\n )}\r\n
\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default RegistrationContent;\r\n","import { useState } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\nimport { useHistory } from 'react-router-dom';\r\n\r\nimport { colors, fontWeight } from 'styles';\r\n\r\nimport { useShowAlert } from 'hooks/useShowAlert';\r\nimport { post } from 'apis/api';\r\nimport { paths } from 'constants/paths';\r\nimport { Registration as RegistrationTypes } from 'types/registration';\r\n\r\nimport RegistrationContent from './components/RegistrationContent';\r\nimport { ValidationError } from 'types/errors';\r\nimport PanePageLayout from 'components/page/PanePageLayout';\r\n\r\nconst LoginLabel = styled.p`\r\n margin: 0.5rem 0 0;\r\n text-align: center;\r\n\r\n & a {\r\n color: ${colors.primary};\r\n font-weight: ${fontWeight.bold};\r\n text-decoration: none;\r\n }\r\n`;\r\n\r\nconst Registration = () => {\r\n const { t } = useTranslation('common');\r\n const history = useHistory();\r\n const { showError } = useShowAlert();\r\n\r\n const [page, setPage] = useState<'company' | 'user'>('company');\r\n\r\n const handleRegister = async (values: RegistrationTypes) => {\r\n if ('company' === page) {\r\n setPage('user');\r\n } else {\r\n try {\r\n await post('/registrations', values);\r\n history.push(paths.app.login);\r\n } catch (err) {\r\n if (err instanceof ValidationError) {\r\n const validationError = err as ValidationError;\r\n if (validationError.errors.length) {\r\n showError(t(`ServerErrors.${validationError.errors[0].code}`));\r\n }\r\n } else {\r\n showError(err);\r\n }\r\n }\r\n }\r\n };\r\n\r\n return (\r\n \r\n setPage(page)}\r\n />\r\n \r\n {t('Registration.AlreadyRegisteredLabel')} \r\n {t('Registration.LoginLink')}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default Registration;\r\n","import { FC, ReactElement } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { Formik, Form as FormikForm } from 'formik';\r\nimport styled from 'styled-components';\r\nimport * as yup from 'yup';\r\n\r\nimport { FormTextField } from 'components/form';\r\nimport Button from 'components/controls/button/Button';\r\n\r\nimport { RegisterParameters } from 'types/auth';\r\n\r\nconst StyledForm = styled(FormikForm)`\r\n display: flex;\r\n flex-direction: column;\r\n min-width: 16rem;\r\n\r\n & .MuiTextField-root,\r\n .MuiButton-root {\r\n margin-top: 1.5rem;\r\n }\r\n\r\n & a {\r\n margin-top: 0.5rem;\r\n }\r\n`;\r\n\r\nexport type RegistrationFormParameters = Omit & {\r\n confirmPassword: string;\r\n};\r\n\r\ntype CompleteRegistrationFormProps = {\r\n email: string;\r\n onSetPassword: (parameters: RegistrationFormParameters) => void;\r\n};\r\n\r\nconst CompleteRegistrationForm: FC = ({\r\n email,\r\n onSetPassword,\r\n}): ReactElement => {\r\n const { t } = useTranslation('common');\r\n\r\n const initialValues: RegistrationFormParameters = {\r\n email: email,\r\n newPassword: '',\r\n confirmPassword: '',\r\n };\r\n\r\n const completeRegistrationSchema: yup.SchemaOf = yup.object(\r\n {\r\n email: yup\r\n .string()\r\n .email(t('common:Errors.NotValidEmail'))\r\n .max(254, t('common:Errors.MaxCharacters', { count: 254 }))\r\n .required(t('Errors.Required')),\r\n newPassword: yup\r\n .string()\r\n .min(6, t('CompleteRegistration.PasswordMinLength', { length: 8 }))\r\n .required(t('CompleteRegistration.PasswordIsRequired')),\r\n confirmPassword: yup\r\n .string()\r\n .when('newPassword', {\r\n is: (val: string) => (val && val.length > 0 ? true : false),\r\n then: yup\r\n .string()\r\n .oneOf(\r\n [yup.ref('newPassword')],\r\n t('CompleteRegistration.PasswordsNeedToBeSameError')\r\n ),\r\n })\r\n .required(t('CompleteRegistration.PasswordIsRequired')),\r\n }\r\n );\r\n\r\n return (\r\n \r\n {({ isSubmitting }) => (\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 CompleteRegistrationForm;\r\n","import { useState } from 'react';\r\nimport { useHistory, useLocation } from 'react-router-dom';\r\nimport { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\nimport queryString from 'query-string';\r\n\r\nimport { colors } from 'styles';\r\nimport { paths } from 'constants/paths';\r\n\r\nimport CompleteRegistrationForm, {\r\n RegistrationFormParameters,\r\n} from './components/CompleteRegistrationForm';\r\nimport { ValidationError } from 'types/errors';\r\nimport { RegisterParameters } from 'types/auth';\r\nimport { post } from 'apis/api';\r\nimport PanePageLayout from 'components/page/PanePageLayout';\r\n\r\nconst ExplanationText = styled.p`\r\n margin: 0.5rem 0 0;\r\n text-align: center;\r\n`;\r\n\r\nconst SignInError = styled.p`\r\n margin: 0.5rem 0 0;\r\n text-align: center;\r\n color: ${colors.error};\r\n`;\r\n\r\nconst useRegistrationParams = () => {\r\n const { search } = useLocation();\r\n const { email, token } = queryString.parse(search, { decode: false });\r\n\r\n return { email: email as string | null, token: token as string | null };\r\n};\r\n\r\nconst CompleteRegistration = () => {\r\n const { t } = useTranslation('common');\r\n const [passwordError, setError] = useState(null);\r\n const history = useHistory();\r\n\r\n const { email, token } = useRegistrationParams();\r\n\r\n const handleSetPassword = async ({\r\n email,\r\n newPassword,\r\n }: RegistrationFormParameters) => {\r\n try {\r\n setError(null);\r\n\r\n if (token) {\r\n const registrationParameters: RegisterParameters = {\r\n email: email,\r\n token: token,\r\n newPassword: newPassword,\r\n };\r\n\r\n await post(\r\n '/authentication/complete-registration',\r\n registrationParameters\r\n );\r\n\r\n history.push(paths.app.login);\r\n }\r\n } catch (err) {\r\n let errorMessage;\r\n\r\n if (err instanceof ValidationError) {\r\n const validationError = err as ValidationError;\r\n\r\n if (validationError.errors.length) {\r\n errorMessage = t(`ServerErrors.${validationError.errors[0].code}`);\r\n }\r\n }\r\n\r\n setError(\r\n errorMessage ?? t('CompleteRegistration.FailedToSetPasswordError')\r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {t('CompleteRegistration.CompleteRegistrationText')}\r\n \r\n \r\n {passwordError && {passwordError}}\r\n \r\n );\r\n};\r\n\r\nexport default CompleteRegistration;\r\n","import { useState } from 'react';\r\nimport { useHistory, useLocation } from 'react-router-dom';\r\nimport { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\nimport queryString from 'query-string';\r\n\r\nimport { colors } from 'styles';\r\nimport { paths } from 'constants/paths';\r\nimport { ValidationError } from 'types/errors';\r\nimport { post } from 'apis/api';\r\n\r\nimport Button from 'components/controls/button/Button';\r\nimport PanePageLayout from 'components/page/PanePageLayout';\r\n\r\nconst EmailConfirmError = styled.p`\r\n margin: 0.5rem 0 0;\r\n text-align: center;\r\n color: ${colors.error};\r\n`;\r\n\r\nconst ExplanationText = styled.p`\r\n margin: 0.5rem 0 1.5rem;\r\n text-align: center;\r\n`;\r\n\r\nconst useEmailConfirmationParams = () => {\r\n const { search } = useLocation();\r\n const { from, to, token } = queryString.parse(search, {\r\n decode: false,\r\n });\r\n\r\n return {\r\n oldEmail: from as string | null,\r\n newEmail: to as string | null,\r\n token: token as string | null,\r\n };\r\n};\r\n\r\nconst ConfirmEmail = () => {\r\n const { t } = useTranslation('common');\r\n const [emailConfirmError, setError] = useState(null);\r\n const [isSubmitting, setSubmitting] = useState(false);\r\n\r\n const history = useHistory();\r\n\r\n const { oldEmail, newEmail, token } = useEmailConfirmationParams();\r\n\r\n const handleConfirmEmail = async () => {\r\n try {\r\n setError(null);\r\n setSubmitting(true);\r\n\r\n if (token) {\r\n await post(`/authentication/confirm-email`, {\r\n oldEmail,\r\n newEmail,\r\n token,\r\n });\r\n\r\n history.push(paths.app.login);\r\n }\r\n } catch (err) {\r\n let errorMessage;\r\n\r\n if (err instanceof ValidationError) {\r\n const validationError = err as ValidationError;\r\n\r\n if (validationError.errors.length) {\r\n errorMessage = t(`ServerErrors.${validationError.errors[0].code}`);\r\n }\r\n }\r\n\r\n setError(errorMessage ?? t('ConfirmEmail.FailedToConfirmEmailError'));\r\n } finally {\r\n setSubmitting(false);\r\n }\r\n };\r\n\r\n return (\r\n \r\n {t('ConfirmEmail.ConfirmEmailText')}\r\n \r\n {t('ConfirmEmail.NewEmailText')}: \r\n {newEmail}\r\n \r\n \r\n {t('ConfirmEmail.ConfirmEmailButton')}\r\n \r\n {emailConfirmError && (\r\n {emailConfirmError}\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default ConfirmEmail;\r\n","import { FC } from 'react';\r\nimport { Route, RouteProps, Redirect } from 'react-router-dom';\r\n\r\nimport useCurrentUser from 'hooks/useCurrentUser';\r\nimport { paths } from 'constants/paths';\r\nimport { Role } from 'types/auth';\r\n\r\ntype PrivateRouteProps = RouteProps & {\r\n redirectPath?: string;\r\n role?: Role;\r\n};\r\n\r\nconst PrivateRoute: FC = ({\r\n redirectPath,\r\n role,\r\n ...rest\r\n}) => {\r\n const { user } = useCurrentUser();\r\n const validRole = !role || role === user?.role;\r\n\r\n if (user && validRole) {\r\n return ;\r\n } else {\r\n return ;\r\n }\r\n};\r\n\r\nexport default PrivateRoute;\r\n","import { FC } from 'react';\r\nimport { Route, RouteProps, Redirect } from 'react-router-dom';\r\n\r\nimport useCurrentUser from 'hooks/useCurrentUser';\r\nimport { paths } from 'constants/paths';\r\n\r\ntype PublicRouteProps = RouteProps & {\r\n redirectPath?: string;\r\n restrictedForAuth?: boolean;\r\n};\r\n\r\nconst PublicRoute: FC = ({\r\n redirectPath,\r\n restrictedForAuth,\r\n ...rest\r\n}) => {\r\n const { user } = useCurrentUser();\r\n\r\n if (user && restrictedForAuth) {\r\n const pathByRole =\r\n user.role === 'Administrator' ? paths.app.admin : paths.app.customer;\r\n\r\n return (\r\n \r\n );\r\n } else {\r\n return ;\r\n }\r\n};\r\n\r\nexport default PublicRoute;\r\n","import { FC, ReactElement } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { Formik, Form as FormikForm } from 'formik';\r\nimport styled from 'styled-components';\r\nimport * as yup from 'yup';\r\n\r\nimport { FormTextField } from 'components/form';\r\nimport Button from 'components/controls/button/Button';\r\nimport { ForgotPasswordParameters } from 'types/auth';\r\n\r\nconst StyledForm = styled(FormikForm)`\r\n display: flex;\r\n flex-direction: column;\r\n min-width: 16rem;\r\n\r\n & .MuiTextField-root,\r\n .MuiButton-root {\r\n margin-top: 1.5rem;\r\n }\r\n\r\n & a {\r\n margin-top: 0.5rem;\r\n }\r\n`;\r\n\r\ntype RecoverPasswordFormProps = {\r\n onRecover: (parameters: ForgotPasswordParameters) => void;\r\n};\r\n\r\nconst RecoverPasswordForm: FC = ({\r\n onRecover,\r\n}): ReactElement => {\r\n const { t } = useTranslation('common');\r\n\r\n const initialValues: ForgotPasswordParameters = {\r\n email: '',\r\n };\r\n\r\n const recoverPasswordSchema: yup.SchemaOf = yup.object(\r\n {\r\n email: yup\r\n .string()\r\n .trim()\r\n .email(t('common:Errors.NotValidEmail'))\r\n .max(254, t('Errors.MaxCharacters', { count: 254 }))\r\n .required(t('Errors.Required')),\r\n }\r\n );\r\n\r\n return (\r\n onRecover({ email: values.email.trim() })}\r\n >\r\n {({ isSubmitting }) => (\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default RecoverPasswordForm;\r\n","import { FC, ReactElement } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { Formik, Form as FormikForm } from 'formik';\r\nimport styled from 'styled-components';\r\n\r\nimport { FormTextField } from 'components/form';\r\nimport Button from 'components/controls/button/Button';\r\n\r\nconst StyledForm = styled(FormikForm)`\r\n display: flex;\r\n flex-direction: column;\r\n min-width: 16rem;\r\n\r\n & .MuiTextField-root,\r\n .MuiButton-root {\r\n margin-top: 1.5rem;\r\n }\r\n\r\n & a {\r\n margin-top: 0.5rem;\r\n }\r\n`;\r\n\r\nexport type SetNewPasswordFormParameters = {\r\n newPassword: string;\r\n};\r\n\r\ntype SetNewPasswordFormProps = {\r\n onSetPassword: (parameters: SetNewPasswordFormParameters) => void;\r\n};\r\n\r\nconst SetNewPasswordForm: FC = ({\r\n onSetPassword,\r\n}): ReactElement => {\r\n const { t } = useTranslation('common');\r\n\r\n const initialValues: SetNewPasswordFormParameters = {\r\n newPassword: '',\r\n };\r\n\r\n return (\r\n \r\n {({ isSubmitting }) => (\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default SetNewPasswordForm;\r\n","import { useState } from 'react';\r\nimport { useHistory, useLocation } from 'react-router-dom';\r\nimport { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\nimport queryString from 'query-string';\r\n\r\nimport { colors } from 'styles';\r\nimport { paths } from 'constants/paths';\r\nimport { ValidationError } from 'types/errors';\r\nimport { post } from 'apis/api';\r\n\r\nimport RecoverPasswordForm from './RecoverPasswordForm';\r\nimport { ForgotPasswordParameters } from 'types/auth';\r\nimport SetNewPasswordForm, {\r\n SetNewPasswordFormParameters,\r\n} from './SetNewPasswordForm';\r\nimport PanePageLayout from 'components/page/PanePageLayout';\r\n\r\nconst PasswordRecoveryError = styled.p`\r\n margin: 0.5rem 0 0;\r\n text-align: center;\r\n color: ${colors.error};\r\n`;\r\n\r\nconst ExplanationText = styled.p`\r\n margin: 0.5rem 0 0;\r\n text-align: center;\r\n`;\r\n\r\nconst useForgotPasswordParams = () => {\r\n const { search } = useLocation();\r\n const { email, token } = queryString.parse(search, {\r\n decode: false,\r\n });\r\n\r\n return {\r\n email: email as string | null,\r\n token: token as string | null,\r\n };\r\n};\r\n\r\nconst ForgotPassword = () => {\r\n const { t } = useTranslation('common');\r\n const { pathname } = useLocation();\r\n\r\n const [recoverPasswordError, setError] = useState(null);\r\n const [linkSentTo, setLinkSent] = useState(null);\r\n\r\n const history = useHistory();\r\n\r\n const { email, token } = useForgotPasswordParams();\r\n\r\n const changePassword =\r\n pathname === paths.app.changePassword && !!email && !!token;\r\n\r\n const handleRecoverPassword = async (\r\n parameters: ForgotPasswordParameters\r\n ) => {\r\n try {\r\n setError(null);\r\n\r\n await post(`/authentication/forgot-password`, parameters);\r\n setLinkSent(parameters.email);\r\n } catch (err) {\r\n let errorMessage;\r\n\r\n if (err instanceof ValidationError) {\r\n const validationError = err as ValidationError;\r\n\r\n if (validationError.errors.length) {\r\n errorMessage = t(`ServerErrors.${validationError.errors[0].code}`);\r\n }\r\n }\r\n\r\n setError(\r\n errorMessage ?? t('RecoverPassword.FailedToRecoverPasswordError')\r\n );\r\n }\r\n };\r\n\r\n const handleSetPassword = async (\r\n parameters: SetNewPasswordFormParameters\r\n ) => {\r\n try {\r\n setError(null);\r\n\r\n if (token) {\r\n await post('/authentication/change-forgotten-password', {\r\n newPassword: parameters.newPassword,\r\n token,\r\n email,\r\n });\r\n history.push(paths.app.login);\r\n }\r\n } catch (err) {\r\n let errorMessage;\r\n\r\n if (err instanceof ValidationError) {\r\n const validationError = err as ValidationError;\r\n\r\n if (validationError.errors.length) {\r\n errorMessage = t(`ServerErrors.${validationError.errors[0].code}`);\r\n }\r\n }\r\n\r\n setError(errorMessage ?? t('RecoverPassword.FailedToSetPasswordError'));\r\n }\r\n };\r\n\r\n return (\r\n \r\n {!changePassword &&\r\n (!linkSentTo ? (\r\n \r\n ) : (\r\n \r\n {t('RecoverPassword.LinkSentExplanation', { email: linkSentTo })}\r\n \r\n ))}\r\n {changePassword && (\r\n \r\n )}\r\n {recoverPasswordError && (\r\n {recoverPasswordError}\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default ForgotPassword;\r\n","import React, { Suspense } from 'react';\r\nimport { SWRConfig } from 'swr';\r\nimport { Switch } from 'react-router-dom';\r\n\r\nimport { useShowAlert } from 'hooks/useShowAlert';\r\nimport { fetcher } from 'apis/api';\r\nimport { AuthProvider } from 'providers/AuthProvider';\r\nimport { UserInfoProvider } from 'providers/UserInfoProvider';\r\nimport { paths } from 'constants/paths';\r\n\r\nimport Login from 'containers/login/Login';\r\nimport { ApplicationLayout, AssessmentLayout } from 'containers/Layout';\r\nimport Registration from 'containers/registration/Registration';\r\nimport CompleteRegistration from 'containers/complete-registration/CompleteRegistration';\r\nimport ConfirmEmail from 'containers/confirm-email/ConfirmEmail';\r\n\r\nimport PrivateRoute from 'components/routes/PrivateRoute';\r\nimport PublicRoute from 'components/routes/PublicRoute';\r\nimport ForgotPassword from 'containers/forgot-password/ForgotPassword';\r\nimport FullScreenLoading from 'components/page/FullScreenLoading';\r\nimport useLogin from 'hooks/useLogin';\r\n\r\nconst AdminRoot = React.lazy(() => import('containers/admin/AdminRoot'));\r\nconst CustomerRoot = React.lazy(\r\n () => import('containers/customer/CustomerRoot')\r\n);\r\nconst Assessment = React.lazy(() => import('containers/assessment/Assessment'));\r\n\r\nfunction App() {\r\n const { showError } = useShowAlert();\r\n const { logout } = useLogin();\r\n\r\n return (\r\n {\r\n if (err.status === 403) {\r\n await logout();\r\n // TODO: Find better solution if possible\r\n window.location.reload();\r\n }\r\n showError(err.message);\r\n },\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default App;\r\n","import { useTranslation } from 'react-i18next';\r\n\r\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport DateFnsUtils from '@date-io/date-fns';\r\n\r\nimport { AlertProvider } from 'providers/AlertProvider';\r\nimport { InstanceProvider } from 'providers/InstanceProvider';\r\nimport { DeviceTypeProvider } from 'providers/DeviceTypeProvider';\r\nimport { dateLocales } from 'utils/dateFunctions';\r\n\r\nimport App from './App';\r\n\r\nconst AppWrapper = () => {\r\n const { i18n } = useTranslation();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default AppWrapper;\r\n","import { InitOptions, LanguageDetectorAsyncModule, Services } from 'i18next';\r\n\r\nimport { getCurrentInstance } from 'apis/instance';\r\n\r\nconst localStorageAvailable = () => {\r\n let hasLocalStorageSupport: boolean | null = null;\r\n\r\n try {\r\n hasLocalStorageSupport = window.localStorage !== null;\r\n const testKey = 'test';\r\n window.localStorage.setItem(testKey, 'foo');\r\n window.localStorage.removeItem(testKey);\r\n } catch (e) {\r\n hasLocalStorageSupport = false;\r\n }\r\n return hasLocalStorageSupport;\r\n};\r\n\r\nclass InstanceLanguageDetector implements LanguageDetectorAsyncModule {\r\n static type: 'languageDetector';\r\n type: 'languageDetector';\r\n async: true;\r\n options: { lookupLocalStorage?: string };\r\n services: Services;\r\n\r\n constructor(\r\n services: Services,\r\n options = { lookupLocalStorage: 'i18nextLng' }\r\n ) {\r\n this.type = 'languageDetector';\r\n this.async = true;\r\n this.services = services;\r\n this.options = options;\r\n }\r\n\r\n init(services: Services, options: object, i18nOptions: InitOptions = {}) {\r\n this.services = services;\r\n this.options = options;\r\n }\r\n\r\n async detect(callback: (locale: string | string[] | undefined) => void) {\r\n let found = [];\r\n\r\n if (this.options.lookupLocalStorage && localStorageAvailable()) {\r\n const lng = window.localStorage.getItem(this.options.lookupLocalStorage);\r\n if (lng) found.push(lng);\r\n }\r\n\r\n try {\r\n var instanceInfo = await getCurrentInstance();\r\n if (instanceInfo && instanceInfo.defaultLanguage) {\r\n found.push(instanceInfo.defaultLanguage);\r\n }\r\n } catch (e) {\r\n // todo: log error?\r\n // eslint-disable-next-line no-console\r\n console.error(e);\r\n }\r\n\r\n if (typeof navigator !== 'undefined') {\r\n if (navigator.languages) {\r\n for (let i = 0; i < navigator.languages.length; i++) {\r\n found.push(navigator.languages[i]);\r\n }\r\n }\r\n if (navigator.language) {\r\n found.push(navigator.language);\r\n }\r\n }\r\n\r\n callback(found.length > 0 ? found : undefined);\r\n }\r\n\r\n cacheUserLanguage(lng: string) {\r\n if (this.options.lookupLocalStorage && localStorageAvailable()) {\r\n window.localStorage.setItem(this.options.lookupLocalStorage, lng);\r\n }\r\n }\r\n}\r\n\r\nInstanceLanguageDetector.type = 'languageDetector';\r\n\r\nexport default InstanceLanguageDetector;\r\n","import i18n from 'i18next';\r\nimport { initReactI18next } from 'react-i18next';\r\nimport Backend from 'i18next-chained-backend';\r\nimport HttpBackend from 'i18next-http-backend';\r\nimport LocalStorageBackend from 'i18next-localstorage-backend';\r\n\r\nimport { defaultLng, supportedLngsCodes } from 'constants/languages';\r\nimport InstanceLanguageDetector from 'utils/InstanceLanguageDetector';\r\n\r\nconst isDevelopment = process.env.NODE_ENV === 'development';\r\n\r\ni18n\r\n .use(Backend)\r\n .use(InstanceLanguageDetector)\r\n .use(initReactI18next)\r\n .init({\r\n debug: isDevelopment,\r\n\r\n fallbackLng: defaultLng,\r\n load: 'languageOnly',\r\n cleanCode: true,\r\n supportedLngs: supportedLngsCodes,\r\n defaultNS: 'common',\r\n ns: 'common',\r\n\r\n interpolation: {\r\n escapeValue: false,\r\n },\r\n backend: {\r\n backends: [LocalStorageBackend, HttpBackend],\r\n backendOptions: [\r\n {\r\n prefix: 'i18n_',\r\n defaultVersion: '',\r\n // versions: {},\r\n },\r\n {\r\n loadPath: '/locales/{{lng}}/{{ns}}.json',\r\n },\r\n ],\r\n },\r\n detection: {\r\n lookupLocalStorage: 'i18n-lng',\r\n },\r\n\r\n react: {\r\n useSuspense: true,\r\n },\r\n });\r\n\r\nexport default i18n;\r\n","import React, { Suspense } from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { BrowserRouter } from 'react-router-dom';\r\nimport { createGlobalStyle } from 'styled-components';\r\n\r\nimport {\r\n ThemeProvider as MaterialThemeProvider,\r\n StylesProvider,\r\n} from '@material-ui/core/styles';\r\n\r\nimport { defaultTheme, colors, fontSize, fontFamily } from './styles';\r\n\r\nimport FullScreenLoading from 'components/page/FullScreenLoading';\r\n\r\nimport AppWrapper from 'AppWrapper';\r\nimport './i18n';\r\n\r\nconst GlobalStyle = createGlobalStyle`\r\n html, body {\r\n margin: 0;\r\n padding: 0;\r\n box-sizing: border-box;\r\n height: 100%;\r\n width: 100%;\r\n }\r\n\r\n body {\r\n background-color: ${colors.appBackground};\r\n color: ${colors.mainText};\r\n font-size: ${fontSize.base};\r\n font-family: ${fontFamily};\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n\r\n & > div#root {\r\n height: 100%;\r\n width: 100%;\r\n }\r\n }\r\n\r\n *, *:before, *:after {\r\n box-sizing: inherit;\r\n }\r\n`;\r\n\r\nReactDOM.render(\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 document.getElementById('root')\r\n);\r\n","import { useContext } from 'react';\r\n\r\nimport { AuthContext } from 'providers/AuthProvider';\r\n\r\nconst useCurrentUser = () => {\r\n const authState = useContext(AuthContext);\r\n\r\n return { user: authState.user };\r\n};\r\n\r\nexport default useCurrentUser;\r\n","var _path, _path2;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgSessions(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Layer_1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n x: 0,\n y: 0,\n viewBox: \"0 0 500 500\",\n xmlSpace: \"preserve\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M427.01 77.88C380.28 31.14 318.14 5.41 252.05 5.41S123.82 31.14 77.09 77.88C30.35 124.61 4.62 186.75 4.62 252.84S30.35 381.07 77.09 427.8c46.73 46.74 108.87 72.48 174.96 72.48s128.23-25.74 174.96-72.48c46.74-46.73 72.48-108.87 72.48-174.96s-25.74-128.23-72.48-174.96zM252.05 451.97c-109.8 0-199.12-89.33-199.12-199.13S142.25 53.72 252.05 53.72s199.13 89.32 199.13 199.12-89.33 199.13-199.13 199.13z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M172.64 209.13l87.37 76.28L373.5 160.1c8.72-9.63 7.89-24.53-1.85-33.13l-.01-.01c-9.56-8.44-24.12-7.64-32.69 1.79L256 219.99l-52.68-46c-9.7-8.47-24.44-7.47-32.91 2.23-8.47 9.71-7.47 24.44 2.23 32.91z\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgSessions);\nexport default __webpack_public_path__ + \"static/media/sessions.04e3b016.svg\";\nexport { ForwardRef as ReactComponent };","var _path, _path2;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgActiveSessions(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Layer_1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n x: \"0px\",\n y: \"0px\",\n viewBox: \"0 0 500 500\",\n style: {\n enableBackground: \"new 0 0 500 500\"\n },\n xmlSpace: \"preserve\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0,251.02c0,63.05,24.55,122.33,69.14,166.91c45.57,45.58,106.5,70.22,171.12,69.1 c61.57-1.07,120.5-26.36,163.77-70.17c40.89-41.4,64.66-95.28,67.73-153.02l23.38-3.08c5.06-0.73,7.44-6.66,4.28-10.68 l-55.35-74.02c-3.52-4.48-10.57-3.47-12.69,1.82l-39.64,86.75c-1.9,4.75,2.05,9.77,7.11,9.05l25.09-2.98 c-9.87,94.96-90.37,169.25-187.9,169.25c-104.58,0-190.33-86.96-188.9-191.53c1.4-102.97,85.6-186.31,188.9-186.31h0 c6.63,0,12-5.37,12-12V26.96c0-6.63-5.37-12-12-12h0c-63.08,0-122.4,24.59-166.98,69.21C24.78,128.49,0,188.37,0,251.02z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M152.14,211.99l87.37,76.28L353,162.96c8.72-9.63,7.89-24.53-1.85-33.13l-0.01-0.01 c-9.56-8.44-24.12-7.64-32.69,1.79l-82.95,91.25l-52.68-46c-9.7-8.47-24.44-7.47-32.91,2.23l0,0 C141.44,188.8,142.44,203.52,152.14,211.99z\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgActiveSessions);\nexport default __webpack_public_path__ + \"static/media/activeSessions.1b8dda97.svg\";\nexport { ForwardRef as ReactComponent };","var _path, _path2, _path3, _polygon, _polygon2, _path4, _path5, _path6;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgBatches(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Layer_1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n x: \"0px\",\n y: \"0px\",\n viewBox: \"0 0 500 500\",\n style: {\n enableBackground: \"new 0 0 500 500\"\n },\n xmlSpace: \"preserve\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M306.68,442.71v46.59c0,5.93-5.44,10.75-12.14,10.75H40.77c-6.71,0-12.14-4.81-12.14-10.75V158.07 c0-5.94,5.43-10.75,12.14-10.75h253.77c5.85,0,10.73,3.65,11.89,8.54v286.85H306.68z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M306.68,158.07v284.64h-0.25V155.87C306.59,156.57,306.68,157.32,306.68,158.07z\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M391.7,82.1v331.23c0,5.94-5.44,10.75-12.14,10.75h-47.1v-294.6c0-3.28-3-5.93-6.7-5.93H113.65V82.1 c0-5.94,5.44-10.75,12.14-10.75h253.77C386.27,71.35,391.7,76.17,391.7,82.1z\"\n })), _polygon || (_polygon = /*#__PURE__*/React.createElement(\"polygon\", {\n points: \"189.45,65.35 189.42,65.35 189.42,65.32 \"\n })), _polygon2 || (_polygon2 = /*#__PURE__*/React.createElement(\"polygon\", {\n points: \"383.81,331.8 383.74,331.8 383.74,331.69 \"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M467.47,14.34v331.24c0,5.94-5.44,10.75-12.14,10.75h-37.35V53.37c0-3.28-3-5.93-6.7-5.93H189.42v-33.1 c0-5.94,5.44-10.75,12.14-10.75h253.77C462.04,3.59,467.47,8.41,467.47,14.34z\"\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M306.68,158.07v284.64h-0.25V155.87C306.59,156.57,306.68,157.32,306.68,158.07z\"\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M306.68,158.07v99.79l-0.25-0.35V155.87C306.59,156.57,306.68,157.32,306.68,158.07z\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgBatches);\nexport default __webpack_public_path__ + \"static/media/batches.8e153293.svg\";\nexport { ForwardRef as ReactComponent };","var _g, _g2;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgManual(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n enableBackground: \"new 0 0 24 24\",\n height: \"24px\",\n viewBox: \"0 0 24 24\",\n width: \"24px\",\n fill: \"#000000\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n fill: \"none\",\n height: 24,\n width: 24,\n x: 0\n }))), _g2 || (_g2 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18.15,1.35l-4,4C14.05,5.45,14,5.57,14,5.71v8.17c0,0.43,0.51,0.66,0.83,0.37l4-3.6c0.11-0.09,0.17-0.23,0.17-0.37V1.71 C19,1.26,18.46,1.04,18.15,1.35z M22.47,5.2C22,4.96,21.51,4.76,21,4.59v12.03C19.86,16.21,18.69,16,17.5,16 c-1.9,0-3.78,0.54-5.5,1.58V5.48C10.38,4.55,8.51,4,6.5,4C4.71,4,3.02,4.44,1.53,5.2C1.2,5.36,1,5.71,1,6.08v12.08 c0,0.76,0.81,1.23,1.48,0.87C3.69,18.4,5.05,18,6.5,18c2.07,0,3.98,0.82,5.5,2c1.52-1.18,3.43-2,5.5-2c1.45,0,2.81,0.4,4.02,1.04 C22.19,19.4,23,18.93,23,18.17V6.08C23,5.71,22.8,5.36,22.47,5.2z\"\n }))));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgManual);\nexport default __webpack_public_path__ + \"static/media/manual.4682ebef.svg\";\nexport { ForwardRef as ReactComponent };","var _path, _path2;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgExport(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlSpace: \"preserve\",\n id: \"Layer_1\",\n x: 0,\n y: 0,\n viewBox: \"0 0 250 250\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M73.13 36.83c2.19 2.18 3.27 5.56 3.27 10.11 0 8.94-4.39 13.41-13.16 13.41 0 0-16.13 0-16.14.01V33.53h16.13c4.42 0 7.72 1.11 9.9 3.3z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M127.59 34.11h-12.18v57.25h12.18c16.03 0 24.05-9.56 24.05-28.68 0-19.05-8.02-28.57-24.05-28.57zm0 0h-12.18v57.25h12.18c16.03 0 24.05-9.56 24.05-28.68 0-19.05-8.02-28.57-24.05-28.57zM216.39.02H33.61C15.05.02 0 15.07 0 33.63v91.85h250V33.63C250 15.07 234.95.02 216.39.02zM82.25 65.22c-4.16 4.4-9.97 6.58-17.42 6.58H47.11v31.69H34.34V21.97h30.49c7.46 0 13.27 2.18 17.42 6.53 4.16 4.35 6.24 10.47 6.24 18.33 0 7.87-2.08 14.01-6.24 18.39zm72.71 27.55c-6.3 7.17-15.17 10.76-26.58 10.76h-25.74V21.97h25.74c11.41 0 20.27 3.56 26.58 10.7 6.29 7.14 9.46 17.14 9.46 30.03 0 12.88-3.16 22.9-9.46 30.07zm71.03-58.89h-33.18v22.2H224v11.91h-31.19v35.5h-12.57V21.97h45.75v11.91zm-98.4.23h-12.18v57.25h12.18c16.03 0 24.05-9.56 24.05-28.68 0-19.05-8.02-28.57-24.05-28.57zm42.18 176.82-39.24 36.87c-1.55 1.46-3.52 2.19-5.51 2.19s-3.96-.73-5.51-2.19l-39.24-36.87 11.02-11.83 25.67 24.1v-70.82h16.13v70.82l25.67-24.1 11.01 11.83z\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgExport);\nexport default __webpack_public_path__ + \"static/media/export.b27498c6.svg\";\nexport { ForwardRef as ReactComponent };","var _g;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgAseba(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", {\n id: \"Layer_1\"\n }, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.4,0c-.77,0-1.39.62-1.4,1.39h.8v.42h-.8s0,1.91,0,1.91h1.68v.42h-1.68s0,1.88,0,1.88h.8v.42h-.8s0,1.91,0,1.91h1.68v.42h-1.68s0,1.88,0,1.88h.8v.42h-.8s0,1.9,0,1.9h1.68v.42h-1.68s0,1.88,0,1.88h.8v.42h-.8s0,1.9,0,1.9h1.68v.42h-1.68s0,1.88,0,1.88h.8v.42h-.8s0,1.9,0,1.9h1.68v.42h-1.68c.02.76.63,1.36,1.39,1.36h12.24c.77,0,1.4-.63,1.4-1.4,0-.3-.1-.58-.26-.81L4.67.82C4.45.33,3.96,0,3.4,0ZM4.79,6.6l8.43,14.61H4.79V6.6Z\"\n }), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.81,4.04c-.22.13-.43.27-.65.4,2.26,3.76,4.52,7.52,6.79,11.28.34.45.86.63,1.17.45s.39-.73.15-1.24c-2.27-3.76-4.53-7.51-6.8-11.27-.22.13-.44.26-.66.39h0Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.5,4.84c-.11.07-.21.14-.32.21,2.21,3.67,4.42,7.34,6.63,11.01.29.48.53.42.65.35.13-.06.28-.29,0-.75-2.21-3.67-4.42-7.34-6.63-11-.11.06-.22.13-.33.19h0Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14.13,3.25c.11-.06.22-.13.33-.19,2.21,3.67,4.42,7.34,6.63,11,.29.48.12.67,0,.74-.11.09-.39.11-.66-.34-2.21-3.67-4.42-7.34-6.63-11.01.11-.07.22-.14.32-.21h0Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.46,2.79h3.84c.16,0,.29.13.29.29v.49c0,.16-.13.29-.29.29h-3.84c-.16,0-.29-.13-.29-.29v-.49c0-.16.13-.29.29-.29Z\",\n transform: \"translate(.06 6.86) rotate(-31.06)\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.72,1.37L11.89.06c.31-.19.81.06,1.1.55l.38.63c.1.16.16.32.19.48l-3.16,1.9c-.13-.1-.24-.23-.34-.39l-.38-.63c-.29-.49-.28-1.04.03-1.23Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.45,18.18l-1.65-1.37c.12-.13.17-.33.15-.55.46.4,1.01.55,1.4.31s.52-.79.38-1.38c.19.12.39.17.56.12l.44,2.11c-.76.25-.7.19-1.28.77Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.72,18.29c.3.49,1.16,1.03,1.25.98.08-.04,0-1.07-.29-1.56-.06-.1-1.02.48-.96.58Z\"\n })))))));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgAseba);\nexport default __webpack_public_path__ + \"static/media/aseba.35de8ebe.svg\";\nexport { ForwardRef as ReactComponent };","import styled, { css } from 'styled-components';\r\n\r\nimport { ReactComponent as SessionsIcon } from 'assets/icons/sessions.svg';\r\nimport { ReactComponent as ActiveSessionsIcon } from 'assets/icons/activeSessions.svg';\r\nimport { ReactComponent as BatchesIcon } from 'assets/icons/batches.svg';\r\nimport { ReactComponent as ManualIcon } from 'assets/icons/manual.svg';\r\nimport { ReactComponent as ExportIcon } from 'assets/icons/export.svg';\r\nimport { ReactComponent as AsebaIcon } from 'assets/icons/aseba.svg';\r\n\r\nimport {\r\n Dashboard as DashboardIcon,\r\n InsertChart,\r\n LocalOffer,\r\n Mail,\r\n Payment,\r\n PeopleAlt,\r\n Person,\r\n} from '@material-ui/icons';\r\nimport { colors } from 'styles';\r\n\r\nconst customIconStyle = css`\r\n fill: currentColor;\r\n width: 1em;\r\n height: 1em;\r\n font-size: 1.5rem;\r\n user-select: none;\r\n`;\r\n\r\nexport const Dashboard = styled(DashboardIcon)`\r\n color: ${colors.icons.dashboard};\r\n`;\r\n\r\nexport const Respondents = styled(PeopleAlt)`\r\n color: ${colors.icons.respondents};\r\n`;\r\n\r\nexport const Sessions = styled(SessionsIcon)`\r\n color: ${colors.icons.sessions};\r\n ${customIconStyle};\r\n`;\r\n\r\nexport const ActiveSessions = styled(ActiveSessionsIcon)`\r\n color: ${colors.icons.sessions};\r\n ${customIconStyle};\r\n`;\r\n\r\nexport const Results = styled(InsertChart)`\r\n color: ${colors.icons.results};\r\n`;\r\n\r\nexport const Credits = styled(Payment)`\r\n color: ${colors.icons.credits};\r\n`;\r\n\r\nexport const Batches = styled(BatchesIcon)`\r\n color: ${colors.icons.batches};\r\n ${customIconStyle};\r\n`;\r\n\r\nexport const Templates = styled(Mail)`\r\n color: ${colors.icons.templates};\r\n`;\r\n\r\nexport const Users = styled(Person)`\r\n color: ${colors.icons.users};\r\n`;\r\n\r\nexport const Manual = styled(ManualIcon)`\r\n color: ${colors.icons.manual};\r\n ${customIconStyle};\r\n`;\r\n\r\nexport const Tags = styled(LocalOffer)`\r\n color: ${colors.icons.tags};\r\n`;\r\n\r\nexport const Export = styled(ExportIcon)`\r\n ${customIconStyle};\r\n`;\r\n\r\nexport const Aseba = styled(AsebaIcon)`\r\n color: ${colors.icons.aseba};\r\n ${customIconStyle};\r\n`;\r\n","import { useCallback, useContext } from 'react';\r\nimport { AlertContext } from 'providers/AlertProvider';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { AlertType } from 'types/alerts';\r\n\r\nexport const useShowAlert = () => {\r\n const { t } = useTranslation('common');\r\n const showAlert = useContext(AlertContext);\r\n\r\n const showError = useCallback(\r\n (message?: any, shouldAutoHide?: boolean) => {\r\n let errorMessage = null;\r\n if (message instanceof Error) {\r\n errorMessage = (message as Error).message;\r\n } else if (typeof message === 'string') {\r\n errorMessage = message;\r\n }\r\n showAlert(\r\n errorMessage || t('Errors.General'),\r\n AlertType.Error,\r\n shouldAutoHide\r\n );\r\n },\r\n [t, showAlert]\r\n );\r\n\r\n const showWarning = useCallback(\r\n (message?: any, shouldAutoHide?: boolean) => {\r\n let errorMessage = null;\r\n if (message instanceof Error) {\r\n errorMessage = (message as Error).message;\r\n } else if (typeof message === 'string') {\r\n errorMessage = message;\r\n }\r\n showAlert(\r\n errorMessage || t('Errors.General'),\r\n AlertType.Warning,\r\n shouldAutoHide\r\n );\r\n },\r\n [t, showAlert]\r\n );\r\n\r\n return {\r\n showError,\r\n showWarning,\r\n };\r\n};\r\n","import { FC } from 'react';\r\nimport styled, { keyframes } from 'styled-components';\r\n\r\nimport { colors } from 'styles';\r\n\r\nconst Wrapper = styled.div`\r\n height: 100vh;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n`;\r\n\r\nconst dotPulse = keyframes`\r\n 0% {\r\n box-shadow: 9999px 0 0 -0.5rem ${colors.primary};\r\n }\r\n 30% {\r\n box-shadow: 9999px 0 0 0.25rem ${colors.primary};\r\n }\r\n 60%,\r\n 100% {\r\n box-shadow: 9999px 0 0 -0.5rem ${colors.primary};\r\n }\r\n`;\r\n\r\nconst dotPulseBefore = keyframes`\r\n 0% {\r\n box-shadow: calc(9999px - 3rem) 0 0 -0.5rem ${colors.primary};\r\n }\r\n 30% {\r\n box-shadow: calc(9999px - 3rem) 0 0 0.25rem ${colors.primary};\r\n }\r\n 60%,\r\n 100% {\r\n box-shadow: calc(9999px - 3rem) 0 0 -0.5rem ${colors.primary};\r\n };\r\n`;\r\n\r\nconst dotPulseAfter = keyframes`\r\n 0% {\r\n box-shadow: calc(9999px + 3rem) 0 0 -0.5rem ${colors.primary};\r\n }\r\n 30% {\r\n box-shadow: calc(9999px + 3rem) 0 0 0.25rem ${colors.primary};\r\n }\r\n 60%,\r\n 100% {\r\n box-shadow: calc(9999px + 3rem) 0 0 -0.5rem ${colors.primary};\r\n }\r\n`;\r\n\r\nconst DotPulse = styled.div`\r\n position: relative;\r\n left: -9999px;\r\n width: 1rem;\r\n height: 1rem;\r\n border-radius: 0.5rem;\r\n background-color: ${colors.primary};\r\n color: ${colors.primary};\r\n box-shadow: 9999px 0 0 -0.5rem ${colors.primary};\r\n animation: ${dotPulse} 1.5s infinite linear;\r\n animation-delay: 0.25s;\r\n\r\n &::before,\r\n &::after {\r\n content: '';\r\n display: inline-block;\r\n position: absolute;\r\n top: 0;\r\n width: 1rem;\r\n height: 1rem;\r\n border-radius: 0.5rem;\r\n background-color: ${colors.primary};\r\n color: ${colors.primary};\r\n }\r\n\r\n &::before {\r\n box-shadow: calc(9999px - 3rem) 0 0 -0.5rem ${colors.primary};\r\n animation: ${dotPulseBefore} 1.5s infinite linear;\r\n animation-delay: 0s;\r\n }\r\n\r\n &::after {\r\n box-shadow: calc(9999px + 3rem) 0 0 -0.5rem ${colors.primary};\r\n animation: ${dotPulseAfter} 1.5s infinite linear;\r\n animation-delay: 0.5s;\r\n }\r\n`;\r\n\r\nconst FullScreenLoading: FC = () => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default FullScreenLoading;\r\n"],"sourceRoot":""}