@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,32 +0,0 @@
1
- export const COUNTRY_CODE_KEY = 'code';
2
- export const COUNTRY_DISPLAY_KEY = 'name';
3
-
4
- const validateCountryField = (value, countryList, emptyErrorMessage, invalidCountryErrorMessage) => {
5
- let countryCode = '';
6
- let displayValue = value;
7
- let error = '';
8
-
9
- if (value) {
10
- const normalizedValue = value.toLowerCase();
11
- // Handling a case here where user enters a valid country code that needs to be
12
- // evaluated and set its value as a valid value.
13
- const selectedCountry = countryList.find(
14
- (country) => (
15
- // When translations are applied, extra space added in country value, so we should trim that.
16
- country[COUNTRY_DISPLAY_KEY].toLowerCase().trim() === normalizedValue
17
- || country[COUNTRY_CODE_KEY].toLowerCase().trim() === normalizedValue
18
- ),
19
- );
20
- if (selectedCountry) {
21
- countryCode = selectedCountry[COUNTRY_CODE_KEY];
22
- displayValue = selectedCountry[COUNTRY_DISPLAY_KEY];
23
- } else {
24
- error = invalidCountryErrorMessage;
25
- }
26
- } else {
27
- error = emptyErrorMessage;
28
- }
29
- return { error, countryCode, displayValue };
30
- };
31
-
32
- export default validateCountryField;
@@ -1,140 +0,0 @@
1
- import { useEffect, useState } from 'react';
2
- import { useDispatch, useSelector } from 'react-redux';
3
-
4
- import { useIntl } from '@openedx/frontend-base';
5
- import { Alert, Icon } from '@openedx/paragon';
6
- import { Close, Error } from '@openedx/paragon/icons';
7
- import PropTypes from 'prop-types';
8
-
9
- import { FormGroup } from '../../../common-components';
10
- import {
11
- clearRegistrationBackendError,
12
- fetchRealtimeValidations,
13
- setEmailSuggestionInStore,
14
- } from '../../data/actions';
15
- import messages from '../../messages';
16
- import validateEmail from './validator';
17
-
18
- /**
19
- * Email field wrapper. It accepts following handlers
20
- * - handleChange for setting value change and
21
- * - handleErrorChange for setting error
22
- *
23
- * It is responsible for
24
- * - Generating email warning and error suggestions
25
- * - Setting and clearing email suggestions
26
- * - Performing email field validations
27
- * - clearing error on focus
28
- * - setting value on change
29
- */
30
- const EmailField = (props) => {
31
- const { formatMessage } = useIntl();
32
- const dispatch = useDispatch();
33
-
34
- const {
35
- handleChange,
36
- handleErrorChange,
37
- confirmEmailValue,
38
- } = props;
39
-
40
- const backedUpFormData = useSelector(state => state.register.registrationFormData);
41
- const validationApiRateLimited = useSelector(state => state.register.validationApiRateLimited);
42
-
43
- const [emailSuggestion, setEmailSuggestion] = useState({ ...backedUpFormData?.emailSuggestion });
44
-
45
- useEffect(() => {
46
- setEmailSuggestion(backedUpFormData.emailSuggestion);
47
- }, [backedUpFormData.emailSuggestion]);
48
-
49
- const handleOnBlur = (e) => {
50
- const { value } = e.target;
51
- const { fieldError, confirmEmailError, suggestion } = validateEmail(value, confirmEmailValue, formatMessage);
52
-
53
- if (confirmEmailError) {
54
- handleErrorChange('confirm_email', confirmEmailError);
55
- }
56
-
57
- dispatch(setEmailSuggestionInStore(suggestion));
58
- setEmailSuggestion(suggestion);
59
-
60
- if (fieldError) {
61
- handleErrorChange('email', fieldError);
62
- } else if (!validationApiRateLimited) {
63
- dispatch(fetchRealtimeValidations({ email: value }));
64
- }
65
- };
66
-
67
- const handleOnFocus = () => {
68
- handleErrorChange('email', '');
69
- dispatch(clearRegistrationBackendError('email'));
70
- };
71
-
72
- const handleSuggestionClick = (event) => {
73
- event.preventDefault();
74
- handleErrorChange('email', '');
75
- handleChange({ target: { name: 'email', value: emailSuggestion.suggestion } });
76
- setEmailSuggestion({ suggestion: '', type: '' });
77
- };
78
-
79
- const handleSuggestionClosed = () => setEmailSuggestion({ suggestion: '', type: '' });
80
-
81
- const renderEmailFeedback = () => {
82
- if (emailSuggestion.type === 'error') {
83
- return (
84
- <Alert variant="danger" className="email-suggestion-alert-error mt-1" icon={Error}>
85
- <span className="email-suggestion__text">
86
- {formatMessage(messages['did.you.mean.alert.text'])}{' '}
87
- <Alert.Link
88
- href="#"
89
- name="email"
90
- onClick={handleSuggestionClick}
91
- >
92
- {emailSuggestion.suggestion}
93
- </Alert.Link>?
94
- <Icon src={Close} className="email-suggestion__close" onClick={handleSuggestionClosed} tabIndex="0" />
95
- </span>
96
- </Alert>
97
- );
98
- }
99
- return (
100
- <span id="email-warning" className="small">
101
- {formatMessage(messages['did.you.mean.alert.text'])}:{' '}
102
- <Alert.Link
103
- href="#"
104
- name="email"
105
- className="email-suggestion-alert-warning"
106
- onClick={handleSuggestionClick}
107
- >
108
- {emailSuggestion.suggestion}
109
- </Alert.Link>?
110
- </span>
111
- );
112
- };
113
-
114
- return (
115
- <FormGroup
116
- borderClass={emailSuggestion.type === 'warning' ? 'yellow-border' : ''}
117
- maxLength={254} // Limit per RFCs is 254
118
- {...props}
119
- handleBlur={handleOnBlur}
120
- handleFocus={handleOnFocus}
121
- >
122
- {emailSuggestion.suggestion ? renderEmailFeedback() : null}
123
- </FormGroup>
124
- );
125
- };
126
-
127
- EmailField.defaultProps = {
128
- errorMessage: '',
129
- confirmEmailValue: null,
130
- };
131
-
132
- EmailField.propTypes = {
133
- errorMessage: PropTypes.string,
134
- value: PropTypes.string.isRequired,
135
- handleChange: PropTypes.func.isRequired,
136
- handleErrorChange: PropTypes.func.isRequired,
137
- confirmEmailValue: PropTypes.string,
138
- };
139
-
140
- export default EmailField;
@@ -1,236 +0,0 @@
1
- import { Provider } from 'react-redux';
2
-
3
- import { getSiteConfig, injectIntl, IntlProvider } from '@openedx/frontend-base';
4
- import { fireEvent, render } from '@testing-library/react';
5
- import { BrowserRouter as Router } from 'react-router-dom';
6
- import configureStore from 'redux-mock-store';
7
-
8
- import { clearRegistrationBackendError, fetchRealtimeValidations } from '../../data/actions';
9
- import { EmailField } from '../index';
10
-
11
- const IntlEmailField = injectIntl(EmailField);
12
- const mockStore = configureStore();
13
-
14
- jest.mock('react-router-dom', () => {
15
- const mockNavigation = jest.fn();
16
-
17
- // eslint-disable-next-line react/prop-types
18
- const Navigate = ({ to }) => {
19
- mockNavigation(to);
20
- return <div />;
21
- };
22
-
23
- return {
24
- ...jest.requireActual('react-router-dom'),
25
- Navigate,
26
- mockNavigate: mockNavigation,
27
- };
28
- });
29
-
30
- describe('EmailField', () => {
31
- let props = {};
32
- let store = {};
33
-
34
- const reduxWrapper = children => (
35
- <IntlProvider locale="en">
36
- <Provider store={store}>{children}</Provider>
37
- </IntlProvider>
38
- );
39
-
40
- const routerWrapper = children => (
41
- <Router>
42
- {children}
43
- </Router>
44
- );
45
-
46
- const initialState = {
47
- register: {
48
- registrationFormData: {
49
- emailSuggestion: {
50
- suggestion: 'example@gmail.com',
51
- type: 'warning',
52
- },
53
- },
54
- },
55
- };
56
-
57
- beforeEach(() => {
58
- store = mockStore(initialState);
59
- props = {
60
- name: 'email',
61
- value: '',
62
- errorMessage: '',
63
- handleChange: jest.fn(),
64
- floatingLabel: '',
65
- handleErrorChange: jest.fn(),
66
- confirmEmailValue: '',
67
- };
68
- window.location = { search: '' };
69
- });
70
-
71
- afterEach(() => {
72
- jest.clearAllMocks();
73
- });
74
-
75
- describe('Test Email Field', () => {
76
- const emptyFieldValidation = {
77
- email: 'Enter your email',
78
- };
79
-
80
- it('should run email field validation when onBlur is fired', () => {
81
- const { container } = render(routerWrapper(reduxWrapper(<IntlEmailField {...props} />)));
82
-
83
- const emailInput = container.querySelector('input#email');
84
- fireEvent.blur(emailInput, { target: { value: '', name: 'email' } });
85
- expect(props.handleErrorChange).toHaveBeenCalledTimes(1);
86
- expect(props.handleErrorChange).toHaveBeenCalledWith(
87
- 'email',
88
- emptyFieldValidation.email,
89
- );
90
- });
91
-
92
- it('should update errors for frontend validations', () => {
93
- const { container } = render(routerWrapper(reduxWrapper(<IntlEmailField {...props} />)));
94
-
95
- const emailInput = container.querySelector('input#email');
96
- fireEvent.blur(emailInput, { target: { value: 'ab', name: 'email' } });
97
-
98
- expect(props.handleErrorChange).toHaveBeenCalledTimes(1);
99
- expect(props.handleErrorChange).toHaveBeenCalledWith(
100
- 'email',
101
- 'Enter a valid email address',
102
- );
103
- });
104
-
105
- it('should clear error on focus', () => {
106
- const { container } = render(routerWrapper(reduxWrapper(<IntlEmailField {...props} />)));
107
-
108
- const emailInput = container.querySelector('input#email');
109
- fireEvent.focus(emailInput, { target: { value: '', name: 'email' } });
110
-
111
- expect(props.handleErrorChange).toHaveBeenCalledTimes(1);
112
- expect(props.handleErrorChange).toHaveBeenCalledWith(
113
- 'email',
114
- '',
115
- );
116
- });
117
-
118
- it('should call backend validation api on blur event, if frontend validations have passed', () => {
119
- store.dispatch = jest.fn(store.dispatch);
120
- const { container } = render(routerWrapper(reduxWrapper(<IntlEmailField {...props} />)));
121
-
122
- // Enter a valid email so that frontend validations are passed
123
- const emailInput = container.querySelector('input#email');
124
- fireEvent.blur(emailInput, { target: { value: 'test@gmail.com', name: 'email' } });
125
-
126
- expect(store.dispatch).toHaveBeenCalledWith(fetchRealtimeValidations({ email: 'test@gmail.com' }));
127
- });
128
-
129
- it('should give email suggestions for common service provider domain typos', () => {
130
- const { container } = render(routerWrapper(reduxWrapper(<IntlEmailField {...props} />)));
131
-
132
- const emailInput = container.querySelector('input#email');
133
- fireEvent.blur(emailInput, { target: { value: 'john@yopmail.com', name: 'email' } });
134
-
135
- const emailWarning = container.querySelector('#email-warning');
136
- expect(emailWarning.textContent).toEqual('Did you mean: john@hotmail.com?');
137
- });
138
-
139
- it('should be able to click on email suggestions and set it as value', () => {
140
- const { container } = render(routerWrapper(reduxWrapper(<IntlEmailField {...props} />)));
141
-
142
- const emailInput = container.querySelector('input#email');
143
- fireEvent.blur(emailInput, { target: { value: 'john@yopmail.com', name: 'email' } });
144
-
145
- const emailSuggestion = container.querySelector('.email-suggestion-alert-warning');
146
- fireEvent.click(emailSuggestion);
147
-
148
- expect(props.handleChange).toHaveBeenCalledTimes(1);
149
- expect(props.handleChange).toHaveBeenCalledWith(
150
- { target: { name: 'email', value: 'john@hotmail.com' } },
151
- );
152
- });
153
-
154
- it('should give error for common top level domain mistakes', () => {
155
- const { container } = render(routerWrapper(reduxWrapper(<IntlEmailField {...props} />)));
156
-
157
- const emailInput = container.querySelector('input#email');
158
- fireEvent.blur(emailInput, { target: { value: 'john@gmail.mistake', name: 'email' } });
159
-
160
- const errorElement = container.querySelector('.alert-danger');
161
- expect(errorElement.textContent).toEqual('Did you mean john@gmail.com?');
162
- });
163
-
164
- it('should give error and suggestion for invalid email', () => {
165
- const { container } = render(routerWrapper(reduxWrapper(<IntlEmailField {...props} />)));
166
-
167
- const emailInput = container.querySelector('input#email');
168
- fireEvent.blur(emailInput, { target: { value: 'john@gmail', name: 'email' } });
169
-
170
- const errorElement = container.querySelector('.alert-danger');
171
- expect(errorElement.textContent).toEqual('Did you mean john@gmail.com?');
172
-
173
- expect(props.handleErrorChange).toHaveBeenCalledTimes(1);
174
- expect(props.handleErrorChange).toHaveBeenCalledWith(
175
- 'email',
176
- 'Enter a valid email address',
177
- );
178
- });
179
-
180
- it('should clear the registration validation error on focus on field', () => {
181
- store.dispatch = jest.fn(store.dispatch);
182
- store = mockStore({
183
- ...initialState,
184
- register: {
185
- ...initialState.register,
186
- registrationError: {
187
- errorCode: 'duplicate-email',
188
- email: [{ userMessage: `This email is already associated with an existing or previous ${getSiteConfig().siteName} account` }],
189
- },
190
- },
191
- });
192
-
193
- store.dispatch = jest.fn(store.dispatch);
194
-
195
- const { container } = render(routerWrapper(reduxWrapper(<IntlEmailField {...props} />)));
196
-
197
- const emailInput = container.querySelector('input#email');
198
- fireEvent.focus(emailInput, { target: { value: 'a@gmail.com', name: 'email' } });
199
-
200
- expect(store.dispatch).toHaveBeenCalledWith(clearRegistrationBackendError('email'));
201
- });
202
-
203
- it('should clear email suggestions when close icon is clicked', () => {
204
- const { container } = render(routerWrapper(reduxWrapper(<IntlEmailField {...props} />)));
205
-
206
- const emailInput = container.querySelector('input#email');
207
- fireEvent.blur(emailInput, { target: { value: 'john@gmail.mistake', name: 'email' } });
208
-
209
- const suggestionText = container.querySelector('.alert-danger');
210
- expect(suggestionText.textContent).toEqual('Did you mean john@gmail.com?');
211
-
212
- const closeButton = container.querySelector('.email-suggestion__close');
213
- fireEvent.click(closeButton);
214
-
215
- const closedSuggestionText = container.querySelector('.alert-danger');
216
- expect(closedSuggestionText).toBeNull();
217
- });
218
-
219
- it('should set confirm email error if it exist', () => {
220
- props = {
221
- ...props,
222
- confirmEmailValue: 'confirmEmail@yopmail.com',
223
- };
224
-
225
- const { container } = render(routerWrapper(reduxWrapper(<IntlEmailField {...props} />)));
226
- const emailInput = container.querySelector('input#email');
227
- fireEvent.blur(emailInput, { target: { value: 'differentEmail@yopmail.com', name: 'email' } });
228
-
229
- expect(props.handleErrorChange).toHaveBeenCalledTimes(1);
230
- expect(props.handleErrorChange).toHaveBeenCalledWith(
231
- 'confirm_email',
232
- 'The email addresses do not match.',
233
- );
234
- });
235
- });
236
- });
@@ -1,131 +0,0 @@
1
- export const COMMON_EMAIL_PROVIDERS = [
2
- 'hotmail.com', 'yahoo.com', 'outlook.com', 'live.com', 'gmail.com',
3
- ];
4
-
5
- export const DEFAULT_SERVICE_PROVIDER_DOMAINS = ['yahoo', 'hotmail', 'live', 'outlook', 'gmail'];
6
-
7
- export const DEFAULT_TOP_LEVEL_DOMAINS = [
8
- 'aaa', 'aarp', 'abarth', 'abb', 'abbott', 'abbvie', 'abc', 'able', 'abogado', 'abudhabi', 'ac', 'academy',
9
- 'accenture', 'accountant', 'accountants', 'aco', 'active', 'actor', 'ad', 'adac', 'ads', 'adult', 'ae', 'aeg', 'aero',
10
- 'aetna', 'af', 'afamilycompany', 'afl', 'africa', 'ag', 'agakhan', 'agency', 'ai', 'aig', 'aigo', 'airbus', 'airforce',
11
- 'airtel', 'akdn', 'al', 'alfaromeo', 'alibaba', 'alipay', 'allfinanz', 'allstate', 'ally', 'alsace', 'alstom', 'am',
12
- 'amazon', 'americanexpress', 'americanfamily', 'amex', 'amfam', 'amica', 'amsterdam', 'an', 'analytics', 'android',
13
- 'anquan', 'anz', 'ao', 'aol', 'apartments', 'app', 'apple', 'aq', 'aquarelle', 'ar', 'arab', 'aramco', 'archi', 'army',
14
- 'arpa', 'art', 'arte', 'as', 'asda', 'asia', 'associates', 'at', 'athleta', 'attorney', 'au', 'auction', 'audi',
15
- 'audible', 'audio', 'auspost', 'author', 'auto', 'autos', 'avianca', 'aw', 'aws', 'ax', 'axa', 'az', 'azure', 'ba',
16
- 'baby', 'baidu', 'banamex', 'bananarepublic', 'band', 'bank', 'bar', 'barcelona', 'barclaycard', 'barclays',
17
- 'barefoot', 'bargains', 'baseball', 'basketball', 'bauhaus', 'bayern', 'bb', 'bbc', 'bbt', 'bbva', 'bcg', 'bcn', 'bd',
18
- 'be', 'beats', 'beauty', 'beer', 'bentley', 'berlin', 'best', 'bestbuy', 'bet', 'bf', 'bg', 'bh', 'bharti', 'bi',
19
- 'bible', 'bid', 'bike', 'bing', 'bingo', 'bio', 'biz', 'bj', 'bl', 'black', 'blackfriday', 'blanco', 'blockbuster',
20
- 'blog', 'bloomberg', 'blue', 'bm', 'bms', 'bmw', 'bn', 'bnl', 'bnpparibas', 'bo', 'boats', 'boehringer', 'bofa', 'bom',
21
- 'bond', 'boo', 'book', 'booking', 'boots', 'bosch', 'bostik', 'boston', 'bot', 'boutique', 'box', 'bq', 'br',
22
- 'bradesco', 'bridgestone', 'broadway', 'broker', 'brother', 'brussels', 'bs', 'bt', 'budapest', 'bugatti', 'build',
23
- 'builders', 'business', 'buy', 'buzz', 'bv', 'bw', 'by', 'bz', 'bzh', 'ca', 'cab', 'cafe', 'cal', 'call',
24
- 'calvinklein', 'cam', 'camera', 'camp', 'cancerresearch', 'canon', 'capetown', 'capital', 'capitalone', 'car',
25
- 'caravan', 'cards', 'care', 'career', 'careers', 'cars', 'cartier', 'casa', 'case', 'caseih', 'cash', 'casino', 'cat',
26
- 'catering', 'catholic', 'cba', 'cbn', 'cbre', 'cbs', 'cc', 'cd', 'ceb', 'center', 'ceo', 'cern', 'cf', 'cfa', 'cfd',
27
- 'cg', 'ch', 'chanel', 'channel', 'charity', 'chase', 'chat', 'cheap', 'chintai', 'chloe', 'christmas', 'chrome',
28
- 'chrysler', 'church', 'ci', 'cipriani', 'circle', 'cisco', 'citadel', 'citi', 'citic', 'city', 'cityeats', 'ck', 'cl',
29
- 'claims', 'cleaning', 'click', 'clinic', 'clinique', 'clothing', 'cloud', 'club', 'clubmed', 'cm', 'cn', 'co', 'coach',
30
- 'codes', 'coffee', 'college', 'cologne', 'com', 'comcast', 'commbank', 'community', 'company', 'compare', 'computer',
31
- 'comsec', 'condos', 'construction', 'consulting', 'contact', 'contractors', 'cooking', 'cookingchannel', 'cool', 'coop',
32
- 'corsica', 'country', 'coupon', 'coupons', 'courses', 'cpa', 'cr', 'credit', 'creditcard', 'creditunion', 'cricket',
33
- 'crown', 'crs', 'cruise', 'cruises', 'csc', 'cu', 'cuisinella', 'cv', 'cw', 'cx', 'cy', 'cymru', 'cyou', 'cz', 'dabur',
34
- 'dad', 'dance', 'data', 'date', 'dating', 'datsun', 'day', 'dclk', 'dds', 'de', 'deal', 'dealer', 'deals', 'degree',
35
- 'delivery', 'dell', 'deloitte', 'delta', 'democrat', 'dental', 'dentist', 'desi', 'design', 'dev', 'dhl', 'diamonds',
36
- 'diet', 'digital', 'direct', 'directory', 'discount', 'discover', 'dish', 'diy', 'dj', 'dk', 'dm', 'dnp', 'do', 'docs',
37
- 'doctor', 'dodge', 'dog', 'doha', 'domains', 'doosan', 'dot', 'download', 'drive', 'dtv', 'dubai', 'duck', 'dunlop',
38
- 'duns', 'dupont', 'durban', 'dvag', 'dvr', 'dz', 'earth', 'eat', 'ec', 'eco', 'edeka', 'edu', 'education', 'ee', 'eg',
39
- 'eh', 'email', 'emerck', 'energy', 'engineer', 'engineering', 'enterprises', 'epost', 'epson', 'equipment', 'er',
40
- 'ericsson', 'erni', 'es', 'esq', 'estate', 'esurance', 'et', 'etisalat', 'eu', 'eurovision', 'eus', 'events', 'everbank',
41
- 'exchange', 'expert', 'exposed', 'express', 'extraspace', 'fage', 'fail', 'fairwinds', 'faith', 'family', 'fan', 'fans',
42
- 'farm', 'farmers', 'fashion', 'fast', 'fedex', 'feedback', 'ferrari', 'ferrero', 'fi', 'fiat', 'fidelity', 'fido', 'film',
43
- 'final', 'finance', 'financial', 'fire', 'firestone', 'firmdale', 'fish', 'fishing', 'fit', 'fitness', 'fj', 'fk',
44
- 'flickr', 'flights', 'flir', 'florist', 'flowers', 'flsmidth', 'fly', 'fm', 'fo', 'foo', 'food', 'foodnetwork', 'football',
45
- 'ford', 'forex', 'forsale', 'forum', 'foundation', 'fox', 'fr', 'free', 'fresenius', 'frl', 'frogans', 'frontdoor',
46
- 'frontier', 'ftr', 'fujitsu', 'fujixerox', 'fun', 'fund', 'furniture', 'futbol', 'fyi', 'ga', 'gal', 'gallery', 'gallo',
47
- 'gallup', 'game', 'games', 'gap', 'garden', 'gay', 'gb', 'gbiz', 'gd', 'gdn', 'ge', 'gea', 'gent', 'genting', 'george',
48
- 'gf', 'gg', 'ggee', 'gh', 'gi', 'gift', 'gifts', 'gives', 'giving', 'gl', 'glade', 'glass', 'gle', 'global', 'globo',
49
- 'gm', 'gmail', 'gmbh', 'gmo', 'gmx', 'gn', 'godaddy', 'gold', 'goldpoint', 'golf', 'goo', 'goodhands', 'goodyear', 'goog',
50
- 'google', 'gop', 'got', 'gov', 'gp', 'gq', 'gr', 'grainger', 'graphics', 'gratis', 'green', 'gripe', 'grocery', 'group',
51
- 'gs', 'gt', 'gu', 'guardian', 'gucci', 'guge', 'guide', 'guitars', 'guru', 'gw', 'gy', 'hair', 'hamburg', 'hangout',
52
- 'haus', 'hbo', 'hdfc', 'hdfcbank', 'health', 'healthcare', 'help', 'helsinki', 'here', 'hermes', 'hgtv', 'hiphop',
53
- 'hisamitsu', 'hitachi', 'hiv', 'hk', 'hkt', 'hm', 'hn', 'hockey', 'holdings', 'holiday', 'homedepot', 'homegoods',
54
- 'homes', 'homesense', 'honda', 'honeywell', 'horse', 'hospital', 'host', 'hosting', 'hot', 'hoteles', 'hotels', 'hotmail',
55
- 'house', 'how', 'hr', 'hsbc', 'ht', 'htc', 'hu', 'hughes', 'hyatt', 'hyundai', 'ibm', 'icbc', 'ice', 'icu', 'id', 'ie',
56
- 'ieee', 'ifm', 'iinet', 'ikano', 'il', 'im', 'imamat', 'imdb', 'immo', 'immobilien', 'in', 'inc', 'industries', 'infiniti',
57
- 'info', 'ing', 'ink', 'institute', 'insurance', 'insure', 'int', 'intel', 'international', 'intuit', 'investments',
58
- 'io', 'ipiranga', 'iq', 'ir', 'irish', 'is', 'iselect', 'ismaili', 'ist', 'istanbul', 'it', 'itau', 'itv', 'iveco', 'iwc',
59
- 'jaguar', 'java', 'jcb', 'jcp', 'je', 'jeep', 'jetzt', 'jewelry', 'jio', 'jlc', 'jll', 'jm', 'jmp', 'jnj', 'jo',
60
- 'jobs', 'joburg', 'jot', 'joy', 'jp', 'jpmorgan', 'jprs', 'juegos', 'juniper', 'kaufen', 'kddi', 'ke', 'kerryhotels',
61
- 'kerrylogistics', 'kerryproperties', 'kfh', 'kg', 'kh', 'ki', 'kia', 'kim', 'kinder', 'kindle', 'kitchen', 'kiwi', 'km',
62
- 'kn', 'koeln', 'komatsu', 'kosher', 'kp', 'kpmg', 'kpn', 'kr', 'krd', 'kred', 'kuokgroup', 'kw', 'ky', 'kyoto', 'kz',
63
- 'la', 'lacaixa', 'ladbrokes', 'lamborghini', 'lamer', 'lancaster', 'lancia', 'lancome', 'land', 'landrover', 'lanxess',
64
- 'lasalle', 'lat', 'latino', 'latrobe', 'law', 'lawyer', 'lb', 'lc', 'lds', 'lease', 'leclerc', 'lefrak', 'legal',
65
- 'lego', 'lexus', 'lgbt', 'li', 'liaison', 'lidl', 'life', 'lifeinsurance', 'lifestyle', 'lighting', 'like', 'lilly',
66
- 'limited', 'limo', 'lincoln', 'linde', 'link', 'lipsy', 'live', 'living', 'lixil', 'lk', 'llc', 'llp', 'loan', 'loans',
67
- 'locker', 'locus', 'loft', 'lol', 'london', 'lotte', 'lotto', 'love', 'lpl', 'lplfinancial', 'lr', 'ls', 'lt', 'ltd',
68
- 'ltda', 'lu', 'lundbeck', 'lupin', 'luxe', 'luxury', 'lv', 'ly', 'ma', 'macys', 'madrid', 'maif', 'maison', 'makeup',
69
- 'man', 'management', 'mango', 'map', 'market', 'marketing', 'markets', 'marriott', 'marshalls', 'maserati', 'mattel',
70
- 'mba', 'mc', 'mcd', 'mcdonalds', 'mckinsey', 'md', 'me', 'med', 'media', 'meet', 'melbourne', 'meme', 'memorial', 'men',
71
- 'menu', 'meo', 'merckmsd', 'metlife', 'mf', 'mg', 'mh', 'miami', 'microsoft', 'mil', 'mini', 'mint', 'mit', 'mitsubishi',
72
- 'mk', 'ml', 'mlb', 'mls', 'mm', 'mma', 'mn', 'mo', 'mobi', 'mobile', 'mobily', 'moda', 'moe', 'moi', 'mom', 'monash',
73
- 'money', 'monster', 'montblanc', 'mopar', 'mormon', 'mortgage', 'moscow', 'moto', 'motorcycles', 'mov', 'movie', 'movistar',
74
- 'mp', 'mq', 'mr', 'ms', 'msd', 'mt', 'mtn', 'mtpc', 'mtr', 'mu', 'museum', 'mutual', 'mutuelle', 'mv', 'mw', 'mx', 'my',
75
- 'mz', 'na', 'nab', 'nadex', 'nagoya', 'name', 'nationwide', 'natura', 'navy', 'nba', 'nc', 'ne', 'nec', 'net', 'netbank',
76
- 'netflix', 'network', 'neustar', 'new', 'newholland', 'news', 'next', 'nextdirect', 'nexus', 'nf', 'nfl', 'ng', 'ngo', 'nhk',
77
- 'ni', 'nico', 'nike', 'nikon', 'ninja', 'nissan', 'nissay', 'nl', 'no', 'nokia', 'northwesternmutual', 'norton', 'now',
78
- 'nowruz', 'nowtv', 'np', 'nr', 'nra', 'nrw', 'ntt', 'nu', 'nyc', 'nz', 'obi', 'observer', 'off', 'office', 'okinawa',
79
- 'olayan', 'olayangroup', 'oldnavy', 'ollo', 'om', 'omega', 'one', 'ong', 'onl', 'online', 'onyourside', 'ooo', 'open',
80
- 'oracle', 'orange', 'org', 'organic', 'orientexpress', 'origins', 'osaka', 'otsuka', 'ott', 'ovh', 'pa', 'page',
81
- 'pamperedchef', 'panasonic', 'panerai', 'paris', 'pars', 'partners', 'parts', 'party', 'passagens', 'pay', 'pccw', 'pe',
82
- 'pet', 'pf', 'pfizer', 'pg', 'ph', 'pharmacy', 'phd', 'philips', 'phone', 'photo', 'photography', 'photos', 'physio',
83
- 'piaget', 'pics', 'pictet', 'pictures', 'pid', 'pin', 'ping', 'pink', 'pioneer', 'pizza', 'pk', 'pl', 'place', 'play',
84
- 'playstation', 'plumbing', 'plus', 'pm', 'pn', 'pnc', 'pohl', 'poker', 'politie', 'porn', 'post', 'pr', 'pramerica',
85
- 'praxi', 'press', 'prime', 'pro', 'prod', 'productions', 'prof', 'progressive', 'promo', 'properties', 'property',
86
- 'protection', 'pru', 'prudential', 'ps', 'pt', 'pub', 'pw', 'pwc', 'py', 'qa', 'qpon', 'quebec', 'quest', 'qvc',
87
- 'racing', 'radio', 'raid', 're', 'read', 'realestate', 'realtor', 'realty', 'recipes', 'red', 'redstone', 'redumbrella',
88
- 'rehab', 'reise', 'reisen', 'reit', 'reliance', 'ren', 'rent', 'rentals', 'repair', 'report', 'republican', 'rest',
89
- 'restaurant', 'review', 'reviews', 'rexroth', 'rich', 'richardli', 'ricoh', 'rightathome', 'ril', 'rio', 'rip', 'rmit',
90
- 'ro', 'rocher', 'rocks', 'rodeo', 'rogers', 'room', 'rs', 'rsvp', 'ru', 'rugby', 'ruhr', 'run', 'rw', 'rwe', 'ryukyu',
91
- 'sa', 'saarland', 'safe', 'safety', 'sakura', 'sale', 'salon', 'samsclub', 'samsung', 'sandvik', 'sandvikcoromant',
92
- 'sanofi', 'sap', 'sapo', 'sarl', 'sas', 'save', 'saxo', 'sb', 'sbi', 'sbs', 'sc', 'sca', 'scb', 'schaeffler', 'schmidt',
93
- 'scholarships', 'school', 'schule', 'schwarz', 'science', 'scjohnson', 'scor', 'scot', 'sd', 'se', 'search', 'seat',
94
- 'secure', 'security', 'seek', 'select', 'sener', 'services', 'ses', 'seven', 'sew', 'sex', 'sexy', 'sfr', 'sg', 'sh',
95
- 'shangrila', 'sharp', 'shaw', 'shell', 'shia', 'shiksha', 'shoes', 'shop', 'shopping', 'shouji', 'show', 'showtime',
96
- 'shriram', 'si', 'silk', 'sina', 'singles', 'site', 'sj', 'sk', 'ski', 'skin', 'sky', 'skype', 'sl', 'sling', 'sm',
97
- 'smart', 'smile', 'sn', 'sncf', 'so', 'soccer', 'social', 'softbank', 'software', 'sohu', 'solar', 'solutions', 'song',
98
- 'sony', 'soy', 'spa', 'space', 'spiegel', 'sport', 'spot', 'spreadbetting', 'sr', 'srl', 'srt', 'ss', 'st', 'stada',
99
- 'staples', 'star', 'starhub', 'statebank', 'statefarm', 'statoil', 'stc', 'stcgroup', 'stockholm', 'storage', 'store',
100
- 'stream', 'studio', 'study', 'style', 'su', 'sucks', 'supplies', 'supply', 'support', 'surf', 'surgery', 'suzuki', 'sv',
101
- 'swatch', 'swiftcover', 'swiss', 'sx', 'sy', 'sydney', 'symantec', 'systems', 'sz', 'tab', 'taipei', 'talk', 'taobao',
102
- 'target', 'tatamotors', 'tatar', 'tattoo', 'tax', 'taxi', 'tc', 'tci', 'td', 'tdk', 'team', 'tech', 'technology', 'tel',
103
- 'telecity', 'telefonica', 'temasek', 'tennis', 'teva', 'tf', 'tg', 'th', 'thd', 'theater', 'theatre', 'tiaa', 'tickets',
104
- 'tienda', 'tiffany', 'tips', 'tires', 'tirol', 'tj', 'tjmaxx', 'tjx', 'tk', 'tkmaxx', 'tl', 'tm', 'tmall', 'tn', 'to',
105
- 'today', 'tokyo', 'tools', 'top', 'toray', 'toshiba', 'total', 'tours', 'town', 'toyota', 'toys', 'tp', 'tr', 'trade',
106
- 'trading', 'training', 'travel', 'travelchannel', 'travelers', 'travelersinsurance', 'trust', 'trv', 'tt', 'tube', 'tui',
107
- 'tunes', 'tushu', 'tv', 'tvs', 'tw', 'tz', 'ua', 'ubank', 'ubs', 'uconnect', 'ug', 'uk', 'um', 'unicom', 'university',
108
- 'uno', 'uol', 'ups', 'us', 'uy', 'uz', 'va', 'vacations', 'vana', 'vanguard', 'vc', 've', 'vegas', 'ventures', 'verisign',
109
- 'versicherung', 'vet', 'vg', 'vi', 'viajes', 'video', 'vig', 'viking', 'villas', 'vin', 'vip', 'virgin', 'visa', 'vision',
110
- 'vista', 'vistaprint', 'viva', 'vivo', 'vlaanderen', 'vn', 'vodka', 'volkswagen', 'volvo', 'vote', 'voting', 'voto',
111
- 'voyage', 'vu', 'vuelos', 'wales', 'walmart', 'walter', 'wang', 'wanggou', 'warman', 'watch', 'watches', 'weather',
112
- 'weatherchannel', 'webcam', 'weber', 'website', 'wed', 'wedding', 'weibo', 'weir', 'wf', 'whoswho', 'wien', 'wiki',
113
- 'williamhill', 'win', 'windows', 'wine', 'winners', 'wme', 'wolterskluwer', 'woodside', 'work', 'works', 'world', 'wow',
114
- 'ws', 'wtc', 'wtf', 'xbox', 'xerox', 'xfinity', 'xihuan', 'xin', '测试', 'कॉम', 'परीक्षा', 'セール', '佛山', 'ಭಾರತ', '慈善',
115
- '集团', '在线', '한국', 'ଭାରତ', '大众汽车', '点看', 'คอม', 'ভাৰত', 'ভারত', '八卦', 'ישראל\u200e', 'موقع\u200e', 'বাংলা', '公益',
116
- '公司', '香格里拉', '网站', '移动', '我爱你', 'москва', 'испытание', 'қаз', 'католик', 'онлайн', 'сайт', '联通', 'срб', 'бг',
117
- 'бел', 'קום\u200e', '时尚', '微博', '테스트', '淡马锡', 'ファッション', 'орг', 'नेट', 'ストア', 'アマゾン', '삼성', 'சிங்கப்பூர்', '商标',
118
- '商店', '商城', 'дети', 'мкд', 'טעסט\u200e', 'ею', 'ポイント', '新闻', '工行', '家電', 'كوم\u200e', '中文网', '中信', '中国',
119
- '中國', '娱乐', '谷歌', 'భారత్', 'ලංකා', '電訊盈科', '购物', '測試', 'クラウド', 'ભારત', '通販', 'भारतम्', 'भारत', 'भारोत', 'آزمایشی\u200e',
120
- 'பரிட்சை', '网店', 'संगठन', '餐厅', '网络', 'ком', 'укр', '香港', '亚马逊', '诺基亚', '食品', 'δοκιμή', '飞利浦', 'إختبار\u200e',
121
- '台湾', '台灣', '手表', '手机', 'мон', 'الجزائر\u200e', 'عمان\u200e', 'ارامكو\u200e', 'ایران\u200e', 'العليان\u200e',
122
- 'اتصالات\u200e', 'امارات\u200e', 'بازار\u200e', 'موريتانيا\u200e', 'پاکستان\u200e', 'الاردن\u200e', 'موبايلي\u200e',
123
- 'بارت\u200e', 'بھارت\u200e', 'المغرب\u200e', 'ابوظبي\u200e', 'البحرين\u200e', 'السعودية\u200e', 'ڀارت\u200e',
124
- 'كاثوليك\u200e', 'سودان\u200e', 'همراه\u200e', 'عراق\u200e', 'مليسيا\u200e', '澳門', '닷컴', '政府', 'شبكة\u200e',
125
- 'بيتك\u200e', 'عرب\u200e', 'გე', '机构', '组织机构', '健康', 'ไทย', 'سورية\u200e', '招聘', 'рус', 'рф', '珠宝',
126
- 'تونس\u200e', '大拿', 'ລາວ', 'みんな', 'グーグル', 'ευ', 'ελ', '世界', '書籍', 'ഭാരതം', 'ਭਾਰਤ', '网址', '닷넷', 'コム',
127
- '天主教', '游戏', 'vermögensberater', 'vermögensberatung', '企业', '信息', '嘉里大酒店', '嘉里', 'مصر\u200e',
128
- 'قطر\u200e', '广东', 'இலங்கை', 'இந்தியா', 'հայ', '新加坡', 'فلسطين\u200e', 'テスト', '政务', 'xperia', 'xxx',
129
- 'xyz', 'yachts', 'yahoo', 'yamaxun', 'yandex', 'ye', 'yodobashi', 'yoga', 'yokohama', 'you', 'youtube', 'yt',
130
- 'yun', 'za', 'zappos', 'zara', 'zero', 'zip', 'zippo', 'zm', 'zone', 'zuerich', 'zw',
131
- ];