@openedx/frontend-app-authn 1.0.0-alpha.5 → 1.0.0-alpha.6

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 (505) hide show
  1. package/dist/Main.d.ts +3 -0
  2. package/{src/Main.tsx → dist/Main.js} +4 -15
  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/{src → dist}/app.scss +1 -1
  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/{src/common-components/EmbeddedRegistrationRoute.jsx → dist/common-components/EmbeddedRegistrationRoute.js} +9 -13
  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 +55 -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 +39 -0
  75. package/dist/common-components/PasswordField.js +94 -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 +68 -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 +42 -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 +56 -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 +31 -0
  94. package/dist/common-components/UnAuthOnlyRoute.js.map +1 -0
  95. package/dist/common-components/data/actions.d.ts +26 -0
  96. package/{src → dist}/common-components/data/actions.js +8 -13
  97. package/dist/common-components/data/actions.js.map +1 -0
  98. package/dist/common-components/data/reducers.d.ts +62 -0
  99. package/dist/common-components/data/reducers.js +39 -0
  100. package/dist/common-components/data/reducers.js.map +1 -0
  101. package/dist/common-components/data/sagas.d.ts +12 -0
  102. package/dist/common-components/data/sagas.js +21 -0
  103. package/dist/common-components/data/sagas.js.map +1 -0
  104. package/dist/common-components/data/selectors.d.ts +98 -0
  105. package/dist/common-components/data/selectors.js +11 -0
  106. package/dist/common-components/data/selectors.js.map +1 -0
  107. package/dist/common-components/data/service.d.ts +5 -0
  108. package/dist/common-components/data/service.js +31 -0
  109. package/dist/common-components/data/service.js.map +1 -0
  110. package/dist/common-components/index.d.ts +13 -0
  111. package/{src/common-components/index.jsx → dist/common-components/index.js} +1 -0
  112. package/dist/common-components/index.js.map +1 -0
  113. package/dist/common-components/messages.d.ts +113 -0
  114. package/dist/common-components/messages.js +126 -0
  115. package/dist/common-components/messages.js.map +1 -0
  116. package/dist/constants.d.ts +1 -0
  117. package/{src/constants.ts → dist/constants.js} +1 -0
  118. package/dist/constants.js.map +1 -0
  119. package/dist/data/configureStore.d.ts +3 -0
  120. package/{src → dist}/data/configureStore.js +11 -20
  121. package/dist/data/configureStore.js.map +1 -0
  122. package/dist/data/constants.d.ts +24 -0
  123. package/{src → dist}/data/constants.js +4 -8
  124. package/dist/data/constants.js.map +1 -0
  125. package/dist/data/countries.d.ts +26 -0
  126. package/{src/data/countries.ts → dist/data/countries.js} +6 -9
  127. package/dist/data/countries.js.map +1 -0
  128. package/dist/data/oneTrust.d.ts +2 -0
  129. package/dist/data/oneTrust.js +3 -0
  130. package/dist/data/oneTrust.js.map +1 -0
  131. package/dist/data/reducers.d.ts +254 -0
  132. package/dist/data/reducers.js +17 -0
  133. package/dist/data/reducers.js.map +1 -0
  134. package/dist/data/sagas.d.ts +1 -0
  135. package/{src → dist}/data/sagas.js +9 -10
  136. package/dist/data/sagas.js.map +1 -0
  137. package/dist/data/utils/cookies.d.ts +1 -0
  138. package/dist/data/utils/cookies.js +12 -0
  139. package/dist/data/utils/cookies.js.map +1 -0
  140. package/dist/data/utils/dataUtils.d.ts +11 -0
  141. package/dist/data/utils/dataUtils.js +67 -0
  142. package/dist/data/utils/dataUtils.js.map +1 -0
  143. package/dist/data/utils/index.d.ts +3 -0
  144. package/dist/data/utils/index.js +4 -0
  145. package/dist/data/utils/index.js.map +1 -0
  146. package/dist/data/utils/reduxUtils.d.ts +15 -0
  147. package/dist/data/utils/reduxUtils.js +29 -0
  148. package/dist/data/utils/reduxUtils.js.map +1 -0
  149. package/dist/data/utils/useMobileResponsive.d.ts +7 -0
  150. package/dist/data/utils/useMobileResponsive.js +22 -0
  151. package/dist/data/utils/useMobileResponsive.js.map +1 -0
  152. package/dist/field-renderer/FieldRenderer.d.ts +34 -0
  153. package/dist/field-renderer/FieldRenderer.js +70 -0
  154. package/dist/field-renderer/FieldRenderer.js.map +1 -0
  155. package/dist/field-renderer/index.d.ts +1 -0
  156. package/{src/field-renderer/index.jsx → dist/field-renderer/index.js} +1 -0
  157. package/dist/field-renderer/index.js.map +1 -0
  158. package/dist/forgot-password/ForgotPasswordAlert.d.ts +16 -0
  159. package/dist/forgot-password/ForgotPasswordAlert.js +66 -0
  160. package/dist/forgot-password/ForgotPasswordAlert.js.map +1 -0
  161. package/dist/forgot-password/ForgotPasswordPage.d.ts +36 -0
  162. package/dist/forgot-password/ForgotPasswordPage.js +91 -0
  163. package/dist/forgot-password/ForgotPasswordPage.js.map +1 -0
  164. package/dist/forgot-password/data/actions.d.ts +30 -0
  165. package/{src → dist}/forgot-password/data/actions.js +10 -16
  166. package/dist/forgot-password/data/actions.js.map +1 -0
  167. package/dist/forgot-password/data/reducers.d.ts +13 -0
  168. package/dist/forgot-password/data/reducers.js +46 -0
  169. package/dist/forgot-password/data/reducers.js.map +1 -0
  170. package/dist/forgot-password/data/sagas.d.ts +4 -0
  171. package/dist/forgot-password/data/sagas.js +28 -0
  172. package/dist/forgot-password/data/sagas.js.map +1 -0
  173. package/dist/forgot-password/data/selectors.d.ts +23 -0
  174. package/dist/forgot-password/data/selectors.js +5 -0
  175. package/dist/forgot-password/data/selectors.js.map +1 -0
  176. package/dist/forgot-password/data/service.d.ts +1 -0
  177. package/dist/forgot-password/data/service.js +26 -0
  178. package/dist/forgot-password/data/service.js.map +1 -0
  179. package/dist/forgot-password/index.d.ts +5 -0
  180. package/{src → dist}/forgot-password/index.js +1 -0
  181. package/dist/forgot-password/index.js.map +1 -0
  182. package/dist/forgot-password/messages.d.ts +123 -0
  183. package/dist/forgot-password/messages.js +128 -0
  184. package/dist/forgot-password/messages.js.map +1 -0
  185. package/dist/i18n/index.d.ts +25 -0
  186. package/dist/i18n/index.js +26 -0
  187. package/dist/i18n/index.js.map +1 -0
  188. package/dist/index.js +4 -0
  189. package/dist/index.js.map +1 -0
  190. package/dist/login/AccountActivationMessage.d.ts +14 -0
  191. package/dist/login/AccountActivationMessage.js +49 -0
  192. package/dist/login/AccountActivationMessage.js.map +1 -0
  193. package/dist/login/ChangePasswordPrompt.d.ts +18 -0
  194. package/dist/login/ChangePasswordPrompt.js +45 -0
  195. package/dist/login/ChangePasswordPrompt.js.map +1 -0
  196. package/dist/login/LoginFailure.d.ts +25 -0
  197. package/dist/login/LoginFailure.js +109 -0
  198. package/dist/login/LoginFailure.js.map +1 -0
  199. package/dist/login/LoginPage.d.ts +10 -0
  200. package/dist/login/LoginPage.js +216 -0
  201. package/dist/login/LoginPage.js.map +1 -0
  202. package/dist/login/data/actions.d.ts +36 -0
  203. package/{src → dist}/login/data/actions.js +12 -19
  204. package/dist/login/data/actions.js.map +1 -0
  205. package/dist/login/data/constants.d.ts +17 -0
  206. package/{src → dist}/login/data/constants.js +4 -4
  207. package/dist/login/data/constants.js.map +1 -0
  208. package/dist/login/data/reducers.d.ts +82 -0
  209. package/dist/login/data/reducers.js +44 -0
  210. package/dist/login/data/reducers.js.map +1 -0
  211. package/dist/login/data/sagas.d.ts +10 -0
  212. package/dist/login/data/sagas.js +34 -0
  213. package/dist/login/data/sagas.js.map +1 -0
  214. package/dist/login/data/service.d.ts +4 -0
  215. package/dist/login/data/service.js +32 -0
  216. package/dist/login/data/service.js.map +1 -0
  217. package/dist/login/index.d.ts +4 -0
  218. package/{src → dist}/login/index.js +1 -1
  219. package/dist/login/index.js.map +1 -0
  220. package/dist/login/messages.d.ts +198 -0
  221. package/dist/login/messages.js +210 -0
  222. package/dist/login/messages.js.map +1 -0
  223. package/dist/logistration/Logistration.d.ts +32 -0
  224. package/dist/logistration/Logistration.js +106 -0
  225. package/dist/logistration/Logistration.js.map +1 -0
  226. package/dist/progressive-profiling/ProgressiveProfiling.d.ts +46 -0
  227. package/dist/progressive-profiling/ProgressiveProfiling.js +167 -0
  228. package/dist/progressive-profiling/ProgressiveProfiling.js.map +1 -0
  229. package/dist/progressive-profiling/ProgressiveProfilingPageModal.d.ts +13 -0
  230. package/dist/progressive-profiling/ProgressiveProfilingPageModal.js +24 -0
  231. package/dist/progressive-profiling/ProgressiveProfilingPageModal.js.map +1 -0
  232. package/dist/progressive-profiling/data/actions.d.ts +19 -0
  233. package/{src → dist}/progressive-profiling/data/actions.js +6 -10
  234. package/dist/progressive-profiling/data/actions.js.map +1 -0
  235. package/dist/progressive-profiling/data/reducers.d.ts +22 -0
  236. package/dist/progressive-profiling/data/reducers.js +23 -0
  237. package/dist/progressive-profiling/data/reducers.js.map +1 -0
  238. package/dist/progressive-profiling/data/sagas.d.ts +4 -0
  239. package/dist/progressive-profiling/data/sagas.js +17 -0
  240. package/dist/progressive-profiling/data/sagas.js.map +1 -0
  241. package/dist/progressive-profiling/data/selectors.d.ts +39 -0
  242. package/{src → dist}/progressive-profiling/data/selectors.js +4 -9
  243. package/dist/progressive-profiling/data/selectors.js.map +1 -0
  244. package/dist/progressive-profiling/data/service.d.ts +1 -0
  245. package/dist/progressive-profiling/data/service.js +23 -0
  246. package/dist/progressive-profiling/data/service.js.map +1 -0
  247. package/dist/progressive-profiling/index.d.ts +4 -0
  248. package/{src → dist}/progressive-profiling/index.js +1 -1
  249. package/dist/progressive-profiling/index.js.map +1 -0
  250. package/dist/progressive-profiling/messages.d.ts +53 -0
  251. package/dist/progressive-profiling/messages.js +57 -0
  252. package/dist/progressive-profiling/messages.js.map +1 -0
  253. package/dist/register/RegistrationFields/CountryField/CountryField.d.ts +38 -0
  254. package/dist/register/RegistrationFields/CountryField/CountryField.js +95 -0
  255. package/dist/register/RegistrationFields/CountryField/CountryField.js.map +1 -0
  256. package/dist/register/RegistrationFields/CountryField/validator.d.ts +8 -0
  257. package/dist/register/RegistrationFields/CountryField/validator.js +29 -0
  258. package/dist/register/RegistrationFields/CountryField/validator.js.map +1 -0
  259. package/dist/register/RegistrationFields/EmailField/EmailField.d.ts +30 -0
  260. package/dist/register/RegistrationFields/EmailField/EmailField.js +80 -0
  261. package/dist/register/RegistrationFields/EmailField/EmailField.js.map +1 -0
  262. package/dist/register/RegistrationFields/EmailField/constants.d.ts +3 -0
  263. package/dist/register/RegistrationFields/EmailField/constants.js +130 -0
  264. package/dist/register/RegistrationFields/EmailField/constants.js.map +1 -0
  265. package/dist/register/RegistrationFields/EmailField/validator.d.ts +17 -0
  266. package/dist/register/RegistrationFields/EmailField/validator.js +107 -0
  267. package/dist/register/RegistrationFields/EmailField/validator.js.map +1 -0
  268. package/dist/register/RegistrationFields/HonorCodeField/HonorCode.d.ts +21 -0
  269. package/dist/register/RegistrationFields/HonorCodeField/HonorCode.js +40 -0
  270. package/dist/register/RegistrationFields/HonorCodeField/HonorCode.js.map +1 -0
  271. package/dist/register/RegistrationFields/NameField/NameField.d.ts +29 -0
  272. package/dist/register/RegistrationFields/NameField/NameField.js +52 -0
  273. package/dist/register/RegistrationFields/NameField/NameField.js.map +1 -0
  274. package/dist/register/RegistrationFields/NameField/validator.d.ts +5 -0
  275. package/{src → dist}/register/RegistrationFields/NameField/validator.js +9 -12
  276. package/dist/register/RegistrationFields/NameField/validator.js.map +1 -0
  277. package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.d.ts +16 -0
  278. package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.js +24 -0
  279. package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.js.map +1 -0
  280. package/dist/register/RegistrationFields/UsernameField/UsernameField.d.ts +31 -0
  281. package/dist/register/RegistrationFields/UsernameField/UsernameField.js +113 -0
  282. package/dist/register/RegistrationFields/UsernameField/UsernameField.js.map +1 -0
  283. package/dist/register/RegistrationFields/UsernameField/validator.d.ts +4 -0
  284. package/dist/register/RegistrationFields/UsernameField/validator.js +15 -0
  285. package/dist/register/RegistrationFields/UsernameField/validator.js.map +1 -0
  286. package/dist/register/RegistrationFields/index.d.ts +6 -0
  287. package/{src → dist}/register/RegistrationFields/index.js +1 -0
  288. package/dist/register/RegistrationFields/index.js.map +1 -0
  289. package/dist/register/RegistrationPage.d.ts +18 -0
  290. package/dist/register/RegistrationPage.js +216 -0
  291. package/dist/register/RegistrationPage.js.map +1 -0
  292. package/dist/register/components/ConfigurableRegistrationForm.d.ts +37 -0
  293. package/dist/register/components/ConfigurableRegistrationForm.js +145 -0
  294. package/dist/register/components/ConfigurableRegistrationForm.js.map +1 -0
  295. package/dist/register/components/RegistrationFailure.d.ts +19 -0
  296. package/dist/register/components/RegistrationFailure.js +57 -0
  297. package/dist/register/components/RegistrationFailure.js.map +1 -0
  298. package/dist/register/data/actions.d.ts +80 -0
  299. package/{src → dist}/register/data/actions.js +26 -42
  300. package/dist/register/data/actions.js.map +1 -0
  301. package/dist/register/data/constants.d.ts +10 -0
  302. package/{src → dist}/register/data/constants.js +4 -4
  303. package/dist/register/data/constants.js.map +1 -0
  304. package/dist/register/data/reducers.d.ts +237 -0
  305. package/dist/register/data/reducers.js +86 -0
  306. package/dist/register/data/reducers.js.map +1 -0
  307. package/dist/register/data/sagas.d.ts +19 -0
  308. package/dist/register/data/sagas.js +45 -0
  309. package/dist/register/data/sagas.js.map +1 -0
  310. package/dist/register/data/selectors.d.ts +26 -0
  311. package/dist/register/data/selectors.js +25 -0
  312. package/dist/register/data/selectors.js.map +1 -0
  313. package/dist/register/data/service.d.ts +8 -0
  314. package/dist/register/data/service.js +46 -0
  315. package/dist/register/data/service.js.map +1 -0
  316. package/dist/register/data/utils.d.ts +6 -0
  317. package/dist/register/data/utils.js +128 -0
  318. package/dist/register/data/utils.js.map +1 -0
  319. package/dist/register/index.d.ts +3 -0
  320. package/{src → dist}/register/index.js +1 -0
  321. package/dist/register/index.js.map +1 -0
  322. package/dist/register/messages.d.ts +193 -0
  323. package/dist/register/messages.js +205 -0
  324. package/dist/register/messages.js.map +1 -0
  325. package/dist/reset-password/ResetPasswordFailure.d.ts +15 -0
  326. package/dist/reset-password/ResetPasswordFailure.js +44 -0
  327. package/dist/reset-password/ResetPasswordFailure.js.map +1 -0
  328. package/dist/reset-password/ResetPasswordPage.d.ts +32 -0
  329. package/dist/reset-password/ResetPasswordPage.js +150 -0
  330. package/dist/reset-password/ResetPasswordPage.js.map +1 -0
  331. package/dist/reset-password/ResetPasswordSuccess.d.ts +2 -0
  332. package/dist/reset-password/ResetPasswordSuccess.js +10 -0
  333. package/dist/reset-password/ResetPasswordSuccess.js.map +1 -0
  334. package/dist/reset-password/data/actions.d.ts +56 -0
  335. package/{src → dist}/reset-password/data/actions.js +17 -26
  336. package/dist/reset-password/data/actions.js.map +1 -0
  337. package/dist/reset-password/data/constants.d.ts +13 -0
  338. package/{src → dist}/reset-password/data/constants.js +6 -7
  339. package/dist/reset-password/data/constants.js.map +1 -0
  340. package/dist/reset-password/data/reducers.d.ts +19 -0
  341. package/dist/reset-password/data/reducers.js +25 -0
  342. package/dist/reset-password/data/reducers.js.map +1 -0
  343. package/dist/reset-password/data/sagas.d.ts +7 -0
  344. package/dist/reset-password/data/sagas.js +63 -0
  345. package/dist/reset-password/data/sagas.js.map +1 -0
  346. package/dist/reset-password/data/selectors.d.ts +23 -0
  347. package/dist/reset-password/data/selectors.js +5 -0
  348. package/dist/reset-password/data/selectors.js.map +1 -0
  349. package/dist/reset-password/data/service.d.ts +3 -0
  350. package/dist/reset-password/data/service.js +62 -0
  351. package/dist/reset-password/data/service.js.map +1 -0
  352. package/dist/reset-password/index.d.ts +5 -0
  353. package/{src → dist}/reset-password/index.js +1 -0
  354. package/dist/reset-password/index.js.map +1 -0
  355. package/dist/reset-password/messages.d.ts +83 -0
  356. package/dist/reset-password/messages.js +87 -0
  357. package/dist/reset-password/messages.js.map +1 -0
  358. package/dist/routes.d.ts +18 -0
  359. package/dist/routes.js +75 -0
  360. package/dist/routes.js.map +1 -0
  361. package/package.json +12 -5
  362. package/src/__mocks__/file.js +0 -1
  363. package/src/__mocks__/svg.js +0 -1
  364. package/src/app.ts +0 -43
  365. package/src/base-container/components/default-layout/DefaultLayout.test.jsx +0 -48
  366. package/src/base-container/components/default-layout/LargeLayout.jsx +0 -42
  367. package/src/base-container/components/default-layout/MediumLayout.jsx +0 -49
  368. package/src/base-container/components/default-layout/SmallLayout.jsx +0 -37
  369. package/src/base-container/components/default-layout/messages.js +0 -16
  370. package/src/base-container/components/image-layout/ExtraSmallLayout.jsx +0 -31
  371. package/src/base-container/components/image-layout/LargeLayout.jsx +0 -32
  372. package/src/base-container/components/image-layout/MediumLayout.jsx +0 -32
  373. package/src/base-container/components/image-layout/SmallLayout.jsx +0 -31
  374. package/src/base-container/components/image-layout/messages.js +0 -16
  375. package/src/base-container/components/welcome-page-layout/LargeLayout.jsx +0 -46
  376. package/src/base-container/components/welcome-page-layout/MediumLayout.jsx +0 -49
  377. package/src/base-container/components/welcome-page-layout/SmallLayout.jsx +0 -38
  378. package/src/base-container/components/welcome-page-layout/messages.js +0 -21
  379. package/src/base-container/index.jsx +0 -70
  380. package/src/base-container/tests/BaseContainer.test.jsx +0 -44
  381. package/src/common-components/EnterpriseSSO.jsx +0 -110
  382. package/src/common-components/FormGroup.jsx +0 -106
  383. package/src/common-components/InstitutionLogistration.jsx +0 -102
  384. package/src/common-components/NotFoundPage.jsx +0 -15
  385. package/src/common-components/PasswordField.jsx +0 -175
  386. package/src/common-components/RedirectLogistration.jsx +0 -94
  387. package/src/common-components/RegisterFaIcons.jsx +0 -8
  388. package/src/common-components/SocialAuthProviders.jsx +0 -75
  389. package/src/common-components/ThirdPartyAuth.jsx +0 -123
  390. package/src/common-components/ThirdPartyAuthAlert.jsx +0 -49
  391. package/src/common-components/UnAuthOnlyRoute.jsx +0 -41
  392. package/src/common-components/data/reducers.js +0 -63
  393. package/src/common-components/data/sagas.js +0 -32
  394. package/src/common-components/data/selectors.js +0 -28
  395. package/src/common-components/data/service.js +0 -23
  396. package/src/common-components/data/tests/reducer.test.js +0 -82
  397. package/src/common-components/data/tests/sagas.test.js +0 -71
  398. package/src/common-components/messages.jsx +0 -127
  399. package/src/common-components/tests/EmbeddedRegistrationRoute.test.jsx +0 -76
  400. package/src/common-components/tests/FormField.test.jsx +0 -289
  401. package/src/common-components/tests/SocialAuthProviders.test.jsx +0 -75
  402. package/src/common-components/tests/ThirdPartyAuthAlert.test.jsx +0 -39
  403. package/src/common-components/tests/UnAuthOnlyRoute.test.jsx +0 -73
  404. package/src/common-components/tests/__snapshots__/SocialAuthProviders.test.jsx.snap +0 -156
  405. package/src/common-components/tests/__snapshots__/ThirdPartyAuthAlert.test.jsx.snap +0 -53
  406. package/src/data/oneTrust.js +0 -3
  407. package/src/data/reducers.js +0 -36
  408. package/src/data/tests/cookies.test.js +0 -42
  409. package/src/data/tests/dataUtils.test.js +0 -19
  410. package/src/data/tests/reduxUtils.test.js +0 -14
  411. package/src/data/utils/cookies.js +0 -12
  412. package/src/data/utils/dataUtils.js +0 -81
  413. package/src/data/utils/index.js +0 -11
  414. package/src/data/utils/reduxUtils.js +0 -34
  415. package/src/data/utils/useMobileResponsive.js +0 -24
  416. package/src/field-renderer/FieldRenderer.jsx +0 -156
  417. package/src/field-renderer/tests/FieldRenderer.test.jsx +0 -201
  418. package/src/forgot-password/ForgotPasswordAlert.jsx +0 -97
  419. package/src/forgot-password/ForgotPasswordPage.jsx +0 -193
  420. package/src/forgot-password/data/reducers.js +0 -58
  421. package/src/forgot-password/data/sagas.js +0 -35
  422. package/src/forgot-password/data/selectors.js +0 -10
  423. package/src/forgot-password/data/service.js +0 -21
  424. package/src/forgot-password/data/tests/reducers.test.js +0 -34
  425. package/src/forgot-password/data/tests/sagas.test.js +0 -67
  426. package/src/forgot-password/messages.js +0 -128
  427. package/src/forgot-password/tests/ForgotPasswordPage.test.jsx +0 -269
  428. package/src/i18n/index.js +0 -25
  429. package/src/login/AccountActivationMessage.jsx +0 -78
  430. package/src/login/ChangePasswordPrompt.jsx +0 -91
  431. package/src/login/LoginFailure.jsx +0 -231
  432. package/src/login/LoginPage.jsx +0 -368
  433. package/src/login/data/reducers.js +0 -76
  434. package/src/login/data/sagas.js +0 -45
  435. package/src/login/data/service.js +0 -27
  436. package/src/login/data/tests/reducers.test.js +0 -155
  437. package/src/login/data/tests/sagas.test.js +0 -110
  438. package/src/login/messages.jsx +0 -211
  439. package/src/login/tests/AccountActivationMessage.test.jsx +0 -122
  440. package/src/login/tests/ChangePasswordPrompt.test.jsx +0 -75
  441. package/src/login/tests/LoginFailure.test.jsx +0 -323
  442. package/src/login/tests/LoginPage.test.jsx +0 -839
  443. package/src/logistration/Logistration.jsx +0 -189
  444. package/src/logistration/Logistration.test.jsx +0 -275
  445. package/src/progressive-profiling/ProgressiveProfiling.jsx +0 -313
  446. package/src/progressive-profiling/ProgressiveProfilingPageModal.jsx +0 -56
  447. package/src/progressive-profiling/data/reducers.js +0 -38
  448. package/src/progressive-profiling/data/sagas.js +0 -24
  449. package/src/progressive-profiling/data/service.js +0 -17
  450. package/src/progressive-profiling/messages.jsx +0 -57
  451. package/src/progressive-profiling/tests/ProgressiveProfiling.test.jsx +0 -322
  452. package/src/register/RegistrationFields/CountryField/CountryField.jsx +0 -164
  453. package/src/register/RegistrationFields/CountryField/CountryField.test.jsx +0 -204
  454. package/src/register/RegistrationFields/CountryField/validator.js +0 -32
  455. package/src/register/RegistrationFields/EmailField/EmailField.jsx +0 -140
  456. package/src/register/RegistrationFields/EmailField/EmailField.test.jsx +0 -236
  457. package/src/register/RegistrationFields/EmailField/constants.js +0 -131
  458. package/src/register/RegistrationFields/EmailField/validator.js +0 -126
  459. package/src/register/RegistrationFields/EmailField/validator.test.js +0 -39
  460. package/src/register/RegistrationFields/HonorCodeField/HonorCode.jsx +0 -104
  461. package/src/register/RegistrationFields/HonorCodeField/HonorCode.test.jsx +0 -70
  462. package/src/register/RegistrationFields/NameField/NameField.jsx +0 -68
  463. package/src/register/RegistrationFields/NameField/NameField.test.jsx +0 -146
  464. package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.jsx +0 -58
  465. package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.test.jsx +0 -55
  466. package/src/register/RegistrationFields/UsernameField/UsernameField.jsx +0 -162
  467. package/src/register/RegistrationFields/UsernameField/UsernameField.test.jsx +0 -319
  468. package/src/register/RegistrationFields/UsernameField/validator.js +0 -16
  469. package/src/register/RegistrationPage.jsx +0 -428
  470. package/src/register/RegistrationPage.test.jsx +0 -854
  471. package/src/register/components/ConfigurableRegistrationForm.jsx +0 -244
  472. package/src/register/components/RegistrationFailure.jsx +0 -80
  473. package/src/register/components/tests/ConfigurableRegistrationForm.test.jsx +0 -401
  474. package/src/register/components/tests/RegistrationFailure.test.jsx +0 -212
  475. package/src/register/components/tests/ThirdPartyAuth.test.jsx +0 -439
  476. package/src/register/data/reducers.js +0 -140
  477. package/src/register/data/sagas.js +0 -58
  478. package/src/register/data/selectors.js +0 -34
  479. package/src/register/data/service.js +0 -45
  480. package/src/register/data/tests/reducers.test.js +0 -277
  481. package/src/register/data/tests/sagas.test.js +0 -239
  482. package/src/register/data/tests/utils.test.js +0 -98
  483. package/src/register/data/utils.js +0 -147
  484. package/src/register/messages.jsx +0 -206
  485. package/src/reset-password/ResetPasswordFailure.jsx +0 -55
  486. package/src/reset-password/ResetPasswordPage.jsx +0 -224
  487. package/src/reset-password/ResetPasswordSuccess.jsx +0 -19
  488. package/src/reset-password/data/reducers.js +0 -44
  489. package/src/reset-password/data/sagas.js +0 -67
  490. package/src/reset-password/data/selectors.js +0 -10
  491. package/src/reset-password/data/service.js +0 -61
  492. package/src/reset-password/data/tests/sagas.test.js +0 -185
  493. package/src/reset-password/messages.js +0 -88
  494. package/src/reset-password/tests/ResetPasswordPage.test.jsx +0 -241
  495. package/src/routes.jsx +0 -79
  496. package/src/setupTest.js +0 -68
  497. /package/{src → dist}/base-container/components/image-layout/index.scss +0 -0
  498. /package/{src/index.ts → dist/index.d.ts} +0 -0
  499. /package/{src → dist}/sass/_base_component.scss +0 -0
  500. /package/{src → dist}/sass/_forgot_password.scss +0 -0
  501. /package/{src → dist}/sass/_login_page.scss +0 -0
  502. /package/{src → dist}/sass/_progressive_profiling_page.scss +0 -0
  503. /package/{src → dist}/sass/_registration.scss +0 -0
  504. /package/{src → dist}/sass/_reset_password.scss +0 -0
  505. /package/{src → dist}/sass/_style.scss +0 -0
