verben-authentication-ui 0.3.2 → 0.3.3

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 (288) hide show
  1. package/ng-package.json +8 -0
  2. package/package.json +8 -14
  3. package/src/lib/components/button/button.component.css +3 -0
  4. package/src/lib/components/button/button.component.html +13 -0
  5. package/src/lib/components/button/button.component.spec.ts +23 -0
  6. package/src/lib/components/button/button.component.ts +24 -0
  7. package/src/lib/components/button/button.module.ts +11 -0
  8. package/{lib/components/forgot-password/ForgotPasswordData.d.ts → src/lib/components/forgot-password/ForgotPasswordData.ts} +1 -1
  9. package/src/lib/components/forgot-password/forgot-password.component.css +29 -0
  10. package/src/lib/components/forgot-password/forgot-password.component.html +13 -0
  11. package/src/lib/components/forgot-password/forgot-password.component.spec.ts +23 -0
  12. package/src/lib/components/forgot-password/forgot-password.component.ts +86 -0
  13. package/src/lib/components/forgot-password/forgot-password.module.ts +18 -0
  14. package/src/lib/components/mail/mail.component.css +0 -0
  15. package/src/lib/components/mail/mail.component.html +11 -0
  16. package/src/lib/components/mail/mail.component.spec.ts +23 -0
  17. package/src/lib/components/mail/mail.component.ts +47 -0
  18. package/src/lib/components/mail/mail.module.ts +13 -0
  19. package/src/lib/components/mail-validation/mail-validation.component.css +59 -0
  20. package/src/lib/components/mail-validation/mail-validation.component.html +37 -0
  21. package/src/lib/components/mail-validation/mail-validation.component.spec.ts +23 -0
  22. package/src/lib/components/mail-validation/mail-validation.component.ts +66 -0
  23. package/src/lib/components/mail-validation/mail-validation.module.ts +18 -0
  24. package/src/lib/components/o-auth/o-auth.component.css +21 -0
  25. package/src/lib/components/o-auth/o-auth.component.html +60 -0
  26. package/src/lib/components/o-auth/o-auth.component.spec.ts +23 -0
  27. package/src/lib/components/o-auth/o-auth.component.ts +43 -0
  28. package/src/lib/components/o-auth/o-auth.module.ts +11 -0
  29. package/src/lib/components/otp-input/otp-input.component.css +19 -0
  30. package/src/lib/components/otp-input/otp-input.component.html +14 -0
  31. package/src/lib/components/otp-input/otp-input.component.spec.ts +23 -0
  32. package/src/lib/components/otp-input/otp-input.component.ts +73 -0
  33. package/src/lib/components/otp-input/otp-input.module.ts +15 -0
  34. package/src/lib/components/reset-password/ResetPasswordData.ts +5 -0
  35. package/src/lib/components/reset-password/reset-password.component.css +29 -0
  36. package/src/lib/components/reset-password/reset-password.component.html +22 -0
  37. package/src/lib/components/reset-password/reset-password.component.spec.ts +23 -0
  38. package/src/lib/components/reset-password/reset-password.component.ts +108 -0
  39. package/src/lib/components/reset-password/reset-password.module.ts +18 -0
  40. package/src/lib/components/sign-in/sign-in.component.css +21 -0
  41. package/src/lib/components/sign-in/sign-in.component.html +84 -0
  42. package/src/lib/components/sign-in/sign-in.component.spec.ts +23 -0
  43. package/src/lib/components/sign-in/sign-in.component.ts +184 -0
  44. package/src/lib/components/sign-in/sign-in.module.ts +17 -0
  45. package/src/lib/components/sign-up/sign-up.component.css +36 -0
  46. package/src/lib/components/sign-up/sign-up.component.html +132 -0
  47. package/src/lib/components/sign-up/sign-up.component.spec.ts +23 -0
  48. package/src/lib/components/sign-up/sign-up.component.ts +176 -0
  49. package/src/lib/components/sign-up/sign-up.module.ts +15 -0
  50. package/src/lib/components/sso/base-table-style.ts +52 -0
  51. package/src/lib/components/sso/helper.ts +15 -0
  52. package/src/lib/components/sso/sso-form/sso-form.component.css +13 -0
  53. package/src/lib/components/sso/sso-form/sso-form.component.html +109 -0
  54. package/src/lib/components/sso/sso-form/sso-form.component.spec.ts +23 -0
  55. package/src/lib/components/sso/sso-form/sso-form.component.ts +70 -0
  56. package/src/lib/components/sso/sso.columns.ts +32 -0
  57. package/src/lib/components/sso/sso.component.css +47 -0
  58. package/src/lib/components/sso/sso.component.html +208 -0
  59. package/src/lib/components/sso/sso.component.spec.ts +23 -0
  60. package/src/lib/components/sso/sso.component.ts +261 -0
  61. package/src/lib/components/sso/sso.module.ts +40 -0
  62. package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.css +8 -0
  63. package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.html +30 -0
  64. package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.spec.ts +23 -0
  65. package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.ts +183 -0
  66. package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.ts +15 -0
  67. package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.css +17 -0
  68. package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.html +45 -0
  69. package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.spec.ts +23 -0
  70. package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.ts +57 -0
  71. package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.ts +11 -0
  72. package/src/lib/components/user-management/base-table-style.ts +52 -0
  73. package/src/lib/components/user-management/helper.ts +29 -0
  74. package/src/lib/components/user-management/index.ts +4 -0
  75. package/src/lib/components/user-management/useer-management.module.ts +48 -0
  76. package/src/lib/components/user-management/user-management-form/use-management-form.component.ts +61 -0
  77. package/src/lib/components/user-management/user-management-form/user-management-form.component.css +0 -0
  78. package/src/lib/components/user-management/user-management-form/user-management-form.component.html +91 -0
  79. package/src/lib/components/user-management/user-management-form/user-management-form.component.spec.ts +23 -0
  80. package/src/lib/components/user-management/user-management.columns.ts +45 -0
  81. package/src/lib/components/user-management/user-management.component.css +26 -0
  82. package/src/lib/components/user-management/user-management.component.html +275 -0
  83. package/src/lib/components/user-management/user-management.component.spec.ts +23 -0
  84. package/src/lib/components/user-management/user-management.component.ts +380 -0
  85. package/src/lib/components/user-management/user-management.service.ts +42 -0
  86. package/src/lib/components/user-request/user-request.component.css +91 -0
  87. package/src/lib/components/user-request/user-request.component.html +165 -0
  88. package/src/lib/components/user-request/user-request.component.spec.ts +23 -0
  89. package/src/lib/components/user-request/user-request.component.ts +167 -0
  90. package/src/lib/components/user-request/user-request.module.ts +18 -0
  91. package/src/lib/components/user-request-approval/access-request.columns.ts +26 -0
  92. package/src/lib/components/user-request-approval/base-table-style.ts +52 -0
  93. package/src/lib/components/user-request-approval/facades/user-access-request.facade.ts +152 -0
  94. package/src/lib/components/user-request-approval/helper.ts +39 -0
  95. package/src/lib/components/user-request-approval/services/user-access-request.service.spec.ts +16 -0
  96. package/src/lib/components/user-request-approval/services/user-access-request.service.ts +87 -0
  97. package/src/lib/components/user-request-approval/states/user-access-request.state.ts +65 -0
  98. package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.css +0 -0
  99. package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.html +7 -0
  100. package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.spec.ts +23 -0
  101. package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.ts +22 -0
  102. package/src/lib/components/user-request-approval/user-request-approval.component.css +1 -0
  103. package/src/lib/components/user-request-approval/user-request-approval.component.html +218 -0
  104. package/src/lib/components/user-request-approval/user-request-approval.component.spec.ts +23 -0
  105. package/src/lib/components/user-request-approval/user-request-approval.component.ts +301 -0
  106. package/src/lib/components/user-request-approval/user-request-approval.module.ts +52 -0
  107. package/src/lib/components/user-request-approval/user-request-approval.service.spec.ts +16 -0
  108. package/src/lib/components/user-request-approval/user-request-approval.service.ts +58 -0
  109. package/src/lib/components/user-request-approval/user-request-form/use-request-form.component.ts +66 -0
  110. package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.css +0 -0
  111. package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.html +97 -0
  112. package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.spec.ts +23 -0
  113. package/src/lib/models/ErrorResponse.ts +7 -0
  114. package/src/lib/models/PasswordRequestParam.ts +5 -0
  115. package/src/lib/models/ResponseKeyValue.ts +5 -0
  116. package/src/lib/models/UserRequest.ts +28 -0
  117. package/src/lib/models/auth-mechanism.ts +14 -0
  118. package/src/lib/models/base.ts +11 -0
  119. package/src/lib/models/log-in.ts +7 -0
  120. package/{lib/models/mainUser.d.ts → src/lib/models/mainUser.ts} +3 -2
  121. package/src/lib/models/object-state.ts +6 -0
  122. package/{lib/models/otpValue.d.ts → src/lib/models/otpValue.ts} +3 -1
  123. package/src/lib/models/paged.ts +9 -0
  124. package/src/lib/models/query-params.ts +7 -0
  125. package/src/lib/models/request-status.ts +4 -0
  126. package/src/lib/models/resend-otp-data.ts +8 -0
  127. package/src/lib/models/resource.ts +27 -0
  128. package/src/lib/models/sign-up.ts +11 -0
  129. package/src/lib/models/single-sign-on.ts +9 -0
  130. package/src/lib/models/status.ts +5 -0
  131. package/src/lib/models/user-access-request-status.ts +5 -0
  132. package/{lib/models/user-access-request.d.ts → src/lib/models/user-access-request.ts} +4 -3
  133. package/src/lib/models/user.ts +24 -0
  134. package/src/lib/services/environment.service.spec.ts +16 -0
  135. package/src/lib/services/environment.service.ts +23 -0
  136. package/src/lib/services/http-web-request.service.spec.ts +16 -0
  137. package/src/lib/services/http-web-request.service.ts +101 -0
  138. package/src/lib/services/util.service.spec.ts +16 -0
  139. package/src/lib/services/util.service.ts +28 -0
  140. package/{public-api.d.ts → src/public-api.ts} +21 -0
  141. package/src/styles.css +96 -0
  142. package/src/theme/tailwind-setup.css +3 -0
  143. package/src/theme/tailwind.css +980 -0
  144. package/tailwind.config.js +20 -0
  145. package/tsconfig.lib.json +15 -0
  146. package/tsconfig.lib.prod.json +11 -0
  147. package/tsconfig.spec.json +15 -0
  148. package/esm2022/lib/components/button/button.component.mjs +0 -46
  149. package/esm2022/lib/components/button/button.module.mjs +0 -20
  150. package/esm2022/lib/components/forgot-password/ForgotPasswordData.mjs +0 -2
  151. package/esm2022/lib/components/forgot-password/forgot-password.component.mjs +0 -86
  152. package/esm2022/lib/components/forgot-password/forgot-password.module.mjs +0 -34
  153. package/esm2022/lib/components/mail/mail.component.mjs +0 -69
  154. package/esm2022/lib/components/mail/mail.module.mjs +0 -21
  155. package/esm2022/lib/components/mail-validation/mail-validation.component.mjs +0 -108
  156. package/esm2022/lib/components/mail-validation/mail-validation.module.mjs +0 -34
  157. package/esm2022/lib/components/o-auth/o-auth.component.mjs +0 -25
  158. package/esm2022/lib/components/o-auth/o-auth.module.mjs +0 -19
  159. package/esm2022/lib/components/otp-input/otp-input.component.mjs +0 -75
  160. package/esm2022/lib/components/otp-input/otp-input.module.mjs +0 -23
  161. package/esm2022/lib/components/reset-password/ResetPasswordData.mjs +0 -2
  162. package/esm2022/lib/components/reset-password/reset-password.component.mjs +0 -107
  163. package/esm2022/lib/components/reset-password/reset-password.module.mjs +0 -34
  164. package/esm2022/lib/components/sign-in/sign-in.component.mjs +0 -214
  165. package/esm2022/lib/components/sign-in/sign-in.module.mjs +0 -24
  166. package/esm2022/lib/components/sign-up/sign-up.component.mjs +0 -223
  167. package/esm2022/lib/components/sign-up/sign-up.module.mjs +0 -24
  168. package/esm2022/lib/components/sso/base-table-style.mjs +0 -53
  169. package/esm2022/lib/components/sso/helper.mjs +0 -14
  170. package/esm2022/lib/components/sso/sso-form/sso-form.component.mjs +0 -74
  171. package/esm2022/lib/components/sso/sso.columns.mjs +0 -29
  172. package/esm2022/lib/components/sso/sso.component.mjs +0 -236
  173. package/esm2022/lib/components/sso/sso.module.mjs +0 -63
  174. package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.mjs +0 -201
  175. package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.mjs +0 -22
  176. package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.mjs +0 -90
  177. package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.mjs +0 -19
  178. package/esm2022/lib/components/user-management/base-table-style.mjs +0 -53
  179. package/esm2022/lib/components/user-management/helper.mjs +0 -26
  180. package/esm2022/lib/components/user-management/useer-management.module.mjs +0 -68
  181. package/esm2022/lib/components/user-management/user-management-form/use-management-form.component.mjs +0 -57
  182. package/esm2022/lib/components/user-management/user-management.columns.mjs +0 -43
  183. package/esm2022/lib/components/user-management/user-management.component.mjs +0 -323
  184. package/esm2022/lib/components/user-request/user-request.component.mjs +0 -206
  185. package/esm2022/lib/components/user-request/user-request.module.mjs +0 -34
  186. package/esm2022/lib/components/user-request-approval/access-request.columns.mjs +0 -24
  187. package/esm2022/lib/components/user-request-approval/base-table-style.mjs +0 -53
  188. package/esm2022/lib/components/user-request-approval/facades/user-access-request.facade.mjs +0 -128
  189. package/esm2022/lib/components/user-request-approval/helper.mjs +0 -35
  190. package/esm2022/lib/components/user-request-approval/services/user-access-request.service.mjs +0 -72
  191. package/esm2022/lib/components/user-request-approval/states/user-access-request.state.mjs +0 -59
  192. package/esm2022/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.mjs +0 -26
  193. package/esm2022/lib/components/user-request-approval/user-request-approval.component.mjs +0 -251
  194. package/esm2022/lib/components/user-request-approval/user-request-approval.module.mjs +0 -77
  195. package/esm2022/lib/components/user-request-approval/user-request-approval.service.mjs +0 -32
  196. package/esm2022/lib/components/user-request-approval/user-request-form/use-request-form.component.mjs +0 -64
  197. package/esm2022/lib/models/ErrorResponse.mjs +0 -11
  198. package/esm2022/lib/models/PasswordRequestParam.mjs +0 -2
  199. package/esm2022/lib/models/ResponseKeyValue.mjs +0 -2
  200. package/esm2022/lib/models/UserRequest.mjs +0 -2
  201. package/esm2022/lib/models/base.mjs +0 -2
  202. package/esm2022/lib/models/log-in.mjs +0 -2
  203. package/esm2022/lib/models/mainUser.mjs +0 -2
  204. package/esm2022/lib/models/object-state.mjs +0 -8
  205. package/esm2022/lib/models/otpValue.mjs +0 -2
  206. package/esm2022/lib/models/paged.mjs +0 -2
  207. package/esm2022/lib/models/query-params.mjs +0 -2
  208. package/esm2022/lib/models/request-status.mjs +0 -5
  209. package/esm2022/lib/models/sign-up.mjs +0 -2
  210. package/esm2022/lib/models/single-sign-on.mjs +0 -2
  211. package/esm2022/lib/models/status.mjs +0 -6
  212. package/esm2022/lib/models/user-access-request-status.mjs +0 -7
  213. package/esm2022/lib/models/user-access-request.mjs +0 -2
  214. package/esm2022/lib/models/user.mjs +0 -2
  215. package/esm2022/lib/services/environment.service.mjs +0 -26
  216. package/esm2022/lib/services/http-web-request.service.mjs +0 -83
  217. package/esm2022/lib/services/util.service.mjs +0 -32
  218. package/esm2022/public-api.mjs +0 -43
  219. package/esm2022/verben-authentication-ui.mjs +0 -5
  220. package/fesm2022/verben-authentication-ui.mjs +0 -3545
  221. package/fesm2022/verben-authentication-ui.mjs.map +0 -1
  222. package/index.d.ts +0 -5
  223. package/lib/components/button/button.component.d.ts +0 -17
  224. package/lib/components/button/button.module.d.ts +0 -10
  225. package/lib/components/forgot-password/forgot-password.component.d.ts +0 -28
  226. package/lib/components/forgot-password/forgot-password.module.d.ts +0 -10
  227. package/lib/components/mail/mail.component.d.ts +0 -32
  228. package/lib/components/mail/mail.module.d.ts +0 -11
  229. package/lib/components/mail-validation/mail-validation.component.d.ts +0 -42
  230. package/lib/components/mail-validation/mail-validation.module.d.ts +0 -10
  231. package/lib/components/o-auth/o-auth.component.d.ts +0 -10
  232. package/lib/components/o-auth/o-auth.module.d.ts +0 -9
  233. package/lib/components/otp-input/otp-input.component.d.ts +0 -20
  234. package/lib/components/otp-input/otp-input.module.d.ts +0 -13
  235. package/lib/components/reset-password/ResetPasswordData.d.ts +0 -5
  236. package/lib/components/reset-password/reset-password.component.d.ts +0 -30
  237. package/lib/components/reset-password/reset-password.module.d.ts +0 -10
  238. package/lib/components/sign-in/sign-in.component.d.ts +0 -77
  239. package/lib/components/sign-in/sign-in.module.d.ts +0 -13
  240. package/lib/components/sign-up/sign-up.component.d.ts +0 -66
  241. package/lib/components/sign-up/sign-up.module.d.ts +0 -13
  242. package/lib/components/sso/base-table-style.d.ts +0 -1
  243. package/lib/components/sso/helper.d.ts +0 -2
  244. package/lib/components/sso/sso-form/sso-form.component.d.ts +0 -21
  245. package/lib/components/sso/sso.columns.d.ts +0 -3
  246. package/lib/components/sso/sso.component.d.ts +0 -54
  247. package/lib/components/sso/sso.module.d.ts +0 -11
  248. package/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.d.ts +0 -65
  249. package/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.d.ts +0 -12
  250. package/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.d.ts +0 -39
  251. package/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.d.ts +0 -9
  252. package/lib/components/user-management/base-table-style.d.ts +0 -1
  253. package/lib/components/user-management/helper.d.ts +0 -2
  254. package/lib/components/user-management/useer-management.module.d.ts +0 -11
  255. package/lib/components/user-management/user-management-form/use-management-form.component.d.ts +0 -20
  256. package/lib/components/user-management/user-management.columns.d.ts +0 -3
  257. package/lib/components/user-management/user-management.component.d.ts +0 -60
  258. package/lib/components/user-request/user-request.component.d.ts +0 -60
  259. package/lib/components/user-request/user-request.module.d.ts +0 -10
  260. package/lib/components/user-request-approval/access-request.columns.d.ts +0 -3
  261. package/lib/components/user-request-approval/base-table-style.d.ts +0 -1
  262. package/lib/components/user-request-approval/facades/user-access-request.facade.d.ts +0 -23
  263. package/lib/components/user-request-approval/helper.d.ts +0 -6
  264. package/lib/components/user-request-approval/services/user-access-request.service.d.ts +0 -50
  265. package/lib/components/user-request-approval/states/user-access-request.state.d.ts +0 -21
  266. package/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.d.ts +0 -12
  267. package/lib/components/user-request-approval/user-request-approval.component.d.ts +0 -59
  268. package/lib/components/user-request-approval/user-request-approval.module.d.ts +0 -12
  269. package/lib/components/user-request-approval/user-request-approval.service.d.ts +0 -18
  270. package/lib/components/user-request-approval/user-request-form/use-request-form.component.d.ts +0 -21
  271. package/lib/models/ErrorResponse.d.ts +0 -6
  272. package/lib/models/PasswordRequestParam.d.ts +0 -5
  273. package/lib/models/ResponseKeyValue.d.ts +0 -5
  274. package/lib/models/UserRequest.d.ts +0 -24
  275. package/lib/models/base.d.ts +0 -10
  276. package/lib/models/log-in.d.ts +0 -7
  277. package/lib/models/object-state.d.ts +0 -6
  278. package/lib/models/paged.d.ts +0 -9
  279. package/lib/models/query-params.d.ts +0 -7
  280. package/lib/models/request-status.d.ts +0 -3
  281. package/lib/models/sign-up.d.ts +0 -9
  282. package/lib/models/single-sign-on.d.ts +0 -7
  283. package/lib/models/status.d.ts +0 -4
  284. package/lib/models/user-access-request-status.d.ts +0 -5
  285. package/lib/models/user.d.ts +0 -23
  286. package/lib/services/environment.service.d.ts +0 -16
  287. package/lib/services/http-web-request.service.d.ts +0 -23
  288. package/lib/services/util.service.d.ts +0 -8
