@openedx/frontend-app-authn 1.0.0-alpha.4 → 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 (506) 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/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/{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/{src → dist}/sass/_base_component.scss +57 -54
  362. package/{src → dist}/sass/_progressive_profiling_page.scss +1 -3
  363. package/{src → dist}/sass/_registration.scss +7 -8
  364. package/{src → dist}/sass/_style.scss +40 -43
  365. package/package.json +17 -6
  366. package/src/__mocks__/file.js +0 -1
  367. package/src/__mocks__/svg.js +0 -1
  368. package/src/app.scss +0 -6
  369. package/src/app.ts +0 -43
  370. package/src/base-container/components/default-layout/DefaultLayout.test.jsx +0 -48
  371. package/src/base-container/components/default-layout/LargeLayout.jsx +0 -42
  372. package/src/base-container/components/default-layout/MediumLayout.jsx +0 -49
  373. package/src/base-container/components/default-layout/SmallLayout.jsx +0 -37
  374. package/src/base-container/components/default-layout/messages.js +0 -16
  375. package/src/base-container/components/image-layout/ExtraSmallLayout.jsx +0 -31
  376. package/src/base-container/components/image-layout/LargeLayout.jsx +0 -32
  377. package/src/base-container/components/image-layout/MediumLayout.jsx +0 -32
  378. package/src/base-container/components/image-layout/SmallLayout.jsx +0 -31
  379. package/src/base-container/components/image-layout/messages.js +0 -16
  380. package/src/base-container/components/welcome-page-layout/LargeLayout.jsx +0 -46
  381. package/src/base-container/components/welcome-page-layout/MediumLayout.jsx +0 -49
  382. package/src/base-container/components/welcome-page-layout/SmallLayout.jsx +0 -38
  383. package/src/base-container/components/welcome-page-layout/messages.js +0 -21
  384. package/src/base-container/index.jsx +0 -70
  385. package/src/base-container/tests/BaseContainer.test.jsx +0 -44
  386. package/src/common-components/EnterpriseSSO.jsx +0 -110
  387. package/src/common-components/FormGroup.jsx +0 -106
  388. package/src/common-components/InstitutionLogistration.jsx +0 -102
  389. package/src/common-components/NotFoundPage.jsx +0 -15
  390. package/src/common-components/PasswordField.jsx +0 -175
  391. package/src/common-components/RedirectLogistration.jsx +0 -94
  392. package/src/common-components/RegisterFaIcons.jsx +0 -8
  393. package/src/common-components/SocialAuthProviders.jsx +0 -75
  394. package/src/common-components/ThirdPartyAuth.jsx +0 -123
  395. package/src/common-components/ThirdPartyAuthAlert.jsx +0 -49
  396. package/src/common-components/UnAuthOnlyRoute.jsx +0 -41
  397. package/src/common-components/data/reducers.js +0 -63
  398. package/src/common-components/data/sagas.js +0 -32
  399. package/src/common-components/data/selectors.js +0 -28
  400. package/src/common-components/data/service.js +0 -23
  401. package/src/common-components/data/tests/reducer.test.js +0 -82
  402. package/src/common-components/data/tests/sagas.test.js +0 -71
  403. package/src/common-components/messages.jsx +0 -127
  404. package/src/common-components/tests/EmbeddedRegistrationRoute.test.jsx +0 -76
  405. package/src/common-components/tests/FormField.test.jsx +0 -289
  406. package/src/common-components/tests/SocialAuthProviders.test.jsx +0 -75
  407. package/src/common-components/tests/ThirdPartyAuthAlert.test.jsx +0 -39
  408. package/src/common-components/tests/UnAuthOnlyRoute.test.jsx +0 -73
  409. package/src/common-components/tests/__snapshots__/SocialAuthProviders.test.jsx.snap +0 -156
  410. package/src/common-components/tests/__snapshots__/ThirdPartyAuthAlert.test.jsx.snap +0 -53
  411. package/src/data/oneTrust.js +0 -3
  412. package/src/data/reducers.js +0 -36
  413. package/src/data/tests/cookies.test.js +0 -42
  414. package/src/data/tests/dataUtils.test.js +0 -19
  415. package/src/data/tests/reduxUtils.test.js +0 -14
  416. package/src/data/utils/cookies.js +0 -12
  417. package/src/data/utils/dataUtils.js +0 -81
  418. package/src/data/utils/index.js +0 -11
  419. package/src/data/utils/reduxUtils.js +0 -34
  420. package/src/data/utils/useMobileResponsive.js +0 -24
  421. package/src/field-renderer/FieldRenderer.jsx +0 -156
  422. package/src/field-renderer/tests/FieldRenderer.test.jsx +0 -201
  423. package/src/forgot-password/ForgotPasswordAlert.jsx +0 -97
  424. package/src/forgot-password/ForgotPasswordPage.jsx +0 -193
  425. package/src/forgot-password/data/reducers.js +0 -58
  426. package/src/forgot-password/data/sagas.js +0 -35
  427. package/src/forgot-password/data/selectors.js +0 -10
  428. package/src/forgot-password/data/service.js +0 -21
  429. package/src/forgot-password/data/tests/reducers.test.js +0 -34
  430. package/src/forgot-password/data/tests/sagas.test.js +0 -67
  431. package/src/forgot-password/messages.js +0 -128
  432. package/src/forgot-password/tests/ForgotPasswordPage.test.jsx +0 -269
  433. package/src/i18n/index.js +0 -25
  434. package/src/login/AccountActivationMessage.jsx +0 -78
  435. package/src/login/ChangePasswordPrompt.jsx +0 -91
  436. package/src/login/LoginFailure.jsx +0 -231
  437. package/src/login/LoginPage.jsx +0 -368
  438. package/src/login/data/reducers.js +0 -76
  439. package/src/login/data/sagas.js +0 -45
  440. package/src/login/data/service.js +0 -27
  441. package/src/login/data/tests/reducers.test.js +0 -155
  442. package/src/login/data/tests/sagas.test.js +0 -110
  443. package/src/login/messages.jsx +0 -211
  444. package/src/login/tests/AccountActivationMessage.test.jsx +0 -122
  445. package/src/login/tests/ChangePasswordPrompt.test.jsx +0 -75
  446. package/src/login/tests/LoginFailure.test.jsx +0 -323
  447. package/src/login/tests/LoginPage.test.jsx +0 -839
  448. package/src/logistration/Logistration.jsx +0 -189
  449. package/src/logistration/Logistration.test.jsx +0 -275
  450. package/src/progressive-profiling/ProgressiveProfiling.jsx +0 -313
  451. package/src/progressive-profiling/ProgressiveProfilingPageModal.jsx +0 -56
  452. package/src/progressive-profiling/data/reducers.js +0 -38
  453. package/src/progressive-profiling/data/sagas.js +0 -24
  454. package/src/progressive-profiling/data/service.js +0 -17
  455. package/src/progressive-profiling/messages.jsx +0 -57
  456. package/src/progressive-profiling/tests/ProgressiveProfiling.test.jsx +0 -322
  457. package/src/register/RegistrationFields/CountryField/CountryField.jsx +0 -164
  458. package/src/register/RegistrationFields/CountryField/CountryField.test.jsx +0 -204
  459. package/src/register/RegistrationFields/CountryField/validator.js +0 -32
  460. package/src/register/RegistrationFields/EmailField/EmailField.jsx +0 -140
  461. package/src/register/RegistrationFields/EmailField/EmailField.test.jsx +0 -236
  462. package/src/register/RegistrationFields/EmailField/constants.js +0 -131
  463. package/src/register/RegistrationFields/EmailField/validator.js +0 -126
  464. package/src/register/RegistrationFields/EmailField/validator.test.js +0 -39
  465. package/src/register/RegistrationFields/HonorCodeField/HonorCode.jsx +0 -104
  466. package/src/register/RegistrationFields/HonorCodeField/HonorCode.test.jsx +0 -70
  467. package/src/register/RegistrationFields/NameField/NameField.jsx +0 -68
  468. package/src/register/RegistrationFields/NameField/NameField.test.jsx +0 -146
  469. package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.jsx +0 -58
  470. package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.test.jsx +0 -55
  471. package/src/register/RegistrationFields/UsernameField/UsernameField.jsx +0 -162
  472. package/src/register/RegistrationFields/UsernameField/UsernameField.test.jsx +0 -319
  473. package/src/register/RegistrationFields/UsernameField/validator.js +0 -16
  474. package/src/register/RegistrationPage.jsx +0 -428
  475. package/src/register/RegistrationPage.test.jsx +0 -854
  476. package/src/register/components/ConfigurableRegistrationForm.jsx +0 -244
  477. package/src/register/components/RegistrationFailure.jsx +0 -80
  478. package/src/register/components/tests/ConfigurableRegistrationForm.test.jsx +0 -401
  479. package/src/register/components/tests/RegistrationFailure.test.jsx +0 -212
  480. package/src/register/components/tests/ThirdPartyAuth.test.jsx +0 -439
  481. package/src/register/data/reducers.js +0 -140
  482. package/src/register/data/sagas.js +0 -58
  483. package/src/register/data/selectors.js +0 -34
  484. package/src/register/data/service.js +0 -45
  485. package/src/register/data/tests/reducers.test.js +0 -277
  486. package/src/register/data/tests/sagas.test.js +0 -239
  487. package/src/register/data/tests/utils.test.js +0 -98
  488. package/src/register/data/utils.js +0 -153
  489. package/src/register/messages.jsx +0 -206
  490. package/src/reset-password/ResetPasswordFailure.jsx +0 -55
  491. package/src/reset-password/ResetPasswordPage.jsx +0 -224
  492. package/src/reset-password/ResetPasswordSuccess.jsx +0 -19
  493. package/src/reset-password/data/reducers.js +0 -44
  494. package/src/reset-password/data/sagas.js +0 -67
  495. package/src/reset-password/data/selectors.js +0 -10
  496. package/src/reset-password/data/service.js +0 -61
  497. package/src/reset-password/data/tests/sagas.test.js +0 -185
  498. package/src/reset-password/messages.js +0 -88
  499. package/src/reset-password/tests/ResetPasswordPage.test.jsx +0 -241
  500. package/src/routes.jsx +0 -79
  501. package/src/setupTest.js +0 -68
  502. /package/{src → dist}/base-container/components/image-layout/index.scss +0 -0
  503. /package/{src/index.ts → dist/index.d.ts} +0 -0
  504. /package/{src → dist}/sass/_forgot_password.scss +0 -0
  505. /package/{src → dist}/sass/_login_page.scss +0 -0
  506. /package/{src → dist}/sass/_reset_password.scss +0 -0
@@ -0,0 +1,20 @@
1
+ export default BaseContainer;
2
+ declare function BaseContainer({ children, showWelcomeBanner, fullName }: {
3
+ children: any;
4
+ showWelcomeBanner: any;
5
+ fullName: any;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ declare namespace BaseContainer {
8
+ namespace defaultProps {
9
+ let showWelcomeBanner: boolean;
10
+ let fullName: null;
11
+ }
12
+ namespace propTypes {
13
+ export let children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
14
+ let showWelcomeBanner_1: PropTypes.Requireable<boolean>;
15
+ export { showWelcomeBanner_1 as showWelcomeBanner };
16
+ let fullName_1: PropTypes.Requireable<string>;
17
+ export { fullName_1 as fullName };
18
+ }
19
+ }
20
+ import PropTypes from 'prop-types';
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useAppConfig } from '@openedx/frontend-base';
3
+ import { breakpoints } from '@openedx/paragon';
4
+ import classNames from 'classnames';
5
+ import PropTypes from 'prop-types';
6
+ import MediaQuery from 'react-responsive';
7
+ import { DefaultLargeLayout, DefaultMediumLayout, DefaultSmallLayout } from './components/default-layout';
8
+ import { ImageExtraSmallLayout, ImageLargeLayout, ImageMediumLayout, ImageSmallLayout, } from './components/image-layout';
9
+ import { AuthLargeLayout, AuthMediumLayout, AuthSmallLayout } from './components/welcome-page-layout';
10
+ const BaseContainer = ({ children, showWelcomeBanner, fullName }) => {
11
+ const enableImageLayout = useAppConfig().ENABLE_IMAGE_LAYOUT;
12
+ if (enableImageLayout) {
13
+ return (_jsxs("div", { className: "layout", children: [_jsx(MediaQuery, { maxWidth: breakpoints.extraSmall.maxWidth - 1, children: showWelcomeBanner ? _jsx(AuthSmallLayout, { fullName: fullName }) : _jsx(ImageExtraSmallLayout, {}) }), _jsx(MediaQuery, { minWidth: breakpoints.small.minWidth, maxWidth: breakpoints.small.maxWidth - 1, children: showWelcomeBanner ? _jsx(AuthSmallLayout, { fullName: fullName }) : _jsx(ImageSmallLayout, {}) }), _jsx(MediaQuery, { minWidth: breakpoints.medium.minWidth, maxWidth: breakpoints.large.maxWidth - 1, children: showWelcomeBanner ? _jsx(AuthMediumLayout, { fullName: fullName }) : _jsx(ImageMediumLayout, {}) }), _jsx(MediaQuery, { minWidth: breakpoints.extraLarge.minWidth, children: showWelcomeBanner ? _jsx(AuthLargeLayout, { fullName: fullName }) : _jsx(ImageLargeLayout, {}) }), _jsx("div", { className: classNames('content', { 'align-items-center mt-0': showWelcomeBanner }), children: children })] }));
14
+ }
15
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "col-md-12 extra-large-screen-top-stripe" }), _jsxs("div", { className: "layout", children: [_jsx(MediaQuery, { maxWidth: breakpoints.small.maxWidth - 1, children: showWelcomeBanner ? _jsx(AuthSmallLayout, { fullName: fullName }) : _jsx(DefaultSmallLayout, {}) }), _jsx(MediaQuery, { minWidth: breakpoints.medium.minWidth, maxWidth: breakpoints.large.maxWidth - 1, children: showWelcomeBanner ? _jsx(AuthMediumLayout, { fullName: fullName }) : _jsx(DefaultMediumLayout, {}) }), _jsx(MediaQuery, { minWidth: breakpoints.extraLarge.minWidth, children: showWelcomeBanner ? _jsx(AuthLargeLayout, { fullName: fullName }) : _jsx(DefaultLargeLayout, {}) }), _jsx("div", { className: classNames('content', { 'align-items-center mt-0': showWelcomeBanner }), children: children })] })] }));
16
+ };
17
+ BaseContainer.defaultProps = {
18
+ showWelcomeBanner: false,
19
+ fullName: null,
20
+ };
21
+ BaseContainer.propTypes = {
22
+ children: PropTypes.node.isRequired,
23
+ showWelcomeBanner: PropTypes.bool,
24
+ fullName: PropTypes.string,
25
+ };
26
+ export default BaseContainer;
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/base-container/index.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC1G,OAAO,EACL,qBAAqB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,GAC7E,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;A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{ breakpoints } from '@openedx/paragon';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport MediaQuery from 'react-responsive';\n\nimport { DefaultLargeLayout, DefaultMediumLayout, DefaultSmallLayout } from './components/default-layout';\nimport {\n ImageExtraSmallLayout, ImageLargeLayout, ImageMediumLayout, ImageSmallLayout,\n} from './components/image-layout';\nimport { AuthLargeLayout, AuthMediumLayout, AuthSmallLayout } from './components/welcome-page-layout';\n\nconst BaseContainer = ({ children, showWelcomeBanner, fullName }) => {\n const enableImageLayout = useAppConfig().ENABLE_IMAGE_LAYOUT;\n\n if (enableImageLayout) {\n return (\n <div className=\"layout\">\n <MediaQuery maxWidth={breakpoints.extraSmall.maxWidth - 1}>\n {showWelcomeBanner ? <AuthSmallLayout fullName={fullName} /> : <ImageExtraSmallLayout />}\n </MediaQuery>\n <MediaQuery minWidth={breakpoints.small.minWidth} maxWidth={breakpoints.small.maxWidth - 1}>\n {showWelcomeBanner ? <AuthSmallLayout fullName={fullName} /> : <ImageSmallLayout />}\n </MediaQuery>\n <MediaQuery minWidth={breakpoints.medium.minWidth} maxWidth={breakpoints.large.maxWidth - 1}>\n {showWelcomeBanner ? <AuthMediumLayout fullName={fullName} /> : <ImageMediumLayout />}\n </MediaQuery>\n <MediaQuery minWidth={breakpoints.extraLarge.minWidth}>\n {showWelcomeBanner ? <AuthLargeLayout fullName={fullName} /> : <ImageLargeLayout />}\n </MediaQuery>\n <div className={classNames('content', { 'align-items-center mt-0': showWelcomeBanner })}>\n {children}\n </div>\n </div>\n );\n }\n\n return (\n <>\n <div className=\"col-md-12 extra-large-screen-top-stripe\" />\n <div className=\"layout\">\n <MediaQuery maxWidth={breakpoints.small.maxWidth - 1}>\n {showWelcomeBanner ? <AuthSmallLayout fullName={fullName} /> : <DefaultSmallLayout />}\n </MediaQuery>\n <MediaQuery minWidth={breakpoints.medium.minWidth} maxWidth={breakpoints.large.maxWidth - 1}>\n {showWelcomeBanner ? <AuthMediumLayout fullName={fullName} /> : <DefaultMediumLayout />}\n </MediaQuery>\n <MediaQuery minWidth={breakpoints.extraLarge.minWidth}>\n {showWelcomeBanner ? <AuthLargeLayout fullName={fullName} /> : <DefaultLargeLayout />}\n </MediaQuery>\n <div className={classNames('content', { 'align-items-center mt-0': showWelcomeBanner })}>\n {children}\n </div>\n </div>\n </>\n );\n};\n\nBaseContainer.defaultProps = {\n showWelcomeBanner: false,\n fullName: null,\n};\n\nBaseContainer.propTypes = {\n children: PropTypes.node.isRequired,\n showWelcomeBanner: PropTypes.bool,\n fullName: PropTypes.string,\n};\n\nexport default BaseContainer;\n"]}
@@ -0,0 +1,14 @@
1
+ export default EmbeddedRegistrationRoute;
2
+ /**
3
+ * This wrapper redirects the requester to embedded register page only if host
4
+ * query param is present.
5
+ */
6
+ declare function EmbeddedRegistrationRoute({ children }: {
7
+ children: any;
8
+ }): any;
9
+ declare namespace EmbeddedRegistrationRoute {
10
+ namespace propTypes {
11
+ let children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
12
+ }
13
+ }
14
+ import PropTypes from 'prop-types';
@@ -1,26 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import PropTypes from 'prop-types';
2
3
  import { Navigate } from 'react-router-dom';
3
-
4
4
  import { PAGE_NOT_FOUND } from '../data/constants';
5
5
  import { isHostAvailableInQueryParams } from '../data/utils';
6
-
7
6
  /**
8
7
  * This wrapper redirects the requester to embedded register page only if host
9
8
  * query param is present.
10
9
  */
11
10
  const EmbeddedRegistrationRoute = ({ children }) => {
12
- const registrationEmbedded = isHostAvailableInQueryParams();
13
-
14
- // Show registration page for embedded experience even if the user is authenticated
15
- if (registrationEmbedded) {
16
- return children;
17
- }
18
-
19
- return <Navigate to={PAGE_NOT_FOUND} replace />;
11
+ const registrationEmbedded = isHostAvailableInQueryParams();
12
+ // Show registration page for embedded experience even if the user is authenticated
13
+ if (registrationEmbedded) {
14
+ return children;
15
+ }
16
+ return _jsx(Navigate, { to: PAGE_NOT_FOUND, replace: true });
20
17
  };
21
-
22
18
  EmbeddedRegistrationRoute.propTypes = {
23
- children: PropTypes.node.isRequired,
19
+ children: PropTypes.node.isRequired,
24
20
  };
25
-
26
21
  export default EmbeddedRegistrationRoute;
22
+ //# sourceMappingURL=EmbeddedRegistrationRoute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmbeddedRegistrationRoute.js","sourceRoot":"","sources":["../../src/common-components/EmbeddedRegistrationRoute.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAE7D;;;GAGG;AACH,MAAM,yBAAyB,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACjD,MAAM,oBAAoB,GAAG,4BAA4B,EAAE,CAAC;IAE5D,mFAAmF;IACnF,IAAI,oBAAoB,EAAE,CAAC;QACzB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,KAAC,QAAQ,IAAC,EAAE,EAAE,cAAc,EAAE,OAAO,SAAG,CAAC;AAClD,CAAC,CAAC;AAEF,yBAAyB,CAAC,SAAS,GAAG;IACpC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CACpC,CAAC;AAEF,eAAe,yBAAyB,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { Navigate } from 'react-router-dom';\n\nimport { PAGE_NOT_FOUND } from '../data/constants';\nimport { isHostAvailableInQueryParams } from '../data/utils';\n\n/**\n * This wrapper redirects the requester to embedded register page only if host\n * query param is present.\n */\nconst EmbeddedRegistrationRoute = ({ children }) => {\n const registrationEmbedded = isHostAvailableInQueryParams();\n\n // Show registration page for embedded experience even if the user is authenticated\n if (registrationEmbedded) {\n return children;\n }\n\n return <Navigate to={PAGE_NOT_FOUND} replace />;\n};\n\nEmbeddedRegistrationRoute.propTypes = {\n children: PropTypes.node.isRequired,\n};\n\nexport default EmbeddedRegistrationRoute;\n"]}
@@ -0,0 +1,29 @@
1
+ export default EnterpriseSSO;
2
+ /**
3
+ * This component renders the Single sign-on (SSO) button only for the tpa provider passed
4
+ * */
5
+ declare function EnterpriseSSO(props: any): import("react/jsx-runtime").JSX.Element;
6
+ declare namespace EnterpriseSSO {
7
+ namespace defaultProps {
8
+ namespace provider {
9
+ let id: string;
10
+ let name: string;
11
+ let iconClass: string;
12
+ let iconImage: string;
13
+ let loginUrl: string;
14
+ let registerUrl: string;
15
+ }
16
+ }
17
+ namespace propTypes {
18
+ let provider_1: PropTypes.Requireable<PropTypes.InferProps<{
19
+ id: PropTypes.Requireable<string>;
20
+ name: PropTypes.Requireable<string>;
21
+ iconClass: PropTypes.Requireable<string>;
22
+ iconImage: PropTypes.Requireable<string>;
23
+ loginUrl: PropTypes.Requireable<string>;
24
+ registerUrl: PropTypes.Requireable<string>;
25
+ }>>;
26
+ export { provider_1 as provider };
27
+ }
28
+ }
29
+ import PropTypes from 'prop-types';
@@ -0,0 +1,55 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
+ import { useAppConfig, getSiteConfig, useIntl } from '@openedx/frontend-base';
4
+ import { Button, Form, Icon, } from '@openedx/paragon';
5
+ import { Login } from '@openedx/paragon/icons';
6
+ import PropTypes from 'prop-types';
7
+ import { LOGIN_PAGE, SUPPORTED_ICON_CLASSES } from '../data/constants';
8
+ import messages from './messages';
9
+ /**
10
+ * This component renders the Single sign-on (SSO) button only for the tpa provider passed
11
+ * */
12
+ const EnterpriseSSO = (props) => {
13
+ const { formatMessage } = useIntl();
14
+ const tpaProvider = props.provider;
15
+ const hideRegistrationLink = useAppConfig().ALLOW_PUBLIC_ACCOUNT_CREATION === false
16
+ || useAppConfig().SHOW_REGISTRATION_LINKS === false;
17
+ const handleSubmit = (e, url) => {
18
+ e.preventDefault();
19
+ window.location.href = getSiteConfig().lmsBaseUrl + url;
20
+ };
21
+ const handleClick = (e) => {
22
+ e.preventDefault();
23
+ window.location.href = LOGIN_PAGE;
24
+ };
25
+ if (tpaProvider) {
26
+ return (_jsx("div", { className: "d-flex justify-content-center m-4", children: _jsx("div", { className: "d-flex flex-column", children: _jsx("div", { className: "mw-450", children: _jsxs(Form, { className: "m-0", children: [_jsx("p", { children: formatMessage(messages['enterprisetpa.title.heading'], { providerName: tpaProvider.name }) }), _jsx(Button, { id: tpaProvider.id, type: "submit", variant: "link", className: `btn-tpa btn-${tpaProvider.id}`, onClick: (e) => handleSubmit(e, tpaProvider.loginUrl), children: tpaProvider.iconImage ? (_jsxs("div", { "aria-hidden": "true", children: [_jsx("img", { className: "btn-tpa__image-icon", src: tpaProvider.iconImage, alt: `icon ${tpaProvider.name}` }), _jsx("span", { className: "pl-2", "aria-hidden": "true", children: tpaProvider.name })] }))
27
+ : (_jsxs(_Fragment, { children: [_jsx("div", { className: "btn-tpa__font-container", "aria-hidden": "true", children: SUPPORTED_ICON_CLASSES.includes(tpaProvider.iconClass) ? (_jsx(FontAwesomeIcon, { icon: ['fab', tpaProvider.iconClass] }))
28
+ : (_jsx(Icon, { className: "h-75", src: Login })) }), _jsx("span", { className: "pl-2", "aria-hidden": "true", children: tpaProvider.name })] })) }, tpaProvider.id), _jsx("div", { className: "mb-4" }), _jsx(Button, { type: "submit", id: "other-ways-to-sign-in", variant: "outline-primary", state: "Complete", className: "w-100", onClick: (e) => handleClick(e), children: hideRegistrationLink
29
+ ? formatMessage(messages['enterprisetpa.login.button.text.public.account.creation.disabled'])
30
+ : formatMessage(messages['enterprisetpa.login.button.text']) })] }) }) }) }));
31
+ }
32
+ return _jsx("div", {});
33
+ };
34
+ EnterpriseSSO.defaultProps = {
35
+ provider: {
36
+ id: '',
37
+ name: '',
38
+ iconClass: '',
39
+ iconImage: '',
40
+ loginUrl: '',
41
+ registerUrl: '',
42
+ },
43
+ };
44
+ EnterpriseSSO.propTypes = {
45
+ provider: PropTypes.shape({
46
+ id: PropTypes.string,
47
+ name: PropTypes.string,
48
+ iconClass: PropTypes.string,
49
+ iconImage: PropTypes.string,
50
+ loginUrl: PropTypes.string,
51
+ registerUrl: PropTypes.string,
52
+ }),
53
+ };
54
+ export default EnterpriseSSO;
55
+ //# sourceMappingURL=EnterpriseSSO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnterpriseSSO.js","sourceRoot":"","sources":["../../src/common-components/EnterpriseSSO.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EACL,MAAM,EAAE,IAAI,EACZ,IAAI,GACL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC;;KAEK;AACL,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,EAAE;IAC9B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,CAAC;IACnC,MAAM,oBAAoB,GAAG,YAAY,EAAE,CAAC,6BAA6B,KAAK,KAAK;WAC9E,YAAY,EAAE,CAAC,uBAAuB,KAAK,KAAK,CAAC;IAEtD,MAAM,YAAY,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;QAC9B,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,aAAa,EAAE,CAAC,UAAU,GAAG,GAAG,C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AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { useAppConfig, getSiteConfig, useIntl } from '@openedx/frontend-base';\nimport {\n Button, Form,\n Icon,\n} from '@openedx/paragon';\nimport { Login } from '@openedx/paragon/icons';\nimport PropTypes from 'prop-types';\n\nimport { LOGIN_PAGE, SUPPORTED_ICON_CLASSES } from '../data/constants';\nimport messages from './messages';\n\n/**\n * This component renders the Single sign-on (SSO) button only for the tpa provider passed\n * */\nconst EnterpriseSSO = (props) => {\n const { formatMessage } = useIntl();\n const tpaProvider = props.provider;\n const hideRegistrationLink = useAppConfig().ALLOW_PUBLIC_ACCOUNT_CREATION === false\n || useAppConfig().SHOW_REGISTRATION_LINKS === false;\n\n const handleSubmit = (e, url) => {\n e.preventDefault();\n window.location.href = getSiteConfig().lmsBaseUrl + url;\n };\n\n const handleClick = (e) => {\n e.preventDefault();\n window.location.href = LOGIN_PAGE;\n };\n\n if (tpaProvider) {\n return (\n <div className=\"d-flex justify-content-center m-4\">\n <div className=\"d-flex flex-column\">\n <div className=\"mw-450\">\n <Form className=\"m-0\">\n <p>{formatMessage(messages['enterprisetpa.title.heading'], { providerName: tpaProvider.name })}</p>\n <Button\n id={tpaProvider.id}\n key={tpaProvider.id}\n type=\"submit\"\n variant=\"link\"\n className={`btn-tpa btn-${tpaProvider.id}`}\n onClick={(e) => handleSubmit(e, tpaProvider.loginUrl)}\n >\n {tpaProvider.iconImage ? (\n <div aria-hidden=\"true\">\n <img className=\"btn-tpa__image-icon\" src={tpaProvider.iconImage} alt={`icon ${tpaProvider.name}`} />\n <span className=\"pl-2\" aria-hidden=\"true\">{tpaProvider.name}</span>\n </div>\n )\n : (\n <>\n <div className=\"btn-tpa__font-container\" aria-hidden=\"true\">\n {SUPPORTED_ICON_CLASSES.includes(tpaProvider.iconClass) ? (\n <FontAwesomeIcon icon={['fab', tpaProvider.iconClass]} />)\n : (\n <Icon className=\"h-75\" src={Login} />\n )}\n </div>\n <span className=\"pl-2\" aria-hidden=\"true\">{tpaProvider.name}</span>\n </>\n )}\n </Button>\n <div className=\"mb-4\" />\n <Button\n type=\"submit\"\n id=\"other-ways-to-sign-in\"\n variant=\"outline-primary\"\n state=\"Complete\"\n className=\"w-100\"\n onClick={(e) => handleClick(e)}\n >\n {hideRegistrationLink\n ? formatMessage(messages['enterprisetpa.login.button.text.public.account.creation.disabled'])\n : formatMessage(messages['enterprisetpa.login.button.text'])}\n </Button>\n </Form>\n </div>\n </div>\n </div>\n );\n }\n return <div />;\n};\n\nEnterpriseSSO.defaultProps = {\n provider: {\n id: '',\n name: '',\n iconClass: '',\n iconImage: '',\n loginUrl: '',\n registerUrl: '',\n },\n};\n\nEnterpriseSSO.propTypes = {\n provider: PropTypes.shape({\n id: PropTypes.string,\n name: PropTypes.string,\n iconClass: PropTypes.string,\n iconImage: PropTypes.string,\n loginUrl: PropTypes.string,\n registerUrl: PropTypes.string,\n }),\n};\n\nexport default EnterpriseSSO;\n"]}
@@ -0,0 +1,60 @@
1
+ export default FormGroup;
2
+ declare function FormGroup(props: any): import("react/jsx-runtime").JSX.Element;
3
+ declare namespace FormGroup {
4
+ namespace defaultProps {
5
+ let as: string;
6
+ let autoComplete: null;
7
+ let borderClass: string;
8
+ let children: null;
9
+ let className: string;
10
+ let errorMessage: string;
11
+ let handleBlur: null;
12
+ function handleChange(): void;
13
+ let handleClick: null;
14
+ let handleFocus: null;
15
+ let helpText: never[];
16
+ let options: null;
17
+ let readOnly: boolean;
18
+ let spellCheck: null;
19
+ let trailingElement: null;
20
+ let type: string;
21
+ }
22
+ namespace propTypes {
23
+ let as_1: PropTypes.Requireable<string>;
24
+ export { as_1 as as };
25
+ let autoComplete_1: PropTypes.Requireable<string>;
26
+ export { autoComplete_1 as autoComplete };
27
+ let borderClass_1: PropTypes.Requireable<string>;
28
+ export { borderClass_1 as borderClass };
29
+ let children_1: PropTypes.Requireable<PropTypes.ReactElementLike>;
30
+ export { children_1 as children };
31
+ let className_1: PropTypes.Requireable<string>;
32
+ export { className_1 as className };
33
+ let errorMessage_1: PropTypes.Requireable<string>;
34
+ export { errorMessage_1 as errorMessage };
35
+ export let floatingLabel: PropTypes.Validator<string>;
36
+ let handleBlur_1: PropTypes.Requireable<(...args: any[]) => any>;
37
+ export { handleBlur_1 as handleBlur };
38
+ let handleChange_1: PropTypes.Requireable<(...args: any[]) => any>;
39
+ export { handleChange_1 as handleChange };
40
+ let handleClick_1: PropTypes.Requireable<(...args: any[]) => any>;
41
+ export { handleClick_1 as handleClick };
42
+ let handleFocus_1: PropTypes.Requireable<(...args: any[]) => any>;
43
+ export { handleFocus_1 as handleFocus };
44
+ let helpText_1: PropTypes.Requireable<(string | null | undefined)[]>;
45
+ export { helpText_1 as helpText };
46
+ export let name: PropTypes.Validator<string>;
47
+ let options_1: PropTypes.Requireable<(...args: any[]) => any>;
48
+ export { options_1 as options };
49
+ let readOnly_1: PropTypes.Requireable<boolean>;
50
+ export { readOnly_1 as readOnly };
51
+ let spellCheck_1: PropTypes.Requireable<string>;
52
+ export { spellCheck_1 as spellCheck };
53
+ let trailingElement_1: PropTypes.Requireable<PropTypes.ReactElementLike>;
54
+ export { trailingElement_1 as trailingElement };
55
+ let type_1: PropTypes.Requireable<string>;
56
+ export { type_1 as type };
57
+ export let value: PropTypes.Validator<string>;
58
+ }
59
+ }
60
+ import PropTypes from 'prop-types';
@@ -0,0 +1,66 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { Form, TransitionReplace, } from '@openedx/paragon';
4
+ import PropTypes from 'prop-types';
5
+ const FormGroup = (props) => {
6
+ const [hasFocus, setHasFocus] = useState(false);
7
+ const handleFocus = (e) => {
8
+ setHasFocus(true);
9
+ if (props.handleFocus) {
10
+ props.handleFocus(e);
11
+ }
12
+ };
13
+ const handleClick = (e) => {
14
+ if (props.handleClick) {
15
+ props.handleClick(e);
16
+ }
17
+ };
18
+ const handleOnBlur = (e) => {
19
+ setHasFocus(false);
20
+ if (props.handleBlur) {
21
+ props.handleBlur(e);
22
+ }
23
+ };
24
+ return (_jsxs(Form.Group, { controlId: props.name, className: props.className, isInvalid: props.errorMessage !== '', children: [_jsx(Form.Control, { as: props.as, readOnly: props.readOnly, type: props.type, "aria-invalid": props.errorMessage !== '', className: "form-group__form-field", autoComplete: props.autoComplete, spellCheck: props.spellCheck, name: props.name, value: props.value, onFocus: handleFocus, onBlur: handleOnBlur, onClick: handleClick, onChange: props.handleChange, controlClassName: props.borderClass, trailingElement: props.trailingElement, floatingLabel: props.floatingLabel, children: props.options ? props.options() : null }), _jsx(TransitionReplace, { children: hasFocus && props.helpText ? (_jsx(Form.Control.Feedback, { type: "default", className: "d-block form-text-size", children: props.helpText.map((message, index) => (_jsxs("span", { children: [message, _jsx("br", {})] }, `help-text-${index.toString()}`))) }, "help-text")) : _jsx("div", {}, "empty") }), props.errorMessage !== '' && (_jsx(Form.Control.Feedback, { className: "form-text-size", hasIcon: false, "feedback-for": props.name, type: "invalid", children: props.errorMessage }, "error")), props.children] }));
25
+ };
26
+ FormGroup.defaultProps = {
27
+ as: 'input',
28
+ autoComplete: null,
29
+ borderClass: '',
30
+ children: null,
31
+ className: '',
32
+ errorMessage: '',
33
+ handleBlur: null,
34
+ handleChange: () => { },
35
+ handleClick: null,
36
+ handleFocus: null,
37
+ helpText: [],
38
+ options: null,
39
+ readOnly: false,
40
+ spellCheck: null,
41
+ trailingElement: null,
42
+ type: 'text',
43
+ };
44
+ FormGroup.propTypes = {
45
+ as: PropTypes.string,
46
+ autoComplete: PropTypes.string,
47
+ borderClass: PropTypes.string,
48
+ children: PropTypes.element,
49
+ className: PropTypes.string,
50
+ errorMessage: PropTypes.string,
51
+ floatingLabel: PropTypes.string.isRequired,
52
+ handleBlur: PropTypes.func,
53
+ handleChange: PropTypes.func,
54
+ handleClick: PropTypes.func,
55
+ handleFocus: PropTypes.func,
56
+ helpText: PropTypes.arrayOf(PropTypes.string),
57
+ name: PropTypes.string.isRequired,
58
+ options: PropTypes.func,
59
+ readOnly: PropTypes.bool,
60
+ spellCheck: PropTypes.string,
61
+ trailingElement: PropTypes.element,
62
+ type: PropTypes.string,
63
+ value: PropTypes.string.isRequired,
64
+ };
65
+ export default FormGroup;
66
+ //# sourceMappingURL=FormGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormGroup.js","sourceRoot":"","sources":["../../src/common-components/FormGroup.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,IAAI,EAAE,iBAAiB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,EAAE;IAC1B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,EAAE;QACxB,WAAW,CAAC,IAAI,CAAC,CAAC;QAClB,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAAC,CAAC;IAClD,CAAC,CAAC;IACF,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,EAAE;QACxB,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAAC,CAAC;IAClD,CAAC,CAAC;IACF,MAAM,YAAY,GAAG,CAAC,CAAC,EAAE,EAAE;QACzB,WAAW,CAAC,KAAK,CAAC,CAAC;QACnB,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;YAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAAC,CAAC;IAChD,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,IAAI,CAAC,KAAK,IAAC,SAAS,EAAE,KAAK,CAAC,IAAI,EA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UAAU;IACjC,OAAO,EAAE,SAAS,CAAC,IAAI;IACvB,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,UAAU,EAAE,SAAS,CAAC,MAAM;IAC5B,eAAe,EAAE,SAAS,CAAC,OAAO;IAClC,IAAI,EAAE,SAAS,CAAC,MAAM;IACtB,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;CACnC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { useState } from 'react';\n\nimport {\n Form, TransitionReplace,\n} from '@openedx/paragon';\nimport PropTypes from 'prop-types';\n\nconst FormGroup = (props) => {\n const [hasFocus, setHasFocus] = useState(false);\n\n const handleFocus = (e) => {\n setHasFocus(true);\n if (props.handleFocus) { props.handleFocus(e); }\n };\n const handleClick = (e) => {\n if (props.handleClick) { props.handleClick(e); }\n };\n const handleOnBlur = (e) => {\n setHasFocus(false);\n if (props.handleBlur) { props.handleBlur(e); }\n };\n\n return (\n <Form.Group controlId={props.name} className={props.className} isInvalid={props.errorMessage !== ''}>\n <Form.Control\n as={props.as}\n readOnly={props.readOnly}\n type={props.type}\n aria-invalid={props.errorMessage !== ''}\n className=\"form-group__form-field\"\n autoComplete={props.autoComplete}\n spellCheck={props.spellCheck}\n name={props.name}\n value={props.value}\n onFocus={handleFocus}\n onBlur={handleOnBlur}\n onClick={handleClick}\n onChange={props.handleChange}\n controlClassName={props.borderClass}\n trailingElement={props.trailingElement}\n floatingLabel={props.floatingLabel}\n >\n {props.options ? props.options() : null}\n </Form.Control>\n <TransitionReplace>\n {hasFocus && props.helpText ? (\n <Form.Control.Feedback type=\"default\" key=\"help-text\" className=\"d-block form-text-size\">\n {props.helpText.map((message, index) => (\n <span key={`help-text-${index.toString()}`}>\n {message}\n <br />\n </span>\n ))}\n </Form.Control.Feedback>\n ) : <div key=\"empty\" />}\n </TransitionReplace>\n {props.errorMessage !== '' && (\n <Form.Control.Feedback key=\"error\" className=\"form-text-size\" hasIcon={false} feedback-for={props.name} type=\"invalid\">{props.errorMessage}</Form.Control.Feedback>\n )}\n {props.children}\n </Form.Group>\n );\n};\n\nFormGroup.defaultProps = {\n as: 'input',\n autoComplete: null,\n borderClass: '',\n children: null,\n className: '',\n errorMessage: '',\n handleBlur: null,\n handleChange: () => {},\n handleClick: null,\n handleFocus: null,\n helpText: [],\n options: null,\n readOnly: false,\n spellCheck: null,\n trailingElement: null,\n type: 'text',\n};\n\nFormGroup.propTypes = {\n as: PropTypes.string,\n autoComplete: PropTypes.string,\n borderClass: PropTypes.string,\n children: PropTypes.element,\n className: PropTypes.string,\n errorMessage: PropTypes.string,\n floatingLabel: PropTypes.string.isRequired,\n handleBlur: PropTypes.func,\n handleChange: PropTypes.func,\n handleClick: PropTypes.func,\n handleFocus: PropTypes.func,\n helpText: PropTypes.arrayOf(PropTypes.string),\n name: PropTypes.string.isRequired,\n options: PropTypes.func,\n readOnly: PropTypes.bool,\n spellCheck: PropTypes.string,\n trailingElement: PropTypes.element,\n type: PropTypes.string,\n value: PropTypes.string.isRequired,\n};\n\nexport default FormGroup;\n"]}
@@ -0,0 +1,34 @@
1
+ export function RenderInstitutionButton(props: any): import("react/jsx-runtime").JSX.Element;
2
+ export namespace RenderInstitutionButton {
3
+ namespace propTypes {
4
+ let buttonTitle: PropTypes.Requireable<string>;
5
+ let onSubmitHandler: PropTypes.Validator<(...args: any[]) => any>;
6
+ let secondaryProviders: PropTypes.Requireable<(PropTypes.InferProps<{
7
+ name: PropTypes.Validator<string>;
8
+ loginUrl: PropTypes.Validator<string>;
9
+ }> | null | undefined)[]>;
10
+ }
11
+ namespace defaultProps {
12
+ let secondaryProviders_1: never[];
13
+ export { secondaryProviders_1 as secondaryProviders };
14
+ let buttonTitle_1: string;
15
+ export { buttonTitle_1 as buttonTitle };
16
+ }
17
+ }
18
+ export default InstitutionLogistration;
19
+ import PropTypes from 'prop-types';
20
+ /**
21
+ * This component renders the page list of available institutions for login
22
+ * */
23
+ declare function InstitutionLogistration(props: any): import("react/jsx-runtime").JSX.Element;
24
+ declare namespace InstitutionLogistration {
25
+ export namespace propTypes_1 {
26
+ let headingTitle: PropTypes.Requireable<string>;
27
+ }
28
+ export { propTypes_1 as propTypes };
29
+ export namespace defaultProps_1 {
30
+ let headingTitle_1: string;
31
+ export { headingTitle_1 as headingTitle };
32
+ }
33
+ export { defaultProps_1 as defaultProps };
34
+ }
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { getSiteConfig, useIntl } from '@openedx/frontend-base';
3
+ import { Button, Hyperlink, Icon } from '@openedx/paragon';
4
+ import { Institution } from '@openedx/paragon/icons';
5
+ import PropTypes from 'prop-types';
6
+ import messages from './messages';
7
+ /**
8
+ * This component renders the Institution login button
9
+ * */
10
+ export const RenderInstitutionButton = props => {
11
+ const { onSubmitHandler, buttonTitle } = props;
12
+ return (_jsxs(Button, { className: "btn-sm text-body p-0 mb-4 border-0", variant: "link", "data-event-name": "institution_login", onClick: onSubmitHandler, children: [_jsx(Icon, { src: Institution, className: "institute-icon" }), buttonTitle] }));
13
+ };
14
+ /**
15
+ * This component renders the page list of available institutions for login
16
+ * */
17
+ const InstitutionLogistration = props => {
18
+ const lmsBaseUrl = getSiteConfig().lmsBaseUrl;
19
+ const { formatMessage } = useIntl();
20
+ const { secondaryProviders, headingTitle, } = props;
21
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "d-flex justify-content-left mb-4 mt-2", children: _jsxs("div", { className: "flex-column", children: [_jsx("h4", { className: "mb-2 font-weight-bold institutions__heading", children: headingTitle }), _jsx("p", { className: "mb-2", children: formatMessage(messages['institution.login.page.sub.heading']) })] }) }), _jsx("div", { className: "mb-5", children: _jsx("table", { className: "pgn__data-table table-striped table-borderless", children: _jsx("tbody", { children: secondaryProviders.map(provider => (_jsx("tr", { className: "pgn__data-table-row", children: _jsx("td", { children: _jsx(Hyperlink, { className: "btn nav-item p-0 mb-1 institutions--provider-link", destination: lmsBaseUrl + provider.loginUrl, children: provider.name }) }) }, provider))) }) }) })] }));
22
+ };
23
+ const LogistrationDefaultProps = {
24
+ secondaryProviders: [],
25
+ buttonTitle: '',
26
+ };
27
+ const LogistrationProps = {
28
+ secondaryProviders: PropTypes.arrayOf(PropTypes.shape({
29
+ name: PropTypes.string.isRequired,
30
+ loginUrl: PropTypes.string.isRequired,
31
+ })),
32
+ };
33
+ RenderInstitutionButton.propTypes = Object.assign(Object.assign({}, LogistrationProps), { buttonTitle: PropTypes.string, onSubmitHandler: PropTypes.func.isRequired });
34
+ RenderInstitutionButton.defaultProps = Object.assign({}, LogistrationDefaultProps);
35
+ InstitutionLogistration.propTypes = Object.assign(Object.assign({}, LogistrationProps), { headingTitle: PropTypes.string });
36
+ InstitutionLogistration.defaultProps = Object.assign(Object.assign({}, LogistrationDefaultProps), { headingTitle: '' });
37
+ export default InstitutionLogistration;
38
+ //# sourceMappingURL=InstitutionLogistration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InstitutionLogistration.js","sourceRoot":"","sources":["../../src/common-components/InstitutionLogistration.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC;;KAEK;AACL,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,CAAC,EAAE;IAC7C,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAE/C,OAAO,CACL,MAAC,MAAM,IACL,SAAS,EAAC,oCAAoC,EAC9C,OAAO,EAAC,MAAM,qBACE,mBAAmB,EACnC,OAAO,EAAE,eAAe,aAExB,KAAC,IAAI,IAAC,GAAG,EAAE,WAA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uBAAuB,CAAC,SAAS,mCAC5B,iBAAiB,KACpB,WAAW,EAAE,SAAS,CAAC,MAAM,EAC7B,eAAe,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU,GAE3C,CAAC;AACF,uBAAuB,CAAC,YAAY,qBAC/B,wBAAwB,CAC5B,CAAC;AAEF,uBAAuB,CAAC,SAAS,mCAC5B,iBAAiB,KACpB,YAAY,EAAE,SAAS,CAAC,MAAM,GAC/B,CAAC;AACF,uBAAuB,CAAC,YAAY,mCAC/B,wBAAwB,KAC3B,YAAY,EAAE,EAAE,GACjB,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["import { getSiteConfig, useIntl } from '@openedx/frontend-base';\nimport { Button, Hyperlink, Icon } from '@openedx/paragon';\nimport { Institution } from '@openedx/paragon/icons';\nimport PropTypes from 'prop-types';\n\nimport messages from './messages';\n\n/**\n * This component renders the Institution login button\n * */\nexport const RenderInstitutionButton = props => {\n const { onSubmitHandler, buttonTitle } = props;\n\n return (\n <Button\n className=\"btn-sm text-body p-0 mb-4 border-0\"\n variant=\"link\"\n data-event-name=\"institution_login\"\n onClick={onSubmitHandler}\n >\n <Icon src={Institution} className=\"institute-icon\" />\n {buttonTitle}\n </Button>\n );\n};\n\n/**\n * This component renders the page list of available institutions for login\n * */\nconst InstitutionLogistration = props => {\n const lmsBaseUrl = getSiteConfig().lmsBaseUrl;\n const { formatMessage } = useIntl();\n const {\n secondaryProviders,\n headingTitle,\n } = props;\n\n return (\n <>\n <div className=\"d-flex justify-content-left mb-4 mt-2\">\n <div className=\"flex-column\">\n <h4 className=\"mb-2 font-weight-bold institutions__heading\">\n {headingTitle}\n </h4>\n <p className=\"mb-2\">\n {formatMessage(messages['institution.login.page.sub.heading'])}\n </p>\n </div>\n </div>\n <div className=\"mb-5\">\n <table className=\"pgn__data-table table-striped table-borderless\">\n <tbody>\n {secondaryProviders.map(provider => (\n <tr key={provider} className=\"pgn__data-table-row\">\n <td>\n <Hyperlink\n className=\"btn nav-item p-0 mb-1 institutions--provider-link\"\n destination={lmsBaseUrl + provider.loginUrl}\n >\n {provider.name}\n </Hyperlink>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </>\n );\n};\n\nconst LogistrationDefaultProps = {\n secondaryProviders: [],\n buttonTitle: '',\n};\nconst LogistrationProps = {\n secondaryProviders: PropTypes.arrayOf(PropTypes.shape({\n name: PropTypes.string.isRequired,\n loginUrl: PropTypes.string.isRequired,\n })),\n};\n\nRenderInstitutionButton.propTypes = {\n ...LogistrationProps,\n buttonTitle: PropTypes.string,\n onSubmitHandler: PropTypes.func.isRequired,\n\n};\nRenderInstitutionButton.defaultProps = {\n ...LogistrationDefaultProps,\n};\n\nInstitutionLogistration.propTypes = {\n ...LogistrationProps,\n headingTitle: PropTypes.string,\n};\nInstitutionLogistration.defaultProps = {\n ...LogistrationDefaultProps,\n headingTitle: '',\n};\n\nexport default InstitutionLogistration;\n"]}
@@ -0,0 +1,2 @@
1
+ export default NotFoundPage;
2
+ declare function NotFoundPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { FormattedMessage } from '@openedx/frontend-base';
3
+ const NotFoundPage = () => (_jsx("div", { className: "container-fluid d-flex py-5 justify-content-center align-items-start text-center", children: _jsx("p", { className: "my-0 py-5 text-muted mw-32em", children: _jsx(FormattedMessage, { id: "error.notfound.message", defaultMessage: "The page you're looking for is unavailable or there's an error in the URL. Please check the URL and try again.", description: "error message when a page does not exist" }) }) }));
4
+ export default NotFoundPage;
5
+ //# sourceMappingURL=NotFoundPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotFoundPage.js","sourceRoot":"","sources":["../../src/common-components/NotFoundPage.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,CACzB,cAAK,SAAS,EAAC,kFAAkF,YAC/F,YAAG,SAAS,EAAC,8BAA8B,YACzC,KAAC,gBAAgB,IACf,EAAE,EAAC,wBAAwB,EAC3B,cAAc,EAAC,gHAAgH,EAC/H,WAAW,EAAC,0CAA0C,GACtD,GACA,GACA,CACP,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { FormattedMessage } from '@openedx/frontend-base';\n\nconst NotFoundPage = () => (\n <div className=\"container-fluid d-flex py-5 justify-content-center align-items-start text-center\">\n <p className=\"my-0 py-5 text-muted mw-32em\">\n <FormattedMessage\n id=\"error.notfound.message\"\n defaultMessage=\"The page you're looking for is unavailable or there's an error in the URL. Please check the URL and try again.\"\n description=\"error message when a page does not exist\"\n />\n </p>\n </div>\n);\n\nexport default NotFoundPage;\n"]}
@@ -0,0 +1,39 @@
1
+ export default PasswordField;
2
+ declare function PasswordField(props: any): import("react/jsx-runtime").JSX.Element;
3
+ declare namespace PasswordField {
4
+ namespace defaultProps {
5
+ let borderClass: string;
6
+ let errorMessage: string;
7
+ let handleBlur: null;
8
+ let handleFocus: null;
9
+ function handleChange(): void;
10
+ let handleErrorChange: null;
11
+ let showRequirements: boolean;
12
+ let showScreenReaderText: boolean;
13
+ let autoComplete: null;
14
+ }
15
+ namespace propTypes {
16
+ let borderClass_1: PropTypes.Requireable<string>;
17
+ export { borderClass_1 as borderClass };
18
+ let errorMessage_1: PropTypes.Requireable<string>;
19
+ export { errorMessage_1 as errorMessage };
20
+ export let floatingLabel: PropTypes.Validator<string>;
21
+ let handleBlur_1: PropTypes.Requireable<(...args: any[]) => any>;
22
+ export { handleBlur_1 as handleBlur };
23
+ let handleFocus_1: PropTypes.Requireable<(...args: any[]) => any>;
24
+ export { handleFocus_1 as handleFocus };
25
+ let handleChange_1: PropTypes.Requireable<(...args: any[]) => any>;
26
+ export { handleChange_1 as handleChange };
27
+ let handleErrorChange_1: PropTypes.Requireable<(...args: any[]) => any>;
28
+ export { handleErrorChange_1 as handleErrorChange };
29
+ export let name: PropTypes.Validator<string>;
30
+ let showRequirements_1: PropTypes.Requireable<boolean>;
31
+ export { showRequirements_1 as showRequirements };
32
+ export let value: PropTypes.Validator<string>;
33
+ let autoComplete_1: PropTypes.Requireable<string>;
34
+ export { autoComplete_1 as autoComplete };
35
+ let showScreenReaderText_1: PropTypes.Requireable<boolean>;
36
+ export { showScreenReaderText_1 as showScreenReaderText };
37
+ }
38
+ }
39
+ import PropTypes from 'prop-types';
@@ -0,0 +1,94 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { useDispatch, useSelector } from 'react-redux';
4
+ import { useIntl } from '@openedx/frontend-base';
5
+ import { Form, Icon, IconButton, OverlayTrigger, Tooltip, useToggle, } from '@openedx/paragon';
6
+ import { Check, Remove, Visibility, VisibilityOff, } from '@openedx/paragon/icons';
7
+ import PropTypes from 'prop-types';
8
+ import { LETTER_REGEX, NUMBER_REGEX } from '../data/constants';
9
+ import { clearRegistrationBackendError, fetchRealtimeValidations } from '../register/data/actions';
10
+ import { validatePasswordField } from '../register/data/utils';
11
+ import messages from './messages';
12
+ const PasswordField = (props) => {
13
+ const { formatMessage } = useIntl();
14
+ const dispatch = useDispatch();
15
+ const validationApiRateLimited = useSelector(state => state.register.validationApiRateLimited);
16
+ const [isPasswordHidden, setHiddenTrue, setHiddenFalse] = useToggle(true);
17
+ const [showTooltip, setShowTooltip] = useState(false);
18
+ const handleBlur = (e) => {
19
+ var _a;
20
+ const { name, value } = e.target;
21
+ if (name === props.name && ((_a = e.relatedTarget) === null || _a === void 0 ? void 0 : _a.name) === 'passwordIcon') {
22
+ return; // Do not run validations on password icon click
23
+ }
24
+ let passwordValue = value;
25
+ if (name === 'passwordIcon') {
26
+ // To validate actual password value when onBlur is triggered by focusing out the password icon
27
+ passwordValue = props.value;
28
+ }
29
+ if (props.handleBlur) {
30
+ props.handleBlur({
31
+ target: {
32
+ name: props.name,
33
+ value: passwordValue,
34
+ },
35
+ });
36
+ }
37
+ setShowTooltip(props.showRequirements && false);
38
+ if (props.handleErrorChange) { // If rendering from register page
39
+ const fieldError = validatePasswordField(passwordValue, formatMessage);
40
+ if (fieldError) {
41
+ props.handleErrorChange('password', fieldError);
42
+ }
43
+ else if (!validationApiRateLimited) {
44
+ dispatch(fetchRealtimeValidations({ password: passwordValue }));
45
+ }
46
+ }
47
+ };
48
+ const handleFocus = (e) => {
49
+ var _a;
50
+ if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.name) === 'passwordIcon') {
51
+ return; // Do not clear error on password icon focus
52
+ }
53
+ if (props.handleFocus) {
54
+ props.handleFocus(e);
55
+ }
56
+ if (props.handleErrorChange) {
57
+ props.handleErrorChange('password', '');
58
+ dispatch(clearRegistrationBackendError('password'));
59
+ }
60
+ setTimeout(() => setShowTooltip(props.showRequirements && true), 150);
61
+ };
62
+ const HideButton = (_jsx(IconButton, { onFocus: handleFocus, onBlur: handleBlur, name: "passwordIcon", src: VisibilityOff, iconAs: Icon, onClick: setHiddenTrue, size: "sm", variant: "secondary", alt: formatMessage(messages['hide.password']) }));
63
+ const ShowButton = (_jsx(IconButton, { onFocus: handleFocus, onBlur: handleBlur, name: "passwordIcon", src: Visibility, iconAs: Icon, onClick: setHiddenFalse, size: "sm", variant: "secondary", alt: formatMessage(messages['show.password']) }));
64
+ const placement = window.innerWidth < 768 ? 'top' : 'left';
65
+ const tooltip = (_jsxs(Tooltip, { id: `password-requirement-${placement}`, children: [_jsxs("span", { id: "letter-check", className: "d-flex align-items-center", children: [LETTER_REGEX.test(props.value) ? _jsx(Icon, { className: "text-success mr-1", src: Check }) : _jsx(Icon, { className: "mr-1 text-light-700", src: Remove }), formatMessage(messages['one.letter'])] }), _jsxs("span", { id: "number-check", className: "d-flex align-items-center", children: [NUMBER_REGEX.test(props.value) ? _jsx(Icon, { className: "text-success mr-1", src: Check }) : _jsx(Icon, { className: "mr-1 text-light-700", src: Remove }), formatMessage(messages['one.number'])] }), _jsxs("span", { id: "characters-check", className: "d-flex align-items-center", children: [props.value.length >= 8 ? _jsx(Icon, { className: "text-success mr-1", src: Check }) : _jsx(Icon, { className: "mr-1 text-light-700", src: Remove }), formatMessage(messages['eight.characters'])] })] }));
66
+ return (_jsxs(Form.Group, { controlId: props.name, isInvalid: props.errorMessage !== '', children: [_jsx(OverlayTrigger, { placement: placement, overlay: tooltip, show: showTooltip, children: _jsx(Form.Control, { as: "input", className: "form-group__form-field", type: isPasswordHidden ? 'password' : 'text', name: props.name, value: props.value, autoComplete: props.autoComplete, "aria-invalid": props.errorMessage !== '', onFocus: handleFocus, onBlur: handleBlur, onChange: props.handleChange, controlClassName: props.borderClass, trailingElement: isPasswordHidden ? ShowButton : HideButton, floatingLabel: props.floatingLabel }) }, "tooltip"), props.errorMessage !== '' && (_jsxs(Form.Control.Feedback, { className: "form-text-size", hasIcon: false, "feedback-for": props.name, type: "invalid", children: [props.errorMessage, props.showScreenReaderText && _jsx("span", { className: "sr-only", children: formatMessage(messages['password.sr.only.helping.text']) })] }, "error"))] }));
67
+ };
68
+ PasswordField.defaultProps = {
69
+ borderClass: '',
70
+ errorMessage: '',
71
+ handleBlur: null,
72
+ handleFocus: null,
73
+ handleChange: () => { },
74
+ handleErrorChange: null,
75
+ showRequirements: true,
76
+ showScreenReaderText: true,
77
+ autoComplete: null,
78
+ };
79
+ PasswordField.propTypes = {
80
+ borderClass: PropTypes.string,
81
+ errorMessage: PropTypes.string,
82
+ floatingLabel: PropTypes.string.isRequired,
83
+ handleBlur: PropTypes.func,
84
+ handleFocus: PropTypes.func,
85
+ handleChange: PropTypes.func,
86
+ handleErrorChange: PropTypes.func,
87
+ name: PropTypes.string.isRequired,
88
+ showRequirements: PropTypes.bool,
89
+ value: PropTypes.string.isRequired,
90
+ autoComplete: PropTypes.string,
91
+ showScreenReaderText: PropTypes.bool,
92
+ };
93
+ export default PasswordField;
94
+ //# sourceMappingURL=PasswordField.js.map