{"version":3,"sources":["webpack:///./src/Avensia.Common/Features/Account/ForgotPassword/ForgotPasswordBlock.tsx","webpack:///./src/Avensia.Common/Features/Account/Login/LoginBlock.tsx","webpack:///./src/Avensia.Common/Features/Account/Register/RegisterBlock.tsx"],"names":["__webpack_require__","r","__webpack_exports__","tslib__WEBPACK_IMPORTED_MODULE_0__","react__WEBPACK_IMPORTED_MODULE_1__","react__WEBPACK_IMPORTED_MODULE_1___default","n","_glitz_react__WEBPACK_IMPORTED_MODULE_2__","Shared_connect__WEBPACK_IMPORTED_MODULE_3__","Shared_Button_Feedback__WEBPACK_IMPORTED_MODULE_4__","Shared_Button__WEBPACK_IMPORTED_MODULE_5__","_avensia_scope_EpiProperty__WEBPACK_IMPORTED_MODULE_6__","_avensia_scope_epi_property_value__WEBPACK_IMPORTED_MODULE_7__","_avensia_scope__WEBPACK_IMPORTED_MODULE_8__","Account_action_creators__WEBPACK_IMPORTED_MODULE_9__","Shared_Style__WEBPACK_IMPORTED_MODULE_10__","Shared_Fields_Text__WEBPACK_IMPORTED_MODULE_11__","_glitz_core__WEBPACK_IMPORTED_MODULE_12__","Form","form","display","flexDirection","marginBottom","position","InputLabel","label","color","fontSize","fontWeight","letterSpacing","fontStyle","marginTop","EmailField","Object","width","ErrorMessage","div","justifyContent","textAlign","RightWrapper","alignItems","BackToLoginButton","margin","top","Small","Title","h4","marginRight","ButtonWrapper","ForgotPassword","_super","props","_this","call","this","onSubmit","e","preventDefault","email","trim","setState","failedMessage","url","searchParams","set","feedback","push","then","result","success","Promise","resolve","reject","message","catch","error","setFailMessage","closeAccountPanel","successMessage","onEmailFieldInput","value","target","updateEmail","onBackClick","setActiveAccountMode","Login","state","prototype","render","FeedbackButton","Button","a","createElement","for","blockTitle","component","mainContent","emailLabel","required","type","defaultValue","placeholder","onChange","css","border","xy","style","Fragment","appearance","Primary","submitButtonCaption","onClick","Link","variant","backToLoginLabel","Component","ForgotPasswordWithFeedback","activeAccountMode","currentUser","accountPanelEmail","dispatch","mode","snackMessage","handleInputChange","currentTarget","name","_a","errorMessage","handleToggleChange","checked","onForgotPasswordClick","Account_action_creators__WEBPACK_IMPORTED_MODULE_8__","onRegisterClick","Registration","closeErrorMessage","toggleShowPassword","showPassword","requestNewConfirmationMail","_avensia_scope__WEBPACK_IMPORTED_MODULE_4__","response","isValid","setInformationMessage","setErrorUrl","setErrorMessage","handleSubmit","query","password","rememberMe","pageToRedirectTo","URL","window","location","href","get","origin","hardReloadToAfterLogin","includeAppShellData","accountPanelIsOpen","toString","informationText","informationMessage","bind","componentDidMount","Shared_Viewport__WEBPACK_IMPORTED_MODULE_10__","isCompact","SigninForm","H4","emailPlaceholder","passwordLabel","PasswordField","passwordPlaceholder","Span","panelMessage","InformationMessage","P","Shared_Style__WEBPACK_IMPORTED_MODULE_9__","cursor","paddingLeft","CenterWrapper2","ShowPasswordWrapper","ShowPassword","CheckboxLabel","showPasswordLabel","RememberMeWrapper","RememberMe","rememberMeLabel","CenterWrapper","Shared_Button__WEBPACK_IMPORTED_MODULE_11__","ForgotPasswordButton","forgotPasswordLabel","RegisterUserButton","registerLabel","marginLeft","LoginWithFeedback","Shared_Button_Feedback__WEBPACK_IMPORTED_MODULE_7__","Shared_Fields_Text__WEBPACK_IMPORTED_MODULE_6__","Shared_Fields_Toggle__WEBPACK_IMPORTED_MODULE_5__","bottom","Shared_Button_Feedback__WEBPACK_IMPORTED_MODULE_5__","Shared_Button__WEBPACK_IMPORTED_MODULE_6__","Shared_Fields_Toggle__WEBPACK_IMPORTED_MODULE_7__","Shared_Fields_Text__WEBPACK_IMPORTED_MODULE_8__","_glitz_core__WEBPACK_IMPORTED_MODULE_11__","FormBottom","CheckboxWrapper","left","font","size","weight","LinkWrapper","Register","acceptTerms","updateAppShellData","onGoToLoginClick","activePanel","termsAgreementLink","termsAgreementLinkText","registerButtonCaption","goToLoginLabel","paddingBottom","className","to","RegisterWithFeedback"],"mappings":"0FAAAA,EAAAC,EAAAC,GAAA,IAAAC,EAAAH,EAAA,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,GAAI5L,OAAAyG,EAAA,EAAAzG,CAAiBsL,GAAqBtI,OAAO,UACrD5E,EAAAsF,EAAAC,cAAC8C,EAAA,GAAY7C,IAAK2H,OAIxBnN,EAAAsF,EAAAC,cAAC+G,EAAU,KACTtM,EAAAsF,EAAAC,cAAC5C,GAAc4K,UAAU,iBACvBvN,EAAAsF,EAAAC,cAACH,GAAeU,KAAK,SAASS,WAAY2F,EAAA,EAAiB1F,SACzDxG,EAAAsF,EAAAC,cAAC8C,EAAA,GAAY7C,IAAK4H,MAGtBpN,EAAAsF,EAAAC,cAACqH,EAAW,KACV5M,EAAAsF,EAAAC,cAACnD,GAAkBsE,QAASzD,KAAK+J,iBAAkBzG,WAAY2F,EAAA,EAAiBvF,KAAMC,SAAS,GAC7F5G,EAAAsF,EAAAC,cAAC8C,EAAA,GAAY7C,IAAK6H,KAEpBrN,EAAAsF,EAAAC,cAACgG,GAAqB7E,QAASzD,KAAK4E,sBAAuBtB,WAAY2F,EAAA,EAAiBvF,MACtF3G,EAAAsF,EAAAC,cAAC8C,EAAA,GAAY7C,IAAKgG,SAOhCqB,EA9KA,CAAuB7M,EAAAsF,EAAMwB,WAgLvB2G,EAAuB7L,OAAAqK,EAAA,EAAArK,GAAsBiL,GAEpChN,EAAA,QAAA+B,OAAAzB,EAAA,EAAAyB,CACb,SAACqD,GAA4B,OAC3B+B,kBAAmB/B,EAAMgC,YAAYD,oBAEvC,SAACG,GAA+B,OAC9B4F,mBAAkB,WAChB,OAAO5F,EAASvF,OAAAyG,EAAA,EAAAzG,KAElBmD,qBAAoB,SAACqC,GACnB,OAAOD,EAASvF,OAAAnB,EAAA,EAAAmB,CAAqBwF,KAEvC5C,kBAAiB,SAAC6C,GAChB,OAAOF,EAASvF,OAAAnB,EAAA,EAAAmB,CAAkByF,OAZzB,CAeboG","file":"assets/account.chunk.0bdf6b593d83f24a0132.js","sourcesContent":["/**\r\n * @ComponentFor ForgotPasswordBlock\r\n */\r\n\r\nimport React from 'react';\r\nimport { styled } from '@glitz/react';\r\nimport connect from 'Shared/connect';\r\nimport ResetPasswordResultViewModel from 'ResetPassword/ResetPasswordResultViewModel.type';\r\nimport ForgotPasswordBlockType from './ForgotPasswordBlock.type';\r\nimport { connectWithFeedback, ConnectPropType } from 'Shared/Button/Feedback';\r\nimport Button, { Appearance as ButtonAppearance } from 'Shared/Button';\r\nimport EpiProperty from '@avensia/scope/EpiProperty';\r\nimport epiPropertyValue from '@avensia/scope/epi-property-value';\r\nimport { postJson, URLX, Breakpoint } from '@avensia/scope';\r\nimport { ACCOUNT_MODE, setActiveAccountMode, closeAccountPanel, updateEmail } from 'Account/action-creators';\r\nimport * as style from 'Shared/Style';\r\nimport Input from 'Shared/Fields/Text';\r\nimport { media } from '@glitz/core';\r\n\r\ntype StateType = {\r\n failedMessage: string;\r\n};\r\n\r\ntype ConnectStateType = {\r\n activeAccountMode: ACCOUNT_MODE;\r\n email: string;\r\n};\r\n\r\ntype DispatchPropType = {\r\n setActiveAccountMode: (mode: ACCOUNT_MODE) => void;\r\n closeAccountPanel: (snackMessage?: string) => void;\r\n updateEmail: (email: string) => void;\r\n};\r\n\r\ntype PropType = ForgotPasswordBlockType & ConnectPropType & ConnectStateType & DispatchPropType;\r\n\r\nconst Form = styled.form({\r\n display: 'flex',\r\n flexDirection: 'column',\r\n marginBottom: style.large,\r\n position: 'relative',\r\n});\r\n\r\nconst InputLabel = styled.label({\r\n color: style.primary,\r\n fontSize: 21,\r\n fontWeight: 500,\r\n letterSpacing: -0.52,\r\n fontStyle: 'bold',\r\n marginTop: '15px',\r\n});\r\n\r\nconst EmailField = styled(Input, {\r\n width: '100%',\r\n marginBottom: style.large,\r\n});\r\n\r\nconst ErrorMessage = styled.div({\r\n color: '#FF0000',\r\n fontWeight: 'bold',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n marginBottom: 20,\r\n textAlign: 'center',\r\n});\r\n\r\nconst RightWrapper = styled.div({\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n});\r\n\r\nconst BackToLoginButton = styled(Button, {\r\n marginBottom: '16px',\r\n margin: {\r\n top: '15px',\r\n },\r\n ...media(style.mediaMinQueries[Breakpoint.Small], {\r\n margin: {\r\n top: '15px',\r\n },\r\n }),\r\n});\r\n\r\nconst Title = styled.h4({\r\n marginRight: '46px',\r\n});\r\n\r\nconst ButtonWrapper = styled.div({\r\n display: 'flex',\r\n margin: {\r\n top: '10px',\r\n },\r\n});\r\n\r\nclass ForgotPassword extends React.Component {\r\n constructor(props: PropType) {\r\n super(props);\r\n this.state = {\r\n failedMessage: null,\r\n };\r\n }\r\n\r\n onSubmit = (e: React.FormEvent) => {\r\n e.preventDefault();\r\n\r\n const email = this.props.email.trim();\r\n if (!email) {\r\n return;\r\n }\r\n\r\n this.setState({ failedMessage: null });\r\n\r\n const url = new URLX('/ForgotPasswordBlock/SendResetPasswordLink');\r\n url.searchParams.set('email', email);\r\n\r\n this.props.feedback.push(\r\n postJson(url)\r\n .then((result: ResetPasswordResultViewModel) => {\r\n if (result.success) {\r\n return Promise.resolve();\r\n } else {\r\n return Promise.reject(result.message);\r\n }\r\n })\r\n .catch(error => {\r\n this.setFailMessage(error);\r\n return Promise.reject(null);\r\n })\r\n .then(() => this.props.closeAccountPanel(epiPropertyValue(this.props.successMessage))),\r\n );\r\n };\r\n\r\n setFailMessage(failedMessage: string) {\r\n this.setState({ failedMessage });\r\n }\r\n\r\n onEmailFieldInput = (e: React.FormEvent) => {\r\n const value: string = (e.target as HTMLInputElement).value;\r\n this.props.updateEmail(value);\r\n this.setState({\r\n failedMessage: '',\r\n });\r\n };\r\n\r\n onBackClick = () => {\r\n this.props.setActiveAccountMode(ACCOUNT_MODE.Login);\r\n };\r\n\r\n render() {\r\n const FeedbackButton = this.props.feedback.Button;\r\n return (\r\n
\r\n \r\n \r\n {epiPropertyValue(this.props.emailLabel)}\r\n \r\n {!!this.state.failedMessage && {this.state.failedMessage}}\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\nconst ForgotPasswordWithFeedback = connectWithFeedback()(ForgotPassword);\r\n\r\nexport default connect(\r\n (state): ConnectStateType => ({\r\n activeAccountMode: state.currentUser.activeAccountMode,\r\n email: state.currentUser.accountPanelEmail,\r\n }),\r\n (dispatch): DispatchPropType => ({\r\n setActiveAccountMode(mode) {\r\n return dispatch(setActiveAccountMode(mode));\r\n },\r\n closeAccountPanel(snackMessage: string) {\r\n return dispatch(closeAccountPanel(snackMessage));\r\n },\r\n updateEmail(email: string) {\r\n return dispatch(updateEmail(email));\r\n },\r\n }),\r\n)(ForgotPasswordWithFeedback);\r\n","/**\r\n * @ComponentFor LoginBlock\r\n */\r\nimport React from 'react';\r\nimport { styled } from '@glitz/react';\r\nimport connect from 'Shared/connect';\r\nimport {\r\n URLX,\r\n translate,\r\n EpiProperty,\r\n epiPropertyValue,\r\n pushState,\r\n replaceState,\r\n postJson,\r\n addUserLog,\r\n Breakpoint,\r\n} from '@avensia/scope';\r\nimport LoginModelType from './LoginModel.type';\r\nimport LoginBlockType from './LoginBlock.type';\r\nimport { Checkbox } from 'Shared/Fields/Toggle';\r\nimport Input from 'Shared/Fields/Text';\r\nimport LoginResultViewModelType from './LoginResultViewModel.type';\r\nimport { connectWithFeedback, ConnectPropType } from 'Shared/Button/Feedback';\r\nimport { ACCOUNT_MODE, setActiveAccountMode, closeAccountPanel, updateEmail } from 'Account/action-creators';\r\nimport * as style from 'Shared/Style';\r\nimport Viewport from 'Shared/Viewport';\r\nimport RegisterValidationResult from 'Account/Register/RegisterValidationResult.type';\r\nimport Button, { Appearance as ButtonAppearance } from 'Shared/Button';\r\nimport { media } from '@glitz/core';\r\n\r\ntype StateType = {\r\n password: string;\r\n rememberMe: boolean;\r\n showPassword: boolean;\r\n errorMessage: string;\r\n informationMessage: string;\r\n url: string;\r\n};\r\n\r\ntype ConnectStateType = {\r\n activeAccountMode: ACCOUNT_MODE;\r\n accountPanelIsOpen: boolean;\r\n hardReloadToAfterLogin: URLX;\r\n panelMessage: string;\r\n email: string;\r\n};\r\n\r\ntype DispatchPropType = {\r\n setActiveAccountMode: (mode: ACCOUNT_MODE) => void;\r\n closeAccountPanel: (snackMessage?: string) => void;\r\n updateEmail: (email: string) => void;\r\n};\r\n\r\ntype PropType = LoginBlockType &\r\n ConnectPropType &\r\n ConnectStateType &\r\n DispatchPropType & { email: string; updateEmail: (email: string) => void };\r\n\r\nclass Login extends React.Component> {\r\n constructor(props: PropType) {\r\n super(props);\r\n\r\n this.state = {\r\n password: '',\r\n rememberMe: false,\r\n showPassword: false,\r\n errorMessage: null,\r\n informationMessage: null,\r\n url: null,\r\n };\r\n this.handleInputChange = this.handleInputChange.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n const url = new URL(window.location.href);\r\n if (url.searchParams.get('confirm-message')) {\r\n this.setInformationMessage(translate('/Account/Login/EmailConfirmed'));\r\n }\r\n }\r\n\r\n handleInputChange = (e: React.FormEvent): void => {\r\n const value: string = (e.target as HTMLInputElement).value;\r\n if (e.currentTarget.name === 'email') {\r\n this.props.updateEmail(value);\r\n } else {\r\n this.setState({\r\n [e.currentTarget.name]: value,\r\n errorMessage: null,\r\n });\r\n }\r\n };\r\n\r\n handleToggleChange = (e: React.FormEvent): void => {\r\n this.setState({ [e.currentTarget.name]: (e.target as HTMLInputElement).checked });\r\n };\r\n\r\n onForgotPasswordClick = (): void => {\r\n this.props.setActiveAccountMode(ACCOUNT_MODE.ForgotPassword);\r\n };\r\n\r\n onRegisterClick = (): void => {\r\n this.props.setActiveAccountMode(ACCOUNT_MODE.Registration);\r\n };\r\n\r\n closeErrorMessage = (): void => {\r\n this.setState({ errorMessage: null });\r\n };\r\n\r\n toggleShowPassword = (): void => {\r\n this.setState({ showPassword: !this.state.showPassword });\r\n };\r\n\r\n setErrorMessage(errorMessage: string) {\r\n this.setState({ errorMessage });\r\n }\r\n\r\n setErrorUrl(url: string) {\r\n this.setState({ url });\r\n }\r\n\r\n setInformationMessage(informationMessage: string) {\r\n this.setState({ informationMessage });\r\n }\r\n\r\n requestNewConfirmationMail = (): void => {\r\n postJson(`${this.state.url}`, { email: this.props.email })\r\n .then((response: RegisterValidationResult) => {\r\n if (response.isValid) {\r\n this.setInformationMessage(response.message);\r\n this.setErrorUrl(null);\r\n } else {\r\n return Promise.reject(response);\r\n }\r\n })\r\n .catch(() => {\r\n this.setErrorMessage(translate('/Account/Login/ServerError'));\r\n this.setErrorUrl(null);\r\n });\r\n };\r\n\r\n handleSubmit = (e: React.FormEvent): void => {\r\n e.preventDefault();\r\n\r\n this.closeErrorMessage();\r\n this.setErrorUrl(null);\r\n this.setInformationMessage(null);\r\n\r\n const email = this.props.email.trim();\r\n const password = this.state.password.trim();\r\n const rememberMe = this.state.rememberMe;\r\n const query: LoginModelType = { email, password, rememberMe };\r\n const pageToRedirectTo = epiPropertyValue(this.props.pageToRedirectTo)\r\n ? new URLX(epiPropertyValue(this.props.pageToRedirectTo))\r\n : null;\r\n\r\n this.props.feedback.push(\r\n postJson('/loginblock', query)\r\n .then((result: LoginResultViewModelType) => {\r\n if (result.success) {\r\n addUserLog('Login successful');\r\n return Promise.resolve();\r\n } else {\r\n addUserLog('Login failed');\r\n return Promise.reject(result);\r\n }\r\n })\r\n .then(() => {\r\n const url = new URL(window.location.href);\r\n if (url.searchParams.get('ReturnUrl')) {\r\n window.location.href = `${url.origin}/${url.searchParams.get('ReturnUrl')}`;\r\n return;\r\n }\r\n\r\n if (this.props.hardReloadToAfterLogin) {\r\n window.location.href = this.props.hardReloadToAfterLogin.toString();\r\n return;\r\n }\r\n\r\n if (pageToRedirectTo) {\r\n return pushState(pageToRedirectTo, { includeAppShellData: true }).then(() => {\r\n if (this.props.accountPanelIsOpen) {\r\n this.props.closeAccountPanel(translate('/Account/Login/Successful'));\r\n }\r\n });\r\n } else {\r\n return replaceState(null, { includeAppShellData: true }).then(() => {\r\n this.props.closeAccountPanel(translate('/Account/Login/Successful'));\r\n });\r\n }\r\n })\r\n .catch(errorMessage => {\r\n this.setErrorMessage(errorMessage.message || null);\r\n this.setErrorUrl(errorMessage.url || null);\r\n this.setInformationMessage(errorMessage.informationText || null);\r\n return Promise.reject(null);\r\n }),\r\n );\r\n };\r\n\r\n render() {\r\n const FeedbackButton = this.props.feedback.Button;\r\n return (\r\n \r\n {(isCompact: boolean) => (\r\n \r\n \r\n {epiPropertyValue(this.props.emailLabel)}\r\n \r\n {epiPropertyValue(this.props.passwordLabel)}\r\n \r\n {this.state.errorMessage && (\r\n \r\n {this.state.errorMessage}\r\n \r\n )}\r\n\r\n {this.props.panelMessage && (\r\n \r\n {this.props.panelMessage}\r\n \r\n )}\r\n\r\n {this.state.informationMessage && (\r\n \r\n \r\n {this.state.informationMessage}\r\n {this.state.url && (\r\n \r\n {translate('/Account/Login/RequestEmailConfirmationMail')}\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 {isCompact ? (\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 {isCompact ? (\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\nconst LoginWithFeedback = connectWithFeedback()(Login);\r\n\r\nexport default connect(\r\n (state): ConnectStateType => ({\r\n activeAccountMode: state.currentUser.activeAccountMode,\r\n accountPanelIsOpen: state.currentUser.accountPanelIsOpen,\r\n hardReloadToAfterLogin: state.currentUser.hardReloadToAfterLogin,\r\n email: state.currentUser.accountPanelEmail,\r\n panelMessage: state.currentUser.panelMessage,\r\n }),\r\n (dispatch): DispatchPropType => ({\r\n setActiveAccountMode(mode) {\r\n return dispatch(setActiveAccountMode(mode));\r\n },\r\n closeAccountPanel(snackMessage?: string) {\r\n return dispatch(closeAccountPanel(snackMessage));\r\n },\r\n updateEmail(email: string) {\r\n return dispatch(updateEmail(email));\r\n },\r\n }),\r\n)(LoginWithFeedback);\r\n\r\nconst ButtonWrapper = styled.div({\r\n display: 'flex',\r\n});\r\n\r\nconst ErrorMessage = styled.div({\r\n color: '#FF0000',\r\n fontWeight: 'bold',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n textAlign: 'center',\r\n marginBottom: 20,\r\n});\r\n\r\nconst InformationMessage = styled.div({\r\n color: style.BLACK,\r\n display: 'flex',\r\n justifyContent: 'center',\r\n textAlign: 'center',\r\n marginBottom: 20,\r\n});\r\n\r\nconst H4 = styled.h4({});\r\n\r\nconst InputLabel = styled.label({\r\n color: style.primary,\r\n fontSize: 21,\r\n fontWeight: 500,\r\n letterSpacing: -0.52,\r\n});\r\n\r\nconst ShowPasswordWrapper = styled.div({\r\n marginRight: 15,\r\n display: 'inline-flex',\r\n});\r\n\r\nconst RememberMeWrapper = styled.div({\r\n marginLeft: 15,\r\n display: 'inline-flex',\r\n});\r\n\r\nconst CheckboxLabel = styled.label({\r\n fontSize: 16,\r\n fontWeight: 300,\r\n marginLeft: 9,\r\n marginBottom: 5,\r\n color: style.secondaryDarker,\r\n});\r\n\r\nconst SigninForm = styled.form({\r\n display: 'flex',\r\n flexDirection: 'column',\r\n marginBottom: style.large,\r\n position: 'relative',\r\n});\r\n\r\nconst EmailField = styled(Input, {\r\n width: '100%',\r\n marginBottom: style.large,\r\n});\r\n\r\nconst PasswordField = styled(Input, {\r\n width: '100%',\r\n marginBottom: style.large,\r\n});\r\n\r\nconst ShowPassword = styled(Checkbox, {});\r\n\r\nconst RememberMe = styled(Checkbox, {});\r\n\r\nconst CenterWrapper = styled.div({\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n});\r\n\r\nconst CenterWrapper2 = styled.div({\r\n display: 'flex',\r\n flexDirection: 'row',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n});\r\n\r\nconst ForgotPasswordButton = styled(Button, {});\r\n\r\nconst RegisterUserButton = styled(Button, {\r\n margin: {\r\n bottom: '16px',\r\n },\r\n ...media(style.mediaMinQueries[Breakpoint.Small], {\r\n margin: {\r\n bottom: 0,\r\n },\r\n }),\r\n});\r\n","/**\r\n * @ComponentFor RegisterBlock\r\n */\r\n\r\nimport React from 'react';\r\nimport { styled } from '@glitz/react';\r\nimport connect from 'Shared/connect';\r\nimport {\r\n translate,\r\n EpiProperty,\r\n epiPropertyValue,\r\n postJson,\r\n addUserLog,\r\n updateAppShellData,\r\n Breakpoint,\r\n Link,\r\n} from '@avensia/scope';\r\nimport RegisterValidationResultType from './RegisterValidationResult.type';\r\nimport { connectWithFeedback, ConnectPropType } from 'Shared/Button/Feedback';\r\nimport Button, { Appearance as ButtonAppearance } from 'Shared/Button';\r\nimport { Checkbox } from 'Shared/Fields/Toggle';\r\nimport RegisterPropType from './Registerblock.type';\r\nimport Input from 'Shared/Fields/Text';\r\nimport { ACCOUNT_MODE, setActiveAccountMode, closeAccountPanel } from 'Account/action-creators';\r\nimport * as style from 'Shared/Style';\r\nimport { media } from '@glitz/core';\r\n\r\ntype StateType = {\r\n email: string;\r\n password: string;\r\n rememberMe: boolean;\r\n showPassword: boolean;\r\n acceptTerms: boolean;\r\n errorMessage: string;\r\n activePanel: ACCOUNT_MODE;\r\n};\r\n\r\ntype ConnectStateType = {\r\n activeAccountMode: ACCOUNT_MODE;\r\n};\r\n\r\ntype DispatchPropType = {\r\n updateAppShellData: () => Promise;\r\n setActiveAccountMode: (mode: ACCOUNT_MODE) => void;\r\n closeAccountPanel: (snackMessage?: string) => void;\r\n};\r\n\r\ntype PropType = RegisterPropType & ConnectPropType & ConnectStateType & DispatchPropType;\r\n\r\nconst H4 = styled.h4({});\r\n\r\nconst ErrorMessage = styled.div({\r\n color: style.RED,\r\n fontWeight: 'bold',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n margin: {\r\n bottom: '20px',\r\n },\r\n textAlign: 'center',\r\n});\r\n\r\nconst SigninForm = styled.form({\r\n display: 'flex',\r\n flexDirection: 'column',\r\n marginBottom: style.large,\r\n position: 'relative',\r\n});\r\n\r\nconst EmailField = styled(Input, {\r\n width: '100%',\r\n marginBottom: style.large,\r\n});\r\n\r\nconst PasswordField = styled(Input, {\r\n width: '100%',\r\n marginBottom: style.large,\r\n});\r\n\r\nconst FormBottom = styled.div({\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n textAlign: 'center',\r\n width: '100%',\r\n});\r\n\r\nconst BackToLoginButton = styled(Button, {\r\n ...media(style.mediaMinQueries[Breakpoint.Small], {\r\n marginRight: '14px',\r\n }),\r\n});\r\n\r\nconst CheckboxWrapper = styled.div({\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n textAlign: 'center',\r\n color: style.secondaryDarker,\r\n});\r\n\r\nconst CheckboxLabel = styled.label({\r\n margin: {\r\n top: '4px',\r\n left: '9px',\r\n },\r\n font: {\r\n size: '16px',\r\n weight: 300,\r\n },\r\n});\r\n\r\nconst InputLabel = styled.label({\r\n color: style.primary,\r\n font: {\r\n size: '21px',\r\n weight: 500,\r\n },\r\n letterSpacing: -0.52,\r\n});\r\n\r\nconst ForgotPasswordButton = styled(Button, {\r\n margin: {\r\n bottom: '21px',\r\n },\r\n ...media(style.mediaMinQueries[Breakpoint.Small], {\r\n margin: {\r\n left: '14px',\r\n bottom: 0,\r\n },\r\n }),\r\n});\r\n\r\nconst LinkWrapper = styled.div({\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n margin: {\r\n top: '17px',\r\n },\r\n ...media(style.mediaMinQueries[Breakpoint.Small], {\r\n flexDirection: 'row',\r\n justifyContent: 'center',\r\n width: '100%',\r\n margin: {\r\n top: '21px',\r\n },\r\n }),\r\n});\r\n\r\nconst ButtonWrapper = styled.div({\r\n display: 'flex',\r\n});\r\n\r\nclass Register extends React.Component> {\r\n constructor(props: PropType) {\r\n super(props);\r\n\r\n this.state = {\r\n email: '',\r\n password: '',\r\n rememberMe: false,\r\n showPassword: false,\r\n acceptTerms: false,\r\n errorMessage: null,\r\n activePanel: ACCOUNT_MODE.Registration,\r\n };\r\n }\r\n\r\n handleInputChange = (e: React.FormEvent): void => {\r\n const value: string = (e.target as HTMLInputElement).value;\r\n\r\n this.setState({\r\n [e.currentTarget.name]: value,\r\n errorMessage: null,\r\n });\r\n };\r\n\r\n handleSubmit = (e: React.FormEvent): void => {\r\n e.preventDefault();\r\n\r\n if (this.state.acceptTerms) {\r\n this.closeErrorMessage();\r\n\r\n const email = this.state.email.trim();\r\n const password = this.state.password.trim();\r\n const query = { email, password };\r\n\r\n this.props.feedback.push(\r\n postJson('/register', query)\r\n .then(\r\n (result: RegisterValidationResultType) => {\r\n if (result.isValid) {\r\n addUserLog('Register successful');\r\n this.props.closeAccountPanel(translate('/Account/Registration/RegistrationSuccessful'));\r\n return Promise.resolve();\r\n } else {\r\n addUserLog('Login failed');\r\n this.setState({ errorMessage: result.message });\r\n return Promise.reject(null);\r\n }\r\n },\r\n () => {\r\n this.setState({ errorMessage: translate('/Errors/Unknown') });\r\n return Promise.reject(null);\r\n },\r\n )\r\n .then(() => this.props.updateAppShellData()),\r\n );\r\n } else {\r\n this.setState({ errorMessage: translate('/Errors/Terms') });\r\n }\r\n };\r\n\r\n closeErrorMessage = (): void => {\r\n this.setState({ errorMessage: null });\r\n };\r\n\r\n toggleShowPassword = (): void => {\r\n this.setState(state => ({ showPassword: !state.showPassword }));\r\n };\r\n\r\n onGoToLoginClick = () => {\r\n this.props.setActiveAccountMode(ACCOUNT_MODE.Login);\r\n };\r\n\r\n onForgotPasswordClick = (): void => {\r\n this.props.setActiveAccountMode(ACCOUNT_MODE.ForgotPassword);\r\n };\r\n\r\n render() {\r\n const FeedbackButton = this.props.feedback.Button;\r\n const {\r\n blockTitle,\r\n emailLabel,\r\n passwordLabel,\r\n showPasswordLabel,\r\n termsAgreementLink,\r\n termsAgreementLinkText,\r\n registerButtonCaption,\r\n goToLoginLabel,\r\n forgotPasswordLabel,\r\n } = this.props;\r\n return (\r\n \r\n \r\n {epiPropertyValue(emailLabel)}\r\n \r\n \r\n {epiPropertyValue(passwordLabel)} (minimum 6 characters)\r\n \r\n \r\n {this.state.errorMessage && {this.state.errorMessage}}\r\n \r\n this.setState({ showPassword: (e.target as HTMLInputElement).checked })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n this.setState({ acceptTerms: (e.target as HTMLInputElement).checked })}\r\n style={{ paddingBottom: '28px' }}\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\nconst RegisterWithFeedback = connectWithFeedback()(Register);\r\n\r\nexport default connect(\r\n (state): ConnectStateType => ({\r\n activeAccountMode: state.currentUser.activeAccountMode,\r\n }),\r\n (dispatch): DispatchPropType => ({\r\n updateAppShellData() {\r\n return dispatch(updateAppShellData());\r\n },\r\n setActiveAccountMode(mode) {\r\n return dispatch(setActiveAccountMode(mode));\r\n },\r\n closeAccountPanel(snackMessage?: string) {\r\n return dispatch(closeAccountPanel(snackMessage));\r\n },\r\n }),\r\n)(RegisterWithFeedback);\r\n"],"sourceRoot":""}