@openedx/frontend-app-authn 1.0.0-alpha.0 → 1.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Main.d.ts +3 -0
- package/dist/Main.js +10 -0
- package/dist/Main.js.map +1 -0
- package/dist/app.d.ts +3 -0
- package/dist/app.js +41 -0
- package/dist/app.js.map +1 -0
- package/dist/app.scss +2 -0
- package/dist/base-container/components/default-layout/LargeLayout.d.ts +2 -0
- package/dist/base-container/components/default-layout/LargeLayout.js +11 -0
- package/dist/base-container/components/default-layout/LargeLayout.js.map +1 -0
- package/dist/base-container/components/default-layout/MediumLayout.d.ts +2 -0
- package/dist/base-container/components/default-layout/MediumLayout.js +11 -0
- package/dist/base-container/components/default-layout/MediumLayout.js.map +1 -0
- package/dist/base-container/components/default-layout/SmallLayout.d.ts +2 -0
- package/dist/base-container/components/default-layout/SmallLayout.js +11 -0
- package/dist/base-container/components/default-layout/SmallLayout.js.map +1 -0
- package/dist/base-container/components/default-layout/index.d.ts +3 -0
- package/{src/base-container/components/default-layout/index.jsx → dist/base-container/components/default-layout/index.js} +1 -0
- package/dist/base-container/components/default-layout/index.js.map +1 -0
- package/dist/base-container/components/default-layout/messages.d.ts +13 -0
- package/dist/base-container/components/default-layout/messages.js +15 -0
- package/dist/base-container/components/default-layout/messages.js.map +1 -0
- package/dist/base-container/components/image-layout/ExtraSmallLayout.d.ts +2 -0
- package/dist/base-container/components/image-layout/ExtraSmallLayout.js +10 -0
- package/dist/base-container/components/image-layout/ExtraSmallLayout.js.map +1 -0
- package/dist/base-container/components/image-layout/LargeLayout.d.ts +2 -0
- package/dist/base-container/components/image-layout/LargeLayout.js +11 -0
- package/dist/base-container/components/image-layout/LargeLayout.js.map +1 -0
- package/dist/base-container/components/image-layout/MediumLayout.d.ts +2 -0
- package/dist/base-container/components/image-layout/MediumLayout.js +11 -0
- package/dist/base-container/components/image-layout/MediumLayout.js.map +1 -0
- package/dist/base-container/components/image-layout/SmallLayout.d.ts +2 -0
- package/dist/base-container/components/image-layout/SmallLayout.js +10 -0
- package/dist/base-container/components/image-layout/SmallLayout.js.map +1 -0
- package/dist/base-container/components/image-layout/index.d.ts +4 -0
- package/{src/base-container/components/image-layout/index.jsx → dist/base-container/components/image-layout/index.js} +1 -0
- package/dist/base-container/components/image-layout/index.js.map +1 -0
- package/dist/base-container/components/image-layout/messages.d.ts +13 -0
- package/dist/base-container/components/image-layout/messages.js +15 -0
- package/dist/base-container/components/image-layout/messages.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/LargeLayout.d.ts +10 -0
- package/dist/base-container/components/welcome-page-layout/LargeLayout.js +14 -0
- package/dist/base-container/components/welcome-page-layout/LargeLayout.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/MediumLayout.d.ts +10 -0
- package/dist/base-container/components/welcome-page-layout/MediumLayout.js +14 -0
- package/dist/base-container/components/welcome-page-layout/MediumLayout.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/SmallLayout.d.ts +10 -0
- package/dist/base-container/components/welcome-page-layout/SmallLayout.js +14 -0
- package/dist/base-container/components/welcome-page-layout/SmallLayout.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/index.d.ts +3 -0
- package/{src/base-container/components/welcome-page-layout/index.jsx → dist/base-container/components/welcome-page-layout/index.js} +1 -0
- package/dist/base-container/components/welcome-page-layout/index.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/messages.d.ts +18 -0
- package/dist/base-container/components/welcome-page-layout/messages.js +20 -0
- package/dist/base-container/components/welcome-page-layout/messages.js.map +1 -0
- package/dist/base-container/index.d.ts +20 -0
- package/dist/base-container/index.js +27 -0
- package/dist/base-container/index.js.map +1 -0
- package/dist/common-components/EmbeddedRegistrationRoute.d.ts +14 -0
- package/dist/common-components/EmbeddedRegistrationRoute.js +22 -0
- package/dist/common-components/EmbeddedRegistrationRoute.js.map +1 -0
- package/dist/common-components/EnterpriseSSO.d.ts +29 -0
- package/dist/common-components/EnterpriseSSO.js +58 -0
- package/dist/common-components/EnterpriseSSO.js.map +1 -0
- package/dist/common-components/FormGroup.d.ts +60 -0
- package/dist/common-components/FormGroup.js +66 -0
- package/dist/common-components/FormGroup.js.map +1 -0
- package/dist/common-components/InstitutionLogistration.d.ts +34 -0
- package/dist/common-components/InstitutionLogistration.js +38 -0
- package/dist/common-components/InstitutionLogistration.js.map +1 -0
- package/dist/common-components/NotFoundPage.d.ts +2 -0
- package/dist/common-components/NotFoundPage.js +5 -0
- package/dist/common-components/NotFoundPage.js.map +1 -0
- package/dist/common-components/PasswordField.d.ts +47 -0
- package/dist/common-components/PasswordField.js +98 -0
- package/dist/common-components/PasswordField.js.map +1 -0
- package/dist/common-components/RedirectLogistration.d.ts +39 -0
- package/dist/common-components/RedirectLogistration.js +72 -0
- package/dist/common-components/RedirectLogistration.js.map +1 -0
- package/dist/common-components/RegisterFaIcons.d.ts +1 -0
- package/dist/common-components/RegisterFaIcons.js +6 -0
- package/dist/common-components/RegisterFaIcons.js.map +1 -0
- package/dist/common-components/SocialAuthProviders.d.ts +23 -0
- package/dist/common-components/SocialAuthProviders.js +43 -0
- package/dist/common-components/SocialAuthProviders.js.map +1 -0
- package/dist/common-components/ThirdPartyAuth.d.ts +42 -0
- package/dist/common-components/ThirdPartyAuth.js +57 -0
- package/dist/common-components/ThirdPartyAuth.js.map +1 -0
- package/dist/common-components/ThirdPartyAuthAlert.d.ts +15 -0
- package/dist/common-components/ThirdPartyAuthAlert.js +32 -0
- package/dist/common-components/ThirdPartyAuthAlert.js.map +1 -0
- package/dist/common-components/UnAuthOnlyRoute.d.ts +14 -0
- package/dist/common-components/UnAuthOnlyRoute.js +32 -0
- package/dist/common-components/UnAuthOnlyRoute.js.map +1 -0
- package/dist/common-components/components/ThirdPartyAuthContext.d.ts +31 -0
- package/dist/common-components/components/ThirdPartyAuthContext.js +84 -0
- package/dist/common-components/components/ThirdPartyAuthContext.js.map +1 -0
- package/dist/common-components/data/api.d.ts +6 -0
- package/dist/common-components/data/api.js +26 -0
- package/dist/common-components/data/api.js.map +1 -0
- package/dist/common-components/data/apiHook.d.ts +9 -0
- package/dist/common-components/data/apiHook.js +14 -0
- package/dist/common-components/data/apiHook.js.map +1 -0
- package/dist/common-components/data/queryKeys.d.ts +4 -0
- package/dist/common-components/data/queryKeys.js +6 -0
- package/dist/common-components/data/queryKeys.js.map +1 -0
- package/dist/common-components/index.d.ts +10 -0
- package/{src/common-components/index.jsx → dist/common-components/index.js} +1 -3
- package/dist/common-components/index.js.map +1 -0
- package/dist/common-components/messages.d.ts +113 -0
- package/dist/common-components/messages.js +126 -0
- package/dist/common-components/messages.js.map +1 -0
- package/dist/constants.d.ts +14 -0
- package/dist/constants.js +17 -0
- package/dist/constants.js.map +1 -0
- package/dist/data/constants.d.ts +16 -0
- package/{src → dist}/data/constants.js +4 -17
- package/dist/data/constants.js.map +1 -0
- package/dist/data/countries.d.ts +26 -0
- package/{src/data/countries.ts → dist/data/countries.js} +6 -9
- package/dist/data/countries.js.map +1 -0
- package/dist/data/oneTrust.d.ts +2 -0
- package/dist/data/oneTrust.js +3 -0
- package/dist/data/oneTrust.js.map +1 -0
- package/dist/data/utils/cookies.d.ts +1 -0
- package/dist/data/utils/cookies.js +12 -0
- package/dist/data/utils/cookies.js.map +1 -0
- package/dist/data/utils/dataUtils.d.ts +12 -0
- package/dist/data/utils/dataUtils.js +81 -0
- package/dist/data/utils/dataUtils.js.map +1 -0
- package/dist/data/utils/index.d.ts +2 -0
- package/dist/data/utils/index.js +3 -0
- package/dist/data/utils/index.js.map +1 -0
- package/dist/data/utils/useMobileResponsive.d.ts +7 -0
- package/dist/data/utils/useMobileResponsive.js +22 -0
- package/dist/data/utils/useMobileResponsive.js.map +1 -0
- package/dist/field-renderer/FieldRenderer.d.ts +34 -0
- package/dist/field-renderer/FieldRenderer.js +70 -0
- package/dist/field-renderer/FieldRenderer.js.map +1 -0
- package/dist/field-renderer/index.d.ts +1 -0
- package/{src/field-renderer/index.jsx → dist/field-renderer/index.js} +1 -0
- package/dist/field-renderer/index.js.map +1 -0
- package/dist/forgot-password/ForgotPasswordAlert.d.ts +16 -0
- package/dist/forgot-password/ForgotPasswordAlert.js +66 -0
- package/dist/forgot-password/ForgotPasswordAlert.js.map +1 -0
- package/dist/forgot-password/ForgotPasswordPage.d.ts +2 -0
- package/dist/forgot-password/ForgotPasswordPage.js +92 -0
- package/dist/forgot-password/ForgotPasswordPage.js.map +1 -0
- package/dist/forgot-password/data/api.d.ts +2 -0
- package/dist/forgot-password/data/api.js +25 -0
- package/dist/forgot-password/data/api.js.map +1 -0
- package/dist/forgot-password/data/apiHook.d.ts +16 -0
- package/dist/forgot-password/data/apiHook.js +26 -0
- package/dist/forgot-password/data/apiHook.js.map +1 -0
- package/dist/forgot-password/index.d.ts +1 -0
- package/dist/forgot-password/index.js +2 -0
- package/dist/forgot-password/index.js.map +1 -0
- package/dist/forgot-password/messages.d.ts +123 -0
- package/dist/forgot-password/messages.js +128 -0
- package/dist/forgot-password/messages.js.map +1 -0
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/index.js +2 -0
- package/dist/i18n/index.js.map +1 -0
- package/{src/index.ts → dist/index.d.ts} +0 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/login/AccountActivationMessage.d.ts +14 -0
- package/dist/login/AccountActivationMessage.js +49 -0
- package/dist/login/AccountActivationMessage.js.map +1 -0
- package/dist/login/ChangePasswordPrompt.d.ts +18 -0
- package/dist/login/ChangePasswordPrompt.js +51 -0
- package/dist/login/ChangePasswordPrompt.js.map +1 -0
- package/dist/login/LoginFailure.d.ts +25 -0
- package/dist/login/LoginFailure.js +109 -0
- package/dist/login/LoginFailure.js.map +1 -0
- package/dist/login/LoginPage.d.ts +12 -0
- package/dist/login/LoginPage.js +174 -0
- package/dist/login/LoginPage.js.map +1 -0
- package/dist/login/components/LoginContext.d.ts +21 -0
- package/dist/login/components/LoginContext.js +28 -0
- package/dist/login/components/LoginContext.js.map +1 -0
- package/dist/login/data/api.d.ts +2 -0
- package/dist/login/data/api.js +27 -0
- package/dist/login/data/api.js.map +1 -0
- package/dist/login/data/apiHook.d.ts +13 -0
- package/dist/login/data/apiHook.js +57 -0
- package/dist/login/data/apiHook.js.map +1 -0
- package/dist/login/data/constants.d.ts +17 -0
- package/{src → dist}/login/data/constants.js +4 -4
- package/dist/login/data/constants.js.map +1 -0
- package/dist/login/index.d.ts +1 -0
- package/dist/login/index.js +2 -0
- package/dist/login/index.js.map +1 -0
- package/dist/login/messages.d.ts +198 -0
- package/dist/login/messages.js +210 -0
- package/dist/login/messages.js.map +1 -0
- package/dist/logistration/Logistration.d.ts +5 -0
- package/dist/logistration/Logistration.js +80 -0
- package/dist/logistration/Logistration.js.map +1 -0
- package/dist/progressive-profiling/ProgressiveProfiling.d.ts +2 -0
- package/dist/progressive-profiling/ProgressiveProfiling.js +143 -0
- package/dist/progressive-profiling/ProgressiveProfiling.js.map +1 -0
- package/dist/progressive-profiling/ProgressiveProfilingPageModal.d.ts +13 -0
- package/dist/progressive-profiling/ProgressiveProfilingPageModal.js +31 -0
- package/dist/progressive-profiling/ProgressiveProfilingPageModal.js.map +1 -0
- package/dist/progressive-profiling/components/ProgressiveProfilingContext.d.ts +18 -0
- package/dist/progressive-profiling/components/ProgressiveProfilingContext.js +52 -0
- package/dist/progressive-profiling/components/ProgressiveProfilingContext.js.map +1 -0
- package/dist/progressive-profiling/data/api.d.ts +2 -0
- package/dist/progressive-profiling/data/api.js +22 -0
- package/dist/progressive-profiling/data/api.js.map +1 -0
- package/dist/progressive-profiling/data/apiHook.d.ts +10 -0
- package/dist/progressive-profiling/data/apiHook.js +36 -0
- package/dist/progressive-profiling/data/apiHook.js.map +1 -0
- package/dist/progressive-profiling/index.d.ts +2 -0
- package/{src → dist}/progressive-profiling/index.js +1 -3
- package/dist/progressive-profiling/index.js.map +1 -0
- package/dist/progressive-profiling/messages.d.ts +53 -0
- package/dist/progressive-profiling/messages.js +57 -0
- package/dist/progressive-profiling/messages.js.map +1 -0
- package/dist/provides.d.ts +4 -0
- package/dist/provides.js +7 -0
- package/dist/provides.js.map +1 -0
- package/dist/register/RegistrationFields/CountryField/CountryField.d.ts +38 -0
- package/dist/register/RegistrationFields/CountryField/CountryField.js +93 -0
- package/dist/register/RegistrationFields/CountryField/CountryField.js.map +1 -0
- package/dist/register/RegistrationFields/CountryField/validator.d.ts +8 -0
- package/dist/register/RegistrationFields/CountryField/validator.js +29 -0
- package/dist/register/RegistrationFields/CountryField/validator.js.map +1 -0
- package/dist/register/RegistrationFields/EmailField/EmailField.d.ts +30 -0
- package/dist/register/RegistrationFields/EmailField/EmailField.js +88 -0
- package/dist/register/RegistrationFields/EmailField/EmailField.js.map +1 -0
- package/dist/register/RegistrationFields/EmailField/constants.d.ts +3 -0
- package/dist/register/RegistrationFields/EmailField/constants.js +130 -0
- package/dist/register/RegistrationFields/EmailField/constants.js.map +1 -0
- package/dist/register/RegistrationFields/EmailField/validator.d.ts +17 -0
- package/dist/register/RegistrationFields/EmailField/validator.js +107 -0
- package/dist/register/RegistrationFields/EmailField/validator.js.map +1 -0
- package/dist/register/RegistrationFields/HonorCodeField/HonorCode.d.ts +21 -0
- package/dist/register/RegistrationFields/HonorCodeField/HonorCode.js +40 -0
- package/dist/register/RegistrationFields/HonorCodeField/HonorCode.js.map +1 -0
- package/dist/register/RegistrationFields/NameField/NameField.d.ts +29 -0
- package/dist/register/RegistrationFields/NameField/NameField.js +59 -0
- package/dist/register/RegistrationFields/NameField/NameField.js.map +1 -0
- package/dist/register/RegistrationFields/NameField/validator.d.ts +6 -0
- package/dist/register/RegistrationFields/NameField/validator.js +23 -0
- package/dist/register/RegistrationFields/NameField/validator.js.map +1 -0
- package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.d.ts +16 -0
- package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.js +24 -0
- package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.js.map +1 -0
- package/dist/register/RegistrationFields/UsernameField/UsernameField.d.ts +31 -0
- package/dist/register/RegistrationFields/UsernameField/UsernameField.js +119 -0
- package/dist/register/RegistrationFields/UsernameField/UsernameField.js.map +1 -0
- package/dist/register/RegistrationFields/UsernameField/validator.d.ts +4 -0
- package/dist/register/RegistrationFields/UsernameField/validator.js +15 -0
- package/dist/register/RegistrationFields/UsernameField/validator.js.map +1 -0
- package/dist/register/RegistrationFields/index.d.ts +6 -0
- package/{src → dist}/register/RegistrationFields/index.js +1 -0
- package/dist/register/RegistrationFields/index.js.map +1 -0
- package/dist/register/RegistrationPage.d.ts +18 -0
- package/dist/register/RegistrationPage.js +259 -0
- package/dist/register/RegistrationPage.js.map +1 -0
- package/dist/register/components/ConfigurableRegistrationForm.d.ts +37 -0
- package/dist/register/components/ConfigurableRegistrationForm.js +145 -0
- package/dist/register/components/ConfigurableRegistrationForm.js.map +1 -0
- package/dist/register/components/RegisterContext.d.ts +8 -0
- package/dist/register/components/RegisterContext.js +167 -0
- package/dist/register/components/RegisterContext.js.map +1 -0
- package/dist/register/components/RegistrationFailure.d.ts +19 -0
- package/dist/register/components/RegistrationFailure.js +60 -0
- package/dist/register/components/RegistrationFailure.js.map +1 -0
- package/dist/register/data/api.d.ts +9 -0
- package/dist/register/data/api.js +45 -0
- package/dist/register/data/api.js.map +1 -0
- package/dist/register/data/apiHook.d.ts +33 -0
- package/dist/register/data/apiHook.js +66 -0
- package/dist/register/data/apiHook.js.map +1 -0
- package/dist/register/data/constants.d.ts +11 -0
- package/{src → dist}/register/data/constants.js +5 -4
- package/dist/register/data/constants.js.map +1 -0
- package/dist/register/data/utils.d.ts +6 -0
- package/dist/register/data/utils.js +128 -0
- package/dist/register/data/utils.js.map +1 -0
- package/dist/register/index.d.ts +1 -0
- package/dist/register/index.js +2 -0
- package/dist/register/index.js.map +1 -0
- package/dist/register/messages.d.ts +203 -0
- package/dist/register/messages.js +215 -0
- package/dist/register/messages.js.map +1 -0
- package/dist/register/types.d.ts +74 -0
- package/dist/register/types.js +2 -0
- package/dist/register/types.js.map +1 -0
- package/dist/reset-password/ResetPasswordFailure.d.ts +15 -0
- package/dist/reset-password/ResetPasswordFailure.js +44 -0
- package/dist/reset-password/ResetPasswordFailure.js.map +1 -0
- package/dist/reset-password/ResetPasswordPage.d.ts +2 -0
- package/dist/reset-password/ResetPasswordPage.js +182 -0
- package/dist/reset-password/ResetPasswordPage.js.map +1 -0
- package/dist/reset-password/ResetPasswordSuccess.d.ts +2 -0
- package/dist/reset-password/ResetPasswordSuccess.js +10 -0
- package/dist/reset-password/ResetPasswordSuccess.js.map +1 -0
- package/dist/reset-password/data/api.d.ts +4 -0
- package/dist/reset-password/data/api.js +57 -0
- package/dist/reset-password/data/api.js.map +1 -0
- package/dist/reset-password/data/apiHook.d.ts +31 -0
- package/dist/reset-password/data/apiHook.js +74 -0
- package/dist/reset-password/data/apiHook.js.map +1 -0
- package/dist/reset-password/data/constants.d.ts +13 -0
- package/{src → dist}/reset-password/data/constants.js +6 -7
- package/dist/reset-password/data/constants.js.map +1 -0
- package/dist/reset-password/index.d.ts +1 -0
- package/dist/reset-password/index.js +2 -0
- package/dist/reset-password/index.js.map +1 -0
- package/dist/reset-password/messages.d.ts +83 -0
- package/dist/reset-password/messages.js +87 -0
- package/dist/reset-password/messages.js.map +1 -0
- package/dist/routes.d.ts +19 -0
- package/dist/routes.js +76 -0
- package/dist/routes.js.map +1 -0
- package/{src → dist}/sass/_base_component.scss +57 -54
- package/{src → dist}/sass/_progressive_profiling_page.scss +1 -3
- package/{src → dist}/sass/_registration.scss +15 -18
- package/{src → dist}/sass/_style.scss +40 -43
- package/dist/slots/LoginComponentSlot/index.d.ts +12 -0
- package/dist/slots/LoginComponentSlot/index.js +11 -0
- package/dist/slots/LoginComponentSlot/index.js.map +1 -0
- package/package.json +38 -16
- package/src/Main.tsx +0 -23
- package/src/__mocks__/file.js +0 -1
- package/src/__mocks__/svg.js +0 -1
- package/src/app.scss +0 -6
- package/src/app.ts +0 -43
- package/src/base-container/components/default-layout/DefaultLayout.test.jsx +0 -48
- package/src/base-container/components/default-layout/LargeLayout.jsx +0 -42
- package/src/base-container/components/default-layout/MediumLayout.jsx +0 -49
- package/src/base-container/components/default-layout/SmallLayout.jsx +0 -37
- package/src/base-container/components/default-layout/messages.js +0 -16
- package/src/base-container/components/image-layout/ExtraSmallLayout.jsx +0 -31
- package/src/base-container/components/image-layout/LargeLayout.jsx +0 -32
- package/src/base-container/components/image-layout/MediumLayout.jsx +0 -32
- package/src/base-container/components/image-layout/SmallLayout.jsx +0 -31
- package/src/base-container/components/image-layout/messages.js +0 -16
- package/src/base-container/components/welcome-page-layout/LargeLayout.jsx +0 -46
- package/src/base-container/components/welcome-page-layout/MediumLayout.jsx +0 -49
- package/src/base-container/components/welcome-page-layout/SmallLayout.jsx +0 -38
- package/src/base-container/components/welcome-page-layout/messages.js +0 -21
- package/src/base-container/index.jsx +0 -70
- package/src/base-container/tests/BaseContainer.test.jsx +0 -44
- package/src/common-components/EmbeddedRegistrationRoute.jsx +0 -26
- package/src/common-components/EnterpriseSSO.jsx +0 -110
- package/src/common-components/FormGroup.jsx +0 -106
- package/src/common-components/InstitutionLogistration.jsx +0 -102
- package/src/common-components/NotFoundPage.jsx +0 -15
- package/src/common-components/PasswordField.jsx +0 -175
- package/src/common-components/RedirectLogistration.jsx +0 -94
- package/src/common-components/RegisterFaIcons.jsx +0 -8
- package/src/common-components/SocialAuthProviders.jsx +0 -75
- package/src/common-components/ThirdPartyAuth.jsx +0 -123
- package/src/common-components/ThirdPartyAuthAlert.jsx +0 -49
- package/src/common-components/UnAuthOnlyRoute.jsx +0 -41
- package/src/common-components/data/actions.js +0 -27
- package/src/common-components/data/reducers.js +0 -63
- package/src/common-components/data/sagas.js +0 -32
- package/src/common-components/data/selectors.js +0 -28
- package/src/common-components/data/service.js +0 -23
- package/src/common-components/data/tests/reducer.test.js +0 -82
- package/src/common-components/data/tests/sagas.test.js +0 -71
- package/src/common-components/messages.jsx +0 -127
- package/src/common-components/tests/EmbeddedRegistrationRoute.test.jsx +0 -76
- package/src/common-components/tests/FormField.test.jsx +0 -289
- package/src/common-components/tests/SocialAuthProviders.test.jsx +0 -75
- package/src/common-components/tests/ThirdPartyAuthAlert.test.jsx +0 -39
- package/src/common-components/tests/UnAuthOnlyRoute.test.jsx +0 -73
- package/src/common-components/tests/__snapshots__/SocialAuthProviders.test.jsx.snap +0 -156
- package/src/common-components/tests/__snapshots__/ThirdPartyAuthAlert.test.jsx.snap +0 -53
- package/src/constants.ts +0 -1
- package/src/data/configureStore.js +0 -33
- package/src/data/oneTrust.js +0 -3
- package/src/data/reducers.js +0 -36
- package/src/data/sagas.js +0 -19
- package/src/data/tests/cookies.test.js +0 -42
- package/src/data/tests/dataUtils.test.js +0 -19
- package/src/data/tests/reduxUtils.test.js +0 -14
- package/src/data/utils/cookies.js +0 -12
- package/src/data/utils/dataUtils.js +0 -81
- package/src/data/utils/index.js +0 -11
- package/src/data/utils/reduxUtils.js +0 -34
- package/src/data/utils/useMobileResponsive.js +0 -24
- package/src/field-renderer/FieldRenderer.jsx +0 -156
- package/src/field-renderer/tests/FieldRenderer.test.jsx +0 -201
- package/src/forgot-password/ForgotPasswordAlert.jsx +0 -97
- package/src/forgot-password/ForgotPasswordPage.jsx +0 -193
- package/src/forgot-password/data/actions.js +0 -32
- package/src/forgot-password/data/reducers.js +0 -58
- package/src/forgot-password/data/sagas.js +0 -35
- package/src/forgot-password/data/selectors.js +0 -10
- package/src/forgot-password/data/service.js +0 -21
- package/src/forgot-password/data/tests/reducers.test.js +0 -34
- package/src/forgot-password/data/tests/sagas.test.js +0 -67
- package/src/forgot-password/index.js +0 -5
- package/src/forgot-password/messages.js +0 -128
- package/src/forgot-password/tests/ForgotPasswordPage.test.jsx +0 -269
- package/src/i18n/index.js +0 -25
- package/src/login/AccountActivationMessage.jsx +0 -78
- package/src/login/ChangePasswordPrompt.jsx +0 -91
- package/src/login/LoginFailure.jsx +0 -231
- package/src/login/LoginPage.jsx +0 -368
- package/src/login/data/actions.js +0 -39
- package/src/login/data/reducers.js +0 -76
- package/src/login/data/sagas.js +0 -45
- package/src/login/data/service.js +0 -24
- package/src/login/data/tests/reducers.test.js +0 -155
- package/src/login/data/tests/sagas.test.js +0 -110
- package/src/login/index.js +0 -5
- package/src/login/messages.jsx +0 -211
- package/src/login/tests/AccountActivationMessage.test.jsx +0 -122
- package/src/login/tests/ChangePasswordPrompt.test.jsx +0 -75
- package/src/login/tests/LoginFailure.test.jsx +0 -323
- package/src/login/tests/LoginPage.test.jsx +0 -839
- package/src/logistration/Logistration.jsx +0 -189
- package/src/logistration/Logistration.test.jsx +0 -275
- package/src/progressive-profiling/ProgressiveProfiling.jsx +0 -313
- package/src/progressive-profiling/ProgressiveProfilingPageModal.jsx +0 -56
- package/src/progressive-profiling/data/actions.js +0 -22
- package/src/progressive-profiling/data/reducers.js +0 -38
- package/src/progressive-profiling/data/sagas.js +0 -24
- package/src/progressive-profiling/data/selectors.js +0 -14
- package/src/progressive-profiling/data/service.js +0 -17
- package/src/progressive-profiling/messages.jsx +0 -57
- package/src/progressive-profiling/tests/ProgressiveProfiling.test.jsx +0 -322
- package/src/register/RegistrationFields/CountryField/CountryField.jsx +0 -164
- package/src/register/RegistrationFields/CountryField/CountryField.test.jsx +0 -204
- package/src/register/RegistrationFields/CountryField/validator.js +0 -32
- package/src/register/RegistrationFields/EmailField/EmailField.jsx +0 -140
- package/src/register/RegistrationFields/EmailField/EmailField.test.jsx +0 -236
- package/src/register/RegistrationFields/EmailField/constants.js +0 -131
- package/src/register/RegistrationFields/EmailField/validator.js +0 -126
- package/src/register/RegistrationFields/EmailField/validator.test.js +0 -39
- package/src/register/RegistrationFields/HonorCodeField/HonorCode.jsx +0 -104
- package/src/register/RegistrationFields/HonorCodeField/HonorCode.test.jsx +0 -70
- package/src/register/RegistrationFields/NameField/NameField.jsx +0 -68
- package/src/register/RegistrationFields/NameField/NameField.test.jsx +0 -146
- package/src/register/RegistrationFields/NameField/validator.js +0 -22
- package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.jsx +0 -58
- package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.test.jsx +0 -55
- package/src/register/RegistrationFields/UsernameField/UsernameField.jsx +0 -162
- package/src/register/RegistrationFields/UsernameField/UsernameField.test.jsx +0 -319
- package/src/register/RegistrationFields/UsernameField/validator.js +0 -16
- package/src/register/RegistrationPage.jsx +0 -428
- package/src/register/RegistrationPage.test.jsx +0 -854
- package/src/register/components/ConfigurableRegistrationForm.jsx +0 -244
- package/src/register/components/RegistrationFailure.jsx +0 -80
- package/src/register/components/tests/ConfigurableRegistrationForm.test.jsx +0 -401
- package/src/register/components/tests/RegistrationFailure.test.jsx +0 -212
- package/src/register/components/tests/ThirdPartyAuth.test.jsx +0 -439
- package/src/register/data/actions.js +0 -85
- package/src/register/data/reducers.js +0 -140
- package/src/register/data/sagas.js +0 -58
- package/src/register/data/selectors.js +0 -34
- package/src/register/data/service.js +0 -45
- package/src/register/data/tests/reducers.test.js +0 -277
- package/src/register/data/tests/sagas.test.js +0 -239
- package/src/register/data/tests/utils.test.js +0 -98
- package/src/register/data/utils.js +0 -153
- package/src/register/index.js +0 -4
- package/src/register/messages.jsx +0 -206
- package/src/reset-password/ResetPasswordFailure.jsx +0 -55
- package/src/reset-password/ResetPasswordPage.jsx +0 -224
- package/src/reset-password/ResetPasswordSuccess.jsx +0 -19
- package/src/reset-password/data/actions.js +0 -50
- package/src/reset-password/data/reducers.js +0 -44
- package/src/reset-password/data/sagas.js +0 -67
- package/src/reset-password/data/selectors.js +0 -10
- package/src/reset-password/data/service.js +0 -61
- package/src/reset-password/data/tests/sagas.test.js +0 -185
- package/src/reset-password/index.js +0 -5
- package/src/reset-password/messages.js +0 -88
- package/src/reset-password/tests/ResetPasswordPage.test.jsx +0 -241
- package/src/routes.jsx +0 -79
- package/src/setupTest.js +0 -68
- /package/{src → dist}/base-container/components/image-layout/index.scss +0 -0
- /package/{src → dist}/sass/_forgot_password.scss +0 -0
- /package/{src → dist}/sass/_login_page.scss +0 -0
- /package/{src → dist}/sass/_reset_password.scss +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
export default messages;
|
|
2
|
+
declare const messages: {
|
|
3
|
+
'login.page.title': {
|
|
4
|
+
id: string;
|
|
5
|
+
defaultMessage: string;
|
|
6
|
+
description: string;
|
|
7
|
+
};
|
|
8
|
+
'login.user.identity.label': {
|
|
9
|
+
id: string;
|
|
10
|
+
defaultMessage: string;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
'login.password.label': {
|
|
14
|
+
id: string;
|
|
15
|
+
defaultMessage: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
'sign.in.button': {
|
|
19
|
+
id: string;
|
|
20
|
+
defaultMessage: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
'forgot.password': {
|
|
24
|
+
id: string;
|
|
25
|
+
defaultMessage: string;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
'institution.login.button': {
|
|
29
|
+
id: string;
|
|
30
|
+
defaultMessage: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
'institution.login.page.title': {
|
|
34
|
+
id: string;
|
|
35
|
+
defaultMessage: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
'institution.login.page.sub.heading': {
|
|
39
|
+
id: string;
|
|
40
|
+
defaultMessage: string;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
'non.compliant.password.title': {
|
|
44
|
+
id: string;
|
|
45
|
+
defaultMessage: string;
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
'non.compliant.password.message': {
|
|
49
|
+
id: string;
|
|
50
|
+
defaultMessage: string;
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
'account.locked.out.message.1': {
|
|
54
|
+
id: string;
|
|
55
|
+
defaultMessage: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
'username.or.email.format.validation.less.chars.message': {
|
|
59
|
+
id: string;
|
|
60
|
+
defaultMessage: string;
|
|
61
|
+
description: string;
|
|
62
|
+
};
|
|
63
|
+
'email.validation.message': {
|
|
64
|
+
id: string;
|
|
65
|
+
defaultMessage: string;
|
|
66
|
+
description: string;
|
|
67
|
+
};
|
|
68
|
+
'password.validation.message': {
|
|
69
|
+
id: string;
|
|
70
|
+
defaultMessage: string;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
'account.activation.success.message.title': {
|
|
74
|
+
id: string;
|
|
75
|
+
defaultMessage: string;
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
'account.activation.success.message': {
|
|
79
|
+
id: string;
|
|
80
|
+
defaultMessage: string;
|
|
81
|
+
description: string;
|
|
82
|
+
};
|
|
83
|
+
'account.activation.info.message': {
|
|
84
|
+
id: string;
|
|
85
|
+
defaultMessage: string;
|
|
86
|
+
description: string;
|
|
87
|
+
};
|
|
88
|
+
'account.activation.error.message.title': {
|
|
89
|
+
id: string;
|
|
90
|
+
defaultMessage: string;
|
|
91
|
+
description: string;
|
|
92
|
+
};
|
|
93
|
+
'account.activation.support.link': {
|
|
94
|
+
id: string;
|
|
95
|
+
defaultMessage: string;
|
|
96
|
+
description: string;
|
|
97
|
+
};
|
|
98
|
+
'account.confirmation.success.message.title': {
|
|
99
|
+
id: string;
|
|
100
|
+
defaultMessage: string;
|
|
101
|
+
description: string;
|
|
102
|
+
};
|
|
103
|
+
'account.confirmation.success.message': {
|
|
104
|
+
id: string;
|
|
105
|
+
defaultMessage: string;
|
|
106
|
+
description: string;
|
|
107
|
+
};
|
|
108
|
+
'account.confirmation.info.message': {
|
|
109
|
+
id: string;
|
|
110
|
+
defaultMessage: string;
|
|
111
|
+
description: string;
|
|
112
|
+
};
|
|
113
|
+
'account.confirmation.error.message.title': {
|
|
114
|
+
id: string;
|
|
115
|
+
defaultMessage: string;
|
|
116
|
+
description: string;
|
|
117
|
+
};
|
|
118
|
+
'tpa.account.link': {
|
|
119
|
+
id: string;
|
|
120
|
+
defaultMessage: string;
|
|
121
|
+
description: string;
|
|
122
|
+
};
|
|
123
|
+
'internal.server.error.message': {
|
|
124
|
+
id: string;
|
|
125
|
+
defaultMessage: string;
|
|
126
|
+
description: string;
|
|
127
|
+
};
|
|
128
|
+
'login.rate.limit.reached.message': {
|
|
129
|
+
id: string;
|
|
130
|
+
defaultMessage: string;
|
|
131
|
+
description: string;
|
|
132
|
+
};
|
|
133
|
+
'login.failure.header.title': {
|
|
134
|
+
id: string;
|
|
135
|
+
defaultMessage: string;
|
|
136
|
+
description: string;
|
|
137
|
+
};
|
|
138
|
+
'contact.support.link': {
|
|
139
|
+
id: string;
|
|
140
|
+
defaultMessage: string;
|
|
141
|
+
description: string;
|
|
142
|
+
};
|
|
143
|
+
'login.incorrect.credentials.error': {
|
|
144
|
+
id: string;
|
|
145
|
+
defaultMessage: string;
|
|
146
|
+
description: string;
|
|
147
|
+
};
|
|
148
|
+
'login.form.invalid.error.message': {
|
|
149
|
+
id: string;
|
|
150
|
+
defaultMessage: string;
|
|
151
|
+
description: string;
|
|
152
|
+
};
|
|
153
|
+
'login.incorrect.credentials.error.reset.link.text': {
|
|
154
|
+
id: string;
|
|
155
|
+
defaultMessage: string;
|
|
156
|
+
description: string;
|
|
157
|
+
};
|
|
158
|
+
'login.incorrect.credentials.error.before.account.blocked.text': {
|
|
159
|
+
id: string;
|
|
160
|
+
defaultMessage: string;
|
|
161
|
+
description: string;
|
|
162
|
+
};
|
|
163
|
+
'password.security.nudge.title': {
|
|
164
|
+
id: string;
|
|
165
|
+
defaultMessage: string;
|
|
166
|
+
description: string;
|
|
167
|
+
};
|
|
168
|
+
'password.security.block.title': {
|
|
169
|
+
id: string;
|
|
170
|
+
defaultMessage: string;
|
|
171
|
+
description: string;
|
|
172
|
+
};
|
|
173
|
+
'password.security.nudge.body': {
|
|
174
|
+
id: string;
|
|
175
|
+
defaultMessage: string;
|
|
176
|
+
description: string;
|
|
177
|
+
};
|
|
178
|
+
'password.security.block.body': {
|
|
179
|
+
id: string;
|
|
180
|
+
defaultMessage: string;
|
|
181
|
+
description: string;
|
|
182
|
+
};
|
|
183
|
+
'password.security.close.button': {
|
|
184
|
+
id: string;
|
|
185
|
+
defaultMessage: string;
|
|
186
|
+
description: string;
|
|
187
|
+
};
|
|
188
|
+
'password.security.redirect.to.reset.password.button': {
|
|
189
|
+
id: string;
|
|
190
|
+
defaultMessage: string;
|
|
191
|
+
description: string;
|
|
192
|
+
};
|
|
193
|
+
'login.tpa.authentication.failure': {
|
|
194
|
+
id: string;
|
|
195
|
+
defaultMessage: string;
|
|
196
|
+
description: string;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { defineMessages } from '@openedx/frontend-base';
|
|
2
|
+
const messages = defineMessages({
|
|
3
|
+
'login.page.title': {
|
|
4
|
+
id: 'login.page.title',
|
|
5
|
+
defaultMessage: 'Login | {siteName}',
|
|
6
|
+
description: 'login page title',
|
|
7
|
+
},
|
|
8
|
+
// Login labels
|
|
9
|
+
'login.user.identity.label': {
|
|
10
|
+
id: 'login.user.identity.label',
|
|
11
|
+
defaultMessage: 'Username or email',
|
|
12
|
+
description: 'Label for user identity field to enter either username or email to login',
|
|
13
|
+
},
|
|
14
|
+
'login.password.label': {
|
|
15
|
+
id: 'login.password.label',
|
|
16
|
+
defaultMessage: 'Password',
|
|
17
|
+
description: 'Label for password field',
|
|
18
|
+
},
|
|
19
|
+
'sign.in.button': {
|
|
20
|
+
id: 'sign.in.button',
|
|
21
|
+
defaultMessage: 'Sign in',
|
|
22
|
+
description: 'Sign in button label that appears on login page',
|
|
23
|
+
},
|
|
24
|
+
'forgot.password': {
|
|
25
|
+
id: 'forgot.password',
|
|
26
|
+
defaultMessage: 'Forgot password',
|
|
27
|
+
description: 'Button text for forgot password',
|
|
28
|
+
},
|
|
29
|
+
'institution.login.button': {
|
|
30
|
+
id: 'institution.login.button',
|
|
31
|
+
defaultMessage: 'Institution/campus credentials',
|
|
32
|
+
description: 'shows institutions list',
|
|
33
|
+
},
|
|
34
|
+
'institution.login.page.title': {
|
|
35
|
+
id: 'institution.login.page.title',
|
|
36
|
+
defaultMessage: 'Sign in with institution/campus credentials',
|
|
37
|
+
description: 'Heading of institution page',
|
|
38
|
+
},
|
|
39
|
+
'institution.login.page.sub.heading': {
|
|
40
|
+
id: 'institution.login.page.sub.heading',
|
|
41
|
+
defaultMessage: 'Choose your institution from the list below',
|
|
42
|
+
description: 'Heading of the institutions list',
|
|
43
|
+
},
|
|
44
|
+
'non.compliant.password.title': {
|
|
45
|
+
id: 'non.compliant.password.title',
|
|
46
|
+
defaultMessage: 'We recently changed our password requirements',
|
|
47
|
+
description: 'A title that appears in bold before error message for non-compliant password',
|
|
48
|
+
},
|
|
49
|
+
'non.compliant.password.message': {
|
|
50
|
+
id: 'non.compliant.password.message',
|
|
51
|
+
defaultMessage: 'Your current password does not meet the new security requirements. '
|
|
52
|
+
+ 'We just sent a password-reset message to the email address associated with this account. '
|
|
53
|
+
+ 'Thank you for helping us keep your data safe.',
|
|
54
|
+
description: 'Error message for non-compliant password',
|
|
55
|
+
},
|
|
56
|
+
'account.locked.out.message.1': {
|
|
57
|
+
id: 'account.locked.out.message.1',
|
|
58
|
+
defaultMessage: 'To protect your account, it\'s been temporarily locked. Try again in 30 minutes.',
|
|
59
|
+
description: 'Part of message for when user account has been locked out after multiple failed login attempts',
|
|
60
|
+
},
|
|
61
|
+
'username.or.email.format.validation.less.chars.message': {
|
|
62
|
+
id: 'username.or.email.format.validation.less.chars.message',
|
|
63
|
+
defaultMessage: 'Username or email must have at least 2 characters.',
|
|
64
|
+
description: 'Validation message that appears when username or email address is less than 2 characters',
|
|
65
|
+
},
|
|
66
|
+
'email.validation.message': {
|
|
67
|
+
id: 'email.validation.message',
|
|
68
|
+
defaultMessage: 'Enter your username or email',
|
|
69
|
+
description: 'Validation message that appears when email is empty',
|
|
70
|
+
},
|
|
71
|
+
'password.validation.message': {
|
|
72
|
+
id: 'password.validation.message',
|
|
73
|
+
defaultMessage: 'Enter your password',
|
|
74
|
+
description: 'Validation message that appears when password is empty',
|
|
75
|
+
},
|
|
76
|
+
// Account Activation Strings
|
|
77
|
+
'account.activation.success.message.title': {
|
|
78
|
+
id: 'account.activation.success.message.title',
|
|
79
|
+
defaultMessage: 'Success! You have activated your account.',
|
|
80
|
+
description: 'Account Activation success message title',
|
|
81
|
+
},
|
|
82
|
+
'account.activation.success.message': {
|
|
83
|
+
id: 'account.activation.success.message',
|
|
84
|
+
defaultMessage: 'You will now receive email updates and alerts from us related to the courses you are enrolled in. Sign in to continue.',
|
|
85
|
+
description: 'Message show to learners when their account has been activated successfully',
|
|
86
|
+
},
|
|
87
|
+
'account.activation.info.message': {
|
|
88
|
+
id: 'account.activation.info.message',
|
|
89
|
+
defaultMessage: 'This account has already been activated.',
|
|
90
|
+
description: 'Message shown when learner account has already been activated',
|
|
91
|
+
},
|
|
92
|
+
'account.activation.error.message.title': {
|
|
93
|
+
id: 'account.activation.error.message.title',
|
|
94
|
+
defaultMessage: 'Your account could not be activated',
|
|
95
|
+
description: 'Account Activation error message title',
|
|
96
|
+
},
|
|
97
|
+
'account.activation.support.link': {
|
|
98
|
+
id: 'account.activation.support.link',
|
|
99
|
+
defaultMessage: 'contact support',
|
|
100
|
+
description: 'Link text used in account activation error message to go to learner help center',
|
|
101
|
+
},
|
|
102
|
+
// Email Confirmation Strings
|
|
103
|
+
'account.confirmation.success.message.title': {
|
|
104
|
+
id: 'account.confirmation.success.message.title',
|
|
105
|
+
defaultMessage: 'Success! You have confirmed your email.',
|
|
106
|
+
description: 'Account verification success message title',
|
|
107
|
+
},
|
|
108
|
+
'account.confirmation.success.message': {
|
|
109
|
+
id: 'account.confirmation.success.message',
|
|
110
|
+
defaultMessage: 'Sign in to continue.',
|
|
111
|
+
description: 'Message show to learners when their account has been activated successfully',
|
|
112
|
+
},
|
|
113
|
+
'account.confirmation.info.message': {
|
|
114
|
+
id: 'account.confirmation.info.message',
|
|
115
|
+
defaultMessage: 'This email has already been confirmed.',
|
|
116
|
+
description: 'Message shown when learner account has already been verified',
|
|
117
|
+
},
|
|
118
|
+
'account.confirmation.error.message.title': {
|
|
119
|
+
id: 'account.confirmation.error.message.title',
|
|
120
|
+
defaultMessage: 'Your email could not be confirmed',
|
|
121
|
+
description: 'Account verification error message title',
|
|
122
|
+
},
|
|
123
|
+
'tpa.account.link': {
|
|
124
|
+
id: 'tpa.account.link',
|
|
125
|
+
defaultMessage: '{provider} account',
|
|
126
|
+
description: 'Link text error message used to go to SSO when staff user try to login through password.',
|
|
127
|
+
},
|
|
128
|
+
'internal.server.error.message': {
|
|
129
|
+
id: 'internal.server.error.message',
|
|
130
|
+
defaultMessage: 'An error has occurred. Try refreshing the page, or check your internet connection.',
|
|
131
|
+
description: 'Error message that appears when server responds with 500 error code',
|
|
132
|
+
},
|
|
133
|
+
'login.rate.limit.reached.message': {
|
|
134
|
+
id: 'login.rate.limit.reached.message',
|
|
135
|
+
defaultMessage: 'Too many failed login attempts. Try again later.',
|
|
136
|
+
description: 'Error message that appears when an anonymous user has made too many failed login attempts',
|
|
137
|
+
},
|
|
138
|
+
'login.failure.header.title': {
|
|
139
|
+
id: 'login.failure.header.title',
|
|
140
|
+
defaultMessage: 'We couldn\'t sign you in.',
|
|
141
|
+
description: 'Login failure header message.',
|
|
142
|
+
},
|
|
143
|
+
'contact.support.link': {
|
|
144
|
+
id: 'contact.support.link',
|
|
145
|
+
defaultMessage: 'contact {platformName} support',
|
|
146
|
+
description: 'Link text used in inactive user error message to go to learner help center',
|
|
147
|
+
},
|
|
148
|
+
'login.incorrect.credentials.error': {
|
|
149
|
+
id: 'login.incorrect.credentials.error',
|
|
150
|
+
defaultMessage: 'The username, email, or password you entered is incorrect. Please try again.',
|
|
151
|
+
description: 'Error message for incorrect email or password',
|
|
152
|
+
},
|
|
153
|
+
'login.form.invalid.error.message': {
|
|
154
|
+
id: 'login.form.invalid.error.message',
|
|
155
|
+
defaultMessage: 'Please fill in the fields below.',
|
|
156
|
+
description: 'Login form empty input user message',
|
|
157
|
+
},
|
|
158
|
+
'login.incorrect.credentials.error.reset.link.text': {
|
|
159
|
+
id: 'login.incorrect.credentials.error.reset.link.text',
|
|
160
|
+
defaultMessage: 'reset your password',
|
|
161
|
+
description: 'Reset password link text for incorrect email or password credentials',
|
|
162
|
+
},
|
|
163
|
+
'login.incorrect.credentials.error.before.account.blocked.text': {
|
|
164
|
+
id: 'login.incorrect.credentials.error.before.account.blocked.text',
|
|
165
|
+
defaultMessage: 'click here to reset it.',
|
|
166
|
+
description: 'Reset password link text for incorrect email or password credentials before blocking account',
|
|
167
|
+
},
|
|
168
|
+
// Vulnerable password change prompt
|
|
169
|
+
'password.security.nudge.title': {
|
|
170
|
+
id: 'password.security.nudge.title',
|
|
171
|
+
defaultMessage: 'Password security',
|
|
172
|
+
description: 'Title for prompt that nudges user to change their vulnerable password',
|
|
173
|
+
},
|
|
174
|
+
'password.security.block.title': {
|
|
175
|
+
id: 'password.security.block.title',
|
|
176
|
+
defaultMessage: 'Password change required',
|
|
177
|
+
description: 'Title for prompt that asks user to change their vulnerable password',
|
|
178
|
+
},
|
|
179
|
+
'password.security.nudge.body': {
|
|
180
|
+
id: 'password.security.nudge.body',
|
|
181
|
+
defaultMessage: 'Our system detected that your password is vulnerable. '
|
|
182
|
+
+ 'We recommend you change it so that your account stays secure.',
|
|
183
|
+
description: 'Message copy for prompt that nudges user to change their vulnerable password',
|
|
184
|
+
},
|
|
185
|
+
'password.security.block.body': {
|
|
186
|
+
id: 'password.security.block.body',
|
|
187
|
+
defaultMessage: 'Our system detected that your password is vulnerable. '
|
|
188
|
+
+ 'Change your password so that your account stays secure.',
|
|
189
|
+
description: 'Message copy for prompt that asks user to change their vulnerable password',
|
|
190
|
+
},
|
|
191
|
+
'password.security.close.button': {
|
|
192
|
+
id: 'password.security.close.button',
|
|
193
|
+
defaultMessage: 'Close',
|
|
194
|
+
description: 'Button to close popup',
|
|
195
|
+
},
|
|
196
|
+
'password.security.redirect.to.reset.password.button': {
|
|
197
|
+
id: 'password.security.redirect.to.reset.password.button',
|
|
198
|
+
defaultMessage: 'Reset your password',
|
|
199
|
+
description: 'Button to redirect users to Reset Password page',
|
|
200
|
+
},
|
|
201
|
+
'login.tpa.authentication.failure': {
|
|
202
|
+
id: 'login.tpa.authentication.failure',
|
|
203
|
+
defaultMessage: 'We are sorry, you are not authorized to access {platform_name} via this channel. '
|
|
204
|
+
+ 'Please contact your learning administrator or manager in order to access {platform_name}.'
|
|
205
|
+
+ '{lineBreak}{lineBreak}Error Details:{lineBreak}{errorMessage}',
|
|
206
|
+
description: 'Error message third party authentication pipeline fails',
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
export default messages;
|
|
210
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/login/messages.jsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,kBAAkB,EAAE;QAClB,EAAE,EAAE,kBAAkB;QACtB,cAAc,EAAE,oBAAoB;QACpC,WAAW,EAAE,kBAAkB;KAChC;IACD,eAAe;IACf,2BAA2B,EAAE;QAC3B,EAAE,EAAE,2BAA2B;QAC/B,cAAc,EAAE,mBAAmB;QACnC,WAAW,EAAE,0EAA0E;KACxF;IACD,sBAAsB,EAAE;QACtB,EAAE,EAAE,sBAAsB;QAC1B,cAAc,EAAE,UAAU;QAC1B,WAAW,EAAE,0BAA0B;KACxC;IACD,gBAAgB,EAAE;QAChB,EAAE,EAAE,gBAAgB;QACpB,cAAc,EAAE,SAAS;QACzB,WAAW,EAAE,iDAAiD;KAC/D;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,iBAAiB;QACrB,cAA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E,EAAE,kCAAkC;QACtC,cAAc,EAAE,mFAAmF;cAC7F,2FAA2F;cAC3F,+DAA+D;QACrE,WAAW,EAAE,yDAAyD;KACvE;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n 'login.page.title': {\n id: 'login.page.title',\n defaultMessage: 'Login | {siteName}',\n description: 'login page title',\n },\n // Login labels\n 'login.user.identity.label': {\n id: 'login.user.identity.label',\n defaultMessage: 'Username or email',\n description: 'Label for user identity field to enter either username or email to login',\n },\n 'login.password.label': {\n id: 'login.password.label',\n defaultMessage: 'Password',\n description: 'Label for password field',\n },\n 'sign.in.button': {\n id: 'sign.in.button',\n defaultMessage: 'Sign in',\n description: 'Sign in button label that appears on login page',\n },\n 'forgot.password': {\n id: 'forgot.password',\n defaultMessage: 'Forgot password',\n description: 'Button text for forgot password',\n },\n 'institution.login.button': {\n id: 'institution.login.button',\n defaultMessage: 'Institution/campus credentials',\n description: 'shows institutions list',\n },\n 'institution.login.page.title': {\n id: 'institution.login.page.title',\n defaultMessage: 'Sign in with institution/campus credentials',\n description: 'Heading of institution page',\n },\n 'institution.login.page.sub.heading': {\n id: 'institution.login.page.sub.heading',\n defaultMessage: 'Choose your institution from the list below',\n description: 'Heading of the institutions list',\n },\n 'non.compliant.password.title': {\n id: 'non.compliant.password.title',\n defaultMessage: 'We recently changed our password requirements',\n description: 'A title that appears in bold before error message for non-compliant password',\n },\n 'non.compliant.password.message': {\n id: 'non.compliant.password.message',\n defaultMessage: 'Your current password does not meet the new security requirements. '\n + 'We just sent a password-reset message to the email address associated with this account. '\n + 'Thank you for helping us keep your data safe.',\n description: 'Error message for non-compliant password',\n },\n 'account.locked.out.message.1': {\n id: 'account.locked.out.message.1',\n defaultMessage: 'To protect your account, it\\'s been temporarily locked. Try again in 30 minutes.',\n description: 'Part of message for when user account has been locked out after multiple failed login attempts',\n },\n 'username.or.email.format.validation.less.chars.message': {\n id: 'username.or.email.format.validation.less.chars.message',\n defaultMessage: 'Username or email must have at least 2 characters.',\n description: 'Validation message that appears when username or email address is less than 2 characters',\n },\n 'email.validation.message': {\n id: 'email.validation.message',\n defaultMessage: 'Enter your username or email',\n description: 'Validation message that appears when email is empty',\n },\n 'password.validation.message': {\n id: 'password.validation.message',\n defaultMessage: 'Enter your password',\n description: 'Validation message that appears when password is empty',\n },\n // Account Activation Strings\n 'account.activation.success.message.title': {\n id: 'account.activation.success.message.title',\n defaultMessage: 'Success! You have activated your account.',\n description: 'Account Activation success message title',\n },\n 'account.activation.success.message': {\n id: 'account.activation.success.message',\n defaultMessage: 'You will now receive email updates and alerts from us related to the courses you are enrolled in. Sign in to continue.',\n description: 'Message show to learners when their account has been activated successfully',\n },\n 'account.activation.info.message': {\n id: 'account.activation.info.message',\n defaultMessage: 'This account has already been activated.',\n description: 'Message shown when learner account has already been activated',\n },\n 'account.activation.error.message.title': {\n id: 'account.activation.error.message.title',\n defaultMessage: 'Your account could not be activated',\n description: 'Account Activation error message title',\n },\n 'account.activation.support.link': {\n id: 'account.activation.support.link',\n defaultMessage: 'contact support',\n description: 'Link text used in account activation error message to go to learner help center',\n },\n // Email Confirmation Strings\n 'account.confirmation.success.message.title': {\n id: 'account.confirmation.success.message.title',\n defaultMessage: 'Success! You have confirmed your email.',\n description: 'Account verification success message title',\n },\n 'account.confirmation.success.message': {\n id: 'account.confirmation.success.message',\n defaultMessage: 'Sign in to continue.',\n description: 'Message show to learners when their account has been activated successfully',\n },\n 'account.confirmation.info.message': {\n id: 'account.confirmation.info.message',\n defaultMessage: 'This email has already been confirmed.',\n description: 'Message shown when learner account has already been verified',\n },\n 'account.confirmation.error.message.title': {\n id: 'account.confirmation.error.message.title',\n defaultMessage: 'Your email could not be confirmed',\n description: 'Account verification error message title',\n },\n 'tpa.account.link': {\n id: 'tpa.account.link',\n defaultMessage: '{provider} account',\n description: 'Link text error message used to go to SSO when staff user try to login through password.',\n },\n 'internal.server.error.message': {\n id: 'internal.server.error.message',\n defaultMessage: 'An error has occurred. Try refreshing the page, or check your internet connection.',\n description: 'Error message that appears when server responds with 500 error code',\n },\n 'login.rate.limit.reached.message': {\n id: 'login.rate.limit.reached.message',\n defaultMessage: 'Too many failed login attempts. Try again later.',\n description: 'Error message that appears when an anonymous user has made too many failed login attempts',\n },\n 'login.failure.header.title': {\n id: 'login.failure.header.title',\n defaultMessage: 'We couldn\\'t sign you in.',\n description: 'Login failure header message.',\n },\n 'contact.support.link': {\n id: 'contact.support.link',\n defaultMessage: 'contact {platformName} support',\n description: 'Link text used in inactive user error message to go to learner help center',\n },\n 'login.incorrect.credentials.error': {\n id: 'login.incorrect.credentials.error',\n defaultMessage: 'The username, email, or password you entered is incorrect. Please try again.',\n description: 'Error message for incorrect email or password',\n },\n 'login.form.invalid.error.message': {\n id: 'login.form.invalid.error.message',\n defaultMessage: 'Please fill in the fields below.',\n description: 'Login form empty input user message',\n },\n 'login.incorrect.credentials.error.reset.link.text': {\n id: 'login.incorrect.credentials.error.reset.link.text',\n defaultMessage: 'reset your password',\n description: 'Reset password link text for incorrect email or password credentials',\n },\n 'login.incorrect.credentials.error.before.account.blocked.text': {\n id: 'login.incorrect.credentials.error.before.account.blocked.text',\n defaultMessage: 'click here to reset it.',\n description: 'Reset password link text for incorrect email or password credentials before blocking account',\n },\n // Vulnerable password change prompt\n 'password.security.nudge.title': {\n id: 'password.security.nudge.title',\n defaultMessage: 'Password security',\n description: 'Title for prompt that nudges user to change their vulnerable password',\n },\n 'password.security.block.title': {\n id: 'password.security.block.title',\n defaultMessage: 'Password change required',\n description: 'Title for prompt that asks user to change their vulnerable password',\n },\n 'password.security.nudge.body': {\n id: 'password.security.nudge.body',\n defaultMessage: 'Our system detected that your password is vulnerable. '\n + 'We recommend you change it so that your account stays secure.',\n description: 'Message copy for prompt that nudges user to change their vulnerable password',\n },\n 'password.security.block.body': {\n id: 'password.security.block.body',\n defaultMessage: 'Our system detected that your password is vulnerable. '\n + 'Change your password so that your account stays secure.',\n description: 'Message copy for prompt that asks user to change their vulnerable password',\n },\n 'password.security.close.button': {\n id: 'password.security.close.button',\n defaultMessage: 'Close',\n description: 'Button to close popup',\n },\n 'password.security.redirect.to.reset.password.button': {\n id: 'password.security.redirect.to.reset.password.button',\n defaultMessage: 'Reset your password',\n description: 'Button to redirect users to Reset Password page',\n },\n 'login.tpa.authentication.failure': {\n id: 'login.tpa.authentication.failure',\n defaultMessage: 'We are sorry, you are not authorized to access {platform_name} via this channel. '\n + 'Please contact your learning administrator or manager in order to access {platform_name}.'\n + '{lineBreak}{lineBreak}Error Details:{lineBreak}{errorMessage}',\n description: 'Error message third party authentication pipeline fails',\n },\n});\n\nexport default messages;\n"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { useAppConfig, getAuthService, getSiteConfig, getUrlByRouteRole, sendPageEvent, sendTrackEvent, useIntl, } from '@openedx/frontend-base';
|
|
4
|
+
import { Icon, Tab, Tabs, } from '@openedx/paragon';
|
|
5
|
+
import { ChevronLeft } from '@openedx/paragon/icons';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import { Navigate, useNavigate } from 'react-router-dom';
|
|
8
|
+
import BaseContainer from '../base-container';
|
|
9
|
+
import { ThirdPartyAuthProvider, useThirdPartyAuthContext } from '../common-components/components/ThirdPartyAuthContext';
|
|
10
|
+
import messages from '../common-components/messages';
|
|
11
|
+
import { loginPath, loginRole, registerPath, registerRole } from '../constants';
|
|
12
|
+
import { getTpaHint, getTpaProvider, updatePathWithQueryParams, } from '../data/utils';
|
|
13
|
+
import { LoginProvider } from '../login/components/LoginContext';
|
|
14
|
+
import { RegistrationPage } from '../register';
|
|
15
|
+
import { RegisterProvider } from '../register/components/RegisterContext';
|
|
16
|
+
import LoginComponentSlot from '../slots/LoginComponentSlot';
|
|
17
|
+
const LogistrationPageInner = ({ selectedPage, }) => {
|
|
18
|
+
const tpaHint = getTpaHint();
|
|
19
|
+
const { thirdPartyAuthContext, clearThirdPartyAuthErrorMessage, } = useThirdPartyAuthContext();
|
|
20
|
+
const { providers, secondaryProviders, } = thirdPartyAuthContext;
|
|
21
|
+
const { formatMessage } = useIntl();
|
|
22
|
+
const [institutionLogin, setInstitutionLogin] = useState(false);
|
|
23
|
+
const [key, setKey] = useState('');
|
|
24
|
+
const navigate = useNavigate();
|
|
25
|
+
const disablePublicAccountCreation = useAppConfig().ALLOW_PUBLIC_ACCOUNT_CREATION === false;
|
|
26
|
+
const hideRegistrationLink = useAppConfig().SHOW_REGISTRATION_LINKS === false;
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const authService = getAuthService();
|
|
29
|
+
if (authService) {
|
|
30
|
+
authService.getCsrfTokenService()
|
|
31
|
+
.getCsrfToken(getSiteConfig().lmsBaseUrl);
|
|
32
|
+
}
|
|
33
|
+
}, []);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (disablePublicAccountCreation) {
|
|
36
|
+
navigate(updatePathWithQueryParams(getUrlByRouteRole(loginRole)));
|
|
37
|
+
}
|
|
38
|
+
}, [navigate, disablePublicAccountCreation]);
|
|
39
|
+
const handleInstitutionLogin = (e) => {
|
|
40
|
+
sendTrackEvent('edx.bi.institution_login_form.toggled', { category: 'user-engagement' });
|
|
41
|
+
if (typeof e === 'string') {
|
|
42
|
+
sendPageEvent('login_and_registration', e === loginPath ? 'login' : 'register');
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
sendPageEvent('login_and_registration', e.target.dataset.eventName);
|
|
46
|
+
}
|
|
47
|
+
setInstitutionLogin(!institutionLogin);
|
|
48
|
+
};
|
|
49
|
+
const handleOnSelect = (tabKey, currentTab) => {
|
|
50
|
+
if (tabKey === currentTab) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
sendTrackEvent(`edx.bi.${tabKey}_form.toggled`, { category: 'user-engagement' });
|
|
54
|
+
clearThirdPartyAuthErrorMessage();
|
|
55
|
+
setKey(tabKey);
|
|
56
|
+
};
|
|
57
|
+
const tabTitle = (_jsxs("div", { className: "d-flex", children: [_jsx(Icon, { src: ChevronLeft, className: "left-icon" }), _jsx("span", { className: "ml-2", children: selectedPage === loginPath
|
|
58
|
+
? formatMessage(messages['logistration.sign.in'])
|
|
59
|
+
: formatMessage(messages['logistration.register']) })] }));
|
|
60
|
+
const isValidTpaHint = () => {
|
|
61
|
+
const { provider } = getTpaProvider(tpaHint, providers, secondaryProviders);
|
|
62
|
+
return !!provider;
|
|
63
|
+
};
|
|
64
|
+
return (_jsx(BaseContainer, { children: _jsx("div", { children: disablePublicAccountCreation
|
|
65
|
+
? (_jsxs(_Fragment, { children: [institutionLogin && (_jsx(Tabs, { defaultActiveKey: "", id: "controlled-tab", onSelect: handleInstitutionLogin, children: _jsx(Tab, { title: tabTitle, eventKey: loginPath }) })), _jsxs("div", { id: "main-content", className: "main-content", children: [!institutionLogin && (_jsx("h3", { className: "mb-4.5", children: formatMessage(messages['logistration.sign.in']) })), _jsx(LoginComponentSlot, { institutionLogin: institutionLogin, handleInstitutionLogin: handleInstitutionLogin })] })] }))
|
|
66
|
+
: (_jsxs("div", { children: [institutionLogin
|
|
67
|
+
? (_jsx(Tabs, { defaultActiveKey: "", id: "controlled-tab", onSelect: handleInstitutionLogin, children: _jsx(Tab, { title: tabTitle, eventKey: selectedPage === loginPath ? loginPath : registerPath }) }))
|
|
68
|
+
: (!isValidTpaHint() && !hideRegistrationLink && (_jsxs(Tabs, { defaultActiveKey: selectedPage, id: "controlled-tab", onSelect: (tabKey) => handleOnSelect(tabKey, selectedPage), children: [_jsx(Tab, { title: formatMessage(messages['logistration.register']), eventKey: registerPath }), _jsx(Tab, { title: formatMessage(messages['logistration.sign.in']), eventKey: loginPath })] }))), key && (_jsx(Navigate, { to: updatePathWithQueryParams(getUrlByRouteRole(key === loginPath ? loginRole : registerRole)), replace: true })), _jsxs("div", { id: "main-content", className: "main-content", children: [!institutionLogin && !isValidTpaHint() && hideRegistrationLink && (_jsx("h3", { className: "mb-4.5", children: formatMessage(messages[selectedPage === loginPath ? 'logistration.sign.in' : 'logistration.register']) })), selectedPage === loginPath
|
|
69
|
+
? (_jsx(LoginComponentSlot, { institutionLogin: institutionLogin, handleInstitutionLogin: handleInstitutionLogin }))
|
|
70
|
+
: (_jsx(RegistrationPage, { institutionLogin: institutionLogin, handleInstitutionLogin: handleInstitutionLogin }))] })] })) }) }));
|
|
71
|
+
};
|
|
72
|
+
LogistrationPageInner.propTypes = {
|
|
73
|
+
selectedPage: PropTypes.string.isRequired,
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Main Logistration Page component wrapped with providers
|
|
77
|
+
*/
|
|
78
|
+
const LogistrationPage = (props) => (_jsx(ThirdPartyAuthProvider, { children: _jsx(RegisterProvider, { children: _jsx(LoginProvider, { children: _jsx(LogistrationPageInner, Object.assign({}, props)) }) }) }));
|
|
79
|
+
export default LogistrationPage;
|
|
80
|
+
//# sourceMappingURL=Logistration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logistration.js","sourceRoot":"","sources":["../../src/logistration/Logistration.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EACL,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,iBAAiB,EAC9D,aAAa,EAAE,cAAc,EAAE,OAAO,GACvC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,IAAI,EACJ,GAAG,EACH,IAAI,GACL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,aAAa,MAAM,mBAAmB,CA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ACJ,CAAC,CAAC;AAEF,qBAAqB,CAAC,SAAS,GAAG;IAChC,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;CAC1C,CAAC;AAEF;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAClC,KAAC,sBAAsB,cACrB,KAAC,gBAAgB,cACf,KAAC,aAAa,cACZ,KAAC,qBAAqB,oBAAK,KAAK,EAAI,GACtB,GACC,GACI,CAC1B,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\n\nimport {\n useAppConfig, getAuthService, getSiteConfig, getUrlByRouteRole,\n sendPageEvent, sendTrackEvent, useIntl,\n} from '@openedx/frontend-base';\nimport {\n Icon,\n Tab,\n Tabs,\n} from '@openedx/paragon';\nimport { ChevronLeft } from '@openedx/paragon/icons';\nimport PropTypes from 'prop-types';\nimport { Navigate, useNavigate } from 'react-router-dom';\n\nimport BaseContainer from '../base-container';\nimport { ThirdPartyAuthProvider, useThirdPartyAuthContext } from '../common-components/components/ThirdPartyAuthContext';\nimport messages from '../common-components/messages';\nimport { loginPath, loginRole, registerPath, registerRole } from '../constants';\nimport {\n getTpaHint, getTpaProvider, updatePathWithQueryParams,\n} from '../data/utils';\nimport { LoginProvider } from '../login/components/LoginContext';\nimport { RegistrationPage } from '../register';\nimport { RegisterProvider } from '../register/components/RegisterContext';\nimport LoginComponentSlot from '../slots/LoginComponentSlot';\n\nconst LogistrationPageInner = ({\n selectedPage,\n}) => {\n const tpaHint = getTpaHint();\n const {\n thirdPartyAuthContext,\n clearThirdPartyAuthErrorMessage,\n } = useThirdPartyAuthContext();\n\n const {\n providers,\n secondaryProviders,\n } = thirdPartyAuthContext;\n const { formatMessage } = useIntl();\n const [institutionLogin, setInstitutionLogin] = useState(false);\n const [key, setKey] = useState('');\n const navigate = useNavigate();\n const disablePublicAccountCreation = useAppConfig().ALLOW_PUBLIC_ACCOUNT_CREATION === false;\n const hideRegistrationLink = useAppConfig().SHOW_REGISTRATION_LINKS === false;\n\n useEffect(() => {\n const authService = getAuthService();\n if (authService) {\n authService.getCsrfTokenService()\n .getCsrfToken(getSiteConfig().lmsBaseUrl);\n }\n }, []);\n\n useEffect(() => {\n if (disablePublicAccountCreation) {\n navigate(updatePathWithQueryParams(getUrlByRouteRole(loginRole)));\n }\n }, [navigate, disablePublicAccountCreation]);\n\n const handleInstitutionLogin = (e) => {\n sendTrackEvent('edx.bi.institution_login_form.toggled', { category: 'user-engagement' });\n if (typeof e === 'string') {\n sendPageEvent('login_and_registration', e === loginPath ? 'login' : 'register');\n } else {\n sendPageEvent('login_and_registration', e.target.dataset.eventName);\n }\n setInstitutionLogin(!institutionLogin);\n };\n\n const handleOnSelect = (tabKey, currentTab) => {\n if (tabKey === currentTab) {\n return;\n }\n sendTrackEvent(`edx.bi.${tabKey}_form.toggled`, { category: 'user-engagement' });\n clearThirdPartyAuthErrorMessage();\n setKey(tabKey);\n };\n\n const tabTitle = (\n <div className=\"d-flex\">\n <Icon src={ChevronLeft} className=\"left-icon\" />\n <span className=\"ml-2\">\n {selectedPage === loginPath\n ? formatMessage(messages['logistration.sign.in'])\n : formatMessage(messages['logistration.register'])}\n </span>\n </div>\n );\n\n const isValidTpaHint = () => {\n const { provider } = getTpaProvider(tpaHint, providers, secondaryProviders);\n return !!provider;\n };\n\n return (\n <BaseContainer>\n <div>\n {disablePublicAccountCreation\n ? (\n <>\n {institutionLogin && (\n <Tabs defaultActiveKey=\"\" id=\"controlled-tab\" onSelect={handleInstitutionLogin}>\n <Tab title={tabTitle} eventKey={loginPath} />\n </Tabs>\n )}\n <div id=\"main-content\" className=\"main-content\">\n {!institutionLogin && (\n <h3 className=\"mb-4.5\">{formatMessage(messages['logistration.sign.in'])}</h3>\n )}\n <LoginComponentSlot\n institutionLogin={institutionLogin}\n handleInstitutionLogin={handleInstitutionLogin}\n />\n </div>\n </>\n )\n : (\n <div>\n {institutionLogin\n ? (\n <Tabs defaultActiveKey=\"\" id=\"controlled-tab\" onSelect={handleInstitutionLogin}>\n <Tab title={tabTitle} eventKey={selectedPage === loginPath ? loginPath : registerPath} />\n </Tabs>\n )\n : (!isValidTpaHint() && !hideRegistrationLink && (\n <Tabs\n defaultActiveKey={selectedPage}\n id=\"controlled-tab\"\n onSelect={(tabKey) => handleOnSelect(tabKey, selectedPage)}\n >\n <Tab title={formatMessage(messages['logistration.register'])} eventKey={registerPath} />\n <Tab title={formatMessage(messages['logistration.sign.in'])} eventKey={loginPath} />\n </Tabs>\n ))}\n {key && (\n <Navigate to={updatePathWithQueryParams(getUrlByRouteRole(key === loginPath ? loginRole : registerRole))} replace />\n )}\n <div id=\"main-content\" className=\"main-content\">\n {!institutionLogin && !isValidTpaHint() && hideRegistrationLink && (\n <h3 className=\"mb-4.5\">\n {formatMessage(messages[selectedPage === loginPath ? 'logistration.sign.in' : 'logistration.register'])}\n </h3>\n )}\n {selectedPage === loginPath\n ? (\n <LoginComponentSlot\n institutionLogin={institutionLogin}\n handleInstitutionLogin={handleInstitutionLogin}\n />\n )\n : (\n <RegistrationPage\n institutionLogin={institutionLogin}\n handleInstitutionLogin={handleInstitutionLogin}\n />\n )}\n </div>\n </div>\n )}\n </div>\n </BaseContainer>\n );\n};\n\nLogistrationPageInner.propTypes = {\n selectedPage: PropTypes.string.isRequired,\n};\n\n/**\n * Main Logistration Page component wrapped with providers\n */\nconst LogistrationPage = (props) => (\n <ThirdPartyAuthProvider>\n <RegisterProvider>\n <LoginProvider>\n <LogistrationPageInner {...props} />\n </LoginProvider>\n </RegisterProvider>\n </ThirdPartyAuthProvider>\n);\n\nexport default LogistrationPage;\n"]}
|