@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,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useAppConfig } from '@openedx/frontend-base';
|
|
3
|
+
import { breakpoints } from '@openedx/paragon';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import MediaQuery from 'react-responsive';
|
|
7
|
+
import { DefaultLargeLayout, DefaultMediumLayout, DefaultSmallLayout } from './components/default-layout';
|
|
8
|
+
import { ImageExtraSmallLayout, ImageLargeLayout, ImageMediumLayout, ImageSmallLayout, } from './components/image-layout';
|
|
9
|
+
import { AuthLargeLayout, AuthMediumLayout, AuthSmallLayout } from './components/welcome-page-layout';
|
|
10
|
+
const BaseContainer = ({ children, showWelcomeBanner, fullName }) => {
|
|
11
|
+
const enableImageLayout = useAppConfig().ENABLE_IMAGE_LAYOUT;
|
|
12
|
+
if (enableImageLayout) {
|
|
13
|
+
return (_jsxs("div", { className: "layout", children: [_jsx(MediaQuery, { maxWidth: breakpoints.extraSmall.maxWidth - 1, children: showWelcomeBanner ? _jsx(AuthSmallLayout, { fullName: fullName }) : _jsx(ImageExtraSmallLayout, {}) }), _jsx(MediaQuery, { minWidth: breakpoints.small.minWidth, maxWidth: breakpoints.small.maxWidth - 1, children: showWelcomeBanner ? _jsx(AuthSmallLayout, { fullName: fullName }) : _jsx(ImageSmallLayout, {}) }), _jsx(MediaQuery, { minWidth: breakpoints.medium.minWidth, maxWidth: breakpoints.large.maxWidth - 1, children: showWelcomeBanner ? _jsx(AuthMediumLayout, { fullName: fullName }) : _jsx(ImageMediumLayout, {}) }), _jsx(MediaQuery, { minWidth: breakpoints.extraLarge.minWidth, children: showWelcomeBanner ? _jsx(AuthLargeLayout, { fullName: fullName }) : _jsx(ImageLargeLayout, {}) }), _jsx("div", { className: classNames('content', { 'align-items-center mt-0': showWelcomeBanner }), children: children })] }));
|
|
14
|
+
}
|
|
15
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "col-md-12 extra-large-screen-top-stripe" }), _jsxs("div", { className: "layout", children: [_jsx(MediaQuery, { maxWidth: breakpoints.small.maxWidth - 1, children: showWelcomeBanner ? _jsx(AuthSmallLayout, { fullName: fullName }) : _jsx(DefaultSmallLayout, {}) }), _jsx(MediaQuery, { minWidth: breakpoints.medium.minWidth, maxWidth: breakpoints.large.maxWidth - 1, children: showWelcomeBanner ? _jsx(AuthMediumLayout, { fullName: fullName }) : _jsx(DefaultMediumLayout, {}) }), _jsx(MediaQuery, { minWidth: breakpoints.extraLarge.minWidth, children: showWelcomeBanner ? _jsx(AuthLargeLayout, { fullName: fullName }) : _jsx(DefaultLargeLayout, {}) }), _jsx("div", { className: classNames('content', { 'align-items-center mt-0': showWelcomeBanner }), children: children })] })] }));
|
|
16
|
+
};
|
|
17
|
+
BaseContainer.defaultProps = {
|
|
18
|
+
showWelcomeBanner: false,
|
|
19
|
+
fullName: null,
|
|
20
|
+
};
|
|
21
|
+
BaseContainer.propTypes = {
|
|
22
|
+
children: PropTypes.node.isRequired,
|
|
23
|
+
showWelcomeBanner: PropTypes.bool,
|
|
24
|
+
fullName: PropTypes.string,
|
|
25
|
+
};
|
|
26
|
+
export default BaseContainer;
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/base-container/index.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,mB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,CAAC,SAAS,GAAG;IACxB,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,iBAAiB,EAAE,SAAS,CAAC,IAAI;IACjC,QAAQ,EAAE,SAAS,CAAC,MAAM;CAC3B,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { useAppConfig } from '@openedx/frontend-base';\nimport { breakpoints } from '@openedx/paragon';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport MediaQuery from 'react-responsive';\n\nimport { DefaultLargeLayout, DefaultMediumLayout, DefaultSmallLayout } from './components/default-layout';\nimport {\n ImageExtraSmallLayout, ImageLargeLayout, ImageMediumLayout, ImageSmallLayout,\n} from './components/image-layout';\nimport { AuthLargeLayout, AuthMediumLayout, AuthSmallLayout } from './components/welcome-page-layout';\n\nconst BaseContainer = ({ children, showWelcomeBanner, fullName }) => {\n const enableImageLayout = useAppConfig().ENABLE_IMAGE_LAYOUT;\n\n if (enableImageLayout) {\n return (\n <div className=\"layout\">\n <MediaQuery maxWidth={breakpoints.extraSmall.maxWidth - 1}>\n {showWelcomeBanner ? <AuthSmallLayout fullName={fullName} /> : <ImageExtraSmallLayout />}\n </MediaQuery>\n <MediaQuery minWidth={breakpoints.small.minWidth} maxWidth={breakpoints.small.maxWidth - 1}>\n {showWelcomeBanner ? <AuthSmallLayout fullName={fullName} /> : <ImageSmallLayout />}\n </MediaQuery>\n <MediaQuery minWidth={breakpoints.medium.minWidth} maxWidth={breakpoints.large.maxWidth - 1}>\n {showWelcomeBanner ? <AuthMediumLayout fullName={fullName} /> : <ImageMediumLayout />}\n </MediaQuery>\n <MediaQuery minWidth={breakpoints.extraLarge.minWidth}>\n {showWelcomeBanner ? <AuthLargeLayout fullName={fullName} /> : <ImageLargeLayout />}\n </MediaQuery>\n <div className={classNames('content', { 'align-items-center mt-0': showWelcomeBanner })}>\n {children}\n </div>\n </div>\n );\n }\n\n return (\n <>\n <div className=\"col-md-12 extra-large-screen-top-stripe\" />\n <div className=\"layout\">\n <MediaQuery maxWidth={breakpoints.small.maxWidth - 1}>\n {showWelcomeBanner ? <AuthSmallLayout fullName={fullName} /> : <DefaultSmallLayout />}\n </MediaQuery>\n <MediaQuery minWidth={breakpoints.medium.minWidth} maxWidth={breakpoints.large.maxWidth - 1}>\n {showWelcomeBanner ? <AuthMediumLayout fullName={fullName} /> : <DefaultMediumLayout />}\n </MediaQuery>\n <MediaQuery minWidth={breakpoints.extraLarge.minWidth}>\n {showWelcomeBanner ? <AuthLargeLayout fullName={fullName} /> : <DefaultLargeLayout />}\n </MediaQuery>\n <div className={classNames('content', { 'align-items-center mt-0': showWelcomeBanner })}>\n {children}\n </div>\n </div>\n </>\n );\n};\n\nBaseContainer.defaultProps = {\n showWelcomeBanner: false,\n fullName: null,\n};\n\nBaseContainer.propTypes = {\n children: PropTypes.node.isRequired,\n showWelcomeBanner: PropTypes.bool,\n fullName: PropTypes.string,\n};\n\nexport default BaseContainer;\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default EmbeddedRegistrationRoute;
|
|
2
|
+
/**
|
|
3
|
+
* This wrapper redirects the requester to embedded register page only if host
|
|
4
|
+
* query param is present.
|
|
5
|
+
*/
|
|
6
|
+
declare function EmbeddedRegistrationRoute({ children }: {
|
|
7
|
+
children: any;
|
|
8
|
+
}): any;
|
|
9
|
+
declare namespace EmbeddedRegistrationRoute {
|
|
10
|
+
namespace propTypes {
|
|
11
|
+
let children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Navigate } from 'react-router-dom';
|
|
4
|
+
import { notFoundPath } from '../constants';
|
|
5
|
+
import { isHostAvailableInQueryParams } from '../data/utils';
|
|
6
|
+
/**
|
|
7
|
+
* This wrapper redirects the requester to embedded register page only if host
|
|
8
|
+
* query param is present.
|
|
9
|
+
*/
|
|
10
|
+
const EmbeddedRegistrationRoute = ({ children }) => {
|
|
11
|
+
const registrationEmbedded = isHostAvailableInQueryParams();
|
|
12
|
+
// Show registration page for embedded experience even if the user is authenticated
|
|
13
|
+
if (registrationEmbedded) {
|
|
14
|
+
return children;
|
|
15
|
+
}
|
|
16
|
+
return _jsx(Navigate, { to: `../${notFoundPath}`, replace: true });
|
|
17
|
+
};
|
|
18
|
+
EmbeddedRegistrationRoute.propTypes = {
|
|
19
|
+
children: PropTypes.node.isRequired,
|
|
20
|
+
};
|
|
21
|
+
export default EmbeddedRegistrationRoute;
|
|
22
|
+
//# sourceMappingURL=EmbeddedRegistrationRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmbeddedRegistrationRoute.js","sourceRoot":"","sources":["../../src/common-components/EmbeddedRegistrationRoute.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAE7D;;;GAGG;AACH,MAAM,yBAAyB,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACjD,MAAM,oBAAoB,GAAG,4BAA4B,EAAE,CAAC;IAE5D,mFAAmF;IACnF,IAAI,oBAAoB,EAAE,CAAC;QACzB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,KAAC,QAAQ,IAAC,EAAE,EAAE,MAAM,YAAY,EAAE,EAAE,OAAO,SAAG,CAAC;AACxD,CAAC,CAAC;AAEF,yBAAyB,CAAC,SAAS,GAAG;IACpC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CACpC,CAAC;AAEF,eAAe,yBAAyB,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { Navigate } from 'react-router-dom';\n\nimport { notFoundPath } from '../constants';\nimport { isHostAvailableInQueryParams } from '../data/utils';\n\n/**\n * This wrapper redirects the requester to embedded register page only if host\n * query param is present.\n */\nconst EmbeddedRegistrationRoute = ({ children }) => {\n const registrationEmbedded = isHostAvailableInQueryParams();\n\n // Show registration page for embedded experience even if the user is authenticated\n if (registrationEmbedded) {\n return children;\n }\n\n return <Navigate to={`../${notFoundPath}`} replace />;\n};\n\nEmbeddedRegistrationRoute.propTypes = {\n children: PropTypes.node.isRequired,\n};\n\nexport default EmbeddedRegistrationRoute;\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export default EnterpriseSSO;
|
|
2
|
+
/**
|
|
3
|
+
* This component renders the Single sign-on (SSO) button only for the tpa provider passed
|
|
4
|
+
* */
|
|
5
|
+
declare function EnterpriseSSO(props: any): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare namespace EnterpriseSSO {
|
|
7
|
+
namespace defaultProps {
|
|
8
|
+
namespace provider {
|
|
9
|
+
let id: string;
|
|
10
|
+
let name: string;
|
|
11
|
+
let iconClass: string;
|
|
12
|
+
let iconImage: string;
|
|
13
|
+
let loginUrl: string;
|
|
14
|
+
let registerUrl: string;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
namespace propTypes {
|
|
18
|
+
let provider_1: PropTypes.Requireable<PropTypes.InferProps<{
|
|
19
|
+
id: PropTypes.Requireable<string>;
|
|
20
|
+
name: PropTypes.Requireable<string>;
|
|
21
|
+
iconClass: PropTypes.Requireable<string>;
|
|
22
|
+
iconImage: PropTypes.Requireable<string>;
|
|
23
|
+
loginUrl: PropTypes.Requireable<string>;
|
|
24
|
+
registerUrl: PropTypes.Requireable<string>;
|
|
25
|
+
}>>;
|
|
26
|
+
export { provider_1 as provider };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
+
import { useAppConfig, getSiteConfig, getUrlByRouteRole, useIntl } from '@openedx/frontend-base';
|
|
4
|
+
import { Button, Form, Icon, } from '@openedx/paragon';
|
|
5
|
+
import { Login } from '@openedx/paragon/icons';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import { useNavigate } from 'react-router-dom';
|
|
8
|
+
import { loginRole } from '../constants';
|
|
9
|
+
import { SUPPORTED_ICON_CLASSES } from '../data/constants';
|
|
10
|
+
import messages from './messages';
|
|
11
|
+
/**
|
|
12
|
+
* This component renders the Single sign-on (SSO) button only for the tpa provider passed
|
|
13
|
+
* */
|
|
14
|
+
const EnterpriseSSO = (props) => {
|
|
15
|
+
const { formatMessage } = useIntl();
|
|
16
|
+
const navigate = useNavigate();
|
|
17
|
+
const tpaProvider = props.provider;
|
|
18
|
+
const hideRegistrationLink = useAppConfig().ALLOW_PUBLIC_ACCOUNT_CREATION === false
|
|
19
|
+
|| useAppConfig().SHOW_REGISTRATION_LINKS === false;
|
|
20
|
+
const handleSubmit = (e, url) => {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
window.location.href = getSiteConfig().lmsBaseUrl + url;
|
|
23
|
+
};
|
|
24
|
+
const handleClick = (e) => {
|
|
25
|
+
e.preventDefault();
|
|
26
|
+
navigate(getUrlByRouteRole(loginRole));
|
|
27
|
+
};
|
|
28
|
+
if (tpaProvider) {
|
|
29
|
+
return (_jsx("div", { className: "d-flex justify-content-center m-4", children: _jsx("div", { className: "d-flex flex-column", children: _jsx("div", { className: "mw-450", children: _jsxs(Form, { className: "m-0", children: [_jsx("p", { children: formatMessage(messages['enterprisetpa.title.heading'], { providerName: tpaProvider.name }) }), _jsx(Button, { id: tpaProvider.id, type: "submit", variant: "link", className: `btn-tpa btn-${tpaProvider.id}`, onClick: (e) => handleSubmit(e, tpaProvider.loginUrl), children: tpaProvider.iconImage ? (_jsxs("div", { "aria-hidden": "true", children: [_jsx("img", { className: "btn-tpa__image-icon", src: tpaProvider.iconImage, alt: `icon ${tpaProvider.name}` }), _jsx("span", { className: "pl-2", "aria-hidden": "true", children: tpaProvider.name })] }))
|
|
30
|
+
: (_jsxs(_Fragment, { children: [_jsx("div", { className: "btn-tpa__font-container", "aria-hidden": "true", children: SUPPORTED_ICON_CLASSES.includes(tpaProvider.iconClass) ? (_jsx(FontAwesomeIcon, { icon: ['fab', tpaProvider.iconClass] }))
|
|
31
|
+
: (_jsx(Icon, { className: "h-75", src: Login })) }), _jsx("span", { className: "pl-2", "aria-hidden": "true", children: tpaProvider.name })] })) }, tpaProvider.id), _jsx("div", { className: "mb-4" }), _jsx(Button, { type: "submit", id: "other-ways-to-sign-in", variant: "outline-primary", state: "Complete", className: "w-100", onClick: (e) => handleClick(e), children: hideRegistrationLink
|
|
32
|
+
? formatMessage(messages['enterprisetpa.login.button.text.public.account.creation.disabled'])
|
|
33
|
+
: formatMessage(messages['enterprisetpa.login.button.text']) })] }) }) }) }));
|
|
34
|
+
}
|
|
35
|
+
return _jsx("div", {});
|
|
36
|
+
};
|
|
37
|
+
EnterpriseSSO.defaultProps = {
|
|
38
|
+
provider: {
|
|
39
|
+
id: '',
|
|
40
|
+
name: '',
|
|
41
|
+
iconClass: '',
|
|
42
|
+
iconImage: '',
|
|
43
|
+
loginUrl: '',
|
|
44
|
+
registerUrl: '',
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
EnterpriseSSO.propTypes = {
|
|
48
|
+
provider: PropTypes.shape({
|
|
49
|
+
id: PropTypes.string,
|
|
50
|
+
name: PropTypes.string,
|
|
51
|
+
iconClass: PropTypes.string,
|
|
52
|
+
iconImage: PropTypes.string,
|
|
53
|
+
loginUrl: PropTypes.string,
|
|
54
|
+
registerUrl: PropTypes.string,
|
|
55
|
+
}),
|
|
56
|
+
};
|
|
57
|
+
export default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ome/react-fontawesome';\nimport { useAppConfig, getSiteConfig, getUrlByRouteRole, useIntl } from '@openedx/frontend-base';\nimport {\n Button, Form,\n Icon,\n} from '@openedx/paragon';\nimport { Login } from '@openedx/paragon/icons';\nimport PropTypes from 'prop-types';\nimport { useNavigate } from 'react-router-dom';\n\nimport { loginRole } from '../constants';\nimport { SUPPORTED_ICON_CLASSES } from '../data/constants';\nimport messages from './messages';\n\n/**\n * This component renders the Single sign-on (SSO) button only for the tpa provider passed\n * */\nconst EnterpriseSSO = (props) => {\n const { formatMessage } = useIntl();\n const navigate = useNavigate();\n const tpaProvider = props.provider;\n const hideRegistrationLink = useAppConfig().ALLOW_PUBLIC_ACCOUNT_CREATION === false\n || useAppConfig().SHOW_REGISTRATION_LINKS === false;\n\n const handleSubmit = (e, url) => {\n e.preventDefault();\n window.location.href = getSiteConfig().lmsBaseUrl + url;\n };\n\n const handleClick = (e) => {\n e.preventDefault();\n navigate(getUrlByRouteRole(loginRole));\n };\n\n if (tpaProvider) {\n return (\n <div className=\"d-flex justify-content-center m-4\">\n <div className=\"d-flex flex-column\">\n <div className=\"mw-450\">\n <Form className=\"m-0\">\n <p>{formatMessage(messages['enterprisetpa.title.heading'], { providerName: tpaProvider.name })}</p>\n <Button\n id={tpaProvider.id}\n key={tpaProvider.id}\n type=\"submit\"\n variant=\"link\"\n className={`btn-tpa btn-${tpaProvider.id}`}\n onClick={(e) => handleSubmit(e, tpaProvider.loginUrl)}\n >\n {tpaProvider.iconImage ? (\n <div aria-hidden=\"true\">\n <img className=\"btn-tpa__image-icon\" src={tpaProvider.iconImage} alt={`icon ${tpaProvider.name}`} />\n <span className=\"pl-2\" aria-hidden=\"true\">{tpaProvider.name}</span>\n </div>\n )\n : (\n <>\n <div className=\"btn-tpa__font-container\" aria-hidden=\"true\">\n {SUPPORTED_ICON_CLASSES.includes(tpaProvider.iconClass) ? (\n <FontAwesomeIcon icon={['fab', tpaProvider.iconClass]} />)\n : (\n <Icon className=\"h-75\" src={Login} />\n )}\n </div>\n <span className=\"pl-2\" aria-hidden=\"true\">{tpaProvider.name}</span>\n </>\n )}\n </Button>\n <div className=\"mb-4\" />\n <Button\n type=\"submit\"\n id=\"other-ways-to-sign-in\"\n variant=\"outline-primary\"\n state=\"Complete\"\n className=\"w-100\"\n onClick={(e) => handleClick(e)}\n >\n {hideRegistrationLink\n ? formatMessage(messages['enterprisetpa.login.button.text.public.account.creation.disabled'])\n : formatMessage(messages['enterprisetpa.login.button.text'])}\n </Button>\n </Form>\n </div>\n </div>\n </div>\n );\n }\n return <div />;\n};\n\nEnterpriseSSO.defaultProps = {\n provider: {\n id: '',\n name: '',\n iconClass: '',\n iconImage: '',\n loginUrl: '',\n registerUrl: '',\n },\n};\n\nEnterpriseSSO.propTypes = {\n provider: PropTypes.shape({\n id: PropTypes.string,\n name: PropTypes.string,\n iconClass: PropTypes.string,\n iconImage: PropTypes.string,\n loginUrl: PropTypes.string,\n registerUrl: PropTypes.string,\n }),\n};\n\nexport default EnterpriseSSO;\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export default FormGroup;
|
|
2
|
+
declare function FormGroup(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare namespace FormGroup {
|
|
4
|
+
namespace defaultProps {
|
|
5
|
+
let as: string;
|
|
6
|
+
let autoComplete: null;
|
|
7
|
+
let borderClass: string;
|
|
8
|
+
let children: null;
|
|
9
|
+
let className: string;
|
|
10
|
+
let errorMessage: string;
|
|
11
|
+
let handleBlur: null;
|
|
12
|
+
function handleChange(): void;
|
|
13
|
+
let handleClick: null;
|
|
14
|
+
let handleFocus: null;
|
|
15
|
+
let helpText: never[];
|
|
16
|
+
let options: null;
|
|
17
|
+
let readOnly: boolean;
|
|
18
|
+
let spellCheck: null;
|
|
19
|
+
let trailingElement: null;
|
|
20
|
+
let type: string;
|
|
21
|
+
}
|
|
22
|
+
namespace propTypes {
|
|
23
|
+
let as_1: PropTypes.Requireable<string>;
|
|
24
|
+
export { as_1 as as };
|
|
25
|
+
let autoComplete_1: PropTypes.Requireable<string>;
|
|
26
|
+
export { autoComplete_1 as autoComplete };
|
|
27
|
+
let borderClass_1: PropTypes.Requireable<string>;
|
|
28
|
+
export { borderClass_1 as borderClass };
|
|
29
|
+
let children_1: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
30
|
+
export { children_1 as children };
|
|
31
|
+
let className_1: PropTypes.Requireable<string>;
|
|
32
|
+
export { className_1 as className };
|
|
33
|
+
let errorMessage_1: PropTypes.Requireable<string>;
|
|
34
|
+
export { errorMessage_1 as errorMessage };
|
|
35
|
+
export let floatingLabel: PropTypes.Validator<string>;
|
|
36
|
+
let handleBlur_1: PropTypes.Requireable<(...args: any[]) => any>;
|
|
37
|
+
export { handleBlur_1 as handleBlur };
|
|
38
|
+
let handleChange_1: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
|
+
export { handleChange_1 as handleChange };
|
|
40
|
+
let handleClick_1: PropTypes.Requireable<(...args: any[]) => any>;
|
|
41
|
+
export { handleClick_1 as handleClick };
|
|
42
|
+
let handleFocus_1: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
|
+
export { handleFocus_1 as handleFocus };
|
|
44
|
+
let helpText_1: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
45
|
+
export { helpText_1 as helpText };
|
|
46
|
+
export let name: PropTypes.Validator<string>;
|
|
47
|
+
let options_1: PropTypes.Requireable<(...args: any[]) => any>;
|
|
48
|
+
export { options_1 as options };
|
|
49
|
+
let readOnly_1: PropTypes.Requireable<boolean>;
|
|
50
|
+
export { readOnly_1 as readOnly };
|
|
51
|
+
let spellCheck_1: PropTypes.Requireable<string>;
|
|
52
|
+
export { spellCheck_1 as spellCheck };
|
|
53
|
+
let trailingElement_1: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
54
|
+
export { trailingElement_1 as trailingElement };
|
|
55
|
+
let type_1: PropTypes.Requireable<string>;
|
|
56
|
+
export { type_1 as type };
|
|
57
|
+
export let value: PropTypes.Validator<string>;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Form, TransitionReplace, } from '@openedx/paragon';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
const FormGroup = (props) => {
|
|
6
|
+
const [hasFocus, setHasFocus] = useState(false);
|
|
7
|
+
const handleFocus = (e) => {
|
|
8
|
+
setHasFocus(true);
|
|
9
|
+
if (props.handleFocus) {
|
|
10
|
+
props.handleFocus(e);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const handleClick = (e) => {
|
|
14
|
+
if (props.handleClick) {
|
|
15
|
+
props.handleClick(e);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const handleOnBlur = (e) => {
|
|
19
|
+
setHasFocus(false);
|
|
20
|
+
if (props.handleBlur) {
|
|
21
|
+
props.handleBlur(e);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return (_jsxs(Form.Group, { controlId: props.name, className: props.className, isInvalid: props.errorMessage !== '', children: [_jsx(Form.Control, { as: props.as, readOnly: props.readOnly, type: props.type, "aria-invalid": props.errorMessage !== '', className: "form-group__form-field", autoComplete: props.autoComplete, spellCheck: props.spellCheck, name: props.name, value: props.value, onFocus: handleFocus, onBlur: handleOnBlur, onClick: handleClick, onChange: props.handleChange, controlClassName: props.borderClass, trailingElement: props.trailingElement, floatingLabel: props.floatingLabel, children: props.options ? props.options() : null }), _jsx(TransitionReplace, { children: hasFocus && props.helpText ? (_jsx(Form.Control.Feedback, { type: "default", className: "d-block form-text-size", children: props.helpText.map((message, index) => (_jsxs("span", { children: [message, _jsx("br", {})] }, `help-text-${index.toString()}`))) }, "help-text")) : _jsx("div", {}, "empty") }), props.errorMessage !== '' && (_jsx(Form.Control.Feedback, { className: "form-text-size", hasIcon: false, "feedback-for": props.name, type: "invalid", children: props.errorMessage }, "error")), props.children] }));
|
|
25
|
+
};
|
|
26
|
+
FormGroup.defaultProps = {
|
|
27
|
+
as: 'input',
|
|
28
|
+
autoComplete: null,
|
|
29
|
+
borderClass: '',
|
|
30
|
+
children: null,
|
|
31
|
+
className: '',
|
|
32
|
+
errorMessage: '',
|
|
33
|
+
handleBlur: null,
|
|
34
|
+
handleChange: () => { },
|
|
35
|
+
handleClick: null,
|
|
36
|
+
handleFocus: null,
|
|
37
|
+
helpText: [],
|
|
38
|
+
options: null,
|
|
39
|
+
readOnly: false,
|
|
40
|
+
spellCheck: null,
|
|
41
|
+
trailingElement: null,
|
|
42
|
+
type: 'text',
|
|
43
|
+
};
|
|
44
|
+
FormGroup.propTypes = {
|
|
45
|
+
as: PropTypes.string,
|
|
46
|
+
autoComplete: PropTypes.string,
|
|
47
|
+
borderClass: PropTypes.string,
|
|
48
|
+
children: PropTypes.element,
|
|
49
|
+
className: PropTypes.string,
|
|
50
|
+
errorMessage: PropTypes.string,
|
|
51
|
+
floatingLabel: PropTypes.string.isRequired,
|
|
52
|
+
handleBlur: PropTypes.func,
|
|
53
|
+
handleChange: PropTypes.func,
|
|
54
|
+
handleClick: PropTypes.func,
|
|
55
|
+
handleFocus: PropTypes.func,
|
|
56
|
+
helpText: PropTypes.arrayOf(PropTypes.string),
|
|
57
|
+
name: PropTypes.string.isRequired,
|
|
58
|
+
options: PropTypes.func,
|
|
59
|
+
readOnly: PropTypes.bool,
|
|
60
|
+
spellCheck: PropTypes.string,
|
|
61
|
+
trailingElement: PropTypes.element,
|
|
62
|
+
type: PropTypes.string,
|
|
63
|
+
value: PropTypes.string.isRequired,
|
|
64
|
+
};
|
|
65
|
+
export default FormGroup;
|
|
66
|
+
//# sourceMappingURL=FormGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormGroup.js","sourceRoot":"","sources":["../../src/common-components/FormGroup.jsx"],"names":[],"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} from 'react';\n\nimport {\n Form, TransitionReplace,\n} from '@openedx/paragon';\nimport PropTypes from 'prop-types';\n\nconst FormGroup = (props) => {\n const [hasFocus, setHasFocus] = useState(false);\n\n const handleFocus = (e) => {\n setHasFocus(true);\n if (props.handleFocus) { props.handleFocus(e); }\n };\n const handleClick = (e) => {\n if (props.handleClick) { props.handleClick(e); }\n };\n const handleOnBlur = (e) => {\n setHasFocus(false);\n if (props.handleBlur) { props.handleBlur(e); }\n };\n\n return (\n <Form.Group controlId={props.name} className={props.className} isInvalid={props.errorMessage !== ''}>\n <Form.Control\n as={props.as}\n readOnly={props.readOnly}\n type={props.type}\n aria-invalid={props.errorMessage !== ''}\n className=\"form-group__form-field\"\n autoComplete={props.autoComplete}\n spellCheck={props.spellCheck}\n name={props.name}\n value={props.value}\n onFocus={handleFocus}\n onBlur={handleOnBlur}\n onClick={handleClick}\n onChange={props.handleChange}\n controlClassName={props.borderClass}\n trailingElement={props.trailingElement}\n floatingLabel={props.floatingLabel}\n >\n {props.options ? props.options() : null}\n </Form.Control>\n <TransitionReplace>\n {hasFocus && props.helpText ? (\n <Form.Control.Feedback type=\"default\" key=\"help-text\" className=\"d-block form-text-size\">\n {props.helpText.map((message, index) => (\n <span key={`help-text-${index.toString()}`}>\n {message}\n <br />\n </span>\n ))}\n </Form.Control.Feedback>\n ) : <div key=\"empty\" />}\n </TransitionReplace>\n {props.errorMessage !== '' && (\n <Form.Control.Feedback key=\"error\" className=\"form-text-size\" hasIcon={false} feedback-for={props.name} type=\"invalid\">{props.errorMessage}</Form.Control.Feedback>\n )}\n {props.children}\n </Form.Group>\n );\n};\n\nFormGroup.defaultProps = {\n as: 'input',\n autoComplete: null,\n borderClass: '',\n children: null,\n className: '',\n errorMessage: '',\n handleBlur: null,\n handleChange: () => {},\n handleClick: null,\n handleFocus: null,\n helpText: [],\n options: null,\n readOnly: false,\n spellCheck: null,\n trailingElement: null,\n type: 'text',\n};\n\nFormGroup.propTypes = {\n as: PropTypes.string,\n autoComplete: PropTypes.string,\n borderClass: PropTypes.string,\n children: PropTypes.element,\n className: PropTypes.string,\n errorMessage: PropTypes.string,\n floatingLabel: PropTypes.string.isRequired,\n handleBlur: PropTypes.func,\n handleChange: PropTypes.func,\n handleClick: PropTypes.func,\n handleFocus: PropTypes.func,\n helpText: PropTypes.arrayOf(PropTypes.string),\n name: PropTypes.string.isRequired,\n options: PropTypes.func,\n readOnly: PropTypes.bool,\n spellCheck: PropTypes.string,\n trailingElement: PropTypes.element,\n type: PropTypes.string,\n value: PropTypes.string.isRequired,\n};\n\nexport default FormGroup;\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export function RenderInstitutionButton(props: any): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export namespace RenderInstitutionButton {
|
|
3
|
+
namespace propTypes {
|
|
4
|
+
let buttonTitle: PropTypes.Requireable<string>;
|
|
5
|
+
let onSubmitHandler: PropTypes.Validator<(...args: any[]) => any>;
|
|
6
|
+
let secondaryProviders: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
7
|
+
name: PropTypes.Validator<string>;
|
|
8
|
+
loginUrl: PropTypes.Validator<string>;
|
|
9
|
+
}> | null | undefined)[]>;
|
|
10
|
+
}
|
|
11
|
+
namespace defaultProps {
|
|
12
|
+
let secondaryProviders_1: never[];
|
|
13
|
+
export { secondaryProviders_1 as secondaryProviders };
|
|
14
|
+
let buttonTitle_1: string;
|
|
15
|
+
export { buttonTitle_1 as buttonTitle };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export default InstitutionLogistration;
|
|
19
|
+
import PropTypes from 'prop-types';
|
|
20
|
+
/**
|
|
21
|
+
* This component renders the page list of available institutions for login
|
|
22
|
+
* */
|
|
23
|
+
declare function InstitutionLogistration(props: any): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare namespace InstitutionLogistration {
|
|
25
|
+
export namespace propTypes_1 {
|
|
26
|
+
let headingTitle: PropTypes.Requireable<string>;
|
|
27
|
+
}
|
|
28
|
+
export { propTypes_1 as propTypes };
|
|
29
|
+
export namespace defaultProps_1 {
|
|
30
|
+
let headingTitle_1: string;
|
|
31
|
+
export { headingTitle_1 as headingTitle };
|
|
32
|
+
}
|
|
33
|
+
export { defaultProps_1 as defaultProps };
|
|
34
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { getSiteConfig, useIntl } from '@openedx/frontend-base';
|
|
3
|
+
import { Button, Hyperlink, Icon } from '@openedx/paragon';
|
|
4
|
+
import { Institution } from '@openedx/paragon/icons';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import messages from './messages';
|
|
7
|
+
/**
|
|
8
|
+
* This component renders the Institution login button
|
|
9
|
+
* */
|
|
10
|
+
export const RenderInstitutionButton = props => {
|
|
11
|
+
const { onSubmitHandler, buttonTitle } = props;
|
|
12
|
+
return (_jsxs(Button, { className: "btn-sm text-body p-0 mb-4 border-0", variant: "link", "data-event-name": "institution_login", onClick: onSubmitHandler, children: [_jsx(Icon, { src: Institution, className: "institute-icon" }), buttonTitle] }));
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* This component renders the page list of available institutions for login
|
|
16
|
+
* */
|
|
17
|
+
const InstitutionLogistration = props => {
|
|
18
|
+
const lmsBaseUrl = getSiteConfig().lmsBaseUrl;
|
|
19
|
+
const { formatMessage } = useIntl();
|
|
20
|
+
const { secondaryProviders, headingTitle, } = props;
|
|
21
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "d-flex justify-content-left mb-4 mt-2", children: _jsxs("div", { className: "flex-column", children: [_jsx("h4", { className: "mb-2 font-weight-bold institutions__heading", children: headingTitle }), _jsx("p", { className: "mb-2", children: formatMessage(messages['institution.login.page.sub.heading']) })] }) }), _jsx("div", { className: "mb-5", children: _jsx("table", { className: "pgn__data-table table-striped table-borderless", children: _jsx("tbody", { children: secondaryProviders.map(provider => (_jsx("tr", { className: "pgn__data-table-row", children: _jsx("td", { children: _jsx(Hyperlink, { className: "btn nav-item p-0 mb-1 institutions--provider-link", destination: lmsBaseUrl + provider.loginUrl, children: provider.name }) }) }, provider))) }) }) })] }));
|
|
22
|
+
};
|
|
23
|
+
const LogistrationDefaultProps = {
|
|
24
|
+
secondaryProviders: [],
|
|
25
|
+
buttonTitle: '',
|
|
26
|
+
};
|
|
27
|
+
const LogistrationProps = {
|
|
28
|
+
secondaryProviders: PropTypes.arrayOf(PropTypes.shape({
|
|
29
|
+
name: PropTypes.string.isRequired,
|
|
30
|
+
loginUrl: PropTypes.string.isRequired,
|
|
31
|
+
})),
|
|
32
|
+
};
|
|
33
|
+
RenderInstitutionButton.propTypes = Object.assign(Object.assign({}, LogistrationProps), { buttonTitle: PropTypes.string, onSubmitHandler: PropTypes.func.isRequired });
|
|
34
|
+
RenderInstitutionButton.defaultProps = Object.assign({}, LogistrationDefaultProps);
|
|
35
|
+
InstitutionLogistration.propTypes = Object.assign(Object.assign({}, LogistrationProps), { headingTitle: PropTypes.string });
|
|
36
|
+
InstitutionLogistration.defaultProps = Object.assign(Object.assign({}, LogistrationDefaultProps), { headingTitle: '' });
|
|
37
|
+
export default InstitutionLogistration;
|
|
38
|
+
//# sourceMappingURL=InstitutionLogistration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InstitutionLogistration.js","sourceRoot":"","sources":["../../src/common-components/InstitutionLogistration.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC;;KAEK;AACL,MAAM,CAA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tB,WAAW,EAAE,EAAE;CAChB,CAAC;AACF,MAAM,iBAAiB,GAAG;IACxB,kBAAkB,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC;QACpD,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;QACjC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;KACtC,CAAC,CAAC;CACJ,CAAC;AAEF,uBAAuB,CAAC,SAAS,mCAC5B,iBAAiB,KACpB,WAAW,EAAE,SAAS,CAAC,MAAM,EAC7B,eAAe,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU,GAE3C,CAAC;AACF,uBAAuB,CAAC,YAAY,qBAC/B,wBAAwB,CAC5B,CAAC;AAEF,uBAAuB,CAAC,SAAS,mCAC5B,iBAAiB,KACpB,YAAY,EAAE,SAAS,CAAC,MAAM,GAC/B,CAAC;AACF,uBAAuB,CAAC,YAAY,mCAC/B,wBAAwB,KAC3B,YAAY,EAAE,EAAE,GACjB,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["import { getSiteConfig, useIntl } from '@openedx/frontend-base';\nimport { Button, Hyperlink, Icon } from '@openedx/paragon';\nimport { Institution } from '@openedx/paragon/icons';\nimport PropTypes from 'prop-types';\n\nimport messages from './messages';\n\n/**\n * This component renders the Institution login button\n * */\nexport const RenderInstitutionButton = props => {\n const { onSubmitHandler, buttonTitle } = props;\n\n return (\n <Button\n className=\"btn-sm text-body p-0 mb-4 border-0\"\n variant=\"link\"\n data-event-name=\"institution_login\"\n onClick={onSubmitHandler}\n >\n <Icon src={Institution} className=\"institute-icon\" />\n {buttonTitle}\n </Button>\n );\n};\n\n/**\n * This component renders the page list of available institutions for login\n * */\nconst InstitutionLogistration = props => {\n const lmsBaseUrl = getSiteConfig().lmsBaseUrl;\n const { formatMessage } = useIntl();\n const {\n secondaryProviders,\n headingTitle,\n } = props;\n\n return (\n <>\n <div className=\"d-flex justify-content-left mb-4 mt-2\">\n <div className=\"flex-column\">\n <h4 className=\"mb-2 font-weight-bold institutions__heading\">\n {headingTitle}\n </h4>\n <p className=\"mb-2\">\n {formatMessage(messages['institution.login.page.sub.heading'])}\n </p>\n </div>\n </div>\n <div className=\"mb-5\">\n <table className=\"pgn__data-table table-striped table-borderless\">\n <tbody>\n {secondaryProviders.map(provider => (\n <tr key={provider} className=\"pgn__data-table-row\">\n <td>\n <Hyperlink\n className=\"btn nav-item p-0 mb-1 institutions--provider-link\"\n destination={lmsBaseUrl + provider.loginUrl}\n >\n {provider.name}\n </Hyperlink>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </>\n );\n};\n\nconst LogistrationDefaultProps = {\n secondaryProviders: [],\n buttonTitle: '',\n};\nconst LogistrationProps = {\n secondaryProviders: PropTypes.arrayOf(PropTypes.shape({\n name: PropTypes.string.isRequired,\n loginUrl: PropTypes.string.isRequired,\n })),\n};\n\nRenderInstitutionButton.propTypes = {\n ...LogistrationProps,\n buttonTitle: PropTypes.string,\n onSubmitHandler: PropTypes.func.isRequired,\n\n};\nRenderInstitutionButton.defaultProps = {\n ...LogistrationDefaultProps,\n};\n\nInstitutionLogistration.propTypes = {\n ...LogistrationProps,\n headingTitle: PropTypes.string,\n};\nInstitutionLogistration.defaultProps = {\n ...LogistrationDefaultProps,\n headingTitle: '',\n};\n\nexport default InstitutionLogistration;\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { FormattedMessage } from '@openedx/frontend-base';
|
|
3
|
+
const NotFoundPage = () => (_jsx("div", { className: "container-fluid d-flex py-5 justify-content-center align-items-start text-center", children: _jsx("p", { className: "my-0 py-5 text-muted mw-32em", children: _jsx(FormattedMessage, { id: "error.notfound.message", defaultMessage: "The page you're looking for is unavailable or there's an error in the URL. Please check the URL and try again.", description: "error message when a page does not exist" }) }) }));
|
|
4
|
+
export default NotFoundPage;
|
|
5
|
+
//# sourceMappingURL=NotFoundPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotFoundPage.js","sourceRoot":"","sources":["../../src/common-components/NotFoundPage.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,CACzB,cAAK,SAAS,EAAC,kFAAkF,YAC/F,YAAG,SAAS,EAAC,8BAA8B,YACzC,KAAC,gBAAgB,IACf,EAAE,EAAC,wBAAwB,EAC3B,cAAc,EAAC,gHAAgH,EAC/H,WAAW,EAAC,0CAA0C,GACtD,GACA,GACA,CACP,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { FormattedMessage } from '@openedx/frontend-base';\n\nconst NotFoundPage = () => (\n <div className=\"container-fluid d-flex py-5 justify-content-center align-items-start text-center\">\n <p className=\"my-0 py-5 text-muted mw-32em\">\n <FormattedMessage\n id=\"error.notfound.message\"\n defaultMessage=\"The page you're looking for is unavailable or there's an error in the URL. Please check the URL and try again.\"\n description=\"error message when a page does not exist\"\n />\n </p>\n </div>\n);\n\nexport default NotFoundPage;\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export default PasswordField;
|
|
2
|
+
declare function PasswordField(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare namespace PasswordField {
|
|
4
|
+
namespace defaultProps {
|
|
5
|
+
export let borderClass: string;
|
|
6
|
+
export let errorMessage: string;
|
|
7
|
+
export let handleBlur: null;
|
|
8
|
+
export let handleFocus: null;
|
|
9
|
+
export function handleChange(): void;
|
|
10
|
+
export let handleErrorChange: null;
|
|
11
|
+
export let showRequirements: boolean;
|
|
12
|
+
export let showScreenReaderText: boolean;
|
|
13
|
+
export let autoComplete: null;
|
|
14
|
+
export { noopFn as clearRegistrationBackendError };
|
|
15
|
+
export { noopFn as validateField };
|
|
16
|
+
export let validationApiRateLimited: boolean;
|
|
17
|
+
}
|
|
18
|
+
namespace propTypes {
|
|
19
|
+
let borderClass_1: PropTypes.Requireable<string>;
|
|
20
|
+
export { borderClass_1 as borderClass };
|
|
21
|
+
let errorMessage_1: PropTypes.Requireable<string>;
|
|
22
|
+
export { errorMessage_1 as errorMessage };
|
|
23
|
+
export let floatingLabel: PropTypes.Validator<string>;
|
|
24
|
+
let handleBlur_1: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
+
export { handleBlur_1 as handleBlur };
|
|
26
|
+
let handleFocus_1: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
+
export { handleFocus_1 as handleFocus };
|
|
28
|
+
let handleChange_1: PropTypes.Requireable<(...args: any[]) => any>;
|
|
29
|
+
export { handleChange_1 as handleChange };
|
|
30
|
+
let handleErrorChange_1: PropTypes.Requireable<(...args: any[]) => any>;
|
|
31
|
+
export { handleErrorChange_1 as handleErrorChange };
|
|
32
|
+
export let name: PropTypes.Validator<string>;
|
|
33
|
+
let showRequirements_1: PropTypes.Requireable<boolean>;
|
|
34
|
+
export { showRequirements_1 as showRequirements };
|
|
35
|
+
export let value: PropTypes.Validator<string>;
|
|
36
|
+
let autoComplete_1: PropTypes.Requireable<string>;
|
|
37
|
+
export { autoComplete_1 as autoComplete };
|
|
38
|
+
let showScreenReaderText_1: PropTypes.Requireable<boolean>;
|
|
39
|
+
export { showScreenReaderText_1 as showScreenReaderText };
|
|
40
|
+
export let clearRegistrationBackendError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
41
|
+
export let validateField: PropTypes.Requireable<(...args: any[]) => any>;
|
|
42
|
+
let validationApiRateLimited_1: PropTypes.Requireable<boolean>;
|
|
43
|
+
export { validationApiRateLimited_1 as validationApiRateLimited };
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
declare function noopFn(): void;
|
|
47
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { useIntl } from '@openedx/frontend-base';
|
|
4
|
+
import { Form, Icon, IconButton, OverlayTrigger, Tooltip, useToggle, } from '@openedx/paragon';
|
|
5
|
+
import { Check, Remove, Visibility, VisibilityOff, } from '@openedx/paragon/icons';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import { LETTER_REGEX, NUMBER_REGEX } from '../data/constants';
|
|
8
|
+
import { validatePasswordField } from '../register/data/utils';
|
|
9
|
+
import messages from './messages';
|
|
10
|
+
const noopFn = () => { };
|
|
11
|
+
const PasswordField = (props) => {
|
|
12
|
+
const { formatMessage } = useIntl();
|
|
13
|
+
const [isPasswordHidden, setHiddenTrue, setHiddenFalse] = useToggle(true);
|
|
14
|
+
const [showTooltip, setShowTooltip] = useState(false);
|
|
15
|
+
const { validationApiRateLimited = false, clearRegistrationBackendError = noopFn, validateField = noopFn, } = props;
|
|
16
|
+
const handleBlur = (e) => {
|
|
17
|
+
var _a;
|
|
18
|
+
const { name, value } = e.target;
|
|
19
|
+
if (name === props.name && ((_a = e.relatedTarget) === null || _a === void 0 ? void 0 : _a.name) === 'passwordIcon') {
|
|
20
|
+
return; // Do not run validations on password icon click
|
|
21
|
+
}
|
|
22
|
+
let passwordValue = value;
|
|
23
|
+
if (name === 'passwordIcon') {
|
|
24
|
+
// To validate actual password value when onBlur is triggered by focusing out the password icon
|
|
25
|
+
passwordValue = props.value;
|
|
26
|
+
}
|
|
27
|
+
if (props.handleBlur) {
|
|
28
|
+
props.handleBlur({
|
|
29
|
+
target: {
|
|
30
|
+
name: props.name,
|
|
31
|
+
value: passwordValue,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
setShowTooltip(props.showRequirements && false);
|
|
36
|
+
if (props.handleErrorChange) { // If rendering from register page
|
|
37
|
+
const fieldError = validatePasswordField(passwordValue, formatMessage);
|
|
38
|
+
if (fieldError) {
|
|
39
|
+
props.handleErrorChange('password', fieldError);
|
|
40
|
+
}
|
|
41
|
+
else if (!validationApiRateLimited) {
|
|
42
|
+
validateField({ password: passwordValue });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const handleFocus = (e) => {
|
|
47
|
+
var _a;
|
|
48
|
+
if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.name) === 'passwordIcon') {
|
|
49
|
+
return; // Do not clear error on password icon focus
|
|
50
|
+
}
|
|
51
|
+
if (props.handleFocus) {
|
|
52
|
+
props.handleFocus(e);
|
|
53
|
+
}
|
|
54
|
+
if (props.handleErrorChange) {
|
|
55
|
+
props.handleErrorChange('password', '');
|
|
56
|
+
clearRegistrationBackendError('password');
|
|
57
|
+
}
|
|
58
|
+
setTimeout(() => setShowTooltip(props.showRequirements && true), 150);
|
|
59
|
+
};
|
|
60
|
+
const HideButton = (_jsx(IconButton, { onFocus: handleFocus, onBlur: handleBlur, name: "passwordIcon", src: VisibilityOff, iconAs: Icon, onClick: setHiddenTrue, size: "sm", variant: "secondary", alt: formatMessage(messages['hide.password']) }));
|
|
61
|
+
const ShowButton = (_jsx(IconButton, { onFocus: handleFocus, onBlur: handleBlur, name: "passwordIcon", src: Visibility, iconAs: Icon, onClick: setHiddenFalse, size: "sm", variant: "secondary", alt: formatMessage(messages['show.password']) }));
|
|
62
|
+
const placement = window.innerWidth < 768 ? 'top' : 'left';
|
|
63
|
+
const tooltip = (_jsxs(Tooltip, { id: `password-requirement-${placement}`, children: [_jsxs("span", { id: "letter-check", className: "d-flex align-items-center", children: [LETTER_REGEX.test(props.value) ? _jsx(Icon, { className: "text-success mr-1", src: Check }) : _jsx(Icon, { className: "mr-1 text-light-700", src: Remove }), formatMessage(messages['one.letter'])] }), _jsxs("span", { id: "number-check", className: "d-flex align-items-center", children: [NUMBER_REGEX.test(props.value) ? _jsx(Icon, { className: "text-success mr-1", src: Check }) : _jsx(Icon, { className: "mr-1 text-light-700", src: Remove }), formatMessage(messages['one.number'])] }), _jsxs("span", { id: "characters-check", className: "d-flex align-items-center", children: [props.value.length >= 8 ? _jsx(Icon, { className: "text-success mr-1", src: Check }) : _jsx(Icon, { className: "mr-1 text-light-700", src: Remove }), formatMessage(messages['eight.characters'])] })] }));
|
|
64
|
+
return (_jsxs(Form.Group, { controlId: props.name, isInvalid: props.errorMessage !== '', children: [_jsx(OverlayTrigger, { placement: placement, overlay: tooltip, show: showTooltip, children: _jsx(Form.Control, { as: "input", className: "form-group__form-field", type: isPasswordHidden ? 'password' : 'text', name: props.name, value: props.value, autoComplete: props.autoComplete, "aria-invalid": props.errorMessage !== '', onFocus: handleFocus, onBlur: handleBlur, onChange: props.handleChange, controlClassName: props.borderClass, trailingElement: isPasswordHidden ? ShowButton : HideButton, floatingLabel: props.floatingLabel }) }, "tooltip"), props.errorMessage !== '' && (_jsxs(Form.Control.Feedback, { className: "form-text-size", hasIcon: false, "feedback-for": props.name, type: "invalid", children: [props.errorMessage, props.showScreenReaderText && _jsx("span", { className: "sr-only", children: formatMessage(messages['password.sr.only.helping.text']) })] }, "error"))] }));
|
|
65
|
+
};
|
|
66
|
+
PasswordField.defaultProps = {
|
|
67
|
+
borderClass: '',
|
|
68
|
+
errorMessage: '',
|
|
69
|
+
handleBlur: null,
|
|
70
|
+
handleFocus: null,
|
|
71
|
+
handleChange: () => { },
|
|
72
|
+
handleErrorChange: null,
|
|
73
|
+
showRequirements: true,
|
|
74
|
+
showScreenReaderText: true,
|
|
75
|
+
autoComplete: null,
|
|
76
|
+
clearRegistrationBackendError: noopFn,
|
|
77
|
+
validateField: noopFn,
|
|
78
|
+
validationApiRateLimited: false,
|
|
79
|
+
};
|
|
80
|
+
PasswordField.propTypes = {
|
|
81
|
+
borderClass: PropTypes.string,
|
|
82
|
+
errorMessage: PropTypes.string,
|
|
83
|
+
floatingLabel: PropTypes.string.isRequired,
|
|
84
|
+
handleBlur: PropTypes.func,
|
|
85
|
+
handleFocus: PropTypes.func,
|
|
86
|
+
handleChange: PropTypes.func,
|
|
87
|
+
handleErrorChange: PropTypes.func,
|
|
88
|
+
name: PropTypes.string.isRequired,
|
|
89
|
+
showRequirements: PropTypes.bool,
|
|
90
|
+
value: PropTypes.string.isRequired,
|
|
91
|
+
autoComplete: PropTypes.string,
|
|
92
|
+
showScreenReaderText: PropTypes.bool,
|
|
93
|
+
clearRegistrationBackendError: PropTypes.func,
|
|
94
|
+
validateField: PropTypes.func,
|
|
95
|
+
validationApiRateLimited: PropTypes.bool,
|
|
96
|
+
};
|
|
97
|
+
export default PasswordField;
|
|
98
|
+
//# sourceMappingURL=PasswordField.js.map
|