@@ -0,0 +1,184 @@
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
+ }
@@ -0,0 +1,17 @@
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
+
@@ -0,0 +1,36 @@
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
+ }
@@ -0,0 +1,132 @@
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
+
@@ -0,0 +1,23 @@
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
+ });
@@ -0,0 +1,176 @@
1
+ import { Component, EventEmitter, Input, Output } from '@angular/core';
2
+ import {
3
+ AbstractControl,
4
+ FormBuilder,
5
+ FormControl,
6
+ FormGroup,
7
+ ValidationErrors,
8
+ ValidatorFn,
9
+ Validators,
10
+ } from '@angular/forms';
11
+ import { SignUpData } from '../../models/sign-up';
12
+ import { HttpWebRequestService } from '../../services/http-web-request.service';
13
+ import { ErrorResponse } from '../../models/ErrorResponse';
14
+ import { ResponseKeyValue } from '../../models/ResponseKeyValue';
15
+ import { UtilService } from '../../services/util.service';
16
+ import { ObjectState } from '../../models/object-state';
17
+
18
+
19
+ @Component({
20
+ selector: 'verben-sign-up',
21
+ templateUrl: './sign-up.component.html',
22
+ styleUrl: './sign-up.component.css'
23
+ })
24
+
25
+ export class SignUpComponent {
26
+ @Input() headlingText: string = 'Create an account';
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() height: string = 'auto';
38
+ @Input() textColor: string = '#333';
39
+ @Input() disabled: boolean = false;
40
+
41
+ // button styles
42
+ @Input() btnClass: string = ''
43
+ @Input() btnBgColor: string = '#FFE681'
44
+ @Input() btnColor: string = ''
45
+ @Input() btnBorder: string = ''
46
+ @Input() btnBorderRadius: string = '24px'
47
+ @Input() btnPd: string = '';
48
+ @Input() btnText: string = 'Create account';
49
+
50
+ //inputStyles
51
+ @Input() inputLabelColor: string = ''
52
+ @Input() inputBgColor: string = 'transparent'
53
+ @Input() inputBorder: string = '1px solid #66666659'
54
+ @Input() inputBorderRadius: string = '12px'
55
+
56
+ // links
57
+ @Input() termsLink: string = '';
58
+ @Input() privacyLink: string = '';
59
+ @Input() routerLink: string = '';
60
+
61
+ @Output() formSubmit = new EventEmitter<SignUpData>();
62
+ @Output() onSubmitEnd: EventEmitter<ResponseKeyValue | ErrorResponse> = new EventEmitter();
63
+ @Output() googleClick = new EventEmitter();
64
+ @Output() appleClick = new EventEmitter();
65
+
66
+ signUpForm: FormGroup;
67
+
68
+ constructor(private fb: FormBuilder,
69
+ private server: HttpWebRequestService,
70
+ private utilService: UtilService
71
+ ) {
72
+ this.signUpForm = this.fb.group({
73
+ Firstname: new FormControl<string | null>(null, Validators.required),
74
+ Lastname: new FormControl<string | null>(null, Validators.required),
75
+ Email: new FormControl<string | null>(null, [
76
+ Validators.required,
77
+ Validators.email,
78
+ ]),
79
+ Password: new FormControl<string | null>(null, [
80
+ Validators.required,
81
+ Validators.minLength(8),
82
+ ]),
83
+ Confirmpassword: new FormControl<string | null>(null, [
84
+ Validators.required,
85
+ Validators.minLength(8),
86
+ ]),
87
+ Terms: new FormControl<boolean>(false, [Validators.requiredTrue]),
88
+ },{ validators: this.passwordMatchValidator });
89
+ }
90
+
91
+ private passwordMatchValidator: ValidatorFn = (group: AbstractControl): ValidationErrors | null => {
92
+ const password = group.get('Password')?.value;
93
+ const confirmPassword = group.get('Confirmpassword')?.value;
94
+ return password === confirmPassword ? null : { passwordMismatch: true };
95
+ };
96
+
97
+ checkForm(): boolean {
98
+ return this.signUpForm.valid;
99
+ }
100
+
101
+ async submit() {
102
+ if (!this.checkForm()) {
103
+ return;
104
+ }
105
+ const data: SignUpData = {
106
+ Firstname: this.signUpForm.controls['Firstname'].value,
107
+ Lastname: this.signUpForm.controls['Lastname'].value,
108
+ Email: this.signUpForm.controls['Email'].value,
109
+ Password: this.signUpForm.controls['Password'].value,
110
+ Terms: this.signUpForm.controls['Terms'].value,
111
+ Id:'61f7e48f0c651345677b7775' ,
112
+ CreatedAt: new Date(),
113
+ UpdatedAt: new Date(),
114
+ DataState: ObjectState.New,
115
+ id:'61f7e48f0c651345677b7775',
116
+ Tenant:'James'
117
+ };
118
+
119
+ const payload = [
120
+ {
121
+ ...data,
122
+ "Code": "123 ",
123
+ "ServiceName": "Test 1",
124
+ "MailAddress": data.Email,
125
+ "OtherName": "James",
126
+ "Status": "Inactive",
127
+ "PhoneNumber":"07012345678",
128
+ "TenantId":'61f7e48f0c651345677b7775',
129
+ "Role": ['tester'],
130
+ "Tags": [
131
+ {
132
+ "Name": "checker",
133
+ "IsOptional": true
134
+ }
135
+ ],
136
+ }
137
+ ]
138
+
139
+ this.formSubmit.emit(data);
140
+ this.utilService.sendBI(true);
141
+ const res = await this.server.post(
142
+ `User/SaveUsers`,payload
143
+ );
144
+ this.utilService.sendBI(false);
145
+ if (res instanceof ErrorResponse) {
146
+ this.onSubmitEnd.emit(res);
147
+ } else {
148
+ var result = res as ResponseKeyValue;
149
+ this.onSubmitEnd.emit(result);
150
+ }
151
+ }
152
+
153
+ handleGoogleAuth() {
154
+ this.googleClick.emit();
155
+ }
156
+ handleAppleAuth() {
157
+ this.appleClick.emit();
158
+ }
159
+
160
+ get styles() {
161
+ return {
162
+ 'background-color': this.bgColor,
163
+ 'box-shadow': this.boxShadow,
164
+ 'border': this.border,
165
+ 'border-radius': this.borderRadius,
166
+ 'color': this.textColor,
167
+ 'width': this.width,
168
+ 'max-width':this.maxWidth,
169
+ 'margin':this.margin,
170
+ 'height': this.height,
171
+ 'padding':this.pd
172
+ };
173
+ }
174
+
175
+ }
176
+
@@ -0,0 +1,15 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { FormsModule } from '@angular/forms';
4
+ import { RouterLink } from '@angular/router';
5
+ import { SignUpComponent } from './sign-up.component';
6
+ import { 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
+ @NgModule({
11
+ declarations: [SignUpComponent],
12
+ imports: [CommonModule, FormsModule, VerbenaInputModule, RouterLink,ButtonModule,OAuthModule,ReactiveFormsModule],
13
+ exports: [SignUpComponent]
14
+ })
15
+ export class SignUpModule {}
@@ -0,0 +1,52 @@
1
+ export const baseStyle: any = {
2
+ width: '100%',
3
+ fontFamily: '"Fraunces", serif',
4
+ fontSize: '125%',
5
+ whiteSpace: 'nowrap',
6
+ margin: '0',
7
+ border: '1px solid #D4A007',
8
+ borderRadius: '16px',
9
+ borderCollapse: 'separate',
10
+ borderSpacing: '0',
11
+ tableLayout: 'fixed',
12
+ overflow: 'hidden',
13
+ rows: {
14
+ even: {
15
+ backgroundColor: '#FDFDFD',
16
+ },
17
+ odd: {
18
+ backgroundColor: '#F1F4FB',
19
+ },
20
+ height: '68px',
21
+ },
22
+ cells: {
23
+ padding: '0.5rem 1rem',
24
+ },
25
+ header: {
26
+ stickyTop: true,
27
+ zIndex: 2,
28
+ backgroundColor: '#EFF2FB',
29
+ fontWeight: 'bold',
30
+ textAlign: 'left',
31
+ padding: '12px 16px',
32
+ height: '40px',
33
+ },
34
+ footer: {
35
+ stickyBottom: true,
36
+ zIndex: 2,
37
+ padding: '3px',
38
+ },
39
+ // body: {
40
+ // background: '#fff',
41
+ // padding: '4px 5px',
42
+ // textAlign: 'center',
43
+ // },
44
+ // firstColumn: {
45
+ // stickyLeft: true,
46
+ // zIndex: 1,
47
+ // },
48
+ lastColumn: {
49
+ stickyRight: true,
50
+ zIndex: 1,
51
+ },
52
+ };
@@ -0,0 +1,15 @@
1
+ import { ObjectState } from '../../models/object-state';
2
+ import { SingleSignOn } from '../../models/single-sign-on';
3
+
4
+ export const mockData: SingleSignOn[] = new Array(10).fill(1).map((id, i) => ({
5
+ Name: `Name ${id + i}`,
6
+ Id: id,
7
+ id: id.toString(),
8
+ Description: `Sign in option ${id+i}`,
9
+ Logo: `./assets/images/test-logo.png`,
10
+ Link: `Link ${id+i}`,
11
+ CreatedAt: new Date(),
12
+ UpdatedAt: new Date(),
13
+ DataState: ObjectState.New,
14
+ Tenant: `Tenant ${id + i}`,
15
+ }));
@@ -0,0 +1,13 @@
1
+ #logo{
2
+ display: none;
3
+ }
4
+ .icon-width{
5
+ width: 20px;
6
+ }
7
+ .icon-width2{
8
+ width: 15px;
9
+ }
10
+ .icon-container{
11
+ width: 30px;
12
+ height: 30px;
13
+ }