@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.
Files changed (484) hide show
  1. package/dist/Main.d.ts +3 -0
  2. package/dist/Main.js +10 -0
  3. package/dist/Main.js.map +1 -0
  4. package/dist/app.d.ts +3 -0
  5. package/dist/app.js +41 -0
  6. package/dist/app.js.map +1 -0
  7. package/dist/app.scss +2 -0
  8. package/dist/base-container/components/default-layout/LargeLayout.d.ts +2 -0
  9. package/dist/base-container/components/default-layout/LargeLayout.js +11 -0
  10. package/dist/base-container/components/default-layout/LargeLayout.js.map +1 -0
  11. package/dist/base-container/components/default-layout/MediumLayout.d.ts +2 -0
  12. package/dist/base-container/components/default-layout/MediumLayout.js +11 -0
  13. package/dist/base-container/components/default-layout/MediumLayout.js.map +1 -0
  14. package/dist/base-container/components/default-layout/SmallLayout.d.ts +2 -0
  15. package/dist/base-container/components/default-layout/SmallLayout.js +11 -0
  16. package/dist/base-container/components/default-layout/SmallLayout.js.map +1 -0
  17. package/dist/base-container/components/default-layout/index.d.ts +3 -0
  18. package/{src/base-container/components/default-layout/index.jsx → dist/base-container/components/default-layout/index.js} +1 -0
  19. package/dist/base-container/components/default-layout/index.js.map +1 -0
  20. package/dist/base-container/components/default-layout/messages.d.ts +13 -0
  21. package/dist/base-container/components/default-layout/messages.js +15 -0
  22. package/dist/base-container/components/default-layout/messages.js.map +1 -0
  23. package/dist/base-container/components/image-layout/ExtraSmallLayout.d.ts +2 -0
  24. package/dist/base-container/components/image-layout/ExtraSmallLayout.js +10 -0
  25. package/dist/base-container/components/image-layout/ExtraSmallLayout.js.map +1 -0
  26. package/dist/base-container/components/image-layout/LargeLayout.d.ts +2 -0
  27. package/dist/base-container/components/image-layout/LargeLayout.js +11 -0
  28. package/dist/base-container/components/image-layout/LargeLayout.js.map +1 -0
  29. package/dist/base-container/components/image-layout/MediumLayout.d.ts +2 -0
  30. package/dist/base-container/components/image-layout/MediumLayout.js +11 -0
  31. package/dist/base-container/components/image-layout/MediumLayout.js.map +1 -0
  32. package/dist/base-container/components/image-layout/SmallLayout.d.ts +2 -0
  33. package/dist/base-container/components/image-layout/SmallLayout.js +10 -0
  34. package/dist/base-container/components/image-layout/SmallLayout.js.map +1 -0
  35. package/dist/base-container/components/image-layout/index.d.ts +4 -0
  36. package/{src/base-container/components/image-layout/index.jsx → dist/base-container/components/image-layout/index.js} +1 -0
  37. package/dist/base-container/components/image-layout/index.js.map +1 -0
  38. package/dist/base-container/components/image-layout/messages.d.ts +13 -0
  39. package/dist/base-container/components/image-layout/messages.js +15 -0
  40. package/dist/base-container/components/image-layout/messages.js.map +1 -0
  41. package/dist/base-container/components/welcome-page-layout/LargeLayout.d.ts +10 -0
  42. package/dist/base-container/components/welcome-page-layout/LargeLayout.js +14 -0
  43. package/dist/base-container/components/welcome-page-layout/LargeLayout.js.map +1 -0
  44. package/dist/base-container/components/welcome-page-layout/MediumLayout.d.ts +10 -0
  45. package/dist/base-container/components/welcome-page-layout/MediumLayout.js +14 -0
  46. package/dist/base-container/components/welcome-page-layout/MediumLayout.js.map +1 -0
  47. package/dist/base-container/components/welcome-page-layout/SmallLayout.d.ts +10 -0
  48. package/dist/base-container/components/welcome-page-layout/SmallLayout.js +14 -0
  49. package/dist/base-container/components/welcome-page-layout/SmallLayout.js.map +1 -0
  50. package/dist/base-container/components/welcome-page-layout/index.d.ts +3 -0
  51. package/{src/base-container/components/welcome-page-layout/index.jsx → dist/base-container/components/welcome-page-layout/index.js} +1 -0
  52. package/dist/base-container/components/welcome-page-layout/index.js.map +1 -0
  53. package/dist/base-container/components/welcome-page-layout/messages.d.ts +18 -0
  54. package/dist/base-container/components/welcome-page-layout/messages.js +20 -0
  55. package/dist/base-container/components/welcome-page-layout/messages.js.map +1 -0
  56. package/dist/base-container/index.d.ts +20 -0
  57. package/dist/base-container/index.js +27 -0
  58. package/dist/base-container/index.js.map +1 -0
  59. package/dist/common-components/EmbeddedRegistrationRoute.d.ts +14 -0
  60. package/dist/common-components/EmbeddedRegistrationRoute.js +22 -0
  61. package/dist/common-components/EmbeddedRegistrationRoute.js.map +1 -0
  62. package/dist/common-components/EnterpriseSSO.d.ts +29 -0
  63. package/dist/common-components/EnterpriseSSO.js +58 -0
  64. package/dist/common-components/EnterpriseSSO.js.map +1 -0
  65. package/dist/common-components/FormGroup.d.ts +60 -0
  66. package/dist/common-components/FormGroup.js +66 -0
  67. package/dist/common-components/FormGroup.js.map +1 -0
  68. package/dist/common-components/InstitutionLogistration.d.ts +34 -0
  69. package/dist/common-components/InstitutionLogistration.js +38 -0
  70. package/dist/common-components/InstitutionLogistration.js.map +1 -0
  71. package/dist/common-components/NotFoundPage.d.ts +2 -0
  72. package/dist/common-components/NotFoundPage.js +5 -0
  73. package/dist/common-components/NotFoundPage.js.map +1 -0
  74. package/dist/common-components/PasswordField.d.ts +47 -0
  75. package/dist/common-components/PasswordField.js +98 -0
  76. package/dist/common-components/PasswordField.js.map +1 -0
  77. package/dist/common-components/RedirectLogistration.d.ts +39 -0
  78. package/dist/common-components/RedirectLogistration.js +72 -0
  79. package/dist/common-components/RedirectLogistration.js.map +1 -0
  80. package/dist/common-components/RegisterFaIcons.d.ts +1 -0
  81. package/dist/common-components/RegisterFaIcons.js +6 -0
  82. package/dist/common-components/RegisterFaIcons.js.map +1 -0
  83. package/dist/common-components/SocialAuthProviders.d.ts +23 -0
  84. package/dist/common-components/SocialAuthProviders.js +43 -0
  85. package/dist/common-components/SocialAuthProviders.js.map +1 -0
  86. package/dist/common-components/ThirdPartyAuth.d.ts +42 -0
  87. package/dist/common-components/ThirdPartyAuth.js +57 -0
  88. package/dist/common-components/ThirdPartyAuth.js.map +1 -0
  89. package/dist/common-components/ThirdPartyAuthAlert.d.ts +15 -0
  90. package/dist/common-components/ThirdPartyAuthAlert.js +32 -0
  91. package/dist/common-components/ThirdPartyAuthAlert.js.map +1 -0
  92. package/dist/common-components/UnAuthOnlyRoute.d.ts +14 -0
  93. package/dist/common-components/UnAuthOnlyRoute.js +32 -0
  94. package/dist/common-components/UnAuthOnlyRoute.js.map +1 -0
  95. package/dist/common-components/components/ThirdPartyAuthContext.d.ts +31 -0
  96. package/dist/common-components/components/ThirdPartyAuthContext.js +84 -0
  97. package/dist/common-components/components/ThirdPartyAuthContext.js.map +1 -0
  98. package/dist/common-components/data/api.d.ts +6 -0
  99. package/dist/common-components/data/api.js +26 -0
  100. package/dist/common-components/data/api.js.map +1 -0
  101. package/dist/common-components/data/apiHook.d.ts +9 -0
  102. package/dist/common-components/data/apiHook.js +14 -0
  103. package/dist/common-components/data/apiHook.js.map +1 -0
  104. package/dist/common-components/data/queryKeys.d.ts +4 -0
  105. package/dist/common-components/data/queryKeys.js +6 -0
  106. package/dist/common-components/data/queryKeys.js.map +1 -0
  107. package/dist/common-components/index.d.ts +10 -0
  108. package/{src/common-components/index.jsx → dist/common-components/index.js} +1 -3
  109. package/dist/common-components/index.js.map +1 -0
  110. package/dist/common-components/messages.d.ts +113 -0
  111. package/dist/common-components/messages.js +126 -0
  112. package/dist/common-components/messages.js.map +1 -0
  113. package/dist/constants.d.ts +14 -0
  114. package/dist/constants.js +17 -0
  115. package/dist/constants.js.map +1 -0
  116. package/dist/data/constants.d.ts +16 -0
  117. package/{src → dist}/data/constants.js +4 -17
  118. package/dist/data/constants.js.map +1 -0
  119. package/dist/data/countries.d.ts +26 -0
  120. package/{src/data/countries.ts → dist/data/countries.js} +6 -9
  121. package/dist/data/countries.js.map +1 -0
  122. package/dist/data/oneTrust.d.ts +2 -0
  123. package/dist/data/oneTrust.js +3 -0
  124. package/dist/data/oneTrust.js.map +1 -0
  125. package/dist/data/utils/cookies.d.ts +1 -0
  126. package/dist/data/utils/cookies.js +12 -0
  127. package/dist/data/utils/cookies.js.map +1 -0
  128. package/dist/data/utils/dataUtils.d.ts +12 -0
  129. package/dist/data/utils/dataUtils.js +81 -0
  130. package/dist/data/utils/dataUtils.js.map +1 -0
  131. package/dist/data/utils/index.d.ts +2 -0
  132. package/dist/data/utils/index.js +3 -0
  133. package/dist/data/utils/index.js.map +1 -0
  134. package/dist/data/utils/useMobileResponsive.d.ts +7 -0
  135. package/dist/data/utils/useMobileResponsive.js +22 -0
  136. package/dist/data/utils/useMobileResponsive.js.map +1 -0
  137. package/dist/field-renderer/FieldRenderer.d.ts +34 -0
  138. package/dist/field-renderer/FieldRenderer.js +70 -0
  139. package/dist/field-renderer/FieldRenderer.js.map +1 -0
  140. package/dist/field-renderer/index.d.ts +1 -0
  141. package/{src/field-renderer/index.jsx → dist/field-renderer/index.js} +1 -0
  142. package/dist/field-renderer/index.js.map +1 -0
  143. package/dist/forgot-password/ForgotPasswordAlert.d.ts +16 -0
  144. package/dist/forgot-password/ForgotPasswordAlert.js +66 -0
  145. package/dist/forgot-password/ForgotPasswordAlert.js.map +1 -0
  146. package/dist/forgot-password/ForgotPasswordPage.d.ts +2 -0
  147. package/dist/forgot-password/ForgotPasswordPage.js +92 -0
  148. package/dist/forgot-password/ForgotPasswordPage.js.map +1 -0
  149. package/dist/forgot-password/data/api.d.ts +2 -0
  150. package/dist/forgot-password/data/api.js +25 -0
  151. package/dist/forgot-password/data/api.js.map +1 -0
  152. package/dist/forgot-password/data/apiHook.d.ts +16 -0
  153. package/dist/forgot-password/data/apiHook.js +26 -0
  154. package/dist/forgot-password/data/apiHook.js.map +1 -0
  155. package/dist/forgot-password/index.d.ts +1 -0
  156. package/dist/forgot-password/index.js +2 -0
  157. package/dist/forgot-password/index.js.map +1 -0
  158. package/dist/forgot-password/messages.d.ts +123 -0
  159. package/dist/forgot-password/messages.js +128 -0
  160. package/dist/forgot-password/messages.js.map +1 -0
  161. package/dist/i18n/index.d.ts +1 -0
  162. package/dist/i18n/index.js +2 -0
  163. package/dist/i18n/index.js.map +1 -0
  164. package/{src/index.ts → dist/index.d.ts} +0 -1
  165. package/dist/index.js +3 -0
  166. package/dist/index.js.map +1 -0
  167. package/dist/login/AccountActivationMessage.d.ts +14 -0
  168. package/dist/login/AccountActivationMessage.js +49 -0
  169. package/dist/login/AccountActivationMessage.js.map +1 -0
  170. package/dist/login/ChangePasswordPrompt.d.ts +18 -0
  171. package/dist/login/ChangePasswordPrompt.js +51 -0
  172. package/dist/login/ChangePasswordPrompt.js.map +1 -0
  173. package/dist/login/LoginFailure.d.ts +25 -0
  174. package/dist/login/LoginFailure.js +109 -0
  175. package/dist/login/LoginFailure.js.map +1 -0
  176. package/dist/login/LoginPage.d.ts +12 -0
  177. package/dist/login/LoginPage.js +174 -0
  178. package/dist/login/LoginPage.js.map +1 -0
  179. package/dist/login/components/LoginContext.d.ts +21 -0
  180. package/dist/login/components/LoginContext.js +28 -0
  181. package/dist/login/components/LoginContext.js.map +1 -0
  182. package/dist/login/data/api.d.ts +2 -0
  183. package/dist/login/data/api.js +27 -0
  184. package/dist/login/data/api.js.map +1 -0
  185. package/dist/login/data/apiHook.d.ts +13 -0
  186. package/dist/login/data/apiHook.js +57 -0
  187. package/dist/login/data/apiHook.js.map +1 -0
  188. package/dist/login/data/constants.d.ts +17 -0
  189. package/{src → dist}/login/data/constants.js +4 -4
  190. package/dist/login/data/constants.js.map +1 -0
  191. package/dist/login/index.d.ts +1 -0
  192. package/dist/login/index.js +2 -0
  193. package/dist/login/index.js.map +1 -0
  194. package/dist/login/messages.d.ts +198 -0
  195. package/dist/login/messages.js +210 -0
  196. package/dist/login/messages.js.map +1 -0
  197. package/dist/logistration/Logistration.d.ts +5 -0
  198. package/dist/logistration/Logistration.js +80 -0
  199. package/dist/logistration/Logistration.js.map +1 -0
  200. package/dist/progressive-profiling/ProgressiveProfiling.d.ts +2 -0
  201. package/dist/progressive-profiling/ProgressiveProfiling.js +143 -0
  202. package/dist/progressive-profiling/ProgressiveProfiling.js.map +1 -0
  203. package/dist/progressive-profiling/ProgressiveProfilingPageModal.d.ts +13 -0
  204. package/dist/progressive-profiling/ProgressiveProfilingPageModal.js +31 -0
  205. package/dist/progressive-profiling/ProgressiveProfilingPageModal.js.map +1 -0
  206. package/dist/progressive-profiling/components/ProgressiveProfilingContext.d.ts +18 -0
  207. package/dist/progressive-profiling/components/ProgressiveProfilingContext.js +52 -0
  208. package/dist/progressive-profiling/components/ProgressiveProfilingContext.js.map +1 -0
  209. package/dist/progressive-profiling/data/api.d.ts +2 -0
  210. package/dist/progressive-profiling/data/api.js +22 -0
  211. package/dist/progressive-profiling/data/api.js.map +1 -0
  212. package/dist/progressive-profiling/data/apiHook.d.ts +10 -0
  213. package/dist/progressive-profiling/data/apiHook.js +36 -0
  214. package/dist/progressive-profiling/data/apiHook.js.map +1 -0
  215. package/dist/progressive-profiling/index.d.ts +2 -0
  216. package/{src → dist}/progressive-profiling/index.js +1 -3
  217. package/dist/progressive-profiling/index.js.map +1 -0
  218. package/dist/progressive-profiling/messages.d.ts +53 -0
  219. package/dist/progressive-profiling/messages.js +57 -0
  220. package/dist/progressive-profiling/messages.js.map +1 -0
  221. package/dist/provides.d.ts +4 -0
  222. package/dist/provides.js +7 -0
  223. package/dist/provides.js.map +1 -0
  224. package/dist/register/RegistrationFields/CountryField/CountryField.d.ts +38 -0
  225. package/dist/register/RegistrationFields/CountryField/CountryField.js +93 -0
  226. package/dist/register/RegistrationFields/CountryField/CountryField.js.map +1 -0
  227. package/dist/register/RegistrationFields/CountryField/validator.d.ts +8 -0
  228. package/dist/register/RegistrationFields/CountryField/validator.js +29 -0
  229. package/dist/register/RegistrationFields/CountryField/validator.js.map +1 -0
  230. package/dist/register/RegistrationFields/EmailField/EmailField.d.ts +30 -0
  231. package/dist/register/RegistrationFields/EmailField/EmailField.js +88 -0
  232. package/dist/register/RegistrationFields/EmailField/EmailField.js.map +1 -0
  233. package/dist/register/RegistrationFields/EmailField/constants.d.ts +3 -0
  234. package/dist/register/RegistrationFields/EmailField/constants.js +130 -0
  235. package/dist/register/RegistrationFields/EmailField/constants.js.map +1 -0
  236. package/dist/register/RegistrationFields/EmailField/validator.d.ts +17 -0
  237. package/dist/register/RegistrationFields/EmailField/validator.js +107 -0
  238. package/dist/register/RegistrationFields/EmailField/validator.js.map +1 -0
  239. package/dist/register/RegistrationFields/HonorCodeField/HonorCode.d.ts +21 -0
  240. package/dist/register/RegistrationFields/HonorCodeField/HonorCode.js +40 -0
  241. package/dist/register/RegistrationFields/HonorCodeField/HonorCode.js.map +1 -0
  242. package/dist/register/RegistrationFields/NameField/NameField.d.ts +29 -0
  243. package/dist/register/RegistrationFields/NameField/NameField.js +59 -0
  244. package/dist/register/RegistrationFields/NameField/NameField.js.map +1 -0
  245. package/dist/register/RegistrationFields/NameField/validator.d.ts +6 -0
  246. package/dist/register/RegistrationFields/NameField/validator.js +23 -0
  247. package/dist/register/RegistrationFields/NameField/validator.js.map +1 -0
  248. package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.d.ts +16 -0
  249. package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.js +24 -0
  250. package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.js.map +1 -0
  251. package/dist/register/RegistrationFields/UsernameField/UsernameField.d.ts +31 -0
  252. package/dist/register/RegistrationFields/UsernameField/UsernameField.js +119 -0
  253. package/dist/register/RegistrationFields/UsernameField/UsernameField.js.map +1 -0
  254. package/dist/register/RegistrationFields/UsernameField/validator.d.ts +4 -0
  255. package/dist/register/RegistrationFields/UsernameField/validator.js +15 -0
  256. package/dist/register/RegistrationFields/UsernameField/validator.js.map +1 -0
  257. package/dist/register/RegistrationFields/index.d.ts +6 -0
  258. package/{src → dist}/register/RegistrationFields/index.js +1 -0
  259. package/dist/register/RegistrationFields/index.js.map +1 -0
  260. package/dist/register/RegistrationPage.d.ts +18 -0
  261. package/dist/register/RegistrationPage.js +259 -0
  262. package/dist/register/RegistrationPage.js.map +1 -0
  263. package/dist/register/components/ConfigurableRegistrationForm.d.ts +37 -0
  264. package/dist/register/components/ConfigurableRegistrationForm.js +145 -0
  265. package/dist/register/components/ConfigurableRegistrationForm.js.map +1 -0
  266. package/dist/register/components/RegisterContext.d.ts +8 -0
  267. package/dist/register/components/RegisterContext.js +167 -0
  268. package/dist/register/components/RegisterContext.js.map +1 -0
  269. package/dist/register/components/RegistrationFailure.d.ts +19 -0
  270. package/dist/register/components/RegistrationFailure.js +60 -0
  271. package/dist/register/components/RegistrationFailure.js.map +1 -0
  272. package/dist/register/data/api.d.ts +9 -0
  273. package/dist/register/data/api.js +45 -0
  274. package/dist/register/data/api.js.map +1 -0
  275. package/dist/register/data/apiHook.d.ts +33 -0
  276. package/dist/register/data/apiHook.js +66 -0
  277. package/dist/register/data/apiHook.js.map +1 -0
  278. package/dist/register/data/constants.d.ts +11 -0
  279. package/{src → dist}/register/data/constants.js +5 -4
  280. package/dist/register/data/constants.js.map +1 -0
  281. package/dist/register/data/utils.d.ts +6 -0
  282. package/dist/register/data/utils.js +128 -0
  283. package/dist/register/data/utils.js.map +1 -0
  284. package/dist/register/index.d.ts +1 -0
  285. package/dist/register/index.js +2 -0
  286. package/dist/register/index.js.map +1 -0
  287. package/dist/register/messages.d.ts +203 -0
  288. package/dist/register/messages.js +215 -0
  289. package/dist/register/messages.js.map +1 -0
  290. package/dist/register/types.d.ts +74 -0
  291. package/dist/register/types.js +2 -0
  292. package/dist/register/types.js.map +1 -0
  293. package/dist/reset-password/ResetPasswordFailure.d.ts +15 -0
  294. package/dist/reset-password/ResetPasswordFailure.js +44 -0
  295. package/dist/reset-password/ResetPasswordFailure.js.map +1 -0
  296. package/dist/reset-password/ResetPasswordPage.d.ts +2 -0
  297. package/dist/reset-password/ResetPasswordPage.js +182 -0
  298. package/dist/reset-password/ResetPasswordPage.js.map +1 -0
  299. package/dist/reset-password/ResetPasswordSuccess.d.ts +2 -0
  300. package/dist/reset-password/ResetPasswordSuccess.js +10 -0
  301. package/dist/reset-password/ResetPasswordSuccess.js.map +1 -0
  302. package/dist/reset-password/data/api.d.ts +4 -0
  303. package/dist/reset-password/data/api.js +57 -0
  304. package/dist/reset-password/data/api.js.map +1 -0
  305. package/dist/reset-password/data/apiHook.d.ts +31 -0
  306. package/dist/reset-password/data/apiHook.js +74 -0
  307. package/dist/reset-password/data/apiHook.js.map +1 -0
  308. package/dist/reset-password/data/constants.d.ts +13 -0
  309. package/{src → dist}/reset-password/data/constants.js +6 -7
  310. package/dist/reset-password/data/constants.js.map +1 -0
  311. package/dist/reset-password/index.d.ts +1 -0
  312. package/dist/reset-password/index.js +2 -0
  313. package/dist/reset-password/index.js.map +1 -0
  314. package/dist/reset-password/messages.d.ts +83 -0
  315. package/dist/reset-password/messages.js +87 -0
  316. package/dist/reset-password/messages.js.map +1 -0
  317. package/dist/routes.d.ts +19 -0
  318. package/dist/routes.js +76 -0
  319. package/dist/routes.js.map +1 -0
  320. package/{src → dist}/sass/_base_component.scss +57 -54
  321. package/{src → dist}/sass/_progressive_profiling_page.scss +1 -3
  322. package/{src → dist}/sass/_registration.scss +15 -18
  323. package/{src → dist}/sass/_style.scss +40 -43
  324. package/dist/slots/LoginComponentSlot/index.d.ts +12 -0
  325. package/dist/slots/LoginComponentSlot/index.js +11 -0
  326. package/dist/slots/LoginComponentSlot/index.js.map +1 -0
  327. package/package.json +38 -16
  328. package/src/Main.tsx +0 -23
  329. package/src/__mocks__/file.js +0 -1
  330. package/src/__mocks__/svg.js +0 -1
  331. package/src/app.scss +0 -6
  332. package/src/app.ts +0 -43
  333. package/src/base-container/components/default-layout/DefaultLayout.test.jsx +0 -48
  334. package/src/base-container/components/default-layout/LargeLayout.jsx +0 -42
  335. package/src/base-container/components/default-layout/MediumLayout.jsx +0 -49
  336. package/src/base-container/components/default-layout/SmallLayout.jsx +0 -37
  337. package/src/base-container/components/default-layout/messages.js +0 -16
  338. package/src/base-container/components/image-layout/ExtraSmallLayout.jsx +0 -31
  339. package/src/base-container/components/image-layout/LargeLayout.jsx +0 -32
  340. package/src/base-container/components/image-layout/MediumLayout.jsx +0 -32
  341. package/src/base-container/components/image-layout/SmallLayout.jsx +0 -31
  342. package/src/base-container/components/image-layout/messages.js +0 -16
  343. package/src/base-container/components/welcome-page-layout/LargeLayout.jsx +0 -46
  344. package/src/base-container/components/welcome-page-layout/MediumLayout.jsx +0 -49
  345. package/src/base-container/components/welcome-page-layout/SmallLayout.jsx +0 -38
  346. package/src/base-container/components/welcome-page-layout/messages.js +0 -21
  347. package/src/base-container/index.jsx +0 -70
  348. package/src/base-container/tests/BaseContainer.test.jsx +0 -44
  349. package/src/common-components/EmbeddedRegistrationRoute.jsx +0 -26
  350. package/src/common-components/EnterpriseSSO.jsx +0 -110
  351. package/src/common-components/FormGroup.jsx +0 -106
  352. package/src/common-components/InstitutionLogistration.jsx +0 -102
  353. package/src/common-components/NotFoundPage.jsx +0 -15
  354. package/src/common-components/PasswordField.jsx +0 -175
  355. package/src/common-components/RedirectLogistration.jsx +0 -94
  356. package/src/common-components/RegisterFaIcons.jsx +0 -8
  357. package/src/common-components/SocialAuthProviders.jsx +0 -75
  358. package/src/common-components/ThirdPartyAuth.jsx +0 -123
  359. package/src/common-components/ThirdPartyAuthAlert.jsx +0 -49
  360. package/src/common-components/UnAuthOnlyRoute.jsx +0 -41
  361. package/src/common-components/data/actions.js +0 -27
  362. package/src/common-components/data/reducers.js +0 -63
  363. package/src/common-components/data/sagas.js +0 -32
  364. package/src/common-components/data/selectors.js +0 -28
  365. package/src/common-components/data/service.js +0 -23
  366. package/src/common-components/data/tests/reducer.test.js +0 -82
  367. package/src/common-components/data/tests/sagas.test.js +0 -71
  368. package/src/common-components/messages.jsx +0 -127
  369. package/src/common-components/tests/EmbeddedRegistrationRoute.test.jsx +0 -76
  370. package/src/common-components/tests/FormField.test.jsx +0 -289
  371. package/src/common-components/tests/SocialAuthProviders.test.jsx +0 -75
  372. package/src/common-components/tests/ThirdPartyAuthAlert.test.jsx +0 -39
  373. package/src/common-components/tests/UnAuthOnlyRoute.test.jsx +0 -73
  374. package/src/common-components/tests/__snapshots__/SocialAuthProviders.test.jsx.snap +0 -156
  375. package/src/common-components/tests/__snapshots__/ThirdPartyAuthAlert.test.jsx.snap +0 -53
  376. package/src/constants.ts +0 -1
  377. package/src/data/configureStore.js +0 -33
  378. package/src/data/oneTrust.js +0 -3
  379. package/src/data/reducers.js +0 -36
  380. package/src/data/sagas.js +0 -19
  381. package/src/data/tests/cookies.test.js +0 -42
  382. package/src/data/tests/dataUtils.test.js +0 -19
  383. package/src/data/tests/reduxUtils.test.js +0 -14
  384. package/src/data/utils/cookies.js +0 -12
  385. package/src/data/utils/dataUtils.js +0 -81
  386. package/src/data/utils/index.js +0 -11
  387. package/src/data/utils/reduxUtils.js +0 -34
  388. package/src/data/utils/useMobileResponsive.js +0 -24
  389. package/src/field-renderer/FieldRenderer.jsx +0 -156
  390. package/src/field-renderer/tests/FieldRenderer.test.jsx +0 -201
  391. package/src/forgot-password/ForgotPasswordAlert.jsx +0 -97
  392. package/src/forgot-password/ForgotPasswordPage.jsx +0 -193
  393. package/src/forgot-password/data/actions.js +0 -32
  394. package/src/forgot-password/data/reducers.js +0 -58
  395. package/src/forgot-password/data/sagas.js +0 -35
  396. package/src/forgot-password/data/selectors.js +0 -10
  397. package/src/forgot-password/data/service.js +0 -21
  398. package/src/forgot-password/data/tests/reducers.test.js +0 -34
  399. package/src/forgot-password/data/tests/sagas.test.js +0 -67
  400. package/src/forgot-password/index.js +0 -5
  401. package/src/forgot-password/messages.js +0 -128
  402. package/src/forgot-password/tests/ForgotPasswordPage.test.jsx +0 -269
  403. package/src/i18n/index.js +0 -25
  404. package/src/login/AccountActivationMessage.jsx +0 -78
  405. package/src/login/ChangePasswordPrompt.jsx +0 -91
  406. package/src/login/LoginFailure.jsx +0 -231
  407. package/src/login/LoginPage.jsx +0 -368
  408. package/src/login/data/actions.js +0 -39
  409. package/src/login/data/reducers.js +0 -76
  410. package/src/login/data/sagas.js +0 -45
  411. package/src/login/data/service.js +0 -24
  412. package/src/login/data/tests/reducers.test.js +0 -155
  413. package/src/login/data/tests/sagas.test.js +0 -110
  414. package/src/login/index.js +0 -5
  415. package/src/login/messages.jsx +0 -211
  416. package/src/login/tests/AccountActivationMessage.test.jsx +0 -122
  417. package/src/login/tests/ChangePasswordPrompt.test.jsx +0 -75
  418. package/src/login/tests/LoginFailure.test.jsx +0 -323
  419. package/src/login/tests/LoginPage.test.jsx +0 -839
  420. package/src/logistration/Logistration.jsx +0 -189
  421. package/src/logistration/Logistration.test.jsx +0 -275
  422. package/src/progressive-profiling/ProgressiveProfiling.jsx +0 -313
  423. package/src/progressive-profiling/ProgressiveProfilingPageModal.jsx +0 -56
  424. package/src/progressive-profiling/data/actions.js +0 -22
  425. package/src/progressive-profiling/data/reducers.js +0 -38
  426. package/src/progressive-profiling/data/sagas.js +0 -24
  427. package/src/progressive-profiling/data/selectors.js +0 -14
  428. package/src/progressive-profiling/data/service.js +0 -17
  429. package/src/progressive-profiling/messages.jsx +0 -57
  430. package/src/progressive-profiling/tests/ProgressiveProfiling.test.jsx +0 -322
  431. package/src/register/RegistrationFields/CountryField/CountryField.jsx +0 -164
  432. package/src/register/RegistrationFields/CountryField/CountryField.test.jsx +0 -204
  433. package/src/register/RegistrationFields/CountryField/validator.js +0 -32
  434. package/src/register/RegistrationFields/EmailField/EmailField.jsx +0 -140
  435. package/src/register/RegistrationFields/EmailField/EmailField.test.jsx +0 -236
  436. package/src/register/RegistrationFields/EmailField/constants.js +0 -131
  437. package/src/register/RegistrationFields/EmailField/validator.js +0 -126
  438. package/src/register/RegistrationFields/EmailField/validator.test.js +0 -39
  439. package/src/register/RegistrationFields/HonorCodeField/HonorCode.jsx +0 -104
  440. package/src/register/RegistrationFields/HonorCodeField/HonorCode.test.jsx +0 -70
  441. package/src/register/RegistrationFields/NameField/NameField.jsx +0 -68
  442. package/src/register/RegistrationFields/NameField/NameField.test.jsx +0 -146
  443. package/src/register/RegistrationFields/NameField/validator.js +0 -22
  444. package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.jsx +0 -58
  445. package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.test.jsx +0 -55
  446. package/src/register/RegistrationFields/UsernameField/UsernameField.jsx +0 -162
  447. package/src/register/RegistrationFields/UsernameField/UsernameField.test.jsx +0 -319
  448. package/src/register/RegistrationFields/UsernameField/validator.js +0 -16
  449. package/src/register/RegistrationPage.jsx +0 -428
  450. package/src/register/RegistrationPage.test.jsx +0 -854
  451. package/src/register/components/ConfigurableRegistrationForm.jsx +0 -244
  452. package/src/register/components/RegistrationFailure.jsx +0 -80
  453. package/src/register/components/tests/ConfigurableRegistrationForm.test.jsx +0 -401
  454. package/src/register/components/tests/RegistrationFailure.test.jsx +0 -212
  455. package/src/register/components/tests/ThirdPartyAuth.test.jsx +0 -439
  456. package/src/register/data/actions.js +0 -85
  457. package/src/register/data/reducers.js +0 -140
  458. package/src/register/data/sagas.js +0 -58
  459. package/src/register/data/selectors.js +0 -34
  460. package/src/register/data/service.js +0 -45
  461. package/src/register/data/tests/reducers.test.js +0 -277
  462. package/src/register/data/tests/sagas.test.js +0 -239
  463. package/src/register/data/tests/utils.test.js +0 -98
  464. package/src/register/data/utils.js +0 -153
  465. package/src/register/index.js +0 -4
  466. package/src/register/messages.jsx +0 -206
  467. package/src/reset-password/ResetPasswordFailure.jsx +0 -55
  468. package/src/reset-password/ResetPasswordPage.jsx +0 -224
  469. package/src/reset-password/ResetPasswordSuccess.jsx +0 -19
  470. package/src/reset-password/data/actions.js +0 -50
  471. package/src/reset-password/data/reducers.js +0 -44
  472. package/src/reset-password/data/sagas.js +0 -67
  473. package/src/reset-password/data/selectors.js +0 -10
  474. package/src/reset-password/data/service.js +0 -61
  475. package/src/reset-password/data/tests/sagas.test.js +0 -185
  476. package/src/reset-password/index.js +0 -5
  477. package/src/reset-password/messages.js +0 -88
  478. package/src/reset-password/tests/ResetPasswordPage.test.jsx +0 -241
  479. package/src/routes.jsx +0 -79
  480. package/src/setupTest.js +0 -68
  481. /package/{src → dist}/base-container/components/image-layout/index.scss +0 -0
  482. /package/{src → dist}/sass/_forgot_password.scss +0 -0
  483. /package/{src → dist}/sass/_login_page.scss +0 -0
  484. /package/{src → dist}/sass/_reset_password.scss +0 -0
@@ -1,27 +0,0 @@
1
- import { AsyncActionType } from '../../data/utils';
2
-
3
- export const THIRD_PARTY_AUTH_CONTEXT = new AsyncActionType('THIRD_PARTY_AUTH', 'GET_THIRD_PARTY_AUTH_CONTEXT');
4
- export const THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG = 'THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG';
5
-
6
- // Third party auth context
7
- export const getThirdPartyAuthContext = (urlParams) => ({
8
- type: THIRD_PARTY_AUTH_CONTEXT.BASE,
9
- payload: { urlParams },
10
- });
11
-
12
- export const getThirdPartyAuthContextBegin = () => ({
13
- type: THIRD_PARTY_AUTH_CONTEXT.BEGIN,
14
- });
15
-
16
- export const getThirdPartyAuthContextSuccess = (fieldDescriptions, optionalFields, thirdPartyAuthContext) => ({
17
- type: THIRD_PARTY_AUTH_CONTEXT.SUCCESS,
18
- payload: { fieldDescriptions, optionalFields, thirdPartyAuthContext },
19
- });
20
-
21
- export const getThirdPartyAuthContextFailure = () => ({
22
- type: THIRD_PARTY_AUTH_CONTEXT.FAILURE,
23
- });
24
-
25
- export const clearThirdPartyAuthContextErrorMessage = () => ({
26
- type: THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG,
27
- });
@@ -1,63 +0,0 @@
1
- import { THIRD_PARTY_AUTH_CONTEXT, THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG } from './actions';
2
- import { COMPLETE_STATE, FAILURE_STATE, PENDING_STATE } from '../../data/constants';
3
-
4
- export const defaultState = {
5
- fieldDescriptions: {},
6
- optionalFields: {
7
- fields: {},
8
- extended_profile: [],
9
- },
10
- thirdPartyAuthApiStatus: null,
11
- thirdPartyAuthContext: {
12
- autoSubmitRegForm: false,
13
- currentProvider: null,
14
- finishAuthUrl: null,
15
- countryCode: null,
16
- providers: [],
17
- secondaryProviders: [],
18
- pipelineUserDetails: null,
19
- errorMessage: null,
20
- welcomePageRedirectUrl: null,
21
- },
22
- };
23
-
24
- const reducer = (state = defaultState, action = {}) => {
25
- switch (action.type) {
26
- case THIRD_PARTY_AUTH_CONTEXT.BEGIN:
27
- return {
28
- ...state,
29
- thirdPartyAuthApiStatus: PENDING_STATE,
30
- };
31
- case THIRD_PARTY_AUTH_CONTEXT.SUCCESS: {
32
- return {
33
- ...state,
34
- fieldDescriptions: action.payload.fieldDescriptions?.fields,
35
- optionalFields: action.payload.optionalFields,
36
- thirdPartyAuthContext: action.payload.thirdPartyAuthContext,
37
- thirdPartyAuthApiStatus: COMPLETE_STATE,
38
- };
39
- }
40
- case THIRD_PARTY_AUTH_CONTEXT.FAILURE:
41
- return {
42
- ...state,
43
- thirdPartyAuthApiStatus: FAILURE_STATE,
44
- thirdPartyAuthContext: {
45
- ...state.thirdPartyAuthContext,
46
- errorMessage: null,
47
- },
48
- };
49
- case THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG:
50
- return {
51
- ...state,
52
- thirdPartyAuthApiStatus: PENDING_STATE,
53
- thirdPartyAuthContext: {
54
- ...state.thirdPartyAuthContext,
55
- errorMessage: null,
56
- },
57
- };
58
- default:
59
- return state;
60
- }
61
- };
62
-
63
- export default reducer;
@@ -1,32 +0,0 @@
1
- import { logError } from '@openedx/frontend-base';
2
- import { call, put, takeEvery } from 'redux-saga/effects';
3
-
4
- import { setCountryFromThirdPartyAuthContext } from '../../register/data/actions';
5
- import {
6
- getThirdPartyAuthContextBegin,
7
- getThirdPartyAuthContextFailure,
8
- getThirdPartyAuthContextSuccess,
9
- THIRD_PARTY_AUTH_CONTEXT,
10
- } from './actions';
11
- import {
12
- getThirdPartyAuthContext,
13
- } from './service';
14
-
15
- export function* fetchThirdPartyAuthContext(action) {
16
- try {
17
- yield put(getThirdPartyAuthContextBegin());
18
- const {
19
- fieldDescriptions, optionalFields, thirdPartyAuthContext,
20
- } = yield call(getThirdPartyAuthContext, action.payload.urlParams);
21
-
22
- yield put(setCountryFromThirdPartyAuthContext(thirdPartyAuthContext.countryCode));
23
- yield put(getThirdPartyAuthContextSuccess(fieldDescriptions, optionalFields, thirdPartyAuthContext));
24
- } catch (e) {
25
- yield put(getThirdPartyAuthContextFailure());
26
- logError(e);
27
- }
28
- }
29
-
30
- export default function* saga() {
31
- yield takeEvery(THIRD_PARTY_AUTH_CONTEXT.BASE, fetchThirdPartyAuthContext);
32
- }
@@ -1,28 +0,0 @@
1
- import { createSelector } from 'reselect';
2
-
3
- export const storeName = 'commonComponents';
4
-
5
- export const commonComponentsSelector = state => ({ ...state[storeName] });
6
-
7
- export const thirdPartyAuthContextSelector = createSelector(
8
- commonComponentsSelector,
9
- commonComponents => commonComponents.thirdPartyAuthContext,
10
- );
11
-
12
- export const fieldDescriptionSelector = createSelector(
13
- commonComponentsSelector,
14
- commonComponents => commonComponents.fieldDescriptions,
15
- );
16
-
17
- export const optionalFieldsSelector = createSelector(
18
- commonComponentsSelector,
19
- commonComponents => commonComponents.optionalFields,
20
- );
21
-
22
- export const tpaProvidersSelector = createSelector(
23
- commonComponentsSelector,
24
- commonComponents => ({
25
- providers: commonComponents.thirdPartyAuthContext.providers,
26
- secondaryProviders: commonComponents.thirdPartyAuthContext.secondaryProviders,
27
- }),
28
- );
@@ -1,23 +0,0 @@
1
- import { getAuthenticatedHttpClient, getSiteConfig } from '@openedx/frontend-base';
2
-
3
- export async function getThirdPartyAuthContext(urlParams) {
4
- const requestConfig = {
5
- headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
6
- params: urlParams,
7
- isPublic: true,
8
- };
9
-
10
- const { data } = await getAuthenticatedHttpClient()
11
- .get(
12
- `${getSiteConfig().lmsBaseUrl}/api/mfe_context`,
13
- requestConfig,
14
- )
15
- .catch((e) => {
16
- throw (e);
17
- });
18
- return {
19
- fieldDescriptions: data.registrationFields || {},
20
- optionalFields: data.optionalFields || {},
21
- thirdPartyAuthContext: data.contextData || {},
22
- };
23
- }
@@ -1,82 +0,0 @@
1
- import { PENDING_STATE } from '../../../data/constants';
2
- import { THIRD_PARTY_AUTH_CONTEXT, THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG } from '../actions';
3
- import reducer from '../reducers';
4
-
5
- describe('common components reducer', () => {
6
- it('test mfe context response', () => {
7
- const state = {
8
- fieldDescriptions: {},
9
- optionalFields: {},
10
- thirdPartyAuthApiStatus: null,
11
- thirdPartyAuthContext: {
12
- currentProvider: null,
13
- finishAuthUrl: null,
14
- countryCode: null,
15
- providers: [],
16
- secondaryProviders: [],
17
- pipelineUserDetails: null,
18
- errorMessage: null,
19
- },
20
- };
21
- const fieldDescriptions = {
22
- fields: [],
23
- };
24
- const optionalFields = {
25
- fields: [],
26
- extended_profile: {},
27
- };
28
- const thirdPartyAuthContext = { ...state.thirdPartyAuthContext };
29
- const action = {
30
- type: THIRD_PARTY_AUTH_CONTEXT.SUCCESS,
31
- payload: { fieldDescriptions, optionalFields, thirdPartyAuthContext },
32
- };
33
-
34
- expect(
35
- reducer(state, action),
36
- ).toEqual(
37
- {
38
- ...state,
39
- fieldDescriptions: [],
40
- optionalFields: {
41
- fields: [],
42
- extended_profile: {},
43
- },
44
- thirdPartyAuthApiStatus: 'complete',
45
- },
46
- );
47
- });
48
-
49
- it('should clear tpa context error message', () => {
50
- const state = {
51
- fieldDescriptions: {},
52
- optionalFields: {},
53
- thirdPartyAuthApiStatus: null,
54
- thirdPartyAuthContext: {
55
- currentProvider: null,
56
- finishAuthUrl: null,
57
- countryCode: null,
58
- providers: [],
59
- secondaryProviders: [],
60
- pipelineUserDetails: null,
61
- errorMessage: 'An error occurred',
62
- },
63
- };
64
-
65
- const action = {
66
- type: THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG,
67
- };
68
-
69
- expect(
70
- reducer(state, action),
71
- ).toEqual(
72
- {
73
- ...state,
74
- thirdPartyAuthApiStatus: PENDING_STATE,
75
- thirdPartyAuthContext: {
76
- ...state.thirdPartyAuthContext,
77
- errorMessage: null,
78
- },
79
- },
80
- );
81
- });
82
- });
@@ -1,71 +0,0 @@
1
- import { runSaga } from 'redux-saga';
2
-
3
- import { setCountryFromThirdPartyAuthContext } from '../../../register/data/actions';
4
- import { initializeMockServices } from '../../../setupTest';
5
- import * as actions from '../actions';
6
- import { fetchThirdPartyAuthContext } from '../sagas';
7
- import * as api from '../service';
8
-
9
- const { loggingService } = initializeMockServices();
10
-
11
- describe('fetchThirdPartyAuthContext', () => {
12
- const params = {
13
- payload: { urlParams: {} },
14
- };
15
-
16
- const data = {
17
- currentProvider: null,
18
- providers: [],
19
- secondaryProviders: [],
20
- finishAuthUrl: null,
21
- pipelineUserDetails: {},
22
- };
23
-
24
- beforeEach(() => {
25
- loggingService.logError.mockReset();
26
- });
27
-
28
- it('should call service and dispatch success action', async () => {
29
- const getThirdPartyAuthContext = jest.spyOn(api, 'getThirdPartyAuthContext')
30
- .mockImplementation(() => Promise.resolve({
31
- thirdPartyAuthContext: data,
32
- fieldDescriptions: {},
33
- optionalFields: {},
34
- }));
35
-
36
- const dispatched = [];
37
- await runSaga(
38
- { dispatch: (action) => dispatched.push(action) },
39
- fetchThirdPartyAuthContext,
40
- params,
41
- );
42
-
43
- expect(getThirdPartyAuthContext).toHaveBeenCalledTimes(1);
44
- expect(dispatched).toEqual([
45
- actions.getThirdPartyAuthContextBegin(),
46
- setCountryFromThirdPartyAuthContext(),
47
- actions.getThirdPartyAuthContextSuccess({}, {}, data),
48
- ]);
49
- getThirdPartyAuthContext.mockClear();
50
- });
51
-
52
- it('should call service and dispatch error action', async () => {
53
- const getThirdPartyAuthContext = jest.spyOn(api, 'getThirdPartyAuthContext')
54
- .mockImplementation(() => Promise.reject(new Error('something went wrong')));
55
-
56
- const dispatched = [];
57
- await runSaga(
58
- { dispatch: (action) => dispatched.push(action) },
59
- fetchThirdPartyAuthContext,
60
- params,
61
- );
62
-
63
- expect(getThirdPartyAuthContext).toHaveBeenCalledTimes(1);
64
- expect(loggingService.logError).toHaveBeenCalled();
65
- expect(dispatched).toEqual([
66
- actions.getThirdPartyAuthContextBegin(),
67
- actions.getThirdPartyAuthContextFailure(),
68
- ]);
69
- getThirdPartyAuthContext.mockClear();
70
- });
71
- });
@@ -1,127 +0,0 @@
1
- import { defineMessages } from '@openedx/frontend-base';
2
-
3
- const messages = defineMessages({
4
- // institution login strings
5
- 'institution.login.page.sub.heading': {
6
- id: 'institution.login.page.sub.heading',
7
- defaultMessage: 'Choose your institution from the list below',
8
- description: 'Heading of the institutions list',
9
- },
10
- // logistration strings
11
- 'logistration.sign.in': {
12
- id: 'logistration.sign.in',
13
- defaultMessage: 'Sign in',
14
- description: 'Text that appears on the tab to switch between login and register',
15
- },
16
- 'logistration.register': {
17
- id: 'logistration.register',
18
- defaultMessage: 'Register',
19
- description: 'Text that appears on the tab to switch between login and register',
20
- },
21
- // enterprise sso strings
22
- 'enterprisetpa.title.heading': {
23
- id: 'enterprisetpa.title.heading',
24
- defaultMessage: 'Would you like to sign in using your {providerName} credentials?',
25
- description: 'Header text used in enterprise third party authentication',
26
- },
27
- 'enterprisetpa.login.button.text': {
28
- id: 'enterprisetpa.login.button.text',
29
- defaultMessage: 'Show me other ways to sign in or register',
30
- description: 'Button text for login',
31
- },
32
- 'enterprisetpa.login.button.text.public.account.creation.disabled': {
33
- id: 'enterprisetpa.login.button.text.public.account.creation.disabled',
34
- defaultMessage: 'Show me other ways to sign in',
35
- description: 'Button text for login when account creation is disabled',
36
- },
37
- // social auth providers
38
- 'sso.sign.in.with': {
39
- id: 'sso.sign.in.with',
40
- defaultMessage: 'Sign in with {providerName}',
41
- description: 'Screen reader text that appears before social auth provider name',
42
- },
43
- 'sso.create.account.using': {
44
- id: 'sso.create.account.using',
45
- defaultMessage: 'Create account using {providerName}',
46
- description: 'Screen reader text that appears before social auth provider name',
47
- },
48
- // password field strings
49
- 'show.password': {
50
- id: 'show.password',
51
- defaultMessage: 'Show password',
52
- description: 'aria label for show password icon on password field',
53
- },
54
- 'hide.password': {
55
- id: 'hide.password',
56
- defaultMessage: 'Hide password',
57
- description: 'aria label for hide password icon on password field',
58
- },
59
- 'one.letter': {
60
- id: 'one.letter',
61
- defaultMessage: '1 letter',
62
- description: 'password requirement to have 1 letter',
63
- },
64
- 'one.number': {
65
- id: 'one.number',
66
- defaultMessage: '1 number',
67
- description: 'password requirement to have 1 number',
68
- },
69
- 'eight.characters': {
70
- id: 'eight.characters',
71
- defaultMessage: '8 characters',
72
- description: 'password requirement to have a minimum of 8 characters',
73
- },
74
- 'password.sr.only.helping.text': {
75
- id: 'password.sr.only.helping.text',
76
- defaultMessage: 'Password must contain at least 8 characters, at least one letter, and at least one number',
77
- description: 'Password helping text for the sr-only class',
78
- },
79
- // third party auth
80
- 'tpa.alert.heading': {
81
- id: 'tpa.alert.heading',
82
- defaultMessage: 'Almost done!',
83
- description: 'Success alert heading after user has successfully signed in with social auth',
84
- },
85
- 'login.third.party.auth.account.not.linked': {
86
- id: 'login.third.party.auth.account.not.linked',
87
- defaultMessage: 'You have successfully signed into {currentProvider}, but your {currentProvider} '
88
- + 'account does not have a linked {platformName} account. To link your accounts, '
89
- + 'sign in now using your {platformName} password.',
90
- description: 'Message that appears on login page if user has successfully authenticated with social '
91
- + 'auth but no associated platform account exists',
92
- },
93
- 'register.third.party.auth.account.not.linked': {
94
- id: 'register.third.party.auth.account.not.linked',
95
- defaultMessage: 'You\'ve successfully signed into {currentProvider}! We just need a little more information '
96
- + 'before you start learning with {platformName}.',
97
- description: 'Message that appears on register page if user has successfully authenticated with TPA '
98
- + 'but no associated platform account exists',
99
- },
100
- 'registration.using.tpa.form.heading': {
101
- id: 'registration.using.tpa.form.heading',
102
- defaultMessage: 'Finish creating your account',
103
- description: 'Heading that appears above form when user is trying to create account using social auth',
104
- },
105
- 'registration.other.options.heading': {
106
- id: 'registration.other.options.heading',
107
- defaultMessage: 'Or register with:',
108
- description: 'A message that appears above third party auth providers i.e saml, google, facebook etc',
109
- },
110
- 'institution.login.button': {
111
- id: 'institution.login.button',
112
- defaultMessage: 'Institution/campus credentials',
113
- description: 'shows institutions list',
114
- },
115
- 'login.other.options.heading': {
116
- id: 'login.other.options.heading',
117
- defaultMessage: 'Or sign in with:',
118
- description: 'Text that appears above other sign in options like social auth buttons',
119
- },
120
- 'enterprise.login.btn.text': {
121
- id: 'enterprise.login.btn.text',
122
- defaultMessage: 'Company or school credentials',
123
- description: 'Company or school login link text.',
124
- },
125
- });
126
-
127
- export default messages;
@@ -1,76 +0,0 @@
1
- /* eslint-disable import/no-import-module-exports */
2
- /* eslint-disable react/function-component-definition */
3
-
4
- import { getSiteConfig } from '@openedx/frontend-base';
5
- import { render } from '@testing-library/react';
6
- import { act } from 'react-dom/test-utils';
7
- import {
8
- MemoryRouter, Route, BrowserRouter as Router, Routes,
9
- } from 'react-router-dom';
10
-
11
- import { PAGE_NOT_FOUND, REGISTER_EMBEDDED_PAGE } from '../../data/constants';
12
- import EmbeddedRegistrationRoute from '../EmbeddedRegistrationRoute';
13
-
14
- const RRD = require('react-router-dom');
15
- // Just render plain div with its children
16
- // eslint-disable-next-line react/prop-types
17
- RRD.BrowserRouter = ({ children }) => <div>{children}</div>;
18
- module.exports = RRD;
19
-
20
- const TestApp = () => (
21
- <Router>
22
- <div>
23
- <Routes>
24
- <Route
25
- path={REGISTER_EMBEDDED_PAGE}
26
- element={<EmbeddedRegistrationRoute><span>Embedded Register Page</span></EmbeddedRegistrationRoute>}
27
- />
28
- <Route
29
- path={PAGE_NOT_FOUND}
30
- element={<span>Page not found</span>}
31
- />
32
- </Routes>
33
- </div>
34
- </Router>
35
- );
36
-
37
- describe('EmbeddedRegistrationRoute', () => {
38
- const routerWrapper = () => (
39
- <MemoryRouter initialEntries={[REGISTER_EMBEDDED_PAGE]}>
40
- <TestApp />
41
- </MemoryRouter>
42
- );
43
-
44
- afterEach(() => {
45
- jest.clearAllMocks();
46
- });
47
-
48
- it('should not render embedded register page if host query param is not available in the url', async () => {
49
- let embeddedRegistrationPage = null;
50
- await act(async () => {
51
- const { container } = await render(routerWrapper());
52
- embeddedRegistrationPage = container;
53
- });
54
-
55
- const renderedPage = embeddedRegistrationPage.querySelector('span');
56
- expect(renderedPage.textContent).toBe('Page not found');
57
- });
58
-
59
- it('should render embedded register page if host query param is available in the url (embedded)', async () => {
60
- delete window.location;
61
- window.location = {
62
- href: getSiteConfig().baseUrl.concat(REGISTER_EMBEDDED_PAGE),
63
- search: '?host=http://localhost/host-websit',
64
- };
65
-
66
- let embeddedRegistrationPage = null;
67
- await act(async () => {
68
- const { container } = await render(routerWrapper());
69
- embeddedRegistrationPage = container;
70
- });
71
-
72
- const renderedPage = embeddedRegistrationPage.querySelector('span');
73
- expect(renderedPage).toBeTruthy();
74
- expect(renderedPage.textContent).toBe('Embedded Register Page');
75
- });
76
- });