verben-authentication-ui 0.3.3 → 0.3.5

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 (292) hide show
  1. package/esm2022/lib/components/button/button.component.mjs +46 -0
  2. package/esm2022/lib/components/button/button.module.mjs +20 -0
  3. package/esm2022/lib/components/forgot-password/ForgotPasswordData.mjs +2 -0
  4. package/esm2022/lib/components/forgot-password/forgot-password.component.mjs +89 -0
  5. package/esm2022/lib/components/forgot-password/forgot-password.module.mjs +34 -0
  6. package/esm2022/lib/components/mail/mail.component.mjs +69 -0
  7. package/esm2022/lib/components/mail/mail.module.mjs +21 -0
  8. package/esm2022/lib/components/mail-validation/mail-validation.component.mjs +108 -0
  9. package/esm2022/lib/components/mail-validation/mail-validation.module.mjs +34 -0
  10. package/esm2022/lib/components/o-auth/o-auth.component.mjs +123 -0
  11. package/esm2022/lib/components/o-auth/o-auth.module.mjs +19 -0
  12. package/esm2022/lib/components/otp-input/otp-input.component.mjs +75 -0
  13. package/esm2022/lib/components/otp-input/otp-input.module.mjs +23 -0
  14. package/esm2022/lib/components/reset-password/ResetPasswordData.mjs +2 -0
  15. package/esm2022/lib/components/reset-password/reset-password.component.mjs +107 -0
  16. package/esm2022/lib/components/reset-password/reset-password.module.mjs +34 -0
  17. package/esm2022/lib/components/sign-in/sign-in.component.mjs +240 -0
  18. package/esm2022/lib/components/sign-in/sign-in.module.mjs +24 -0
  19. package/esm2022/lib/components/sign-up/sign-up.component.mjs +223 -0
  20. package/esm2022/lib/components/sign-up/sign-up.module.mjs +24 -0
  21. package/esm2022/lib/components/sso/base-table-style.mjs +53 -0
  22. package/esm2022/lib/components/sso/helper.mjs +14 -0
  23. package/esm2022/lib/components/sso/sso-form/sso-form.component.mjs +74 -0
  24. package/esm2022/lib/components/sso/sso.columns.mjs +29 -0
  25. package/esm2022/lib/components/sso/sso.component.mjs +236 -0
  26. package/esm2022/lib/components/sso/sso.module.mjs +63 -0
  27. package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.mjs +228 -0
  28. package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.mjs +22 -0
  29. package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.mjs +90 -0
  30. package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.mjs +19 -0
  31. package/esm2022/lib/components/user-management/base-table-style.mjs +53 -0
  32. package/esm2022/lib/components/user-management/helper.mjs +26 -0
  33. package/esm2022/lib/components/user-management/useer-management.module.mjs +68 -0
  34. package/esm2022/lib/components/user-management/user-management-form/use-management-form.component.mjs +57 -0
  35. package/esm2022/lib/components/user-management/user-management.columns.mjs +43 -0
  36. package/esm2022/lib/components/user-management/user-management.component.mjs +323 -0
  37. package/esm2022/lib/components/user-request/user-request.component.mjs +206 -0
  38. package/esm2022/lib/components/user-request/user-request.module.mjs +34 -0
  39. package/esm2022/lib/components/user-request-approval/access-request.columns.mjs +24 -0
  40. package/esm2022/lib/components/user-request-approval/base-table-style.mjs +53 -0
  41. package/esm2022/lib/components/user-request-approval/facades/user-access-request.facade.mjs +128 -0
  42. package/esm2022/lib/components/user-request-approval/helper.mjs +35 -0
  43. package/esm2022/lib/components/user-request-approval/services/user-access-request.service.mjs +72 -0
  44. package/esm2022/lib/components/user-request-approval/states/user-access-request.state.mjs +59 -0
  45. package/esm2022/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.mjs +26 -0
  46. package/esm2022/lib/components/user-request-approval/user-request-approval.component.mjs +251 -0
  47. package/esm2022/lib/components/user-request-approval/user-request-approval.module.mjs +77 -0
  48. package/esm2022/lib/components/user-request-approval/user-request-approval.service.mjs +32 -0
  49. package/esm2022/lib/components/user-request-approval/user-request-form/use-request-form.component.mjs +64 -0
  50. package/esm2022/lib/models/ErrorResponse.mjs +11 -0
  51. package/esm2022/lib/models/PasswordRequestParam.mjs +2 -0
  52. package/esm2022/lib/models/ResponseKeyValue.mjs +2 -0
  53. package/esm2022/lib/models/UserRequest.mjs +2 -0
  54. package/esm2022/lib/models/auth-mechanism.mjs +8 -0
  55. package/esm2022/lib/models/base.mjs +2 -0
  56. package/esm2022/lib/models/log-in.mjs +2 -0
  57. package/esm2022/lib/models/mainUser.mjs +2 -0
  58. package/esm2022/lib/models/object-state.mjs +8 -0
  59. package/esm2022/lib/models/otpValue.mjs +2 -0
  60. package/esm2022/lib/models/paged.mjs +2 -0
  61. package/esm2022/lib/models/query-params.mjs +2 -0
  62. package/esm2022/lib/models/request-status.mjs +5 -0
  63. package/esm2022/lib/models/resend-otp-data.mjs +2 -0
  64. package/esm2022/lib/models/sign-up.mjs +2 -0
  65. package/esm2022/lib/models/single-sign-on.mjs +2 -0
  66. package/esm2022/lib/models/status.mjs +6 -0
  67. package/esm2022/lib/models/user-access-request-status.mjs +7 -0
  68. package/esm2022/lib/models/user-access-request.mjs +2 -0
  69. package/esm2022/lib/models/user.mjs +2 -0
  70. package/esm2022/lib/services/environment.service.mjs +26 -0
  71. package/esm2022/lib/services/http-web-request.service.mjs +82 -0
  72. package/esm2022/lib/services/util.service.mjs +32 -0
  73. package/esm2022/public-api.mjs +43 -0
  74. package/esm2022/verben-authentication-ui.mjs +5 -0
  75. package/fesm2022/verben-authentication-ui.mjs +3702 -0
  76. package/fesm2022/verben-authentication-ui.mjs.map +1 -0
  77. package/index.d.ts +5 -0
  78. package/lib/components/button/button.component.d.ts +17 -0
  79. package/lib/components/button/button.module.d.ts +10 -0
  80. package/{src/lib/components/forgot-password/ForgotPasswordData.ts → lib/components/forgot-password/ForgotPasswordData.d.ts} +1 -1
  81. package/lib/components/forgot-password/forgot-password.component.d.ts +29 -0
  82. package/lib/components/forgot-password/forgot-password.module.d.ts +10 -0
  83. package/lib/components/mail/mail.component.d.ts +32 -0
  84. package/lib/components/mail/mail.module.d.ts +11 -0
  85. package/lib/components/mail-validation/mail-validation.component.d.ts +42 -0
  86. package/lib/components/mail-validation/mail-validation.module.d.ts +10 -0
  87. package/lib/components/o-auth/o-auth.component.d.ts +27 -0
  88. package/lib/components/o-auth/o-auth.module.d.ts +9 -0
  89. package/lib/components/otp-input/otp-input.component.d.ts +20 -0
  90. package/lib/components/otp-input/otp-input.module.d.ts +13 -0
  91. package/lib/components/reset-password/ResetPasswordData.d.ts +5 -0
  92. package/lib/components/reset-password/reset-password.component.d.ts +30 -0
  93. package/lib/components/reset-password/reset-password.module.d.ts +10 -0
  94. package/lib/components/sign-in/sign-in.component.d.ts +81 -0
  95. package/lib/components/sign-in/sign-in.module.d.ts +13 -0
  96. package/lib/components/sign-up/sign-up.component.d.ts +66 -0
  97. package/lib/components/sign-up/sign-up.module.d.ts +13 -0
  98. package/lib/components/sso/base-table-style.d.ts +1 -0
  99. package/lib/components/sso/helper.d.ts +2 -0
  100. package/lib/components/sso/sso-form/sso-form.component.d.ts +21 -0
  101. package/lib/components/sso/sso.columns.d.ts +3 -0
  102. package/lib/components/sso/sso.component.d.ts +54 -0
  103. package/lib/components/sso/sso.module.d.ts +11 -0
  104. package/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.d.ts +67 -0
  105. package/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.d.ts +12 -0
  106. package/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.d.ts +39 -0
  107. package/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.d.ts +9 -0
  108. package/lib/components/user-management/base-table-style.d.ts +1 -0
  109. package/lib/components/user-management/helper.d.ts +2 -0
  110. package/lib/components/user-management/useer-management.module.d.ts +11 -0
  111. package/lib/components/user-management/user-management-form/use-management-form.component.d.ts +20 -0
  112. package/lib/components/user-management/user-management.columns.d.ts +3 -0
  113. package/lib/components/user-management/user-management.component.d.ts +60 -0
  114. package/lib/components/user-request/user-request.component.d.ts +60 -0
  115. package/lib/components/user-request/user-request.module.d.ts +10 -0
  116. package/lib/components/user-request-approval/access-request.columns.d.ts +3 -0
  117. package/lib/components/user-request-approval/base-table-style.d.ts +1 -0
  118. package/lib/components/user-request-approval/facades/user-access-request.facade.d.ts +23 -0
  119. package/lib/components/user-request-approval/helper.d.ts +6 -0
  120. package/lib/components/user-request-approval/services/user-access-request.service.d.ts +50 -0
  121. package/lib/components/user-request-approval/states/user-access-request.state.d.ts +21 -0
  122. package/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.d.ts +12 -0
  123. package/lib/components/user-request-approval/user-request-approval.component.d.ts +59 -0
  124. package/lib/components/user-request-approval/user-request-approval.module.d.ts +12 -0
  125. package/lib/components/user-request-approval/user-request-approval.service.d.ts +18 -0
  126. package/lib/components/user-request-approval/user-request-form/use-request-form.component.d.ts +21 -0
  127. package/lib/models/ErrorResponse.d.ts +6 -0
  128. package/lib/models/PasswordRequestParam.d.ts +5 -0
  129. package/lib/models/ResponseKeyValue.d.ts +5 -0
  130. package/lib/models/UserRequest.d.ts +24 -0
  131. package/lib/models/auth-mechanism.d.ts +13 -0
  132. package/lib/models/base.d.ts +10 -0
  133. package/lib/models/log-in.d.ts +7 -0
  134. package/{src/lib/models/mainUser.ts → lib/models/mainUser.d.ts} +2 -3
  135. package/lib/models/object-state.d.ts +6 -0
  136. package/{src/lib/models/otpValue.ts → lib/models/otpValue.d.ts} +1 -3
  137. package/lib/models/paged.d.ts +9 -0
  138. package/lib/models/query-params.d.ts +7 -0
  139. package/lib/models/request-status.d.ts +3 -0
  140. package/lib/models/resend-otp-data.d.ts +8 -0
  141. package/lib/models/sign-up.d.ts +9 -0
  142. package/lib/models/single-sign-on.d.ts +7 -0
  143. package/lib/models/status.d.ts +4 -0
  144. package/lib/models/user-access-request-status.d.ts +5 -0
  145. package/{src/lib/models/user-access-request.ts → lib/models/user-access-request.d.ts} +3 -4
  146. package/lib/models/user.d.ts +23 -0
  147. package/lib/services/environment.service.d.ts +16 -0
  148. package/lib/services/http-web-request.service.d.ts +23 -0
  149. package/lib/services/util.service.d.ts +8 -0
  150. package/package.json +14 -8
  151. package/{src/public-api.ts → public-api.d.ts} +0 -21
  152. package/ng-package.json +0 -8
  153. package/src/lib/components/button/button.component.css +0 -3
  154. package/src/lib/components/button/button.component.html +0 -13
  155. package/src/lib/components/button/button.component.spec.ts +0 -23
  156. package/src/lib/components/button/button.component.ts +0 -24
  157. package/src/lib/components/button/button.module.ts +0 -11
  158. package/src/lib/components/forgot-password/forgot-password.component.css +0 -29
  159. package/src/lib/components/forgot-password/forgot-password.component.html +0 -13
  160. package/src/lib/components/forgot-password/forgot-password.component.spec.ts +0 -23
  161. package/src/lib/components/forgot-password/forgot-password.component.ts +0 -86
  162. package/src/lib/components/forgot-password/forgot-password.module.ts +0 -18
  163. package/src/lib/components/mail/mail.component.css +0 -0
  164. package/src/lib/components/mail/mail.component.html +0 -11
  165. package/src/lib/components/mail/mail.component.spec.ts +0 -23
  166. package/src/lib/components/mail/mail.component.ts +0 -47
  167. package/src/lib/components/mail/mail.module.ts +0 -13
  168. package/src/lib/components/mail-validation/mail-validation.component.css +0 -59
  169. package/src/lib/components/mail-validation/mail-validation.component.html +0 -37
  170. package/src/lib/components/mail-validation/mail-validation.component.spec.ts +0 -23
  171. package/src/lib/components/mail-validation/mail-validation.component.ts +0 -66
  172. package/src/lib/components/mail-validation/mail-validation.module.ts +0 -18
  173. package/src/lib/components/o-auth/o-auth.component.css +0 -21
  174. package/src/lib/components/o-auth/o-auth.component.html +0 -60
  175. package/src/lib/components/o-auth/o-auth.component.spec.ts +0 -23
  176. package/src/lib/components/o-auth/o-auth.component.ts +0 -43
  177. package/src/lib/components/o-auth/o-auth.module.ts +0 -11
  178. package/src/lib/components/otp-input/otp-input.component.css +0 -19
  179. package/src/lib/components/otp-input/otp-input.component.html +0 -14
  180. package/src/lib/components/otp-input/otp-input.component.spec.ts +0 -23
  181. package/src/lib/components/otp-input/otp-input.component.ts +0 -73
  182. package/src/lib/components/otp-input/otp-input.module.ts +0 -15
  183. package/src/lib/components/reset-password/ResetPasswordData.ts +0 -5
  184. package/src/lib/components/reset-password/reset-password.component.css +0 -29
  185. package/src/lib/components/reset-password/reset-password.component.html +0 -22
  186. package/src/lib/components/reset-password/reset-password.component.spec.ts +0 -23
  187. package/src/lib/components/reset-password/reset-password.component.ts +0 -108
  188. package/src/lib/components/reset-password/reset-password.module.ts +0 -18
  189. package/src/lib/components/sign-in/sign-in.component.css +0 -21
  190. package/src/lib/components/sign-in/sign-in.component.html +0 -84
  191. package/src/lib/components/sign-in/sign-in.component.spec.ts +0 -23
  192. package/src/lib/components/sign-in/sign-in.component.ts +0 -184
  193. package/src/lib/components/sign-in/sign-in.module.ts +0 -17
  194. package/src/lib/components/sign-up/sign-up.component.css +0 -36
  195. package/src/lib/components/sign-up/sign-up.component.html +0 -132
  196. package/src/lib/components/sign-up/sign-up.component.spec.ts +0 -23
  197. package/src/lib/components/sign-up/sign-up.component.ts +0 -176
  198. package/src/lib/components/sign-up/sign-up.module.ts +0 -15
  199. package/src/lib/components/sso/base-table-style.ts +0 -52
  200. package/src/lib/components/sso/helper.ts +0 -15
  201. package/src/lib/components/sso/sso-form/sso-form.component.css +0 -13
  202. package/src/lib/components/sso/sso-form/sso-form.component.html +0 -109
  203. package/src/lib/components/sso/sso-form/sso-form.component.spec.ts +0 -23
  204. package/src/lib/components/sso/sso-form/sso-form.component.ts +0 -70
  205. package/src/lib/components/sso/sso.columns.ts +0 -32
  206. package/src/lib/components/sso/sso.component.css +0 -47
  207. package/src/lib/components/sso/sso.component.html +0 -208
  208. package/src/lib/components/sso/sso.component.spec.ts +0 -23
  209. package/src/lib/components/sso/sso.component.ts +0 -261
  210. package/src/lib/components/sso/sso.module.ts +0 -40
  211. package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.css +0 -8
  212. package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.html +0 -30
  213. package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.spec.ts +0 -23
  214. package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.ts +0 -183
  215. package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.ts +0 -15
  216. package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.css +0 -17
  217. package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.html +0 -45
  218. package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.spec.ts +0 -23
  219. package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.ts +0 -57
  220. package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.ts +0 -11
  221. package/src/lib/components/user-management/base-table-style.ts +0 -52
  222. package/src/lib/components/user-management/helper.ts +0 -29
  223. package/src/lib/components/user-management/index.ts +0 -4
  224. package/src/lib/components/user-management/useer-management.module.ts +0 -48
  225. package/src/lib/components/user-management/user-management-form/use-management-form.component.ts +0 -61
  226. package/src/lib/components/user-management/user-management-form/user-management-form.component.css +0 -0
  227. package/src/lib/components/user-management/user-management-form/user-management-form.component.html +0 -91
  228. package/src/lib/components/user-management/user-management-form/user-management-form.component.spec.ts +0 -23
  229. package/src/lib/components/user-management/user-management.columns.ts +0 -45
  230. package/src/lib/components/user-management/user-management.component.css +0 -26
  231. package/src/lib/components/user-management/user-management.component.html +0 -275
  232. package/src/lib/components/user-management/user-management.component.spec.ts +0 -23
  233. package/src/lib/components/user-management/user-management.component.ts +0 -380
  234. package/src/lib/components/user-management/user-management.service.ts +0 -42
  235. package/src/lib/components/user-request/user-request.component.css +0 -91
  236. package/src/lib/components/user-request/user-request.component.html +0 -165
  237. package/src/lib/components/user-request/user-request.component.spec.ts +0 -23
  238. package/src/lib/components/user-request/user-request.component.ts +0 -167
  239. package/src/lib/components/user-request/user-request.module.ts +0 -18
  240. package/src/lib/components/user-request-approval/access-request.columns.ts +0 -26
  241. package/src/lib/components/user-request-approval/base-table-style.ts +0 -52
  242. package/src/lib/components/user-request-approval/facades/user-access-request.facade.ts +0 -152
  243. package/src/lib/components/user-request-approval/helper.ts +0 -39
  244. package/src/lib/components/user-request-approval/services/user-access-request.service.spec.ts +0 -16
  245. package/src/lib/components/user-request-approval/services/user-access-request.service.ts +0 -87
  246. package/src/lib/components/user-request-approval/states/user-access-request.state.ts +0 -65
  247. package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.css +0 -0
  248. package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.html +0 -7
  249. package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.spec.ts +0 -23
  250. package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.ts +0 -22
  251. package/src/lib/components/user-request-approval/user-request-approval.component.css +0 -1
  252. package/src/lib/components/user-request-approval/user-request-approval.component.html +0 -218
  253. package/src/lib/components/user-request-approval/user-request-approval.component.spec.ts +0 -23
  254. package/src/lib/components/user-request-approval/user-request-approval.component.ts +0 -301
  255. package/src/lib/components/user-request-approval/user-request-approval.module.ts +0 -52
  256. package/src/lib/components/user-request-approval/user-request-approval.service.spec.ts +0 -16
  257. package/src/lib/components/user-request-approval/user-request-approval.service.ts +0 -58
  258. package/src/lib/components/user-request-approval/user-request-form/use-request-form.component.ts +0 -66
  259. package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.css +0 -0
  260. package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.html +0 -97
  261. package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.spec.ts +0 -23
  262. package/src/lib/models/ErrorResponse.ts +0 -7
  263. package/src/lib/models/PasswordRequestParam.ts +0 -5
  264. package/src/lib/models/ResponseKeyValue.ts +0 -5
  265. package/src/lib/models/UserRequest.ts +0 -28
  266. package/src/lib/models/auth-mechanism.ts +0 -14
  267. package/src/lib/models/base.ts +0 -11
  268. package/src/lib/models/log-in.ts +0 -7
  269. package/src/lib/models/object-state.ts +0 -6
  270. package/src/lib/models/paged.ts +0 -9
  271. package/src/lib/models/query-params.ts +0 -7
  272. package/src/lib/models/request-status.ts +0 -4
  273. package/src/lib/models/resend-otp-data.ts +0 -8
  274. package/src/lib/models/resource.ts +0 -27
  275. package/src/lib/models/sign-up.ts +0 -11
  276. package/src/lib/models/single-sign-on.ts +0 -9
  277. package/src/lib/models/status.ts +0 -5
  278. package/src/lib/models/user-access-request-status.ts +0 -5
  279. package/src/lib/models/user.ts +0 -24
  280. package/src/lib/services/environment.service.spec.ts +0 -16
  281. package/src/lib/services/environment.service.ts +0 -23
  282. package/src/lib/services/http-web-request.service.spec.ts +0 -16
  283. package/src/lib/services/http-web-request.service.ts +0 -101
  284. package/src/lib/services/util.service.spec.ts +0 -16
  285. package/src/lib/services/util.service.ts +0 -28
  286. package/src/styles.css +0 -96
  287. package/src/theme/tailwind-setup.css +0 -3
  288. package/src/theme/tailwind.css +0 -980
  289. package/tailwind.config.js +0 -20
  290. package/tsconfig.lib.json +0 -15
  291. package/tsconfig.lib.prod.json +0 -11
  292. package/tsconfig.spec.json +0 -15