@@ -1,14 +1,9 @@
1
1
  import { createSelector } from 'reselect';
2
-
3
2
  export const storeName = 'commonComponents';
4
-
5
- export const commonComponentsSelector = state => ({ ...state[storeName] });
6
-
7
- export const welcomePageContextSelector = createSelector(
8
- commonComponentsSelector,
9
- commonComponents => ({
3
+ export const commonComponentsSelector = state => (Object.assign({}, state[storeName]));
4
+ export const welcomePageContextSelector = createSelector(commonComponentsSelector, commonComponents => ({
10
5
  fields: commonComponents.optionalFields.fields,
11
6
  extended_profile: commonComponents.optionalFields.extended_profile,
12
7
  nextUrl: commonComponents.thirdPartyAuthContext.welcomePageRedirectUrl,
13
- }),
14
- );
8
+ }));
9
+ //# sourceMappingURL=selectors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectors.js","sourceRoot":"","sources":["../../../src/progressive-profiling/data/selectors.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC;AAE5C,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC,EAAE,CAAC,mBAAM,KAAK,CAAC,SAAS,CAAC,EAAG,CAAC;AAE3E,MAAM,CAAC,MAAM,0BAA0B,GAAG,cAAc,CACtD,wBAAwB,EACxB,gBAAgB,CAAC,EAAE,CAAC,CAAC;IACnB,MAAM,EAAE,gBAAgB,CAAC,cAAc,CAAC,MAAM;IAC9C,gBAAgB,EAAE,gBAAgB,CAAC,cAAc,CAAC,gBAAgB;IAClE,OAAO,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,sBAAsB;CACvE,CAAC,CACH,CAAC","sourcesContent":["import { createSelector } from 'reselect';\n\nexport const storeName = 'commonComponents';\n\nexport const commonComponentsSelector = state => ({ ...state[storeName] });\n\nexport const welcomePageContextSelector = createSelector(\n commonComponentsSelector,\n commonComponents => ({\n fields: commonComponents.optionalFields.fields,\n extended_profile: commonComponents.optionalFields.extended_profile,\n nextUrl: commonComponents.thirdPartyAuthContext.welcomePageRedirectUrl,\n }),\n);\n"]}
@@ -0,0 +1 @@
1
+ export function patchAccount(username: any, commitValues: any): Promise<void>;
@@ -0,0 +1,23 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { getAuthenticatedHttpClient, getSiteConfig } from '@openedx/frontend-base';
11
+ export function patchAccount(username, commitValues) {
12
+ return __awaiter(this, void 0, void 0, function* () {
13
+ const requestConfig = {
14
+ headers: { 'Content-Type': 'application/merge-patch+json' },
15
+ };
16
+ yield getAuthenticatedHttpClient()
17
+ .patch(`${getSiteConfig().lmsBaseUrl}/api/user/v1/accounts/${username}`, commitValues, requestConfig)
18
+ .catch((error) => {
19
+ throw (error);
20
+ });
21
+ });
22
+ }
23
+ //# sourceMappingURL=service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/progressive-profiling/data/service.js"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,0BAA0B,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEnF,MAAM,UAAgB,YAAY,CAAC,QAAQ,EAAE,YAAY;;QACvD,MAAM,aAAa,GAAG;YACpB,OAAO,EAAE,EAAE,cAAc,EAAE,8BAA8B,EAAE;SAC5D,CAAC;QAEF,MAAM,0BAA0B,EAAE;aAC/B,KAAK,CACJ,GAAG,aAAa,EAAE,CAAC,UAAU,yBAAyB,QAAQ,EAAE,EAChE,YAAY,EACZ,aAAa,CACd;aACA,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;YACf,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACP,CAAC;CAAA","sourcesContent":["import { getAuthenticatedHttpClient, getSiteConfig } from '@openedx/frontend-base';\n\nexport async function patchAccount(username, commitValues) {\n const requestConfig = {\n headers: { 'Content-Type': 'application/merge-patch+json' },\n };\n\n await getAuthenticatedHttpClient()\n .patch(\n `${getSiteConfig().lmsBaseUrl}/api/user/v1/accounts/${username}`,\n commitValues,\n requestConfig,\n )\n .catch((error) => {\n throw (error);\n });\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export const storeName: "welcomePage";
2
+ export { default as ProgressiveProfiling } from "./ProgressiveProfiling";
3
+ export { default as reducer } from "./data/reducers";
4
+ export { default as saga } from "./data/sagas";
@@ -1,5 +1,5 @@
1
1
  export const storeName = 'welcomePage';
2
-
3
2
  export { default as ProgressiveProfiling } from './ProgressiveProfiling';
4
3
  export { default as reducer } from './data/reducers';
5
4
  export { default as saga } from './data/sagas';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/progressive-profiling/index.js"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CAAC;AAEvC,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export const storeName = 'welcomePage';\n\nexport { default as ProgressiveProfiling } from './ProgressiveProfiling';\nexport { default as reducer } from './data/reducers';\nexport { default as saga } from './data/sagas';\n"]}
@@ -0,0 +1,53 @@
1
+ export default messages;
2
+ declare const messages: {
3
+ 'progressive.profiling.page.title': {
4
+ id: string;
5
+ defaultMessage: string;
6
+ description: string;
7
+ };
8
+ 'progressive.profiling.page.heading': {
9
+ id: string;
10
+ defaultMessage: string;
11
+ description: string;
12
+ };
13
+ 'optional.fields.information.link': {
14
+ id: string;
15
+ defaultMessage: string;
16
+ description: string;
17
+ };
18
+ 'optional.fields.submit.button': {
19
+ id: string;
20
+ defaultMessage: string;
21
+ description: string;
22
+ };
23
+ 'optional.fields.skip.button': {
24
+ id: string;
25
+ defaultMessage: string;
26
+ description: string;
27
+ };
28
+ 'continue.to.platform': {
29
+ id: string;
30
+ defaultMessage: string;
31
+ description: string;
32
+ };
33
+ 'modal.title': {
34
+ id: string;
35
+ defaultMessage: string;
36
+ description: string;
37
+ };
38
+ 'modal.description': {
39
+ id: string;
40
+ defaultMessage: string;
41
+ description: string;
42
+ };
43
+ 'welcome.page.error.heading': {
44
+ id: string;
45
+ defaultMessage: string;
46
+ description: string;
47
+ };
48
+ 'welcome.page.error.message': {
49
+ id: string;
50
+ defaultMessage: string;
51
+ description: string;
52
+ };
53
+ };
@@ -0,0 +1,57 @@
1
+ import { defineMessages } from '@openedx/frontend-base';
2
+ const messages = defineMessages({
3
+ 'progressive.profiling.page.title': {
4
+ id: 'progressive.profiling.page.title',
5
+ defaultMessage: 'Welcome | {siteName}',
6
+ description: 'progressive profiling page title',
7
+ },
8
+ 'progressive.profiling.page.heading': {
9
+ id: 'progressive.profiling.page.heading',
10
+ defaultMessage: 'A few questions for you will help us get smarter.',
11
+ description: 'The page heading for the progressive profiling page.',
12
+ },
13
+ 'optional.fields.information.link': {
14
+ id: 'optional.fields.information.link',
15
+ defaultMessage: 'Learn more about how we use this information.',
16
+ description: 'Optional fields page information link',
17
+ },
18
+ 'optional.fields.submit.button': {
19
+ id: 'optional.fields.submit.button',
20
+ defaultMessage: 'Submit',
21
+ description: 'Submit button text',
22
+ },
23
+ 'optional.fields.skip.button': {
24
+ id: 'optional.fields.skip.button',
25
+ defaultMessage: 'Skip for now',
26
+ description: 'Skip button text',
27
+ },
28
+ // modal dialog box
29
+ 'continue.to.platform': {
30
+ id: 'continue.to.platform',
31
+ defaultMessage: 'Continue to {platformName}',
32
+ description: 'Button text for modal when user chooses "skip for now" option',
33
+ },
34
+ 'modal.title': {
35
+ id: 'modal.title',
36
+ defaultMessage: 'Thanks for letting us know.',
37
+ description: 'Heading for welcome page modal',
38
+ },
39
+ 'modal.description': {
40
+ id: 'modal.description',
41
+ defaultMessage: 'You can complete your profile in settings at any time if you change your mind.',
42
+ description: 'Modal body text',
43
+ },
44
+ // error message
45
+ 'welcome.page.error.heading': {
46
+ id: 'welcome.page.error.heading',
47
+ defaultMessage: 'We couldn\'t update your profile',
48
+ description: 'Error message heading',
49
+ },
50
+ 'welcome.page.error.message': {
51
+ id: 'welcome.page.error.message',
52
+ defaultMessage: 'An error occurred. You can complete your profile in settings at any time.',
53
+ description: 'Error message body',
54
+ },
55
+ });
56
+ export default messages;
57
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/progressive-profiling/messages.jsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,kCAAkC,EAAE;QAClC,EAAE,EAAE,kCAAkC;QACtC,cAAc,EAAE,sBAAsB;QACtC,WAAW,EAAE,kCAAkC;KAChD;IACD,oCAAoC,EAAE;QACpC,EAAE,EAAE,oCAAoC;QACxC,cAAc,EAAE,mDAAmD;QACnE,WAAW,EAAE,sDAAsD;KACpE;IACD,kCAAkC,EAAE;QAClC,EAAE,EAAE,kCAAkC;QACtC,cAAc,EAAE,+CAA+C;QAC/D,WAAW,EAAE,uCAAuC;KACrD;IACD,+BAA+B,EAAE;QAC/B,EAAE,EAAE,+BAA+B;QACnC,cAAc,EAAE,QAAQ;QACxB,WAAW,EAAE,oBAAoB;KAClC;IACD,6BAA6B,EAAE;QAC7B,EAAE,EAAE,6BAA6B;QACjC,cAAc,EAAE,cAAc;QAC9B,WAAW,EAAE,kBAAkB;KAChC;IACD,mBAAmB;IACnB,sBAAsB,EAAE;QACtB,EAAE,EAAE,sBAAsB;QAC1B,cAAc,EAAE,4BAA4B;QAC5C,WAAW,EAAE,+DAA+D;KAC7E;IACD,aAAa,EAAE;QACb,EAAE,EAAE,aAAa;QACjB,cAAc,EAAE,6BAA6B;QAC7C,WAAW,EAAE,gCAAgC;KAC9C;IACD,mBAAmB,EAAE;QACnB,EAAE,EAAE,mBAAmB;QACvB,cAAc,EAAE,gFAAgF;QAChG,WAAW,EAAE,iBAAiB;KAC/B;IACD,gBAAgB;IAChB,4BAA4B,EAAE;QAC5B,EAAE,EAAE,4BAA4B;QAChC,cAAc,EAAE,kCAAkC;QAClD,WAAW,EAAE,uBAAuB;KACrC;IACD,4BAA4B,EAAE;QAC5B,EAAE,EAAE,4BAA4B;QAChC,cAAc,EAAE,2EAA2E;QAC3F,WAAW,EAAE,oBAAoB;KAClC;CACF,CAAC,CAAC;AACH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n 'progressive.profiling.page.title': {\n id: 'progressive.profiling.page.title',\n defaultMessage: 'Welcome | {siteName}',\n description: 'progressive profiling page title',\n },\n 'progressive.profiling.page.heading': {\n id: 'progressive.profiling.page.heading',\n defaultMessage: 'A few questions for you will help us get smarter.',\n description: 'The page heading for the progressive profiling page.',\n },\n 'optional.fields.information.link': {\n id: 'optional.fields.information.link',\n defaultMessage: 'Learn more about how we use this information.',\n description: 'Optional fields page information link',\n },\n 'optional.fields.submit.button': {\n id: 'optional.fields.submit.button',\n defaultMessage: 'Submit',\n description: 'Submit button text',\n },\n 'optional.fields.skip.button': {\n id: 'optional.fields.skip.button',\n defaultMessage: 'Skip for now',\n description: 'Skip button text',\n },\n // modal dialog box\n 'continue.to.platform': {\n id: 'continue.to.platform',\n defaultMessage: 'Continue to {platformName}',\n description: 'Button text for modal when user chooses \"skip for now\" option',\n },\n 'modal.title': {\n id: 'modal.title',\n defaultMessage: 'Thanks for letting us know.',\n description: 'Heading for welcome page modal',\n },\n 'modal.description': {\n id: 'modal.description',\n defaultMessage: 'You can complete your profile in settings at any time if you change your mind.',\n description: 'Modal body text',\n },\n // error message\n 'welcome.page.error.heading': {\n id: 'welcome.page.error.heading',\n defaultMessage: 'We couldn\\'t update your profile',\n description: 'Error message heading',\n },\n 'welcome.page.error.message': {\n id: 'welcome.page.error.message',\n defaultMessage: 'An error occurred. You can complete your profile in settings at any time.',\n description: 'Error message body',\n },\n});\nexport default messages;\n"]}
@@ -0,0 +1,38 @@
1
+ export default CountryField;
2
+ /**
3
+ * Country field wrapper. It accepts following handlers
4
+ * - handleChange for setting value change and
5
+ * - handleErrorChange for setting error
6
+ *
7
+ * It is responsible for
8
+ * - Auto populating country field if backendCountryCode is available in redux
9
+ * - Performing country field validations
10
+ * - clearing error on focus
11
+ * - setting value on change and selection
12
+ */
13
+ declare function CountryField(props: any): import("react/jsx-runtime").JSX.Element;
14
+ declare namespace CountryField {
15
+ namespace propTypes {
16
+ let countryList: PropTypes.Validator<(PropTypes.InferProps<{
17
+ code: PropTypes.Requireable<string>;
18
+ name: PropTypes.Requireable<string>;
19
+ }> | null | undefined)[]>;
20
+ let errorMessage: PropTypes.Requireable<string>;
21
+ let onChangeHandler: PropTypes.Validator<(...args: any[]) => any>;
22
+ let handleErrorChange: PropTypes.Validator<(...args: any[]) => any>;
23
+ let onFocusHandler: PropTypes.Validator<(...args: any[]) => any>;
24
+ let selectedCountry: PropTypes.Requireable<PropTypes.InferProps<{
25
+ displayValue: PropTypes.Requireable<string>;
26
+ countryCode: PropTypes.Requireable<string>;
27
+ }>>;
28
+ }
29
+ namespace defaultProps {
30
+ let errorMessage_1: null;
31
+ export { errorMessage_1 as errorMessage };
32
+ export namespace selectedCountry_1 {
33
+ let value: string;
34
+ }
35
+ export { selectedCountry_1 as selectedCountry };
36
+ }
37
+ }
38
+ import PropTypes from 'prop-types';
@@ -0,0 +1,95 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect } from 'react';
3
+ import { useDispatch, useSelector } from 'react-redux';
4
+ import { useIntl } from '@openedx/frontend-base';
5
+ import { FormAutosuggest, FormAutosuggestOption, FormControlFeedback } from '@openedx/paragon';
6
+ import classNames from 'classnames';
7
+ import PropTypes from 'prop-types';
8
+ import { clearRegistrationBackendError } from '../../data/actions';
9
+ import messages from '../../messages';
10
+ import validateCountryField, { COUNTRY_CODE_KEY, COUNTRY_DISPLAY_KEY } from './validator';
11
+ /**
12
+ * Country field wrapper. It accepts following handlers
13
+ * - handleChange for setting value change and
14
+ * - handleErrorChange for setting error
15
+ *
16
+ * It is responsible for
17
+ * - Auto populating country field if backendCountryCode is available in redux
18
+ * - Performing country field validations
19
+ * - clearing error on focus
20
+ * - setting value on change and selection
21
+ */
22
+ const CountryField = (props) => {
23
+ const { countryList, selectedCountry, onChangeHandler, handleErrorChange, onFocusHandler, } = props;
24
+ const { formatMessage } = useIntl();
25
+ const dispatch = useDispatch();
26
+ const countryFieldValue = {
27
+ userProvidedText: selectedCountry.displayValue,
28
+ selectionValue: selectedCountry.displayValue,
29
+ selectionId: selectedCountry.countryCode,
30
+ };
31
+ const backendCountryCode = useSelector(state => state.register.backendCountryCode);
32
+ useEffect(() => {
33
+ if (backendCountryCode && backendCountryCode !== (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.countryCode)) {
34
+ let countryCode = '';
35
+ let countryDisplayValue = '';
36
+ const countryVal = countryList.find((country) => (country[COUNTRY_CODE_KEY].toLowerCase() === backendCountryCode.toLowerCase()));
37
+ if (countryVal) {
38
+ countryCode = countryVal[COUNTRY_CODE_KEY];
39
+ countryDisplayValue = countryVal[COUNTRY_DISPLAY_KEY];
40
+ }
41
+ onChangeHandler({ target: { name: 'country' } }, { countryCode, displayValue: countryDisplayValue });
42
+ }
43
+ else if (!selectedCountry.displayValue) {
44
+ onChangeHandler({ target: { name: 'country' } }, { countryCode: '', displayValue: '' });
45
+ }
46
+ }, [backendCountryCode, countryList]); // eslint-disable-line react-hooks/exhaustive-deps
47
+ const handleOnBlur = (event) => {
48
+ // Do not run validations when drop-down arrow is clicked
49
+ if (event.relatedTarget && event.relatedTarget.className.includes('pgn__form-autosuggest__icon-button')) {
50
+ return;
51
+ }
52
+ const { value } = event.target;
53
+ const { error } = validateCountryField(value.trim(), countryList, formatMessage(messages['empty.country.field.error']), formatMessage(messages['invalid.country.field.error']));
54
+ handleErrorChange('country', error);
55
+ };
56
+ const handleOnFocus = (event) => {
57
+ handleErrorChange('country', '');
58
+ dispatch(clearRegistrationBackendError('country'));
59
+ onFocusHandler(event);
60
+ };
61
+ const handleOnChange = (value) => {
62
+ onChangeHandler({ target: { name: 'country' } }, { countryCode: value.selectionId, displayValue: value.userProvidedText });
63
+ // We have put this check because proviously we also had onSelected event handler and we call
64
+ // the onBlur on that event handler but now there is no such handler and we only have
65
+ // onChange so we check the is there is proper sectionId which only be
66
+ // proper one when we select it from dropdown's item otherwise its null.
67
+ if (value.selectionId !== '') {
68
+ handleOnBlur({ target: { name: 'country', value: value.userProvidedText } });
69
+ }
70
+ };
71
+ const getCountryList = () => countryList.map((country) => (_jsx(FormAutosuggestOption, { id: country[COUNTRY_CODE_KEY], children: country[COUNTRY_DISPLAY_KEY] }, country[COUNTRY_DISPLAY_KEY])));
72
+ return (_jsxs("div", { className: "mb-4", children: [_jsx(FormAutosuggest, { floatingLabel: formatMessage(messages['registration.country.label']), "aria-label": "form autosuggest", name: "country", value: countryFieldValue || {}, className: classNames({ 'form-field-error': props.errorMessage }), onFocus: (e) => handleOnFocus(e), onBlur: (e) => handleOnBlur(e), onChange: (value) => handleOnChange(value), children: getCountryList() }), props.errorMessage !== '' && (_jsx(FormControlFeedback, { className: "form-text-size", hasIcon: false, "feedback-for": "country", type: "invalid", children: props.errorMessage }, "error"))] }));
73
+ };
74
+ CountryField.propTypes = {
75
+ countryList: PropTypes.arrayOf(PropTypes.shape({
76
+ code: PropTypes.string,
77
+ name: PropTypes.string,
78
+ })).isRequired,
79
+ errorMessage: PropTypes.string,
80
+ onChangeHandler: PropTypes.func.isRequired,
81
+ handleErrorChange: PropTypes.func.isRequired,
82
+ onFocusHandler: PropTypes.func.isRequired,
83
+ selectedCountry: PropTypes.shape({
84
+ displayValue: PropTypes.string,
85
+ countryCode: PropTypes.string,
86
+ }),
87
+ };
88
+ CountryField.defaultProps = {
89
+ errorMessage: null,
90
+ selectedCountry: {
91
+ value: '',
92
+ },
93
+ };
94
+ export default CountryField;
95
+ //# sourceMappingURL=CountryField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CountryField.js","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CAAC","sourcesContent":["import { useEffect } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { useIntl } from '@openedx/frontend-base';\nimport { FormAutosuggest, FormAutosuggestOption, FormControlFeedback } from '@openedx/paragon';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\nimport { clearRegistrationBackendError } from '../../data/actions';\nimport messages from '../../messages';\nimport validateCountryField, { COUNTRY_CODE_KEY, COUNTRY_DISPLAY_KEY } from './validator';\n\n/**\n * Country field wrapper. It accepts following handlers\n * - handleChange for setting value change and\n * - handleErrorChange for setting error\n *\n * It is responsible for\n * - Auto populating country field if backendCountryCode is available in redux\n * - Performing country field validations\n * - clearing error on focus\n * - setting value on change and selection\n */\nconst CountryField = (props) => {\n const {\n countryList,\n selectedCountry,\n onChangeHandler,\n handleErrorChange,\n onFocusHandler,\n } = props;\n const { formatMessage } = useIntl();\n const dispatch = useDispatch();\n\n const countryFieldValue = {\n userProvidedText: selectedCountry.displayValue,\n selectionValue: selectedCountry.displayValue,\n selectionId: selectedCountry.countryCode,\n };\n\n const backendCountryCode = useSelector(state => state.register.backendCountryCode);\n\n useEffect(() => {\n if (backendCountryCode && backendCountryCode !== selectedCountry?.countryCode) {\n let countryCode = '';\n let countryDisplayValue = '';\n\n const countryVal = countryList.find(\n (country) => (country[COUNTRY_CODE_KEY].toLowerCase() === backendCountryCode.toLowerCase()),\n );\n if (countryVal) {\n countryCode = countryVal[COUNTRY_CODE_KEY];\n countryDisplayValue = countryVal[COUNTRY_DISPLAY_KEY];\n }\n onChangeHandler(\n { target: { name: 'country' } },\n { countryCode, displayValue: countryDisplayValue },\n );\n } else if (!selectedCountry.displayValue) {\n onChangeHandler(\n { target: { name: 'country' } },\n { countryCode: '', displayValue: '' },\n );\n }\n }, [backendCountryCode, countryList]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleOnBlur = (event) => {\n // Do not run validations when drop-down arrow is clicked\n if (event.relatedTarget && event.relatedTarget.className.includes('pgn__form-autosuggest__icon-button')) {\n return;\n }\n\n const { value } = event.target;\n\n const { error } = validateCountryField(\n value.trim(),\n countryList,\n formatMessage(messages['empty.country.field.error']),\n formatMessage(messages['invalid.country.field.error'])\n );\n handleErrorChange('country', error);\n };\n\n const handleOnFocus = (event) => {\n handleErrorChange('country', '');\n dispatch(clearRegistrationBackendError('country'));\n onFocusHandler(event);\n };\n\n const handleOnChange = (value) => {\n onChangeHandler(\n { target: { name: 'country' } },\n { countryCode: value.selectionId, displayValue: value.userProvidedText }\n );\n\n // We have put this check because proviously we also had onSelected event handler and we call\n // the onBlur on that event handler but now there is no such handler and we only have\n // onChange so we check the is there is proper sectionId which only be\n // proper one when we select it from dropdown's item otherwise its null.\n if (value.selectionId !== '') {\n handleOnBlur({ target: { name: 'country', value: value.userProvidedText } });\n }\n };\n\n const getCountryList = () => countryList.map((country) => (\n <FormAutosuggestOption key={country[COUNTRY_DISPLAY_KEY]} id={country[COUNTRY_CODE_KEY]}>\n {country[COUNTRY_DISPLAY_KEY]}\n </FormAutosuggestOption>\n ));\n\n return (\n <div className=\"mb-4\">\n <FormAutosuggest\n floatingLabel={formatMessage(messages['registration.country.label'])}\n aria-label=\"form autosuggest\"\n name=\"country\"\n value={countryFieldValue || {}}\n className={classNames({ 'form-field-error': props.errorMessage })}\n onFocus={(e) => handleOnFocus(e)}\n onBlur={(e) => handleOnBlur(e)}\n onChange={(value) => handleOnChange(value)}\n >\n {getCountryList()}\n </FormAutosuggest>\n {props.errorMessage !== '' && (\n <FormControlFeedback\n key=\"error\"\n className=\"form-text-size\"\n hasIcon={false}\n feedback-for=\"country\"\n type=\"invalid\"\n >\n {props.errorMessage}\n </FormControlFeedback>\n )}\n </div>\n );\n};\n\nCountryField.propTypes = {\n countryList: PropTypes.arrayOf(\n PropTypes.shape({\n code: PropTypes.string,\n name: PropTypes.string,\n }),\n ).isRequired,\n errorMessage: PropTypes.string,\n onChangeHandler: PropTypes.func.isRequired,\n handleErrorChange: PropTypes.func.isRequired,\n onFocusHandler: PropTypes.func.isRequired,\n selectedCountry: PropTypes.shape({\n displayValue: PropTypes.string,\n countryCode: PropTypes.string,\n }),\n};\n\nCountryField.defaultProps = {\n errorMessage: null,\n selectedCountry: {\n value: '',\n },\n};\n\nexport default CountryField;\n"]}
@@ -0,0 +1,8 @@
1
+ export const COUNTRY_CODE_KEY: "code";
2
+ export const COUNTRY_DISPLAY_KEY: "name";
3
+ export default validateCountryField;
4
+ declare function validateCountryField(value: any, countryList: any, emptyErrorMessage: any, invalidCountryErrorMessage: any): {
5
+ error: string;
6
+ countryCode: string;
7
+ displayValue: any;
8
+ };
@@ -0,0 +1,29 @@
1
+ export const COUNTRY_CODE_KEY = 'code';
2
+ export const COUNTRY_DISPLAY_KEY = 'name';
3
+ const validateCountryField = (value, countryList, emptyErrorMessage, invalidCountryErrorMessage) => {
4
+ let countryCode = '';
5
+ let displayValue = value;
6
+ let error = '';
7
+ if (value) {
8
+ const normalizedValue = value.toLowerCase();
9
+ // Handling a case here where user enters a valid country code that needs to be
10
+ // evaluated and set its value as a valid value.
11
+ const selectedCountry = countryList.find((country) => (
12
+ // When translations are applied, extra space added in country value, so we should trim that.
13
+ country[COUNTRY_DISPLAY_KEY].toLowerCase().trim() === normalizedValue
14
+ || country[COUNTRY_CODE_KEY].toLowerCase().trim() === normalizedValue));
15
+ if (selectedCountry) {
16
+ countryCode = selectedCountry[COUNTRY_CODE_KEY];
17
+ displayValue = selectedCountry[COUNTRY_DISPLAY_KEY];
18
+ }
19
+ else {
20
+ error = invalidCountryErrorMessage;
21
+ }
22
+ }
23
+ else {
24
+ error = emptyErrorMessage;
25
+ }
26
+ return { error, countryCode, displayValue };
27
+ };
28
+ export default validateCountryField;
29
+ //# sourceMappingURL=validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validator.js","sourceRoot":"","sources":["../../../../src/register/RegistrationFields/CountryField/validator.js"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AACvC,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAE1C,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,EAAE;IACjG,IAAI,WAAW,GAAG,EAAE,CAAC;IACrB,IAAI,YAAY,GAAG,KAAK,CAAC;IACzB,IAAI,KAAK,GAAG,EAAE,CAAC;IAEf,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;QAC5C,+EAA+E;QAC/E,gDAAgD;QAChD,MAAM,eAAe,GAAG,WAAW,CAAC,IAAI,CACtC,CAAC,OAAO,EAAE,EAAE,CAAC;QACX,6FAA6F;QAC7F,OAAO,CAAC,mBAAmB,CAAC,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,eAAe;eAClE,OAAO,CAAC,gBAAgB,CAAC,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,eAAe,CACtE,CACF,CAAC;QACF,IAAI,eAAe,EAAE,CAAC;YACpB,WAAW,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC;YAChD,YAAY,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;QACtD,CAAC;aAAM,CAAC;YACN,KAAK,GAAG,0BAA0B,CAAC;QACrC,CAAC;IACH,CAAC;SAAM,CAAC;QACN,KAAK,GAAG,iBAAiB,CAAC;IAC5B,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AAC9C,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["export const COUNTRY_CODE_KEY = 'code';\nexport const COUNTRY_DISPLAY_KEY = 'name';\n\nconst validateCountryField = (value, countryList, emptyErrorMessage, invalidCountryErrorMessage) => {\n let countryCode = '';\n let displayValue = value;\n let error = '';\n\n if (value) {\n const normalizedValue = value.toLowerCase();\n // Handling a case here where user enters a valid country code that needs to be\n // evaluated and set its value as a valid value.\n const selectedCountry = countryList.find(\n (country) => (\n // When translations are applied, extra space added in country value, so we should trim that.\n country[COUNTRY_DISPLAY_KEY].toLowerCase().trim() === normalizedValue\n || country[COUNTRY_CODE_KEY].toLowerCase().trim() === normalizedValue\n ),\n );\n if (selectedCountry) {\n countryCode = selectedCountry[COUNTRY_CODE_KEY];\n displayValue = selectedCountry[COUNTRY_DISPLAY_KEY];\n } else {\n error = invalidCountryErrorMessage;\n }\n } else {\n error = emptyErrorMessage;\n }\n return { error, countryCode, displayValue };\n};\n\nexport default validateCountryField;\n"]}
@@ -0,0 +1,30 @@
1
+ export default EmailField;
2
+ /**
3
+ * Email field wrapper. It accepts following handlers
4
+ * - handleChange for setting value change and
5
+ * - handleErrorChange for setting error
6
+ *
7
+ * It is responsible for
8
+ * - Generating email warning and error suggestions
9
+ * - Setting and clearing email suggestions
10
+ * - Performing email field validations
11
+ * - clearing error on focus
12
+ * - setting value on change
13
+ */
14
+ declare function EmailField(props: any): import("react/jsx-runtime").JSX.Element;
15
+ declare namespace EmailField {
16
+ namespace defaultProps {
17
+ let errorMessage: string;
18
+ let confirmEmailValue: null;
19
+ }
20
+ namespace propTypes {
21
+ let errorMessage_1: PropTypes.Requireable<string>;
22
+ export { errorMessage_1 as errorMessage };
23
+ export let value: PropTypes.Validator<string>;
24
+ export let handleChange: PropTypes.Validator<(...args: any[]) => any>;
25
+ export let handleErrorChange: PropTypes.Validator<(...args: any[]) => any>;
26
+ let confirmEmailValue_1: PropTypes.Requireable<string>;
27
+ export { confirmEmailValue_1 as confirmEmailValue };
28
+ }
29
+ }
30
+ import PropTypes from 'prop-types';
@@ -0,0 +1,80 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
3
+ import { useDispatch, useSelector } from 'react-redux';
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
+ import { FormGroup } from '../../../common-components';
9
+ import { clearRegistrationBackendError, fetchRealtimeValidations, setEmailSuggestionInStore, } from '../../data/actions';
10
+ import messages from '../../messages';
11
+ import validateEmail from './validator';
12
+ /**
13
+ * Email field wrapper. It accepts following handlers
14
+ * - handleChange for setting value change and
15
+ * - handleErrorChange for setting error
16
+ *
17
+ * It is responsible for
18
+ * - Generating email warning and error suggestions
19
+ * - Setting and clearing email suggestions
20
+ * - Performing email field validations
21
+ * - clearing error on focus
22
+ * - setting value on change
23
+ */
24
+ const EmailField = (props) => {
25
+ const { formatMessage } = useIntl();
26
+ const dispatch = useDispatch();
27
+ const { handleChange, handleErrorChange, confirmEmailValue, } = props;
28
+ const backedUpFormData = useSelector(state => state.register.registrationFormData);
29
+ const validationApiRateLimited = useSelector(state => state.register.validationApiRateLimited);
30
+ const [emailSuggestion, setEmailSuggestion] = useState(Object.assign({}, backedUpFormData === null || backedUpFormData === void 0 ? void 0 : backedUpFormData.emailSuggestion));
31
+ useEffect(() => {
32
+ setEmailSuggestion(backedUpFormData.emailSuggestion);
33
+ }, [backedUpFormData.emailSuggestion]);
34
+ const handleOnBlur = (e) => {
35
+ const { value } = e.target;
36
+ const { fieldError, confirmEmailError, suggestion } = validateEmail(value, confirmEmailValue, formatMessage);
37
+ if (confirmEmailError) {
38
+ handleErrorChange('confirm_email', confirmEmailError);
39
+ }
40
+ dispatch(setEmailSuggestionInStore(suggestion));
41
+ setEmailSuggestion(suggestion);
42
+ if (fieldError) {
43
+ handleErrorChange('email', fieldError);
44
+ }
45
+ else if (!validationApiRateLimited) {
46
+ dispatch(fetchRealtimeValidations({ email: value }));
47
+ }
48
+ };
49
+ const handleOnFocus = () => {
50
+ handleErrorChange('email', '');
51
+ dispatch(clearRegistrationBackendError('email'));
52
+ };
53
+ const handleSuggestionClick = (event) => {
54
+ event.preventDefault();
55
+ handleErrorChange('email', '');
56
+ handleChange({ target: { name: 'email', value: emailSuggestion.suggestion } });
57
+ setEmailSuggestion({ suggestion: '', type: '' });
58
+ };
59
+ const handleSuggestionClosed = () => setEmailSuggestion({ suggestion: '', type: '' });
60
+ const renderEmailFeedback = () => {
61
+ if (emailSuggestion.type === 'error') {
62
+ return (_jsx(Alert, { variant: "danger", className: "email-suggestion-alert-error mt-1", icon: Error, children: _jsxs("span", { className: "email-suggestion__text", children: [formatMessage(messages['did.you.mean.alert.text']), ' ', _jsx(Alert.Link, { href: "#", name: "email", onClick: handleSuggestionClick, children: emailSuggestion.suggestion }), "?", _jsx(Icon, { src: Close, className: "email-suggestion__close", onClick: handleSuggestionClosed, tabIndex: "0" })] }) }));
63
+ }
64
+ return (_jsxs("span", { id: "email-warning", className: "small", children: [formatMessage(messages['did.you.mean.alert.text']), ":", ' ', _jsx(Alert.Link, { href: "#", name: "email", className: "email-suggestion-alert-warning", onClick: handleSuggestionClick, children: emailSuggestion.suggestion }), "?"] }));
65
+ };
66
+ return (_jsx(FormGroup, Object.assign({ borderClass: emailSuggestion.type === 'warning' ? 'yellow-border' : '', maxLength: 254 }, props, { handleBlur: handleOnBlur, handleFocus: handleOnFocus, children: emailSuggestion.suggestion ? renderEmailFeedback() : null })));
67
+ };
68
+ EmailField.defaultProps = {
69
+ errorMessage: '',
70
+ confirmEmailValue: null,
71
+ };
72
+ EmailField.propTypes = {
73
+ errorMessage: PropTypes.string,
74
+ value: PropTypes.string.isRequired,
75
+ handleChange: PropTypes.func.isRequired,
76
+ handleErrorChange: PropTypes.func.isRequired,
77
+ confirmEmailValue: PropTypes.string,
78
+ };
79
+ export default EmailField;
80
+ //# sourceMappingURL=EmailField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmailField.js","sourceRoot":"","sources":["../../../../src/register/RegistrationFields/EmailField/EmailField.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD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AC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,YAAY,GAAG;IACxB,YAAY,EAAE,EAAE;IAChB,iBAAiB,EAAE,IAAI;CACxB,CAAC;AAEF,UAAU,CAAC,SAAS,GAAG;IACrB,YAAY,EAAE,SAAS,CAAC,MAAM;IAC9B,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IAClC,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACvC,iBAAiB,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IAC5C,iBAAiB,EAAE,SAAS,CAAC,MAAM;CACpC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { useIntl } from '@openedx/frontend-base';\nimport { Alert, Icon } from '@openedx/paragon';\nimport { Close, Error } from '@openedx/paragon/icons';\nimport PropTypes from 'prop-types';\n\nimport { FormGroup } from '../../../common-components';\nimport {\n clearRegistrationBackendError,\n fetchRealtimeValidations,\n setEmailSuggestionInStore,\n} from '../../data/actions';\nimport messages from '../../messages';\nimport validateEmail from './validator';\n\n/**\n * Email field wrapper. It accepts following handlers\n * - handleChange for setting value change and\n * - handleErrorChange for setting error\n *\n * It is responsible for\n * - Generating email warning and error suggestions\n * - Setting and clearing email suggestions\n * - Performing email field validations\n * - clearing error on focus\n * - setting value on change\n */\nconst EmailField = (props) => {\n const { formatMessage } = useIntl();\n const dispatch = useDispatch();\n\n const {\n handleChange,\n handleErrorChange,\n confirmEmailValue,\n } = props;\n\n const backedUpFormData = useSelector(state => state.register.registrationFormData);\n const validationApiRateLimited = useSelector(state => state.register.validationApiRateLimited);\n\n const [emailSuggestion, setEmailSuggestion] = useState({ ...backedUpFormData?.emailSuggestion });\n\n useEffect(() => {\n setEmailSuggestion(backedUpFormData.emailSuggestion);\n }, [backedUpFormData.emailSuggestion]);\n\n const handleOnBlur = (e) => {\n const { value } = e.target;\n const { fieldError, confirmEmailError, suggestion } = validateEmail(value, confirmEmailValue, formatMessage);\n\n if (confirmEmailError) {\n handleErrorChange('confirm_email', confirmEmailError);\n }\n\n dispatch(setEmailSuggestionInStore(suggestion));\n setEmailSuggestion(suggestion);\n\n if (fieldError) {\n handleErrorChange('email', fieldError);\n } else if (!validationApiRateLimited) {\n dispatch(fetchRealtimeValidations({ email: value }));\n }\n };\n\n const handleOnFocus = () => {\n handleErrorChange('email', '');\n dispatch(clearRegistrationBackendError('email'));\n };\n\n const handleSuggestionClick = (event) => {\n event.preventDefault();\n handleErrorChange('email', '');\n handleChange({ target: { name: 'email', value: emailSuggestion.suggestion } });\n setEmailSuggestion({ suggestion: '', type: '' });\n };\n\n const handleSuggestionClosed = () => setEmailSuggestion({ suggestion: '', type: '' });\n\n const renderEmailFeedback = () => {\n if (emailSuggestion.type === 'error') {\n return (\n <Alert variant=\"danger\" className=\"email-suggestion-alert-error mt-1\" icon={Error}>\n <span className=\"email-suggestion__text\">\n {formatMessage(messages['did.you.mean.alert.text'])}{' '}\n <Alert.Link\n href=\"#\"\n name=\"email\"\n onClick={handleSuggestionClick}\n >\n {emailSuggestion.suggestion}\n </Alert.Link>?\n <Icon src={Close} className=\"email-suggestion__close\" onClick={handleSuggestionClosed} tabIndex=\"0\" />\n </span>\n </Alert>\n );\n }\n return (\n <span id=\"email-warning\" className=\"small\">\n {formatMessage(messages['did.you.mean.alert.text'])}:{' '}\n <Alert.Link\n href=\"#\"\n name=\"email\"\n className=\"email-suggestion-alert-warning\"\n onClick={handleSuggestionClick}\n >\n {emailSuggestion.suggestion}\n </Alert.Link>?\n </span>\n );\n };\n\n return (\n <FormGroup\n borderClass={emailSuggestion.type === 'warning' ? 'yellow-border' : ''}\n maxLength={254} // Limit per RFCs is 254\n {...props}\n handleBlur={handleOnBlur}\n handleFocus={handleOnFocus}\n >\n {emailSuggestion.suggestion ? renderEmailFeedback() : null}\n </FormGroup>\n );\n};\n\nEmailField.defaultProps = {\n errorMessage: '',\n confirmEmailValue: null,\n};\n\nEmailField.propTypes = {\n errorMessage: PropTypes.string,\n value: PropTypes.string.isRequired,\n handleChange: PropTypes.func.isRequired,\n handleErrorChange: PropTypes.func.isRequired,\n confirmEmailValue: PropTypes.string,\n};\n\nexport default EmailField;\n"]}
@@ -0,0 +1,3 @@
1
+ export const COMMON_EMAIL_PROVIDERS: string[];
2
+ export const DEFAULT_SERVICE_PROVIDER_DOMAINS: string[];
3
+ export const DEFAULT_TOP_LEVEL_DOMAINS: string[];