@@ -1,108 +0,0 @@
1
- import { Component, EventEmitter, Input, Output } from '@angular/core';
2
- import {
3
- AbstractControl,
4
- FormBuilder,
5
- FormControl,
6
- FormGroup,
7
- ValidationErrors,
8
- Validators,
9
- } from '@angular/forms';
10
- import { ResetPasswordData } from './ResetPasswordData';
11
- import { HttpWebRequestService } from '../../services/http-web-request.service';
12
- import { ErrorResponse } from '../../models/ErrorResponse';
13
- import { ResponseKeyValue } from '../../models/ResponseKeyValue';
14
- import { PasswordRequestParam } from '../../models/PasswordRequestParam';
15
- import { UtilService } from '../../services/util.service';
16
-
17
- @Component({
18
- selector: 'verben-reset-password',
19
- templateUrl: './reset-password.component.html',
20
- styleUrl: './reset-password.component.css',
21
- })
22
-
23
- export class ResetPasswordComponent {
24
- @Input() title: string = 'Reset Password';
25
- @Input() subTitle: string = 'Create a New Password';
26
- @Input() buttonCaption: string = 'Submit';
27
- @Input() buttonTextColor?: string;
28
- @Input() buttonBackgroundColor?: string;
29
- @Input() showOldPassword: boolean = false;
30
- @Input() token?: string;
31
-
32
- @Output() onSubmit: EventEmitter<ResetPasswordData> = new EventEmitter();
33
- @Output() onSubmitEnd: EventEmitter<ResponseKeyValue | ErrorResponse> =
34
- new EventEmitter();
35
-
36
- resetPasswordForm: FormGroup;
37
-
38
- constructor(
39
- private fb: FormBuilder,
40
- private server: HttpWebRequestService,
41
- private utilService: UtilService
42
- ) {
43
- this.resetPasswordForm = this.fb.group({
44
- OldPassword: new FormControl<string | null>(
45
- null,
46
- this.oldPasswordValidator.bind(this)
47
- ),
48
- Password: new FormControl<string | null>(null, Validators.required),
49
- ConfirmPassword: new FormControl<string | null>(null, [
50
- Validators.required,
51
- this.confirmPasswordValidator.bind(this),
52
- ]),
53
- });
54
- }
55
-
56
- checkForm(): boolean {
57
- return this.resetPasswordForm.valid;
58
- }
59
-
60
- oldPasswordValidator(control: AbstractControl): ValidationErrors | null {
61
- if (this.showOldPassword && control.value == null) {
62
- return { customValidation: true };
63
- }
64
- return null;
65
- }
66
- confirmPasswordValidator(control: AbstractControl): ValidationErrors | null {
67
- if (
68
- this.resetPasswordForm &&
69
- this.resetPasswordForm.controls['Password'] &&
70
- this.resetPasswordForm.controls['Password'].value !== control.value
71
- ) {
72
- return { customValidation: true };
73
- }
74
- return null;
75
- }
76
-
77
- async submit() {
78
- if (!this.checkForm()) {
79
- return;
80
- }
81
- var data: ResetPasswordData = {
82
- OldPassword: this.showOldPassword
83
- ? this.resetPasswordForm.controls['OldPassword'].value
84
- : undefined,
85
- Password: this.resetPasswordForm.controls['Password'].value,
86
- ConfirmPassword: this.resetPasswordForm.controls['ConfirmPassword'].value,
87
- };
88
- this.onSubmit.emit(data);
89
- var passwordRequest: PasswordRequestParam = {
90
- NewPassword: data.Password,
91
- OldPassword: data.OldPassword,
92
- Token: this.token,
93
- };
94
- this.utilService.sendBI(true);
95
- const res = await this.server.post(
96
- `User/CompleteChangePasswordRequest`,
97
- passwordRequest
98
- );
99
- this.utilService.sendBI(false);
100
- if (res instanceof ErrorResponse) {
101
- this.onSubmitEnd.emit(res);
102
- } else {
103
- var result = res as ResponseKeyValue;
104
- this.onSubmitEnd.emit(result);
105
- }
106
- }
107
- }
108
-
@@ -1,18 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { ResetPasswordComponent } from './reset-password.component';
3
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
4
- import { VerbenaButtonModule, VerbenaInputModule } from 'verben-ng-ui';
5
- import { CommonModule } from '@angular/common';
6
-
7
- @NgModule({
8
- declarations: [ResetPasswordComponent],
9
- imports: [
10
- FormsModule,
11
- ReactiveFormsModule,
12
- VerbenaInputModule,
13
- VerbenaButtonModule,
14
- CommonModule,
15
- ],
16
- exports: [ResetPasswordComponent],
17
- })
18
- export class ResetPasswordModule {}
@@ -1,21 +0,0 @@
1
- a{
2
- text-decoration: underline;
3
- }
4
-
5
- .flexWrapper{
6
- display: flex;
7
- flex-direction: column;
8
- gap:20px;
9
- margin-top: 12px;
10
- }
11
- .formWrapper{
12
- display: flex;
13
- flex-direction: column;
14
- gap:20px;
15
- }
16
-
17
- .pwdWrapper{
18
- display: flex;
19
- justify-content: flex-end;
20
- cursor: pointer;
21
- }
@@ -1,84 +0,0 @@
1
- <section
2
- [ngStyle]="styles"
3
- class="{{ customClass }}"
4
- >
5
- <h2 class="{{headlingClass}}">{{headlingText}}</h2>
6
- <form [formGroup]="loginForm" (ngSubmit)="submit()" class="flexWrapper">
7
- <div class="formWrapper" *ngIf="showform">
8
- <verbena-input
9
- [label]="'Email'"
10
- [labelColor]="inputLabelColor"
11
- [placeHolder]="''"
12
- [required]="true"
13
- [type]="'email'"
14
- formControlName="Email"
15
- [showBorder]="true"
16
- [bgColor]="inputBgColor"
17
- [border]="inputBorder"
18
- [borderRadius]="inputBorderRadius"
19
- [showErrorMessage]="true"
20
- [errorMessageColor]="'red'"
21
- [errorBorderColor]="'red'"
22
- [errorPosition]="'bottom'"
23
- class="outline-none focus-none"
24
- ></verbena-input>
25
- <div>
26
- <verbena-input
27
- [label]="'Password'"
28
- [labelColor]="inputLabelColor"
29
- [placeHolder]="''"
30
- [required]="true"
31
- [type]="'password'"
32
- formControlName="Password"
33
- [showBorder]="true"
34
- [bgColor]="inputBgColor"
35
- [border]="inputBorder"
36
- [borderRadius]="inputBorderRadius"
37
- [showErrorMessage]="true"
38
- [errorMessageColor]="'red'"
39
- [errorBorderColor]="'red'"
40
- [errorPosition]="'bottom'"
41
- [passwordToggle]="true"
42
- [customErrorMessages]="{
43
- password:'length must be 5 characters'
44
- }"
45
- class="outline-none focus-none"
46
- ></verbena-input>
47
- <div class="pwdWrapper">
48
- <p clas="mb-0"> <a [routerLink]="forgetPasswordLink" class="{{forgetPasswordClass}}">Forgot password</a></p>
49
- </div>
50
- </div>
51
- <lib-button
52
- [buttonClass]="btnClass"
53
- [color]="btnColor"
54
- [border]="btnBorder"
55
- [borderRadius]="btnBorderRadius"
56
- [bgColor]="btnBgColor"
57
- [pd]="btnPd"
58
- [text]="btnText"
59
- type="submit"
60
- [disabled]="!this.checkForm()"
61
- ></lib-button>
62
- </div>
63
- <div>
64
- <p *ngIf="requestAccessLink">
65
- <a [routerLink]="requestAccessLink" class="{{requestAccessClass}}">Click here to request user access</a>
66
- </p>
67
- <div>
68
- <div *ngIf="AuthMechanisms !== null">
69
- <verben-o-auth
70
- [authMechanisms]="AuthMechanisms"
71
- (googleClick)="handleGoogleAuth()"
72
- (appleClick)="handleAppleAuth()"
73
- (microsoftClick)="handleMicrosoft()"
74
- ></verben-o-auth>
75
- </div>
76
- <p class="{{createAccountClass}}" *ngIf="createAccountLink">
77
- Don't have an account?
78
- <a [routerLink]="createAccountLink" class="{{createAccountLinkClass}}">Create an account</a>
79
- </p>
80
- </div>
81
- </div>
82
- </form>
83
- </section>
84
-
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { SignInComponent } from './sign-in.component';
4
-
5
- describe('SignInComponent', () => {
6
- let component: SignInComponent;
7
- let fixture: ComponentFixture<SignInComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [SignInComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(SignInComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,184 +0,0 @@
1
- import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
2
- import {
3
- AbstractControl,
4
- FormBuilder,
5
- FormControl,
6
- FormGroup,
7
- ValidationErrors,
8
- Validators,
9
- } from '@angular/forms';
10
- import { LoginData } from '../../models/log-in';
11
- import { HttpWebRequestService } from '../../services/http-web-request.service';
12
- import { UtilService } from '../../services/util.service';
13
- import { ErrorResponse } from '../../models/ErrorResponse';
14
- import { ResponseKeyValue } from '../../models/ResponseKeyValue';
15
- import { EnvironmentService } from '../../services/environment.service'
16
- import { AuthMechanism, MechanismType } from '../../models/auth-mechanism';
17
-
18
-
19
- @Component({
20
- selector: 'verben-sign-in',
21
- templateUrl: './sign-in.component.html',
22
- styleUrl: './sign-in.component.css'
23
- })
24
-
25
- export class SignInComponent implements OnInit {
26
- @Input() headlingText: string = 'Sign in';
27
- @Input() width: string = '';
28
- @Input() maxWidth: string = '';
29
- @Input() margin: string = '';
30
- @Input() pd: string = '';
31
- @Input() customClass: string = ''
32
- @Input() headlingClass: string = ''
33
- @Input() bgColor: string = '#fff';
34
- @Input() boxShadow: string = '4px 4px 4px rgba(0, 0, 0, 0.25)';
35
- @Input() border: string = '1px solid #66666680';
36
- @Input() borderRadius: string = '24px';
37
- @Input() textColor: string = '#333';
38
- @Input() height: string = 'auto';
39
- @Input() forgetPasswordClass: string = '';
40
- @Input() requestAccessClass: string = '';
41
- @Input() createAccountClass: string = '';
42
- @Input() createAccountLinkClass: string = '';
43
-
44
- // links
45
- @Input() forgetPasswordLink: string = '';
46
- @Input() createAccountLink: string = '';
47
- @Input() requestAccessLink: string = '';
48
-
49
- // button styles
50
- @Input() btnClass: string = ''
51
- @Input() btnBgColor: string = '#FFE681'
52
- @Input() btnColor: string = ''
53
- @Input() btnBorder: string = ''
54
- @Input() btnBorderRadius: string = '24px'
55
- @Input() btnPd: string = '';
56
- @Input() btnText: string = 'Log in';
57
-
58
- //inputStyles
59
- @Input() inputLabelColor: string = ''
60
- @Input() inputBgColor: string = 'transparent'
61
- @Input() inputBorder: string = '1px solid #66666659'
62
- @Input() inputBorderRadius: string = '12px'
63
- @Input() termsErrorText: string = 'Please agree to the terms of use and privacy policy.'
64
-
65
- @Output() formSubmit = new EventEmitter<LoginData>();
66
- @Output() onSubmitEnd: EventEmitter<ResponseKeyValue | ErrorResponse> = new EventEmitter();
67
- @Output() googleClick = new EventEmitter();
68
- @Output() microsoftClick = new EventEmitter();
69
- @Output() appleClick = new EventEmitter();
70
-
71
- tenantDetails:any | null = null;
72
- AuthMechanisms:AuthMechanism[] | null = null
73
- showform:boolean = false;
74
- loginForm: FormGroup;
75
- apiKey:string;
76
- secret:string;
77
-
78
- constructor(private fb: FormBuilder,
79
- private server: HttpWebRequestService,
80
- private utilService: UtilService,
81
- private envSvc: EnvironmentService,
82
- ) {
83
- this.loginForm = this.fb.group({
84
- Email: new FormControl<string | null>(null, [
85
- Validators.required,
86
- Validators.email,
87
- ]),
88
- Password: new FormControl<string | null>(null, [
89
- Validators.required,
90
- Validators.minLength(5),
91
- ]),
92
- });
93
- this.apiKey = this.envSvc.environment.APIKey
94
- this.secret = this.envSvc.environment.Secret
95
- }
96
-
97
- ngOnInit(){
98
- this.getTenantConfig()
99
- }
100
-
101
- async getTenantConfig(){
102
- const res = await this.server.get(
103
- `Tenant/GetTenantConfigByKey/${this.apiKey}`
104
- );
105
- this.tenantDetails = res;
106
- this.AuthMechanisms = this.tenantDetails?.AuthMechanisms;
107
- if(!this.tenantDetails?.AuthMechanism && this.tenantDetails?.AuthMechanism !== MechanismType.InApp){
108
- this.showform = false;
109
- }else if(this.tenantDetails?.AuthMechanism === MechanismType.InApp){
110
- this.showform = true;
111
- }else if(this.AuthMechanisms !== null){
112
- this.showform = this.AuthMechanisms.some(item =>
113
- item.AuthMechanism.includes(MechanismType.InApp)
114
- )
115
- }
116
- }
117
-
118
- checkForm(): boolean {
119
- return this.loginForm.valid;
120
- }
121
-
122
- async submit() {
123
- if (!this.checkForm()) {
124
- return;
125
- }
126
-
127
- const data: LoginData = {
128
- MailAddress: this.loginForm.controls['Email'].value,
129
- Password: this.loginForm.controls['Password'].value,
130
- LoginType:this.tenantDetails?.AuthMechanism,
131
- APIKey:this.apiKey,
132
- Secrete:this.secret
133
- };
134
-
135
- this.formSubmit.emit(data);
136
-
137
- this.utilService.sendBI(true);
138
- const res = await this.server.post(
139
- `Authentication/Login`,data
140
- );
141
- this.utilService.sendBI(false);
142
- if (res instanceof ErrorResponse) {
143
- this.onSubmitEnd.emit(res);
144
- } else {
145
- var result = res as ResponseKeyValue;
146
- this.onSubmitEnd.emit(result);
147
- }
148
- }
149
-
150
- handleGoogleAuth() {
151
- if(this.AuthMechanisms !== null){
152
- const data = this.AuthMechanisms.filter(item => item.AuthMechanism === MechanismType.Google)
153
- this.googleClick.emit();
154
- }
155
- }
156
- handleMicrosoft(){
157
- if(this.AuthMechanisms !== null){
158
- const data = this.AuthMechanisms.filter(item => item.AuthMechanism === MechanismType.MicrosoftAD)
159
- this.microsoftClick.emit();
160
- }
161
- }
162
- handleAppleAuth() {
163
- if(this.AuthMechanisms !== null){
164
- const data = this.AuthMechanisms.filter(item => item.AuthMechanism === MechanismType.Apple)
165
- this.appleClick.emit();
166
- }
167
- }
168
-
169
- get styles() {
170
- return {
171
- 'background-color': this.bgColor,
172
- 'box-shadow': this.boxShadow,
173
- 'border': this.border,
174
- 'border-radius': this.borderRadius,
175
- 'color': this.textColor,
176
- 'width': this.width,
177
- 'max-width':this.maxWidth,
178
- 'margin':this.margin,
179
- 'height': this.height,
180
- 'padding':this.pd
181
- };
182
- }
183
-
184
- }
@@ -1,17 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { SignInComponent } from '../sign-in/sign-in.component';
4
- import { FormsModule } from '@angular/forms';
5
- import { RouterLink} from '@angular/router';
6
- import { VerbenaButtonModule, VerbenaInputModule } from 'verben-ng-ui';
7
- import { OAuthModule } from '../o-auth/o-auth.module';
8
- import { ButtonModule } from '../button/button.module';
9
- import { ReactiveFormsModule } from '@angular/forms';
10
-
11
- @NgModule({
12
- declarations: [SignInComponent],
13
- imports: [CommonModule,FormsModule,VerbenaInputModule,VerbenaButtonModule,RouterLink,OAuthModule,ButtonModule,ReactiveFormsModule],
14
- exports: [SignInComponent]
15
- })
16
- export class SignInModule {}
17
-
@@ -1,36 +0,0 @@
1
- a{
2
- text-decoration: underline;
3
- cursor: pointer;
4
- }
5
- input[type="checkbox"]:checked {
6
- accent-color: #111;
7
- }
8
-
9
- .flexWrapper{
10
- display: flex;
11
- flex-direction: column;
12
- gap:10px;
13
- }
14
-
15
- .checkBoxWrapper{
16
- display: flex;
17
- align-items: start;
18
- gap:2px;
19
- }
20
-
21
- .checBoxInput{
22
- margin-top:6px
23
- }
24
-
25
- .bigcheckboxWrapper{
26
- margin-top: 0.5rem;
27
- margin-bottom: 1.5rem;
28
- }
29
-
30
- .error-text{
31
- color:red
32
- }
33
-
34
- .disable-btn{
35
- cursor: not-allowed;
36
- }
@@ -1,132 +0,0 @@
1
- <section [ngStyle]="styles" class="{{ customClass }}">
2
- <h2 class="{{headlingClass}}">
3
- {{headlingText}}
4
- </h2>
5
- <form [formGroup]="signUpForm" (ngSubmit)="submit()" class="flexWrapper">
6
- <verbena-input
7
- [label]="'First name'"
8
- [labelColor]="inputLabelColor"
9
- [placeHolder]="''"
10
- [required]="true"
11
- [type]="'text'"
12
- formControlName="Firstname"
13
- [showBorder]="true"
14
- [bgColor]="inputBgColor"
15
- [border]="inputBorder"
16
- [borderRadius]="inputBorderRadius"
17
- [showErrorMessage]="true"
18
- [errorMessageColor]="'red'"
19
- [errorBorderColor]="'red'"
20
- [errorPosition]="'bottom'"
21
- class="outline-none focus-none"
22
- [customErrorMessages]="{required:'First name is required'}"
23
- ></verbena-input>
24
- <verbena-input
25
- [label]="'Last name'"
26
- [labelColor]="inputLabelColor"
27
- [placeHolder]="''"
28
- [required]="true"
29
- [type]="'text'"
30
- formControlName="Lastname"
31
- [showBorder]="true"
32
- [bgColor]="inputBgColor"
33
- [border]="inputBorder"
34
- [borderRadius]="inputBorderRadius"
35
- [showErrorMessage]="true"
36
- [errorMessageColor]="'red'"
37
- [errorBorderColor]="'red'"
38
- [errorPosition]="'bottom'"
39
- class="outline-none focus-none"
40
- [customErrorMessages]="{required:'Last name is required'}"
41
- ></verbena-input>
42
- <verbena-input
43
- [label]="'Email'"
44
- [labelColor]="inputLabelColor"
45
- [placeHolder]="''"
46
- [required]="true"
47
- [type]="'email'"
48
- formControlName="Email"
49
- [showBorder]="true"
50
- [bgColor]="inputBgColor"
51
- [border]="inputBorder"
52
- [borderRadius]="inputBorderRadius"
53
- [showErrorMessage]="true"
54
- [errorMessageColor]="'red'"
55
- [errorBorderColor]="'red'"
56
- [errorPosition]="'bottom'"
57
- class="outline-none focus-none"
58
- ></verbena-input>
59
- <verbena-input
60
- [label]="'Password'"
61
- [labelColor]="inputLabelColor"
62
- [placeHolder]="''"
63
- [required]="true"
64
- [type]="'password'"
65
- formControlName="Password"
66
- [showBorder]="true"
67
- [bgColor]="inputBgColor"
68
- [border]="inputBorder"
69
- [borderRadius]="inputBorderRadius"
70
- [showErrorMessage]="true"
71
- [errorMessageColor]="'red'"
72
- [errorBorderColor]="'red'"
73
- [errorPosition]="'bottom'"
74
- [passwordToggle]="true"
75
- class="outline-none focus-none"
76
- ></verbena-input>
77
- <div>
78
- <verbena-input
79
- [label]="'Confirm Password'"
80
- [labelColor]="inputLabelColor"
81
- [placeHolder]="''"
82
- [required]="true"
83
- [type]="'password'"
84
- formControlName="Confirmpassword"
85
- [showBorder]="true"
86
- [bgColor]="inputBgColor"
87
- [border]="inputBorder"
88
- [borderRadius]="inputBorderRadius"
89
- [showErrorMessage]="false"
90
- [errorBorderColor]="'red'"
91
- class="outline-none focus-none"
92
- ></verbena-input>
93
- <span *ngIf="signUpForm.hasError('passwordMismatch') && signUpForm.get('Confirmpassword')?.dirty">
94
- <small class="error-text">Passwords do not match.</small>
95
- </span>
96
- </div>
97
- <div>
98
- <div class="checkBoxWrapper">
99
- <input type="checkbox" id="terms" formControlName="Terms" class="checBoxInput" />
100
- <label for="terms"
101
- class="break-all font-normal leading-6"
102
- >By creating an account, I agree to our <a [attr.href]="termsLink">Terms of use</a> and
103
- <a [attr.href]="privacyLink">Privacy Policy</a></label
104
- >
105
- </div>
106
- <p *ngIf="signUpForm.controls['Terms'].invalid && signUpForm.controls['Terms'].touched">
107
- <small class="error-text">Please agree to the terms of use and privacy policy.</small>
108
- </p>
109
- </div>
110
- <lib-button
111
- [buttonClass]="btnClass"
112
- [color]="btnColor"
113
- [border]="btnBorder"
114
- [borderRadius]="btnBorderRadius"
115
- [bgColor]="btnBgColor"
116
- [pd]="btnPd"
117
- [text]="btnText"
118
- type="submit"
119
- [disabled]="!this.checkForm()"
120
- [ngStyle]="{'margin-top':'10px'}"
121
- ></lib-button>
122
- <verben-o-auth
123
- (googleClick)="handleGoogleAuth()"
124
- (appleClick)="handleAppleAuth()"
125
- ></verben-o-auth>
126
- <p>
127
- Already have an account?
128
- <a [routerLink]="routerLink" class="">Log in</a>
129
- </p>
130
- </form>
131
- </section>
132
-
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { SignUpComponent } from './sign-up.component';
4
-
5
- describe('SignUpComponent', () => {
6
- let component: SignUpComponent;
7
- let fixture: ComponentFixture<SignUpComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [SignUpComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(SignUpComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });