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
@@ -0,0 +1,3702 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Injectable, Inject, Optional, EventEmitter, Component, Input, Output, NgModule, ViewChild, signal, computed } from '@angular/core';
3
+ import * as i1$1 from '@angular/forms';
4
+ import { FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
+ import * as i1 from '@angular/common/http';
6
+ import * as i2 from 'verben-ng-ui';
7
+ import { UTIL_SERVICE, VerbenaInputModule, VerbenaButtonModule, SvgModule, DataFilterType, DataViewModule, TableFilterModule, SortTableModule, DataExportModule, VisibleColumnModule, CardDataViewModule, VerbenaTextareaModule, DataTableModule, CardModule, VerbenaBadgeModule, DropDownModule } from 'verben-ng-ui';
8
+ import * as i1$2 from '@angular/common';
9
+ import { CommonModule } from '@angular/common';
10
+ import * as i6 from '@angular/router';
11
+ import { RouterLink } from '@angular/router';
12
+ import { BehaviorSubject, lastValueFrom } from 'rxjs';
13
+
14
+ class ErrorResponse {
15
+ ErrorMsg;
16
+ StatusCode;
17
+ FullLog;
18
+ constructor(ErrorMsg, StatusCode, FullLog) {
19
+ this.ErrorMsg = ErrorMsg;
20
+ this.StatusCode = StatusCode;
21
+ this.FullLog = FullLog;
22
+ }
23
+ }
24
+
25
+ // In your library's services/environment.service.ts
26
+ // import { ENVIRONMENT } from '../models/ENVIRONMENT_TOKEN';
27
+ const ENVIRONMENT = new InjectionToken('environment');
28
+ class EnvironmentService {
29
+ env;
30
+ constructor(env) {
31
+ this.env = env;
32
+ }
33
+ get environment() {
34
+ return this.env;
35
+ }
36
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EnvironmentService, deps: [{ token: ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Injectable });
37
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EnvironmentService, providedIn: 'root' });
38
+ }
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EnvironmentService, decorators: [{
40
+ type: Injectable,
41
+ args: [{
42
+ providedIn: 'root',
43
+ }]
44
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
45
+ type: Inject,
46
+ args: [ENVIRONMENT]
47
+ }] }] });
48
+
49
+ class HttpWebRequestService {
50
+ http;
51
+ envSvc;
52
+ notificationService;
53
+ isProd;
54
+ constructor(http, envSvc, notificationService) {
55
+ this.http = http;
56
+ this.envSvc = envSvc;
57
+ this.notificationService = notificationService;
58
+ this.isProd = this.envSvc.environment.production;
59
+ }
60
+ buildHeaders() {
61
+ return {
62
+ 'Content-Type': 'application/json',
63
+ };
64
+ }
65
+ buildUrl(url, baseUrl) {
66
+ return `${baseUrl}/${url}`;
67
+ }
68
+ handleError(err) {
69
+ const msg = err.error?.ErrorMsg ||
70
+ err.error?.errors?.values?.toString() ||
71
+ `${err.status} ${err.statusText}`;
72
+ this.notificationService.error(msg, { timeout: 3000 });
73
+ return new ErrorResponse(msg);
74
+ }
75
+ request(method, url, body, baseUrl = this.envSvc.environment.AuthenticationAPI) {
76
+ const options = {
77
+ headers: this.buildHeaders(),
78
+ };
79
+ const requestUrl = this.buildUrl(url, baseUrl);
80
+ switch (method) {
81
+ case 'GET':
82
+ return new Promise((resolve) => this.http.get(requestUrl, options).subscribe({
83
+ next: resolve,
84
+ error: (err) => resolve(this.handleError(err)),
85
+ }));
86
+ case 'POST':
87
+ return new Promise((resolve) => this.http.post(requestUrl, body, options).subscribe({
88
+ next: resolve,
89
+ error: (err) => resolve(this.handleError(err)),
90
+ }));
91
+ case 'PUT':
92
+ return this.http.put(requestUrl, body, options);
93
+ case 'DELETE':
94
+ return this.http.delete(requestUrl, options);
95
+ }
96
+ }
97
+ get(url, baseUrl) {
98
+ return this.request('GET', url, undefined, baseUrl);
99
+ }
100
+ post(url, body, baseUrl) {
101
+ return this.request('POST', url, JSON.stringify(body), baseUrl);
102
+ }
103
+ postFile(url, formData, baseUrl) {
104
+ return new Promise((resolve) => this.http.post(this.buildUrl(url, baseUrl || this.envSvc.environment.AuthenticationAPI), formData).subscribe({
105
+ next: resolve,
106
+ error: (err) => resolve(this.handleError(err)),
107
+ }));
108
+ }
109
+ put(url, body, baseUrl) {
110
+ return this.request('PUT', url, body, baseUrl);
111
+ }
112
+ delete(url, baseUrl) {
113
+ return this.request('DELETE', url, undefined, baseUrl);
114
+ }
115
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpWebRequestService, deps: [{ token: i1.HttpClient }, { token: EnvironmentService }, { token: i2.NotificationService }], target: i0.ɵɵFactoryTarget.Injectable });
116
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpWebRequestService, providedIn: 'root' });
117
+ }
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpWebRequestService, decorators: [{
119
+ type: Injectable,
120
+ args: [{
121
+ providedIn: 'root',
122
+ }]
123
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: EnvironmentService }, { type: i2.NotificationService }] });
124
+
125
+ class UtilService {
126
+ parentUtilService;
127
+ constructor(parentUtilService) {
128
+ this.parentUtilService = parentUtilService;
129
+ }
130
+ sendBI(state) {
131
+ console.log({ Service: this.parentUtilService });
132
+ if (this.parentUtilService && this.parentUtilService.sendBI) {
133
+ this.parentUtilService.sendBI(state);
134
+ }
135
+ else {
136
+ console.warn('Util Service is not provided');
137
+ }
138
+ }
139
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UtilService, deps: [{ token: UTIL_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
140
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UtilService, providedIn: 'root' });
141
+ }
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UtilService, decorators: [{
143
+ type: Injectable,
144
+ args: [{
145
+ providedIn: 'root',
146
+ }]
147
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
148
+ type: Optional
149
+ }, {
150
+ type: Inject,
151
+ args: [UTIL_SERVICE]
152
+ }] }] });
153
+
154
+ class ResetPasswordComponent {
155
+ fb;
156
+ server;
157
+ utilService;
158
+ title = 'Reset Password';
159
+ subTitle = 'Create a New Password';
160
+ buttonCaption = 'Submit';
161
+ buttonTextColor;
162
+ buttonBackgroundColor;
163
+ showOldPassword = false;
164
+ token;
165
+ onSubmit = new EventEmitter();
166
+ onSubmitEnd = new EventEmitter();
167
+ resetPasswordForm;
168
+ constructor(fb, server, utilService) {
169
+ this.fb = fb;
170
+ this.server = server;
171
+ this.utilService = utilService;
172
+ this.resetPasswordForm = this.fb.group({
173
+ OldPassword: new FormControl(null, this.oldPasswordValidator.bind(this)),
174
+ Password: new FormControl(null, Validators.required),
175
+ ConfirmPassword: new FormControl(null, [
176
+ Validators.required,
177
+ this.confirmPasswordValidator.bind(this),
178
+ ]),
179
+ });
180
+ }
181
+ checkForm() {
182
+ return this.resetPasswordForm.valid;
183
+ }
184
+ oldPasswordValidator(control) {
185
+ if (this.showOldPassword && control.value == null) {
186
+ return { customValidation: true };
187
+ }
188
+ return null;
189
+ }
190
+ confirmPasswordValidator(control) {
191
+ if (this.resetPasswordForm &&
192
+ this.resetPasswordForm.controls['Password'] &&
193
+ this.resetPasswordForm.controls['Password'].value !== control.value) {
194
+ return { customValidation: true };
195
+ }
196
+ return null;
197
+ }
198
+ async submit() {
199
+ if (!this.checkForm()) {
200
+ return;
201
+ }
202
+ var data = {
203
+ OldPassword: this.showOldPassword
204
+ ? this.resetPasswordForm.controls['OldPassword'].value
205
+ : undefined,
206
+ Password: this.resetPasswordForm.controls['Password'].value,
207
+ ConfirmPassword: this.resetPasswordForm.controls['ConfirmPassword'].value,
208
+ };
209
+ this.onSubmit.emit(data);
210
+ var passwordRequest = {
211
+ NewPassword: data.Password,
212
+ OldPassword: data.OldPassword,
213
+ Token: this.token,
214
+ };
215
+ this.utilService.sendBI(true);
216
+ const res = await this.server.post(`User/CompleteChangePasswordRequest`, passwordRequest);
217
+ this.utilService.sendBI(false);
218
+ if (res instanceof ErrorResponse) {
219
+ this.onSubmitEnd.emit(res);
220
+ }
221
+ else {
222
+ var result = res;
223
+ this.onSubmitEnd.emit(result);
224
+ }
225
+ }
226
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ResetPasswordComponent, deps: [{ token: i1$1.FormBuilder }, { token: HttpWebRequestService }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Component });
227
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ResetPasswordComponent, selector: "verben-reset-password", inputs: { title: "title", subTitle: "subTitle", buttonCaption: "buttonCaption", buttonTextColor: "buttonTextColor", buttonBackgroundColor: "buttonBackgroundColor", showOldPassword: "showOldPassword", token: "token" }, outputs: { onSubmit: "onSubmit", onSubmitEnd: "onSubmitEnd" }, ngImport: i0, template: "<div [formGroup]=\"this.resetPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div *ngIf=\"showOldPassword\" class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Old Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"OldPassword\" [passwordToggle]=\"true\"\n type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">New Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"Password\" [passwordToggle]=\"true\"\n type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Confirm Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"ConfirmPassword\" [passwordToggle]=\"true\"\n type=\"password\"></verbena-input>\n </div>\n <verbena-button fontWeight=\"700\" (click)=\"submit()\" [text]=\"buttonCaption\" width=\"100%\" [textColor]=\"buttonTextColor\"\n [bgColor]=\"buttonBackgroundColor\" borderRadius=\"25px\" [disable]=\"!this.checkForm()\"></verbena-button>\n\n</div>", styles: ["*{font-family:sans-serif;font-size:16px}.flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}.justify-center{justify-content:center}.justify-end{justify-content:end}.align-items-center{align-items:center}.grid{display:grid}.verben-error-message{font-size:.8rem;color:red}.verben-input{border:1px solid #cbd5e1;outline:none;border-radius:5px;color:#334155;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s,outline-color .2s}.verben-input::placeholder{color:#64748b}.verben-input:hover{border:1px solid #697e97}.verben-input.disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input:disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input.focused{border-color:#3b82f6;outline:none}.verben-input:focus{border-color:#3b82f6;outline:none}.verben-input.ng-invalid{border-color:red}.verben-button{padding:8px 15px;border-radius:4px;border:none;text-align:center}.verben-button.primary{background-color:#ffe681}.verben-button.secondary{background-color:#d9d9d940}.reset-password-container{gap:25px;padding:50px;border:1px solid rgba(102,102,102,.5);box-shadow:4px 4px 4px #00000040;border-radius:24px}.reset-password-title{font-size:30px;font-weight:700}.reset-password-subtitle{font-size:14px;font-weight:500;color:#666}.form-field{gap:5px}.form-field-caption{color:#666}\n"], dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
228
+ }
229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ResetPasswordComponent, decorators: [{
230
+ type: Component,
231
+ args: [{ selector: 'verben-reset-password', template: "<div [formGroup]=\"this.resetPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div *ngIf=\"showOldPassword\" class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Old Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"OldPassword\" [passwordToggle]=\"true\"\n type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">New Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"Password\" [passwordToggle]=\"true\"\n type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Confirm Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"ConfirmPassword\" [passwordToggle]=\"true\"\n type=\"password\"></verbena-input>\n </div>\n <verbena-button fontWeight=\"700\" (click)=\"submit()\" [text]=\"buttonCaption\" width=\"100%\" [textColor]=\"buttonTextColor\"\n [bgColor]=\"buttonBackgroundColor\" borderRadius=\"25px\" [disable]=\"!this.checkForm()\"></verbena-button>\n\n</div>", styles: ["*{font-family:sans-serif;font-size:16px}.flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}.justify-center{justify-content:center}.justify-end{justify-content:end}.align-items-center{align-items:center}.grid{display:grid}.verben-error-message{font-size:.8rem;color:red}.verben-input{border:1px solid #cbd5e1;outline:none;border-radius:5px;color:#334155;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s,outline-color .2s}.verben-input::placeholder{color:#64748b}.verben-input:hover{border:1px solid #697e97}.verben-input.disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input:disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input.focused{border-color:#3b82f6;outline:none}.verben-input:focus{border-color:#3b82f6;outline:none}.verben-input.ng-invalid{border-color:red}.verben-button{padding:8px 15px;border-radius:4px;border:none;text-align:center}.verben-button.primary{background-color:#ffe681}.verben-button.secondary{background-color:#d9d9d940}.reset-password-container{gap:25px;padding:50px;border:1px solid rgba(102,102,102,.5);box-shadow:4px 4px 4px #00000040;border-radius:24px}.reset-password-title{font-size:30px;font-weight:700}.reset-password-subtitle{font-size:14px;font-weight:500;color:#666}.form-field{gap:5px}.form-field-caption{color:#666}\n"] }]
232
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: HttpWebRequestService }, { type: UtilService }], propDecorators: { title: [{
233
+ type: Input
234
+ }], subTitle: [{
235
+ type: Input
236
+ }], buttonCaption: [{
237
+ type: Input
238
+ }], buttonTextColor: [{
239
+ type: Input
240
+ }], buttonBackgroundColor: [{
241
+ type: Input
242
+ }], showOldPassword: [{
243
+ type: Input
244
+ }], token: [{
245
+ type: Input
246
+ }], onSubmit: [{
247
+ type: Output
248
+ }], onSubmitEnd: [{
249
+ type: Output
250
+ }] } });
251
+
252
+ class ResetPasswordModule {
253
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ResetPasswordModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
254
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ResetPasswordModule, declarations: [ResetPasswordComponent], imports: [FormsModule,
255
+ ReactiveFormsModule,
256
+ VerbenaInputModule,
257
+ VerbenaButtonModule,
258
+ CommonModule], exports: [ResetPasswordComponent] });
259
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ResetPasswordModule, imports: [FormsModule,
260
+ ReactiveFormsModule,
261
+ VerbenaInputModule,
262
+ VerbenaButtonModule,
263
+ CommonModule] });
264
+ }
265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ResetPasswordModule, decorators: [{
266
+ type: NgModule,
267
+ args: [{
268
+ declarations: [ResetPasswordComponent],
269
+ imports: [
270
+ FormsModule,
271
+ ReactiveFormsModule,
272
+ VerbenaInputModule,
273
+ VerbenaButtonModule,
274
+ CommonModule,
275
+ ],
276
+ exports: [ResetPasswordComponent],
277
+ }]
278
+ }] });
279
+
280
+ var ObjectState;
281
+ (function (ObjectState) {
282
+ ObjectState["New"] = "New";
283
+ ObjectState["Changed"] = "Changed";
284
+ ObjectState["Unchanged"] = "Unchanged";
285
+ ObjectState["Removed"] = "Removed";
286
+ })(ObjectState || (ObjectState = {}));
287
+
288
+ var Status;
289
+ (function (Status) {
290
+ Status["InActive"] = "InActive";
291
+ Status["Active"] = "Active";
292
+ })(Status || (Status = {}));
293
+
294
+ var RequestStatus;
295
+ (function (RequestStatus) {
296
+ RequestStatus["Pending"] = "Pending";
297
+ })(RequestStatus || (RequestStatus = {}));
298
+
299
+ class UserRequestComponent {
300
+ fb;
301
+ server;
302
+ utilService;
303
+ envSvc;
304
+ width = '500px';
305
+ headingTitle = 'Request an account';
306
+ headingClass = 'font-medium text-[2rem] leading-[48px] text-[#333]';
307
+ customClass = '';
308
+ bgColor = '#fff';
309
+ boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
310
+ border = '1px solid #66666680';
311
+ borderRadius = '24px';
312
+ textColor = '#333';
313
+ height = 'auto';
314
+ pd = '32px 48px';
315
+ apiKey = '';
316
+ // Button Inputs
317
+ text = 'Send Request';
318
+ color = 'black';
319
+ btnBorder = '1px solid #FFE681';
320
+ btnBorderRadius = '40px';
321
+ btnBgColor = '#FFE681';
322
+ btnWidth = '100%';
323
+ btnPd = '10px 20px';
324
+ termsLink = '';
325
+ privacyLink = '';
326
+ routerLink = '';
327
+ formSubmit = new EventEmitter();
328
+ googleClick = new EventEmitter();
329
+ onSubmitSuccess = new EventEmitter();
330
+ appleClick = new EventEmitter();
331
+ onSubmitResponseEnd = new EventEmitter();
332
+ userRequestForm;
333
+ constructor(fb, server, utilService, envSvc) {
334
+ this.fb = fb;
335
+ this.server = server;
336
+ this.utilService = utilService;
337
+ this.envSvc = envSvc;
338
+ this.apiKey = this.envSvc.environment.APIKey;
339
+ this.userRequestForm = this.fb.group({
340
+ FirstName: [null, [Validators.required]],
341
+ LastName: [null, [Validators.required]],
342
+ Email: [null, [Validators.required, Validators.email]],
343
+ Password: [null, [Validators.required, Validators.minLength(8)]],
344
+ ConfirmPassword: [null, [Validators.required]],
345
+ }, { validators: this.passwordMatchValidator });
346
+ }
347
+ passwordMatchValidator(control) {
348
+ const password = control.get('Password')?.value;
349
+ const confirmPassword = control.get('ConfirmPassword')?.value;
350
+ return password === confirmPassword ? null : { passwordMismatch: true };
351
+ }
352
+ get passwordMismatchError() {
353
+ return this.userRequestForm.hasError('passwordMismatch');
354
+ }
355
+ get styles() {
356
+ return {
357
+ 'background-color': this.bgColor,
358
+ 'box-shadow': this.boxShadow,
359
+ border: this.border,
360
+ 'border-radius': this.borderRadius,
361
+ color: this.textColor,
362
+ 'max-width': this.width,
363
+ height: this.height,
364
+ padding: this.pd,
365
+ };
366
+ }
367
+ checkForm() {
368
+ return this.userRequestForm.valid;
369
+ }
370
+ handleGoogleAuth() {
371
+ this.googleClick.emit();
372
+ }
373
+ handleAppleAuth() {
374
+ this.appleClick.emit();
375
+ }
376
+ async submitForm() {
377
+ if (!this.checkForm()) {
378
+ return;
379
+ }
380
+ const payload = [
381
+ {
382
+ Code: '',
383
+ FirstName: this.userRequestForm.controls['FirstName'].value,
384
+ LastName: this.userRequestForm.controls['LastName'].value,
385
+ MailAddress: this.userRequestForm.controls['Email'].value,
386
+ Password: this.userRequestForm.controls['Password'].value,
387
+ PhoneNumber: '',
388
+ OtherName: '',
389
+ Role: [],
390
+ Tags: [],
391
+ Status: Status.Active,
392
+ RequestStatus: RequestStatus.Pending,
393
+ UpdatedAt: new Date(),
394
+ CreatedAt: new Date(),
395
+ Id: '',
396
+ DataState: ObjectState.New,
397
+ TenantId: '',
398
+ ServiceName: '',
399
+ ActionBy: '',
400
+ Comment: '',
401
+ },
402
+ ];
403
+ // Emit payload if needed
404
+ this.formSubmit.emit(payload);
405
+ // Show loading indicator
406
+ this.utilService.sendBI(true);
407
+ try {
408
+ // Make the API call
409
+ const res = await this.server.post(`User/SaveUserAccessRequests`, payload);
410
+ // Hide loading indicator
411
+ this.utilService.sendBI(false);
412
+ if (res instanceof ErrorResponse) {
413
+ // Emit error response
414
+ this.onSubmitResponseEnd.emit(res);
415
+ console.log(res);
416
+ }
417
+ else {
418
+ // Emit success response
419
+ const result = res;
420
+ this.onSubmitResponseEnd.emit(result);
421
+ // Emit success event
422
+ this.onSubmitSuccess.emit(result);
423
+ }
424
+ }
425
+ catch (error) {
426
+ // Handle unexpected errors
427
+ this.utilService.sendBI(false);
428
+ console.error('Unexpected error:', error);
429
+ this.onSubmitResponseEnd.emit(error);
430
+ }
431
+ }
432
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestComponent, deps: [{ token: i1$1.FormBuilder }, { token: HttpWebRequestService }, { token: UtilService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Component });
433
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UserRequestComponent, selector: "lib-user-request", inputs: { width: "width", headingTitle: "headingTitle", headingClass: "headingClass", customClass: "customClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height", pd: "pd", text: "text", color: "color", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnBgColor: "btnBgColor", btnWidth: "btnWidth", btnPd: "btnPd", termsLink: "termsLink", privacyLink: "privacyLink", routerLink: "routerLink" }, outputs: { formSubmit: "formSubmit", googleClick: "googleClick", onSubmitSuccess: "onSubmitSuccess", appleClick: "appleClick", onSubmitResponseEnd: "onSubmitResponseEnd" }, ngImport: i0, template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{ headingClass }}\">\n {{ headingTitle }}\n </h2>\n\n <form\n [formGroup]=\"userRequestForm\"\n (ngSubmit)=\"submitForm()\"\n class=\"flex flex-col gap-5 mt-3\"\n >\n <verbena-input\n [label]=\"'First Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"FirstName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"LastName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'E-mail Address'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [customErrorMessages]=\"{\n required: 'Email address is required',\n email: 'Email address must be valid'\n }\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [passwordToggle]=\"true\"\n formControlName=\"Password\"\n [required]=\"true\"\n [type]=\"'password'\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-input\n [label]=\"'Confirm Password'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"ConfirmPassword\"\n [showBorder]=\"true\"\n [passwordToggle]=\"true\"\n [bgColor]=\"'white'\"\n [minLength]=\"userRequestForm.controls['Password'].value?.length\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [customErrorMessages]=\"{\n minLength:'Confirm Password must match password',\n required: 'Confirm Password is required and must match password',\n password: 'Password does not match',\n }\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-button\n [class]=\"'mt-6'\"\n [disable]=\"!this.checkForm()\"\n [text]=\"text\"\n [bgColor]=\"btnBgColor\"\n [textColor]=\"color\"\n [buttonClass]=\"'cursor-not-allowed'\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [pd]=\"btnPd\"\n [ngClass]=\"{\n 'cursor-not-allowed':!checkForm()\n }\"\n [width]=\"btnWidth\"\n buttonClass=\"font-medium text-[22px] leading-[33px]\"\n ></verbena-button>\n <div class=\"flex justify-center items-center OR\">\n <span></span>\n OR\n <span></span>\n </div>\n\n <verbena-button\n svg=\"google-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n (click)=\"handleGoogleAuth()\"\n text=\"Continue with Google\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333]\"\n ></verbena-button>\n\n <verbena-button\n svg=\"apple-logo\"\n (click)=\"handleAppleAuth()\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Apple\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n ></verbena-button>\n </form>\n</section>\n", styles: [".flex{display:flex}.items-center{align-items:center}.overflow-hidden{overflow:hidden}.justify-center{justify-content:center}.h-full{height:100%}.text-center{text-align:center}.underline{text-decoration:underline}.gap-5{gap:20px}.mt-4{margin-top:1rem}.space-y-4>:not([hidden])~:not([hidden]){margin-top:1rem}.gap-1>:not([hidden])~:not([hidden]){gap:.25rem}.pt-3{padding-top:.75rem}.mt-5{margin-top:1.25rem}.border{border-width:1px}.rounded-xl{border-radius:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.flex-col{flex-direction:column}.object-cover{object-fit:cover}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed!important}.accent{accent-color:#000}.OR{color:#666;gap:6px}.OR span{width:150px;border-top:2px solid #6666663d;display:block}\n"], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
434
+ }
435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestComponent, decorators: [{
436
+ type: Component,
437
+ args: [{ selector: 'lib-user-request', template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{ headingClass }}\">\n {{ headingTitle }}\n </h2>\n\n <form\n [formGroup]=\"userRequestForm\"\n (ngSubmit)=\"submitForm()\"\n class=\"flex flex-col gap-5 mt-3\"\n >\n <verbena-input\n [label]=\"'First Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"FirstName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"LastName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'E-mail Address'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [customErrorMessages]=\"{\n required: 'Email address is required',\n email: 'Email address must be valid'\n }\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [passwordToggle]=\"true\"\n formControlName=\"Password\"\n [required]=\"true\"\n [type]=\"'password'\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-input\n [label]=\"'Confirm Password'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"ConfirmPassword\"\n [showBorder]=\"true\"\n [passwordToggle]=\"true\"\n [bgColor]=\"'white'\"\n [minLength]=\"userRequestForm.controls['Password'].value?.length\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [customErrorMessages]=\"{\n minLength:'Confirm Password must match password',\n required: 'Confirm Password is required and must match password',\n password: 'Password does not match',\n }\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-button\n [class]=\"'mt-6'\"\n [disable]=\"!this.checkForm()\"\n [text]=\"text\"\n [bgColor]=\"btnBgColor\"\n [textColor]=\"color\"\n [buttonClass]=\"'cursor-not-allowed'\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [pd]=\"btnPd\"\n [ngClass]=\"{\n 'cursor-not-allowed':!checkForm()\n }\"\n [width]=\"btnWidth\"\n buttonClass=\"font-medium text-[22px] leading-[33px]\"\n ></verbena-button>\n <div class=\"flex justify-center items-center OR\">\n <span></span>\n OR\n <span></span>\n </div>\n\n <verbena-button\n svg=\"google-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n (click)=\"handleGoogleAuth()\"\n text=\"Continue with Google\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333]\"\n ></verbena-button>\n\n <verbena-button\n svg=\"apple-logo\"\n (click)=\"handleAppleAuth()\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Apple\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n ></verbena-button>\n </form>\n</section>\n", styles: [".flex{display:flex}.items-center{align-items:center}.overflow-hidden{overflow:hidden}.justify-center{justify-content:center}.h-full{height:100%}.text-center{text-align:center}.underline{text-decoration:underline}.gap-5{gap:20px}.mt-4{margin-top:1rem}.space-y-4>:not([hidden])~:not([hidden]){margin-top:1rem}.gap-1>:not([hidden])~:not([hidden]){gap:.25rem}.pt-3{padding-top:.75rem}.mt-5{margin-top:1.25rem}.border{border-width:1px}.rounded-xl{border-radius:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.flex-col{flex-direction:column}.object-cover{object-fit:cover}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed!important}.accent{accent-color:#000}.OR{color:#666;gap:6px}.OR span{width:150px;border-top:2px solid #6666663d;display:block}\n"] }]
438
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: HttpWebRequestService }, { type: UtilService }, { type: EnvironmentService }], propDecorators: { width: [{
439
+ type: Input
440
+ }], headingTitle: [{
441
+ type: Input
442
+ }], headingClass: [{
443
+ type: Input
444
+ }], customClass: [{
445
+ type: Input
446
+ }], bgColor: [{
447
+ type: Input
448
+ }], boxShadow: [{
449
+ type: Input
450
+ }], border: [{
451
+ type: Input
452
+ }], borderRadius: [{
453
+ type: Input
454
+ }], textColor: [{
455
+ type: Input
456
+ }], height: [{
457
+ type: Input
458
+ }], pd: [{
459
+ type: Input
460
+ }], text: [{
461
+ type: Input
462
+ }], color: [{
463
+ type: Input
464
+ }], btnBorder: [{
465
+ type: Input
466
+ }], btnBorderRadius: [{
467
+ type: Input
468
+ }], btnBgColor: [{
469
+ type: Input
470
+ }], btnWidth: [{
471
+ type: Input
472
+ }], btnPd: [{
473
+ type: Input
474
+ }], termsLink: [{
475
+ type: Input
476
+ }], privacyLink: [{
477
+ type: Input
478
+ }], routerLink: [{
479
+ type: Input
480
+ }], formSubmit: [{
481
+ type: Output
482
+ }], googleClick: [{
483
+ type: Output
484
+ }], onSubmitSuccess: [{
485
+ type: Output
486
+ }], appleClick: [{
487
+ type: Output
488
+ }], onSubmitResponseEnd: [{
489
+ type: Output
490
+ }] } });
491
+
492
+ class UserRequestModule {
493
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
494
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: UserRequestModule, declarations: [UserRequestComponent], imports: [FormsModule,
495
+ ReactiveFormsModule,
496
+ VerbenaInputModule,
497
+ VerbenaButtonModule,
498
+ CommonModule], exports: [UserRequestComponent] });
499
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestModule, imports: [FormsModule,
500
+ ReactiveFormsModule,
501
+ VerbenaInputModule,
502
+ VerbenaButtonModule,
503
+ CommonModule] });
504
+ }
505
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestModule, decorators: [{
506
+ type: NgModule,
507
+ args: [{
508
+ declarations: [UserRequestComponent],
509
+ imports: [
510
+ FormsModule,
511
+ ReactiveFormsModule,
512
+ VerbenaInputModule,
513
+ VerbenaButtonModule,
514
+ CommonModule,
515
+ ],
516
+ exports: [UserRequestComponent],
517
+ }]
518
+ }] });
519
+
520
+ class MailValidationComponent {
521
+ customClass = '';
522
+ bgColor = '#fff';
523
+ boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
524
+ border = '1px solid #66666680';
525
+ borderRadius = '24px';
526
+ textColor = '#666666';
527
+ height = 'auto';
528
+ pd = '32px 48px';
529
+ width = '600px';
530
+ text = 'Login';
531
+ textAlign = 'center';
532
+ color = 'black';
533
+ textSize = '32px';
534
+ btnBorder = '1px solid #FFE681';
535
+ btnBorderRadius = "40px";
536
+ btnBgColor = '#FFE681';
537
+ btnWidth = '100%';
538
+ btnPd = '7px 10px';
539
+ resendOtp = new EventEmitter();
540
+ proceedToNextStep = new EventEmitter();
541
+ login = new EventEmitter();
542
+ currentStep = 'linkSent';
543
+ handleResendOtp() {
544
+ this.resendOtp.emit();
545
+ }
546
+ goToNextStep() {
547
+ switch (this.currentStep) {
548
+ case 'linkSent':
549
+ this.currentStep = 'verified';
550
+ this.proceedToNextStep.emit(this.currentStep);
551
+ break;
552
+ case 'verified':
553
+ this.currentStep = 'accessGranted';
554
+ this.proceedToNextStep.emit(this.currentStep);
555
+ break;
556
+ }
557
+ }
558
+ get styles() {
559
+ return {
560
+ 'background-color': this.bgColor,
561
+ 'box-shadow': this.boxShadow,
562
+ 'border': this.border,
563
+ 'border-radius': this.borderRadius,
564
+ 'color': this.textColor,
565
+ 'max-width': this.width,
566
+ 'margin': '0 auto',
567
+ 'height': this.height,
568
+ 'padding': this.pd,
569
+ };
570
+ }
571
+ handleLogin() {
572
+ this.login.emit();
573
+ }
574
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailValidationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
575
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MailValidationComponent, selector: "lib-mail-validation", inputs: { customClass: "customClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height", pd: "pd", width: "width", text: "text", textAlign: "textAlign", color: "color", textSize: "textSize", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnBgColor: "btnBgColor", btnWidth: "btnWidth", btnPd: "btnPd" }, outputs: { resendOtp: "resendOtp", proceedToNextStep: "proceedToNextStep", login: "login" }, ngImport: i0, template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <div *ngIf=\"currentStep === 'linkSent'\">\n <p [style.color]=\"textColor\" [style.font-size]=\"textSize\">\n Follow the link sent to your e-mail to verify your e-mail address\n </p>\n <p class=\"mt-4\" (click)=\"handleResendOtp()\">\n Didn't get a link? <a href=\"#\" class=\"underline resend\">Resend</a>\n </p>\n </div>\n\n <div *ngIf=\"currentStep === 'verified'\">\n <p [style.color]=\"textColor\" [style.font-size]=\"textSize\">\n Your e-mail has been verified! You will be notified when your access has\n been authorized\n </p>\n </div>\n\n <div *ngIf=\"currentStep === 'accessGranted'\">\n <p [style.color]=\"textColor\" [style.font-size]=\"textSize\">\n Your e-mail has been verified!\n </p>\n <div class=\"mt-4\">\n <verbena-button\n [text]=\"text\"\n [bgColor]=\"btnBgColor\"\n [textColor]=\"color\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [pd]=\"btnPd\"\n (click)=\"handleLogin()\"\n [width]=\"btnWidth\"\n textSize=\"'22px'\"\n buttonClass=\"font-medium text-[22px] leading-[33px]\"\n ></verbena-button>\n </div>\n </div>\n</section>\n", styles: [".flex{display:flex}.overflow-hidden{overflow:hidden}.h-full{height:100%}.underline{text-decoration:underline}.mt-4{margin-top:1rem}.resend{color:#00f}.space-y-4>:not([hidden])~:not([hidden]){margin-top:1rem}.gap-1>:not([hidden])~:not([hidden]){gap:.25rem}.pt-3{padding-top:.75rem}.mt-5{margin-top:1.25rem}.border{border-width:1px}.rounded-xl{border-radius:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.flex-col{flex-direction:column}.w-full{width:100%}\n"], dependencies: [{ kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
576
+ }
577
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailValidationComponent, decorators: [{
578
+ type: Component,
579
+ args: [{ selector: 'lib-mail-validation', template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <div *ngIf=\"currentStep === 'linkSent'\">\n <p [style.color]=\"textColor\" [style.font-size]=\"textSize\">\n Follow the link sent to your e-mail to verify your e-mail address\n </p>\n <p class=\"mt-4\" (click)=\"handleResendOtp()\">\n Didn't get a link? <a href=\"#\" class=\"underline resend\">Resend</a>\n </p>\n </div>\n\n <div *ngIf=\"currentStep === 'verified'\">\n <p [style.color]=\"textColor\" [style.font-size]=\"textSize\">\n Your e-mail has been verified! You will be notified when your access has\n been authorized\n </p>\n </div>\n\n <div *ngIf=\"currentStep === 'accessGranted'\">\n <p [style.color]=\"textColor\" [style.font-size]=\"textSize\">\n Your e-mail has been verified!\n </p>\n <div class=\"mt-4\">\n <verbena-button\n [text]=\"text\"\n [bgColor]=\"btnBgColor\"\n [textColor]=\"color\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [pd]=\"btnPd\"\n (click)=\"handleLogin()\"\n [width]=\"btnWidth\"\n textSize=\"'22px'\"\n buttonClass=\"font-medium text-[22px] leading-[33px]\"\n ></verbena-button>\n </div>\n </div>\n</section>\n", styles: [".flex{display:flex}.overflow-hidden{overflow:hidden}.h-full{height:100%}.underline{text-decoration:underline}.mt-4{margin-top:1rem}.resend{color:#00f}.space-y-4>:not([hidden])~:not([hidden]){margin-top:1rem}.gap-1>:not([hidden])~:not([hidden]){gap:.25rem}.pt-3{padding-top:.75rem}.mt-5{margin-top:1.25rem}.border{border-width:1px}.rounded-xl{border-radius:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.flex-col{flex-direction:column}.w-full{width:100%}\n"] }]
580
+ }], propDecorators: { customClass: [{
581
+ type: Input
582
+ }], bgColor: [{
583
+ type: Input
584
+ }], boxShadow: [{
585
+ type: Input
586
+ }], border: [{
587
+ type: Input
588
+ }], borderRadius: [{
589
+ type: Input
590
+ }], textColor: [{
591
+ type: Input
592
+ }], height: [{
593
+ type: Input
594
+ }], pd: [{
595
+ type: Input
596
+ }], width: [{
597
+ type: Input
598
+ }], text: [{
599
+ type: Input
600
+ }], textAlign: [{
601
+ type: Input
602
+ }], color: [{
603
+ type: Input
604
+ }], textSize: [{
605
+ type: Input
606
+ }], btnBorder: [{
607
+ type: Input
608
+ }], btnBorderRadius: [{
609
+ type: Input
610
+ }], btnBgColor: [{
611
+ type: Input
612
+ }], btnWidth: [{
613
+ type: Input
614
+ }], btnPd: [{
615
+ type: Input
616
+ }], resendOtp: [{
617
+ type: Output
618
+ }], proceedToNextStep: [{
619
+ type: Output
620
+ }], login: [{
621
+ type: Output
622
+ }] } });
623
+
624
+ class MailValidationModule {
625
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailValidationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
626
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MailValidationModule, declarations: [MailValidationComponent], imports: [FormsModule,
627
+ ReactiveFormsModule,
628
+ VerbenaInputModule,
629
+ VerbenaButtonModule,
630
+ CommonModule], exports: [MailValidationComponent] });
631
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailValidationModule, imports: [FormsModule,
632
+ ReactiveFormsModule,
633
+ VerbenaInputModule,
634
+ VerbenaButtonModule,
635
+ CommonModule] });
636
+ }
637
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailValidationModule, decorators: [{
638
+ type: NgModule,
639
+ args: [{
640
+ declarations: [MailValidationComponent],
641
+ imports: [
642
+ FormsModule,
643
+ ReactiveFormsModule,
644
+ VerbenaInputModule,
645
+ VerbenaButtonModule,
646
+ CommonModule,
647
+ ],
648
+ exports: [MailValidationComponent],
649
+ }]
650
+ }] });
651
+
652
+ class ButtonComponent {
653
+ text = '';
654
+ color = 'black';
655
+ border = '1px solid #FFE681';
656
+ borderRadius = "40px";
657
+ bgColor = '#FFE681';
658
+ width = '100%';
659
+ pd = '10px 20px';
660
+ buttonClass = '';
661
+ disabled = false;
662
+ buttonClick = new EventEmitter();
663
+ handleClick() {
664
+ this.buttonClick.emit();
665
+ }
666
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
667
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ButtonComponent, selector: "lib-button", inputs: { text: "text", color: "color", border: "border", borderRadius: "borderRadius", bgColor: "bgColor", width: "width", pd: "pd", buttonClass: "buttonClass", disabled: "disabled" }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<verbena-button\n[text]=\"text\"\n[bgColor]=\"bgColor\"\n[textColor]=\"color\"\n[border]=\"border\"\n[borderRadius]=\"borderRadius\"\n[pd]=\"pd\"\n[width]=\"width\"\n[disable]=\"disabled\"\n[ngStyle]=\"{'cursor': disabled ? 'not-allowed' : 'pointer' }\"\nbuttonClass=\"font-medium text-[22px] leading-[33px] {{buttonClass}}\"\n(click)=\"handleClick()\"\n></verbena-button>\n", styles: [".disable-btn{cursor:not-allowed}\n"], dependencies: [{ kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }] });
668
+ }
669
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, decorators: [{
670
+ type: Component,
671
+ args: [{ selector: 'lib-button', template: "<verbena-button\n[text]=\"text\"\n[bgColor]=\"bgColor\"\n[textColor]=\"color\"\n[border]=\"border\"\n[borderRadius]=\"borderRadius\"\n[pd]=\"pd\"\n[width]=\"width\"\n[disable]=\"disabled\"\n[ngStyle]=\"{'cursor': disabled ? 'not-allowed' : 'pointer' }\"\nbuttonClass=\"font-medium text-[22px] leading-[33px] {{buttonClass}}\"\n(click)=\"handleClick()\"\n></verbena-button>\n", styles: [".disable-btn{cursor:not-allowed}\n"] }]
672
+ }], propDecorators: { text: [{
673
+ type: Input
674
+ }], color: [{
675
+ type: Input
676
+ }], border: [{
677
+ type: Input
678
+ }], borderRadius: [{
679
+ type: Input
680
+ }], bgColor: [{
681
+ type: Input
682
+ }], width: [{
683
+ type: Input
684
+ }], pd: [{
685
+ type: Input
686
+ }], buttonClass: [{
687
+ type: Input
688
+ }], disabled: [{
689
+ type: Input
690
+ }], buttonClick: [{
691
+ type: Output
692
+ }] } });
693
+
694
+ var MechanismType;
695
+ (function (MechanismType) {
696
+ MechanismType["InApp"] = "InApp";
697
+ MechanismType["Google"] = "Google";
698
+ MechanismType["Apple"] = "Apple";
699
+ MechanismType["MicrosoftAD"] = "MicrosoftAD";
700
+ })(MechanismType || (MechanismType = {}));
701
+
702
+ class OAuthComponent {
703
+ clientId = 'YOUR_CLIENT_ID_FROM_BACKEND';
704
+ showGoogle = false;
705
+ showMicrosoft = false;
706
+ showApple = false;
707
+ authMechanisms = null;
708
+ microsoftClick = new EventEmitter();
709
+ googleClick = new EventEmitter();
710
+ appleClick = new EventEmitter();
711
+ ngOnInit() {
712
+ if (this.authMechanisms !== null) {
713
+ this.showMicrosoft = this.authMechanisms.some(item => item.AuthMechanism.includes(MechanismType.MicrosoftAD));
714
+ this.showGoogle = this.authMechanisms.some(item => item.AuthMechanism.includes(MechanismType.Google));
715
+ if (this.showGoogle) {
716
+ const data = this.authMechanisms.find(item => item.AuthMechanism.includes(MechanismType.Google));
717
+ this.clientId = data.ClientId;
718
+ }
719
+ this.showApple = this.authMechanisms.some(item => item.AuthMechanism.includes(MechanismType.Apple));
720
+ this.loadGoogleScript();
721
+ }
722
+ }
723
+ loadGoogleScript() {
724
+ console.log('checking here');
725
+ if (!document.getElementById('google-jssdk')) {
726
+ const script = document.createElement('script');
727
+ script.src = 'https://accounts.google.com/gsi/client';
728
+ script.id = 'google-jssdk';
729
+ script.async = true;
730
+ script.defer = true;
731
+ script.onload = () => console.log('Google SDK loaded');
732
+ script.onerror = () => console.log('Error loading Google SDK');
733
+ document.head.appendChild(script);
734
+ }
735
+ }
736
+ oAuthWithMicrosoft() {
737
+ this.microsoftClick.emit();
738
+ }
739
+ // oAuthWithGoogle() {
740
+ // console.log('windows',window['google'])
741
+ // console.log('client id is here', this.clientId)
742
+ // if (window['google']) {
743
+ // window['google'].accounts.id.initialize({
744
+ // client_id: this.clientId,
745
+ // callback: (response: any) => this.handleCredentialResponse(response),
746
+ // ux_mode: 'popup'
747
+ // });
748
+ // window['google'].accounts.id.prompt();
749
+ // } else {
750
+ // console.error('Google SDK not loaded.');
751
+ // }
752
+ // }
753
+ // oAuthWithGoogle() {
754
+ // const redirectUri = encodeURIComponent('http://localhost:5124/Authentication/ExternalCallback');
755
+ // const scope = encodeURIComponent('openid email profile');
756
+ // const responseType = 'code';
757
+ // const authUrl = `https://accounts.google.com/o/oauth2/v2/auth?client_id=${this.clientId}&redirect_uri=${redirectUri}&response_type=${responseType}&scope=${scope}`;
758
+ // window.open(authUrl, '_blank', 'width=full,height=full');
759
+ // }
760
+ oAuthWithGoogle() {
761
+ const redirectUri = encodeURIComponent('http://localhost:4200/Authentication/ExternalCallback');
762
+ const scope = encodeURIComponent('openid email profile');
763
+ const responseType = 'code';
764
+ const authUrl = `https://accounts.google.com/o/oauth2/v2/auth?client_id=${this.clientId}&redirect_uri=${redirectUri}&response_type=${responseType}&scope=${scope}`;
765
+ window.open(authUrl, '_blank', 'width=1000,height=800');
766
+ // const interval = setInterval(() => {
767
+ // console.log('yessss inside pop up')
768
+ // try {
769
+ // console.log('auth windows is here',authWindow)
770
+ // const currentUrl = authWindow.location.href;
771
+ // console.log('yessss for currentUrl',currentUrl)
772
+ // if (currentUrl.indexOf('code=') !== -1) {
773
+ // const urlParams = new URLSearchParams(authWindow.location.search);
774
+ // const authCode = urlParams.get('code');
775
+ // if (authCode) {
776
+ // console.log('Authorization code:', authCode);
777
+ // clearInterval(interval);
778
+ // this.exchangeCodeForToken(authCode);
779
+ // // authWindow.close();
780
+ // }
781
+ // }
782
+ // } catch (error) {
783
+ // }
784
+ // }, 1000);
785
+ }
786
+ exchangeCodeForToken(authCode) {
787
+ console.log('Exchanging code for token:', authCode);
788
+ // this.http.post('/api/auth/google/token', { code: authCode }).subscribe({
789
+ // next: (response) => {
790
+ // console.log('Token received:', response);
791
+ // // Handle successful login (store token, etc.)
792
+ // },
793
+ // error: (err) => {
794
+ // console.error('Error exchanging code for token:', err);
795
+ // }
796
+ // });
797
+ }
798
+ handleCredentialResponse(response) {
799
+ console.log('Encoded JWT ID token:', response.credential);
800
+ }
801
+ oAuthWithApple() {
802
+ this.appleClick.emit();
803
+ }
804
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OAuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
805
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: OAuthComponent, selector: "verben-o-auth", inputs: { authMechanisms: "authMechanisms" }, outputs: { microsoftClick: "microsoftClick", googleClick: "googleClick", appleClick: "appleClick" }, ngImport: i0, template: "<section class=\"oauthWrapper\"> \n <div class=\"OrFlexWrapper\">\n <hr/>\n <span>OR</span>\n <hr/>\n </div>\n <span *ngIf=\"showMicrosoft\"> \n <verbena-button\n svg=\"microsoft-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Microsoft\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n (click)=\"oAuthWithMicrosoft()\"\n ></verbena-button>\n </span> \n\n <span *ngIf=\"showGoogle\"> \n <verbena-button\n svg=\"google-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Google\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n (click)=\"oAuthWithGoogle()\"\n ></verbena-button>\n\n <!-- <div id=\"g_id_onload\"\n data-client_id=\"834995866282-l8gkp0r3v3a1bdvfmaumurki7ndar3m4.apps.googleusercontent.com\"\n data-context=\"signin\"\n data-ux_mode=\"popup\"\n data-login_uri=\"http://localhost:5124/Authentication/ExternalCallback\"\n data-itp_support=\"true\">\n</div>\n\n<div class=\"g_id_signin\"\n data-type=\"standard\"\n data-shape=\"rectangular\"\n data-theme=\"outline\"\n data-text=\"signin_with\"\n data-size=\"large\"\n data-logo_alignment=\"center\">\n</div> -->\n </span>\n \n <span *ngIf=\"showApple\"> \n <verbena-button\n svg=\"apple-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Apple\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n (click)=\"oAuthWithApple()\"\n ></verbena-button>\n </span>\n</section>\n", styles: ["hr{height:1px;margin:0;border:1px solid #66666640;flex:1}.OR{margin:0 2px;color:#666}.oauthWrapper{display:flex;flex-direction:column;gap:12px}.OrFlexWrapper{display:flex;align-items:center;gap:8px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }] });
806
+ }
807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OAuthComponent, decorators: [{
808
+ type: Component,
809
+ args: [{ selector: 'verben-o-auth', template: "<section class=\"oauthWrapper\"> \n <div class=\"OrFlexWrapper\">\n <hr/>\n <span>OR</span>\n <hr/>\n </div>\n <span *ngIf=\"showMicrosoft\"> \n <verbena-button\n svg=\"microsoft-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Microsoft\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n (click)=\"oAuthWithMicrosoft()\"\n ></verbena-button>\n </span> \n\n <span *ngIf=\"showGoogle\"> \n <verbena-button\n svg=\"google-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Google\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n (click)=\"oAuthWithGoogle()\"\n ></verbena-button>\n\n <!-- <div id=\"g_id_onload\"\n data-client_id=\"834995866282-l8gkp0r3v3a1bdvfmaumurki7ndar3m4.apps.googleusercontent.com\"\n data-context=\"signin\"\n data-ux_mode=\"popup\"\n data-login_uri=\"http://localhost:5124/Authentication/ExternalCallback\"\n data-itp_support=\"true\">\n</div>\n\n<div class=\"g_id_signin\"\n data-type=\"standard\"\n data-shape=\"rectangular\"\n data-theme=\"outline\"\n data-text=\"signin_with\"\n data-size=\"large\"\n data-logo_alignment=\"center\">\n</div> -->\n </span>\n \n <span *ngIf=\"showApple\"> \n <verbena-button\n svg=\"apple-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Apple\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n (click)=\"oAuthWithApple()\"\n ></verbena-button>\n </span>\n</section>\n", styles: ["hr{height:1px;margin:0;border:1px solid #66666640;flex:1}.OR{margin:0 2px;color:#666}.oauthWrapper{display:flex;flex-direction:column;gap:12px}.OrFlexWrapper{display:flex;align-items:center;gap:8px}\n"] }]
810
+ }], propDecorators: { authMechanisms: [{
811
+ type: Input
812
+ }], microsoftClick: [{
813
+ type: Output
814
+ }], googleClick: [{
815
+ type: Output
816
+ }], appleClick: [{
817
+ type: Output
818
+ }] } });
819
+
820
+ class SignUpComponent {
821
+ fb;
822
+ server;
823
+ utilService;
824
+ headlingText = 'Create an account';
825
+ width = '';
826
+ maxWidth = '';
827
+ margin = '';
828
+ pd = '';
829
+ customClass = '';
830
+ headlingClass = '';
831
+ bgColor = '#fff';
832
+ boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
833
+ border = '1px solid #66666680';
834
+ borderRadius = '24px';
835
+ height = 'auto';
836
+ textColor = '#333';
837
+ disabled = false;
838
+ // button styles
839
+ btnClass = '';
840
+ btnBgColor = '#FFE681';
841
+ btnColor = '';
842
+ btnBorder = '';
843
+ btnBorderRadius = '24px';
844
+ btnPd = '';
845
+ btnText = 'Create account';
846
+ //inputStyles
847
+ inputLabelColor = '';
848
+ inputBgColor = 'transparent';
849
+ inputBorder = '1px solid #66666659';
850
+ inputBorderRadius = '12px';
851
+ // links
852
+ termsLink = '';
853
+ privacyLink = '';
854
+ routerLink = '';
855
+ formSubmit = new EventEmitter();
856
+ onSubmitEnd = new EventEmitter();
857
+ googleClick = new EventEmitter();
858
+ appleClick = new EventEmitter();
859
+ signUpForm;
860
+ constructor(fb, server, utilService) {
861
+ this.fb = fb;
862
+ this.server = server;
863
+ this.utilService = utilService;
864
+ this.signUpForm = this.fb.group({
865
+ Firstname: new FormControl(null, Validators.required),
866
+ Lastname: new FormControl(null, Validators.required),
867
+ Email: new FormControl(null, [
868
+ Validators.required,
869
+ Validators.email,
870
+ ]),
871
+ Password: new FormControl(null, [
872
+ Validators.required,
873
+ Validators.minLength(8),
874
+ ]),
875
+ Confirmpassword: new FormControl(null, [
876
+ Validators.required,
877
+ Validators.minLength(8),
878
+ ]),
879
+ Terms: new FormControl(false, [Validators.requiredTrue]),
880
+ }, { validators: this.passwordMatchValidator });
881
+ }
882
+ passwordMatchValidator = (group) => {
883
+ const password = group.get('Password')?.value;
884
+ const confirmPassword = group.get('Confirmpassword')?.value;
885
+ return password === confirmPassword ? null : { passwordMismatch: true };
886
+ };
887
+ checkForm() {
888
+ return this.signUpForm.valid;
889
+ }
890
+ async submit() {
891
+ if (!this.checkForm()) {
892
+ return;
893
+ }
894
+ const data = {
895
+ Firstname: this.signUpForm.controls['Firstname'].value,
896
+ Lastname: this.signUpForm.controls['Lastname'].value,
897
+ Email: this.signUpForm.controls['Email'].value,
898
+ Password: this.signUpForm.controls['Password'].value,
899
+ Terms: this.signUpForm.controls['Terms'].value,
900
+ Id: '61f7e48f0c651345677b7775',
901
+ CreatedAt: new Date(),
902
+ UpdatedAt: new Date(),
903
+ DataState: ObjectState.New,
904
+ id: '61f7e48f0c651345677b7775',
905
+ Tenant: 'James'
906
+ };
907
+ const payload = [
908
+ {
909
+ ...data,
910
+ "Code": "123 ",
911
+ "ServiceName": "Test 1",
912
+ "MailAddress": data.Email,
913
+ "OtherName": "James",
914
+ "Status": "Inactive",
915
+ "PhoneNumber": "07012345678",
916
+ "TenantId": '61f7e48f0c651345677b7775',
917
+ "Role": ['tester'],
918
+ "Tags": [
919
+ {
920
+ "Name": "checker",
921
+ "IsOptional": true
922
+ }
923
+ ],
924
+ }
925
+ ];
926
+ this.formSubmit.emit(data);
927
+ this.utilService.sendBI(true);
928
+ const res = await this.server.post(`User/SaveUsers`, payload);
929
+ this.utilService.sendBI(false);
930
+ if (res instanceof ErrorResponse) {
931
+ this.onSubmitEnd.emit(res);
932
+ }
933
+ else {
934
+ var result = res;
935
+ this.onSubmitEnd.emit(result);
936
+ }
937
+ }
938
+ handleGoogleAuth() {
939
+ this.googleClick.emit();
940
+ }
941
+ handleAppleAuth() {
942
+ this.appleClick.emit();
943
+ }
944
+ get styles() {
945
+ return {
946
+ 'background-color': this.bgColor,
947
+ 'box-shadow': this.boxShadow,
948
+ 'border': this.border,
949
+ 'border-radius': this.borderRadius,
950
+ 'color': this.textColor,
951
+ 'width': this.width,
952
+ 'max-width': this.maxWidth,
953
+ 'margin': this.margin,
954
+ 'height': this.height,
955
+ 'padding': this.pd
956
+ };
957
+ }
958
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignUpComponent, deps: [{ token: i1$1.FormBuilder }, { token: HttpWebRequestService }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Component });
959
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SignUpComponent, selector: "verben-sign-up", inputs: { headlingText: "headlingText", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", customClass: "customClass", headlingClass: "headlingClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", height: "height", textColor: "textColor", disabled: "disabled", btnClass: "btnClass", btnBgColor: "btnBgColor", btnColor: "btnColor", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnPd: "btnPd", btnText: "btnText", inputLabelColor: "inputLabelColor", inputBgColor: "inputBgColor", inputBorder: "inputBorder", inputBorderRadius: "inputBorderRadius", termsLink: "termsLink", privacyLink: "privacyLink", routerLink: "routerLink" }, outputs: { formSubmit: "formSubmit", onSubmitEnd: "onSubmitEnd", googleClick: "googleClick", appleClick: "appleClick" }, ngImport: i0, template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{headlingClass}}\">\n {{headlingText}}\n </h2>\n <form [formGroup]=\"signUpForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\">\n <verbena-input\n [label]=\"'First name'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"Firstname\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n [customErrorMessages]=\"{required:'First name is required'}\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last name'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"Lastname\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n [customErrorMessages]=\"{required:'Last name is required'}\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Password\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n [passwordToggle]=\"true\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div> \n <verbena-input\n [label]=\"'Confirm Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Confirmpassword\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"false\"\n [errorBorderColor]=\"'red'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <span *ngIf=\"signUpForm.hasError('passwordMismatch') && signUpForm.get('Confirmpassword')?.dirty\"> \n <small class=\"error-text\">Passwords do not match.</small>\n </span>\n </div>\n <div> \n <div class=\"checkBoxWrapper\">\n <input type=\"checkbox\" id=\"terms\" formControlName=\"Terms\" class=\"checBoxInput\" />\n <label for=\"terms\" \n class=\"break-all font-normal leading-6\"\n >By creating an account, I agree to our <a [attr.href]=\"termsLink\">Terms of use</a> and\n <a [attr.href]=\"privacyLink\">Privacy Policy</a></label\n >\n </div>\n <p *ngIf=\"signUpForm.controls['Terms'].invalid && signUpForm.controls['Terms'].touched\">\n <small class=\"error-text\">Please agree to the terms of use and privacy policy.</small>\n </p>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n type=\"submit\"\n [disabled]=\"!this.checkForm()\"\n [ngStyle]=\"{'margin-top':'10px'}\"\n ></lib-button>\n <verben-o-auth \n (googleClick)=\"handleGoogleAuth()\"\n (appleClick)=\"handleAppleAuth()\"\n ></verben-o-auth>\n <p>\n Already have an account?\n <a [routerLink]=\"routerLink\" class=\"\">Log in</a>\n </p>\n </form>\n </section>\n \n", styles: ["a{text-decoration:underline;cursor:pointer}input[type=checkbox]:checked{accent-color:#111}.flexWrapper{display:flex;flex-direction:column;gap:10px}.checkBoxWrapper{display:flex;align-items:start;gap:2px}.checBoxInput{margin-top:6px}.bigcheckboxWrapper{margin-top:.5rem;margin-bottom:1.5rem}.error-text{color:red}.disable-btn{cursor:not-allowed}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ButtonComponent, selector: "lib-button", inputs: ["text", "color", "border", "borderRadius", "bgColor", "width", "pd", "buttonClass", "disabled"], outputs: ["buttonClick"] }, { kind: "component", type: OAuthComponent, selector: "verben-o-auth", inputs: ["authMechanisms"], outputs: ["microsoftClick", "googleClick", "appleClick"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
960
+ }
961
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignUpComponent, decorators: [{
962
+ type: Component,
963
+ args: [{ selector: 'verben-sign-up', template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{headlingClass}}\">\n {{headlingText}}\n </h2>\n <form [formGroup]=\"signUpForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\">\n <verbena-input\n [label]=\"'First name'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"Firstname\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n [customErrorMessages]=\"{required:'First name is required'}\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last name'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"Lastname\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n [customErrorMessages]=\"{required:'Last name is required'}\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Password\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n [passwordToggle]=\"true\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div> \n <verbena-input\n [label]=\"'Confirm Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Confirmpassword\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"false\"\n [errorBorderColor]=\"'red'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <span *ngIf=\"signUpForm.hasError('passwordMismatch') && signUpForm.get('Confirmpassword')?.dirty\"> \n <small class=\"error-text\">Passwords do not match.</small>\n </span>\n </div>\n <div> \n <div class=\"checkBoxWrapper\">\n <input type=\"checkbox\" id=\"terms\" formControlName=\"Terms\" class=\"checBoxInput\" />\n <label for=\"terms\" \n class=\"break-all font-normal leading-6\"\n >By creating an account, I agree to our <a [attr.href]=\"termsLink\">Terms of use</a> and\n <a [attr.href]=\"privacyLink\">Privacy Policy</a></label\n >\n </div>\n <p *ngIf=\"signUpForm.controls['Terms'].invalid && signUpForm.controls['Terms'].touched\">\n <small class=\"error-text\">Please agree to the terms of use and privacy policy.</small>\n </p>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n type=\"submit\"\n [disabled]=\"!this.checkForm()\"\n [ngStyle]=\"{'margin-top':'10px'}\"\n ></lib-button>\n <verben-o-auth \n (googleClick)=\"handleGoogleAuth()\"\n (appleClick)=\"handleAppleAuth()\"\n ></verben-o-auth>\n <p>\n Already have an account?\n <a [routerLink]=\"routerLink\" class=\"\">Log in</a>\n </p>\n </form>\n </section>\n \n", styles: ["a{text-decoration:underline;cursor:pointer}input[type=checkbox]:checked{accent-color:#111}.flexWrapper{display:flex;flex-direction:column;gap:10px}.checkBoxWrapper{display:flex;align-items:start;gap:2px}.checBoxInput{margin-top:6px}.bigcheckboxWrapper{margin-top:.5rem;margin-bottom:1.5rem}.error-text{color:red}.disable-btn{cursor:not-allowed}\n"] }]
964
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: HttpWebRequestService }, { type: UtilService }], propDecorators: { headlingText: [{
965
+ type: Input
966
+ }], width: [{
967
+ type: Input
968
+ }], maxWidth: [{
969
+ type: Input
970
+ }], margin: [{
971
+ type: Input
972
+ }], pd: [{
973
+ type: Input
974
+ }], customClass: [{
975
+ type: Input
976
+ }], headlingClass: [{
977
+ type: Input
978
+ }], bgColor: [{
979
+ type: Input
980
+ }], boxShadow: [{
981
+ type: Input
982
+ }], border: [{
983
+ type: Input
984
+ }], borderRadius: [{
985
+ type: Input
986
+ }], height: [{
987
+ type: Input
988
+ }], textColor: [{
989
+ type: Input
990
+ }], disabled: [{
991
+ type: Input
992
+ }], btnClass: [{
993
+ type: Input
994
+ }], btnBgColor: [{
995
+ type: Input
996
+ }], btnColor: [{
997
+ type: Input
998
+ }], btnBorder: [{
999
+ type: Input
1000
+ }], btnBorderRadius: [{
1001
+ type: Input
1002
+ }], btnPd: [{
1003
+ type: Input
1004
+ }], btnText: [{
1005
+ type: Input
1006
+ }], inputLabelColor: [{
1007
+ type: Input
1008
+ }], inputBgColor: [{
1009
+ type: Input
1010
+ }], inputBorder: [{
1011
+ type: Input
1012
+ }], inputBorderRadius: [{
1013
+ type: Input
1014
+ }], termsLink: [{
1015
+ type: Input
1016
+ }], privacyLink: [{
1017
+ type: Input
1018
+ }], routerLink: [{
1019
+ type: Input
1020
+ }], formSubmit: [{
1021
+ type: Output
1022
+ }], onSubmitEnd: [{
1023
+ type: Output
1024
+ }], googleClick: [{
1025
+ type: Output
1026
+ }], appleClick: [{
1027
+ type: Output
1028
+ }] } });
1029
+
1030
+ class OAuthModule {
1031
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1032
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: OAuthModule, declarations: [OAuthComponent], imports: [CommonModule, VerbenaInputModule, VerbenaButtonModule], exports: [OAuthComponent] });
1033
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OAuthModule, imports: [CommonModule, VerbenaInputModule, VerbenaButtonModule] });
1034
+ }
1035
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OAuthModule, decorators: [{
1036
+ type: NgModule,
1037
+ args: [{
1038
+ declarations: [OAuthComponent],
1039
+ imports: [CommonModule, VerbenaInputModule, VerbenaButtonModule],
1040
+ exports: [OAuthComponent]
1041
+ }]
1042
+ }] });
1043
+
1044
+ class ButtonModule {
1045
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1046
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ButtonModule, declarations: [ButtonComponent], imports: [CommonModule, VerbenaButtonModule, FormsModule], exports: [ButtonComponent] });
1047
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonModule, imports: [CommonModule, VerbenaButtonModule, FormsModule] });
1048
+ }
1049
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonModule, decorators: [{
1050
+ type: NgModule,
1051
+ args: [{
1052
+ declarations: [ButtonComponent],
1053
+ imports: [CommonModule, VerbenaButtonModule, FormsModule],
1054
+ exports: [ButtonComponent]
1055
+ }]
1056
+ }] });
1057
+
1058
+ class SignUpModule {
1059
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignUpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1060
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SignUpModule, declarations: [SignUpComponent], imports: [CommonModule, FormsModule, VerbenaInputModule, RouterLink, ButtonModule, OAuthModule, ReactiveFormsModule], exports: [SignUpComponent] });
1061
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignUpModule, imports: [CommonModule, FormsModule, VerbenaInputModule, ButtonModule, OAuthModule, ReactiveFormsModule] });
1062
+ }
1063
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignUpModule, decorators: [{
1064
+ type: NgModule,
1065
+ args: [{
1066
+ declarations: [SignUpComponent],
1067
+ imports: [CommonModule, FormsModule, VerbenaInputModule, RouterLink, ButtonModule, OAuthModule, ReactiveFormsModule],
1068
+ exports: [SignUpComponent]
1069
+ }]
1070
+ }] });
1071
+
1072
+ class SignInComponent {
1073
+ fb;
1074
+ server;
1075
+ utilService;
1076
+ envSvc;
1077
+ headlingText = 'Sign in';
1078
+ width = '';
1079
+ maxWidth = '';
1080
+ margin = '';
1081
+ pd = '';
1082
+ customClass = '';
1083
+ headlingClass = '';
1084
+ bgColor = '#fff';
1085
+ boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
1086
+ border = '1px solid #66666680';
1087
+ borderRadius = '24px';
1088
+ textColor = '#333';
1089
+ height = 'auto';
1090
+ forgetPasswordClass = '';
1091
+ requestAccessClass = '';
1092
+ createAccountClass = '';
1093
+ createAccountLinkClass = '';
1094
+ // links
1095
+ forgetPasswordLink = '';
1096
+ createAccountLink = '';
1097
+ requestAccessLink = '';
1098
+ // button styles
1099
+ btnClass = '';
1100
+ btnBgColor = '#FFE681';
1101
+ btnColor = '';
1102
+ btnBorder = '';
1103
+ btnBorderRadius = '24px';
1104
+ btnPd = '';
1105
+ btnText = 'Log in';
1106
+ //inputStyles
1107
+ inputLabelColor = '';
1108
+ inputBgColor = 'transparent';
1109
+ inputBorder = '1px solid #66666659';
1110
+ inputBorderRadius = '12px';
1111
+ termsErrorText = 'Please agree to the terms of use and privacy policy.';
1112
+ formSubmit = new EventEmitter();
1113
+ onSubmitEnd = new EventEmitter();
1114
+ googleClick = new EventEmitter();
1115
+ microsoftClick = new EventEmitter();
1116
+ appleClick = new EventEmitter();
1117
+ tenantDetails = null;
1118
+ AuthMechanisms = null;
1119
+ showform = false;
1120
+ loginForm;
1121
+ apiKey;
1122
+ secret;
1123
+ constructor(fb, server, utilService, envSvc) {
1124
+ this.fb = fb;
1125
+ this.server = server;
1126
+ this.utilService = utilService;
1127
+ this.envSvc = envSvc;
1128
+ this.loginForm = this.fb.group({
1129
+ Email: new FormControl(null, [
1130
+ Validators.required,
1131
+ Validators.email,
1132
+ ]),
1133
+ Password: new FormControl(null, [
1134
+ Validators.required,
1135
+ Validators.minLength(5),
1136
+ ]),
1137
+ });
1138
+ this.apiKey = this.envSvc.environment.APIKey;
1139
+ this.secret = this.envSvc.environment.Secret;
1140
+ }
1141
+ ngOnInit() {
1142
+ this.getTenantConfig();
1143
+ }
1144
+ async getTenantConfig() {
1145
+ const res = await this.server.get(`Tenant/GetTenantConfigByKey/${this.apiKey}`);
1146
+ this.tenantDetails = res;
1147
+ this.AuthMechanisms = this.tenantDetails?.AuthMechanisms;
1148
+ if (!this.tenantDetails?.AuthMechanism && this.tenantDetails?.AuthMechanism !== MechanismType.InApp) {
1149
+ this.showform = false;
1150
+ }
1151
+ else if (this.tenantDetails?.AuthMechanism === MechanismType.InApp) {
1152
+ this.showform = true;
1153
+ }
1154
+ else if (this.AuthMechanisms !== null) {
1155
+ this.showform = this.AuthMechanisms.some(item => item.AuthMechanism.includes(MechanismType.InApp));
1156
+ }
1157
+ }
1158
+ checkForm() {
1159
+ return this.loginForm.valid;
1160
+ }
1161
+ async submit() {
1162
+ if (!this.checkForm()) {
1163
+ return;
1164
+ }
1165
+ const data = {
1166
+ MailAddress: this.loginForm.controls['Email'].value,
1167
+ Password: this.loginForm.controls['Password'].value,
1168
+ LoginType: this.tenantDetails?.AuthMechanism,
1169
+ APIKey: this.apiKey,
1170
+ Secrete: this.secret
1171
+ };
1172
+ this.formSubmit.emit(data);
1173
+ this.utilService.sendBI(true);
1174
+ const res = await this.server.post(`Authentication/Login`, data);
1175
+ this.utilService.sendBI(false);
1176
+ if (res instanceof ErrorResponse) {
1177
+ this.onSubmitEnd.emit(res);
1178
+ }
1179
+ else {
1180
+ var result = res;
1181
+ this.onSubmitEnd.emit(result);
1182
+ }
1183
+ }
1184
+ handleGoogleAuth() {
1185
+ if (this.AuthMechanisms !== null) {
1186
+ const data = this.AuthMechanisms.filter(item => item.AuthMechanism === MechanismType.Google);
1187
+ this.googleClick.emit();
1188
+ }
1189
+ }
1190
+ handleMicrosoft() {
1191
+ if (this.AuthMechanisms !== null) {
1192
+ const data = this.AuthMechanisms.filter(item => item.AuthMechanism === MechanismType.MicrosoftAD);
1193
+ this.microsoftClick.emit();
1194
+ }
1195
+ }
1196
+ handleAppleAuth() {
1197
+ if (this.AuthMechanisms !== null) {
1198
+ const data = this.AuthMechanisms.filter(item => item.AuthMechanism === MechanismType.Apple);
1199
+ this.appleClick.emit();
1200
+ }
1201
+ }
1202
+ get styles() {
1203
+ return {
1204
+ 'background-color': this.bgColor,
1205
+ 'box-shadow': this.boxShadow,
1206
+ 'border': this.border,
1207
+ 'border-radius': this.borderRadius,
1208
+ 'color': this.textColor,
1209
+ 'width': this.width,
1210
+ 'max-width': this.maxWidth,
1211
+ 'margin': this.margin,
1212
+ 'height': this.height,
1213
+ 'padding': this.pd
1214
+ };
1215
+ }
1216
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignInComponent, deps: [{ token: i1$1.FormBuilder }, { token: HttpWebRequestService }, { token: UtilService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Component });
1217
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SignInComponent, selector: "verben-sign-in", inputs: { headlingText: "headlingText", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", customClass: "customClass", headlingClass: "headlingClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height", forgetPasswordClass: "forgetPasswordClass", requestAccessClass: "requestAccessClass", createAccountClass: "createAccountClass", createAccountLinkClass: "createAccountLinkClass", forgetPasswordLink: "forgetPasswordLink", createAccountLink: "createAccountLink", requestAccessLink: "requestAccessLink", btnClass: "btnClass", btnBgColor: "btnBgColor", btnColor: "btnColor", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnPd: "btnPd", btnText: "btnText", inputLabelColor: "inputLabelColor", inputBgColor: "inputBgColor", inputBorder: "inputBorder", inputBorderRadius: "inputBorderRadius", termsErrorText: "termsErrorText" }, outputs: { formSubmit: "formSubmit", onSubmitEnd: "onSubmitEnd", googleClick: "googleClick", microsoftClick: "microsoftClick", appleClick: "appleClick" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h2 class=\"{{headlingClass}}\">{{headlingText}}</h2>\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\"> \n <div class=\"formWrapper\" *ngIf=\"showform\"> \n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div> \n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Password\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n [passwordToggle]=\"true\"\n [customErrorMessages]=\"{\n password:'length must be 5 characters'\n }\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div class=\"pwdWrapper\"> \n <p clas=\"mb-0\"> <a [routerLink]=\"forgetPasswordLink\" class=\"{{forgetPasswordClass}}\">Forgot password</a></p>\n </div>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n type=\"submit\" \n [disabled]=\"!this.checkForm()\"\n ></lib-button>\n </div>\n <div> \n <p *ngIf=\"requestAccessLink\">\n <a [routerLink]=\"requestAccessLink\" class=\"{{requestAccessClass}}\">Click here to request user access</a>\n </p>\n <div> \n <div *ngIf=\"AuthMechanisms !== null\"> \n <verben-o-auth \n [authMechanisms]=\"AuthMechanisms\"\n (googleClick)=\"handleGoogleAuth()\"\n (appleClick)=\"handleAppleAuth()\"\n (microsoftClick)=\"handleMicrosoft()\"\n ></verben-o-auth>\n </div>\n <p class=\"{{createAccountClass}}\" *ngIf=\"createAccountLink\">\n Don't have an account?\n <a [routerLink]=\"createAccountLink\" class=\"{{createAccountLinkClass}}\">Create an account</a>\n </p>\n </div>\n </div>\n </form>\n </section>\n ", styles: ["a{text-decoration:underline}.flexWrapper{display:flex;flex-direction:column;gap:20px;margin-top:12px}.formWrapper{display:flex;flex-direction:column;gap:20px}.pwdWrapper{display:flex;justify-content:flex-end;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: OAuthComponent, selector: "verben-o-auth", inputs: ["authMechanisms"], outputs: ["microsoftClick", "googleClick", "appleClick"] }, { kind: "component", type: ButtonComponent, selector: "lib-button", inputs: ["text", "color", "border", "borderRadius", "bgColor", "width", "pd", "buttonClass", "disabled"], outputs: ["buttonClick"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
1218
+ }
1219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignInComponent, decorators: [{
1220
+ type: Component,
1221
+ args: [{ selector: 'verben-sign-in', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h2 class=\"{{headlingClass}}\">{{headlingText}}</h2>\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\"> \n <div class=\"formWrapper\" *ngIf=\"showform\"> \n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div> \n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Password\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n [passwordToggle]=\"true\"\n [customErrorMessages]=\"{\n password:'length must be 5 characters'\n }\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div class=\"pwdWrapper\"> \n <p clas=\"mb-0\"> <a [routerLink]=\"forgetPasswordLink\" class=\"{{forgetPasswordClass}}\">Forgot password</a></p>\n </div>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n type=\"submit\" \n [disabled]=\"!this.checkForm()\"\n ></lib-button>\n </div>\n <div> \n <p *ngIf=\"requestAccessLink\">\n <a [routerLink]=\"requestAccessLink\" class=\"{{requestAccessClass}}\">Click here to request user access</a>\n </p>\n <div> \n <div *ngIf=\"AuthMechanisms !== null\"> \n <verben-o-auth \n [authMechanisms]=\"AuthMechanisms\"\n (googleClick)=\"handleGoogleAuth()\"\n (appleClick)=\"handleAppleAuth()\"\n (microsoftClick)=\"handleMicrosoft()\"\n ></verben-o-auth>\n </div>\n <p class=\"{{createAccountClass}}\" *ngIf=\"createAccountLink\">\n Don't have an account?\n <a [routerLink]=\"createAccountLink\" class=\"{{createAccountLinkClass}}\">Create an account</a>\n </p>\n </div>\n </div>\n </form>\n </section>\n ", styles: ["a{text-decoration:underline}.flexWrapper{display:flex;flex-direction:column;gap:20px;margin-top:12px}.formWrapper{display:flex;flex-direction:column;gap:20px}.pwdWrapper{display:flex;justify-content:flex-end;cursor:pointer}\n"] }]
1222
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: HttpWebRequestService }, { type: UtilService }, { type: EnvironmentService }], propDecorators: { headlingText: [{
1223
+ type: Input
1224
+ }], width: [{
1225
+ type: Input
1226
+ }], maxWidth: [{
1227
+ type: Input
1228
+ }], margin: [{
1229
+ type: Input
1230
+ }], pd: [{
1231
+ type: Input
1232
+ }], customClass: [{
1233
+ type: Input
1234
+ }], headlingClass: [{
1235
+ type: Input
1236
+ }], bgColor: [{
1237
+ type: Input
1238
+ }], boxShadow: [{
1239
+ type: Input
1240
+ }], border: [{
1241
+ type: Input
1242
+ }], borderRadius: [{
1243
+ type: Input
1244
+ }], textColor: [{
1245
+ type: Input
1246
+ }], height: [{
1247
+ type: Input
1248
+ }], forgetPasswordClass: [{
1249
+ type: Input
1250
+ }], requestAccessClass: [{
1251
+ type: Input
1252
+ }], createAccountClass: [{
1253
+ type: Input
1254
+ }], createAccountLinkClass: [{
1255
+ type: Input
1256
+ }], forgetPasswordLink: [{
1257
+ type: Input
1258
+ }], createAccountLink: [{
1259
+ type: Input
1260
+ }], requestAccessLink: [{
1261
+ type: Input
1262
+ }], btnClass: [{
1263
+ type: Input
1264
+ }], btnBgColor: [{
1265
+ type: Input
1266
+ }], btnColor: [{
1267
+ type: Input
1268
+ }], btnBorder: [{
1269
+ type: Input
1270
+ }], btnBorderRadius: [{
1271
+ type: Input
1272
+ }], btnPd: [{
1273
+ type: Input
1274
+ }], btnText: [{
1275
+ type: Input
1276
+ }], inputLabelColor: [{
1277
+ type: Input
1278
+ }], inputBgColor: [{
1279
+ type: Input
1280
+ }], inputBorder: [{
1281
+ type: Input
1282
+ }], inputBorderRadius: [{
1283
+ type: Input
1284
+ }], termsErrorText: [{
1285
+ type: Input
1286
+ }], formSubmit: [{
1287
+ type: Output
1288
+ }], onSubmitEnd: [{
1289
+ type: Output
1290
+ }], googleClick: [{
1291
+ type: Output
1292
+ }], microsoftClick: [{
1293
+ type: Output
1294
+ }], appleClick: [{
1295
+ type: Output
1296
+ }] } });
1297
+
1298
+ class SignInModule {
1299
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignInModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1300
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SignInModule, declarations: [SignInComponent], imports: [CommonModule, FormsModule, VerbenaInputModule, VerbenaButtonModule, RouterLink, OAuthModule, ButtonModule, ReactiveFormsModule], exports: [SignInComponent] });
1301
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignInModule, imports: [CommonModule, FormsModule, VerbenaInputModule, VerbenaButtonModule, OAuthModule, ButtonModule, ReactiveFormsModule] });
1302
+ }
1303
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignInModule, decorators: [{
1304
+ type: NgModule,
1305
+ args: [{
1306
+ declarations: [SignInComponent],
1307
+ imports: [CommonModule, FormsModule, VerbenaInputModule, VerbenaButtonModule, RouterLink, OAuthModule, ButtonModule, ReactiveFormsModule],
1308
+ exports: [SignInComponent]
1309
+ }]
1310
+ }] });
1311
+
1312
+ class OtpInputComponent {
1313
+ fb;
1314
+ length = 6;
1315
+ otpClass = '';
1316
+ otpChange = new EventEmitter();
1317
+ otpForm;
1318
+ constructor(fb) {
1319
+ this.fb = fb;
1320
+ }
1321
+ ngOnInit() {
1322
+ this.otpForm = this.fb.group({
1323
+ otpArray: this.fb.array(Array(this.length).fill('').map(() => new FormControl('')))
1324
+ });
1325
+ this.otpArray.valueChanges.subscribe(() => {
1326
+ this.emitOtp();
1327
+ });
1328
+ }
1329
+ get otpArray() {
1330
+ return this.otpForm.get('otpArray');
1331
+ }
1332
+ handleInput(event, index) {
1333
+ const value = event.target.value;
1334
+ // /\d/.test(value)
1335
+ if (value.length > 0) {
1336
+ this.otpArray.at(index).setValue(value);
1337
+ if (index < this.length - 1) {
1338
+ this.focusNextInput(index);
1339
+ }
1340
+ }
1341
+ else {
1342
+ this.otpArray.at(index).setValue('');
1343
+ }
1344
+ }
1345
+ handleKeydown(event, index) {
1346
+ if (event.key === 'Backspace') {
1347
+ const currentValue = this.otpArray.at(index).value;
1348
+ if (currentValue) {
1349
+ this.otpArray.at(index).setValue('');
1350
+ }
1351
+ else if (index > 0) {
1352
+ this.focusPreviousInput(index);
1353
+ }
1354
+ }
1355
+ }
1356
+ focusNextInput(index) {
1357
+ const nextInput = document.getElementById(`otp-input-${index + 1}`);
1358
+ nextInput?.focus();
1359
+ }
1360
+ focusPreviousInput(index) {
1361
+ const prevInput = document.getElementById(`otp-input-${index - 1}`);
1362
+ prevInput?.focus();
1363
+ }
1364
+ emitOtp() {
1365
+ const otp = this.otpArray.value.join('');
1366
+ this.otpChange.emit(otp);
1367
+ }
1368
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OtpInputComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
1369
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: OtpInputComponent, selector: "verben-otp-input", inputs: { length: "length", otpClass: "otpClass" }, outputs: { otpChange: "otpChange" }, ngImport: i0, template: "<form [formGroup]=\"otpForm\" >\n <div formArrayName=\"otpArray\" class=\"otp-container\">\n <input\n *ngFor=\"let control of otpArray.controls; let i = index\"\n [id]=\"'otp-input-' + i\"\n class=\"otp-input {{otpClass}}\"\n maxlength=\"1\"\n (input)=\"handleInput($event, i)\"\n (keydown)=\"handleKeydown($event, i)\"\n [formControlName]=\"i\"\n type=\"text\"\n />\n </div>\n</form>\n", styles: [".otp-container{display:flex;gap:15px}.otp-input{width:50px;height:46px;text-align:center;font-size:1.5rem;border:1px solid #66666658;border-radius:12px}.otp-input:focus{border-color:#ffe681;outline:none}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }] });
1370
+ }
1371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OtpInputComponent, decorators: [{
1372
+ type: Component,
1373
+ args: [{ selector: 'verben-otp-input', template: "<form [formGroup]=\"otpForm\" >\n <div formArrayName=\"otpArray\" class=\"otp-container\">\n <input\n *ngFor=\"let control of otpArray.controls; let i = index\"\n [id]=\"'otp-input-' + i\"\n class=\"otp-input {{otpClass}}\"\n maxlength=\"1\"\n (input)=\"handleInput($event, i)\"\n (keydown)=\"handleKeydown($event, i)\"\n [formControlName]=\"i\"\n type=\"text\"\n />\n </div>\n</form>\n", styles: [".otp-container{display:flex;gap:15px}.otp-input{width:50px;height:46px;text-align:center;font-size:1.5rem;border:1px solid #66666658;border-radius:12px}.otp-input:focus{border-color:#ffe681;outline:none}\n"] }]
1374
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { length: [{
1375
+ type: Input
1376
+ }], otpClass: [{
1377
+ type: Input
1378
+ }], otpChange: [{
1379
+ type: Output
1380
+ }] } });
1381
+
1382
+ class TwoFactorAuthOtpComponent {
1383
+ fb;
1384
+ server;
1385
+ utilService;
1386
+ customClass = '';
1387
+ headlingClass = '';
1388
+ headlingText = 'Two Factor Authentication';
1389
+ paragraphClass = '';
1390
+ resendClass = '';
1391
+ width = '';
1392
+ maxWidth = '';
1393
+ margin = '';
1394
+ pd = '';
1395
+ bgColor = '#fff';
1396
+ boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
1397
+ border = '1px solid #66666680';
1398
+ borderRadius = '24px';
1399
+ textColor = '#333';
1400
+ height = 'auto';
1401
+ length = 6;
1402
+ otpClass = '';
1403
+ resendOtpData = {
1404
+ MailAddress: "verbena@gmail.com",
1405
+ Password: "Default",
1406
+ LoginType: "InApp",
1407
+ APIKey: "PDLTC6",
1408
+ Secrete: "$White360$",
1409
+ RedirectUri: "/auth/otp"
1410
+ };
1411
+ User = {
1412
+ Code: '024',
1413
+ TenantId: '53b1c579bdf3de74f76bdac9',
1414
+ Id: '53b1c579bdf3de74f76bdac9',
1415
+ ServiceName: 'chinedu',
1416
+ MailAddress: 'nwaekwuchinedu@gmail.com',
1417
+ PhoneNumber: '070',
1418
+ FirstName: 'nwaekwu',
1419
+ LastName: 'chinedu',
1420
+ OtherName: 'chinedu',
1421
+ Role: [],
1422
+ Tags: [
1423
+ {
1424
+ Name: "tester",
1425
+ IsOptional: true
1426
+ }
1427
+ ],
1428
+ Password: 'Default',
1429
+ Status: 'Active',
1430
+ CreatedAt: new Date(),
1431
+ UpdatedAt: new Date(),
1432
+ DataState: ObjectState.New
1433
+ };
1434
+ OtpData = {
1435
+ User: this.User,
1436
+ Token: '',
1437
+ ValidateUrl: '',
1438
+ Secret: '',
1439
+ OTP: '',
1440
+ Info: ''
1441
+ };
1442
+ btnClass = '';
1443
+ btnBgColor = '#FFE681';
1444
+ btnColor = '';
1445
+ btnBorder = '';
1446
+ btnBorderRadius = '24px';
1447
+ btnPd = '';
1448
+ btnText = 'Submit';
1449
+ otpValue = '';
1450
+ otpForm;
1451
+ buttonClick = new EventEmitter();
1452
+ otpChange = new EventEmitter();
1453
+ onSubmitEnd = new EventEmitter();
1454
+ resend = new EventEmitter();
1455
+ constructor(fb, server, utilService) {
1456
+ this.fb = fb;
1457
+ this.server = server;
1458
+ this.utilService = utilService;
1459
+ }
1460
+ ngOnInit() {
1461
+ this.otpForm = this.fb.group({
1462
+ otpValue: ['', [Validators.required, Validators.minLength(6)]]
1463
+ });
1464
+ }
1465
+ onOtpChange(value) {
1466
+ this.otpValue = value;
1467
+ this.otpForm.get('otpValue')?.setValue(value);
1468
+ this.otpChange.emit(this.otpValue);
1469
+ }
1470
+ async submitData() {
1471
+ const data = {
1472
+ User: {
1473
+ ...this.User
1474
+ },
1475
+ Token: this.OtpData.Token,
1476
+ ValidateUrl: this.OtpData.ValidateUrl,
1477
+ Secret: this.OtpData.Secret,
1478
+ OTP: this.OtpData.OTP,
1479
+ Info: this.OtpData.Info,
1480
+ };
1481
+ if (this.otpForm.valid) {
1482
+ // this.buttonClick.emit(this.otpForm.get('otpValue')?.value);
1483
+ this.utilService.sendBI(true);
1484
+ const res = await this.server.post(`Authentication/Validate`, data);
1485
+ this.utilService.sendBI(false);
1486
+ if (res instanceof ErrorResponse) {
1487
+ this.onSubmitEnd.emit(res);
1488
+ }
1489
+ else {
1490
+ var result = res;
1491
+ this.onSubmitEnd.emit(result);
1492
+ }
1493
+ }
1494
+ }
1495
+ async resendOtp() {
1496
+ const data = {
1497
+ MailAddress: this.resendOtpData?.MailAddress,
1498
+ Password: this.resendOtpData?.Password,
1499
+ LoginType: this.resendOtpData?.LoginType,
1500
+ APIKey: this.resendOtpData?.APIKey,
1501
+ Secrete: this.resendOtpData?.Secrete,
1502
+ RedirectUri: this.resendOtpData?.RedirectUri
1503
+ };
1504
+ this.utilService.sendBI(true);
1505
+ const res = await this.server.post(`Authentication/ResendOTP`, data);
1506
+ this.utilService.sendBI(false);
1507
+ if (res instanceof ErrorResponse) {
1508
+ this.resend.emit(res);
1509
+ }
1510
+ else {
1511
+ var result = res;
1512
+ this.resend.emit(result);
1513
+ }
1514
+ }
1515
+ get styles() {
1516
+ return {
1517
+ 'background-color': this.bgColor,
1518
+ 'box-shadow': this.boxShadow,
1519
+ 'border': this.border,
1520
+ 'border-radius': this.borderRadius,
1521
+ 'color': this.textColor,
1522
+ 'width': this.width,
1523
+ 'max-width': this.maxWidth,
1524
+ 'margin': this.margin,
1525
+ 'height': this.height,
1526
+ 'padding': this.pd
1527
+ };
1528
+ }
1529
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthOtpComponent, deps: [{ token: i1$1.FormBuilder }, { token: HttpWebRequestService }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Component });
1530
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TwoFactorAuthOtpComponent, selector: "verben-auth-otp", inputs: { customClass: "customClass", headlingClass: "headlingClass", headlingText: "headlingText", paragraphClass: "paragraphClass", resendClass: "resendClass", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height", length: "length", otpClass: "otpClass", resendOtpData: "resendOtpData", User: "User", OtpData: "OtpData", btnClass: "btnClass", btnBgColor: "btnBgColor", btnColor: "btnColor", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnPd: "btnPd", btnText: "btnText" }, outputs: { buttonClick: "buttonClick", otpChange: "otpChange", onSubmitEnd: "onSubmitEnd", resend: "resend" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">{{headlingText}}</h3>\n <div class=\"otpWrapper\"> \n <p class=\"{{paragraphClass}}\">Enter the {{length}} digit code sent to you</p>\n <verben-otp-input \n [length]=\"length\" \n (otpChange)=\"onOtpChange($event)\"\n [otpClass]=\"otpClass\"\n ></verben-otp-input>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n (buttonClick)=\"submitData()\"\n [disabled]=\"!otpForm.valid\"\n ></lib-button>\n <p class=\"resendWrapper\">\n Didn\u2019t get a code?\n <a class=\"{{resendClass}}\" (click)=\"resendOtp()\">Resend</a>\n </p>\n \n</section>", styles: [".otpWrapper{margin-bottom:20px;margin-top:15px}.resendWrapper{margin-top:10px;margin-bottom:0!important}\n"], dependencies: [{ kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ButtonComponent, selector: "lib-button", inputs: ["text", "color", "border", "borderRadius", "bgColor", "width", "pd", "buttonClass", "disabled"], outputs: ["buttonClick"] }, { kind: "component", type: OtpInputComponent, selector: "verben-otp-input", inputs: ["length", "otpClass"], outputs: ["otpChange"] }] });
1531
+ }
1532
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthOtpComponent, decorators: [{
1533
+ type: Component,
1534
+ args: [{ selector: 'verben-auth-otp', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">{{headlingText}}</h3>\n <div class=\"otpWrapper\"> \n <p class=\"{{paragraphClass}}\">Enter the {{length}} digit code sent to you</p>\n <verben-otp-input \n [length]=\"length\" \n (otpChange)=\"onOtpChange($event)\"\n [otpClass]=\"otpClass\"\n ></verben-otp-input>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n (buttonClick)=\"submitData()\"\n [disabled]=\"!otpForm.valid\"\n ></lib-button>\n <p class=\"resendWrapper\">\n Didn\u2019t get a code?\n <a class=\"{{resendClass}}\" (click)=\"resendOtp()\">Resend</a>\n </p>\n \n</section>", styles: [".otpWrapper{margin-bottom:20px;margin-top:15px}.resendWrapper{margin-top:10px;margin-bottom:0!important}\n"] }]
1535
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: HttpWebRequestService }, { type: UtilService }], propDecorators: { customClass: [{
1536
+ type: Input
1537
+ }], headlingClass: [{
1538
+ type: Input
1539
+ }], headlingText: [{
1540
+ type: Input
1541
+ }], paragraphClass: [{
1542
+ type: Input
1543
+ }], resendClass: [{
1544
+ type: Input
1545
+ }], width: [{
1546
+ type: Input
1547
+ }], maxWidth: [{
1548
+ type: Input
1549
+ }], margin: [{
1550
+ type: Input
1551
+ }], pd: [{
1552
+ type: Input
1553
+ }], bgColor: [{
1554
+ type: Input
1555
+ }], boxShadow: [{
1556
+ type: Input
1557
+ }], border: [{
1558
+ type: Input
1559
+ }], borderRadius: [{
1560
+ type: Input
1561
+ }], textColor: [{
1562
+ type: Input
1563
+ }], height: [{
1564
+ type: Input
1565
+ }], length: [{
1566
+ type: Input
1567
+ }], otpClass: [{
1568
+ type: Input
1569
+ }], resendOtpData: [{
1570
+ type: Input
1571
+ }], User: [{
1572
+ type: Input
1573
+ }], OtpData: [{
1574
+ type: Input
1575
+ }], btnClass: [{
1576
+ type: Input
1577
+ }], btnBgColor: [{
1578
+ type: Input
1579
+ }], btnColor: [{
1580
+ type: Input
1581
+ }], btnBorder: [{
1582
+ type: Input
1583
+ }], btnBorderRadius: [{
1584
+ type: Input
1585
+ }], btnPd: [{
1586
+ type: Input
1587
+ }], btnText: [{
1588
+ type: Input
1589
+ }], buttonClick: [{
1590
+ type: Output
1591
+ }], otpChange: [{
1592
+ type: Output
1593
+ }], onSubmitEnd: [{
1594
+ type: Output
1595
+ }], resend: [{
1596
+ type: Output
1597
+ }] } });
1598
+
1599
+ class OtpInputModule {
1600
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OtpInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1601
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: OtpInputModule, declarations: [OtpInputComponent], imports: [CommonModule, FormsModule, VerbenaInputModule, RouterLink, ButtonModule, OAuthModule, ReactiveFormsModule], exports: [OtpInputComponent] });
1602
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OtpInputModule, imports: [CommonModule, FormsModule, VerbenaInputModule, ButtonModule, OAuthModule, ReactiveFormsModule] });
1603
+ }
1604
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OtpInputModule, decorators: [{
1605
+ type: NgModule,
1606
+ args: [{
1607
+ declarations: [OtpInputComponent],
1608
+ imports: [CommonModule, FormsModule, VerbenaInputModule, RouterLink, ButtonModule, OAuthModule, ReactiveFormsModule],
1609
+ exports: [OtpInputComponent]
1610
+ }]
1611
+ }] });
1612
+
1613
+ class TwoFactorAuthOtpModule {
1614
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthOtpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1615
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthOtpModule, declarations: [TwoFactorAuthOtpComponent], imports: [CommonModule, ButtonModule, OtpInputModule, RouterLink, ReactiveFormsModule], exports: [TwoFactorAuthOtpComponent] });
1616
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthOtpModule, imports: [CommonModule, ButtonModule, OtpInputModule, ReactiveFormsModule] });
1617
+ }
1618
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthOtpModule, decorators: [{
1619
+ type: NgModule,
1620
+ args: [{
1621
+ declarations: [TwoFactorAuthOtpComponent],
1622
+ imports: [CommonModule, ButtonModule, OtpInputModule, RouterLink, ReactiveFormsModule],
1623
+ exports: [TwoFactorAuthOtpComponent]
1624
+ }]
1625
+ }] });
1626
+
1627
+ class TwoFactorAuthSetupComponent {
1628
+ customClass = '';
1629
+ headlingClass = '';
1630
+ headlingText = 'Set Up Two Factor Authentication';
1631
+ paragraphClass = '';
1632
+ buttonClass = '';
1633
+ width = '';
1634
+ maxWidth = '';
1635
+ margin = '';
1636
+ pd = '';
1637
+ bgColor = '#fff';
1638
+ boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
1639
+ border = '1px solid #66666680';
1640
+ borderRadius = '24px';
1641
+ textColor = '#333';
1642
+ height = '';
1643
+ smsClick = new EventEmitter();
1644
+ mailClick = new EventEmitter();
1645
+ skipClick = new EventEmitter();
1646
+ continueWithSMS() {
1647
+ this.smsClick.emit();
1648
+ }
1649
+ continueWithMail() {
1650
+ this.mailClick.emit();
1651
+ }
1652
+ handleSkip() {
1653
+ this.skipClick.emit();
1654
+ }
1655
+ get styles() {
1656
+ return {
1657
+ 'background-color': this.bgColor,
1658
+ 'box-shadow': this.boxShadow,
1659
+ 'border': this.border,
1660
+ 'border-radius': this.borderRadius,
1661
+ 'color': this.textColor,
1662
+ 'width': this.width,
1663
+ 'max-width': this.maxWidth,
1664
+ 'margin': this.margin,
1665
+ 'height': this.height,
1666
+ 'padding': this.pd
1667
+ };
1668
+ }
1669
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthSetupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1670
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TwoFactorAuthSetupComponent, selector: "verben-two-factor-auth-setup", inputs: { customClass: "customClass", headlingClass: "headlingClass", headlingText: "headlingText", paragraphClass: "paragraphClass", buttonClass: "buttonClass", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height" }, outputs: { smsClick: "smsClick", mailClick: "mailClick", skipClick: "skipClick" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">{{headlingText}}</h3>\n <div class=\"setUpBtnWrapper\">\n <verbena-button\n svg=\"2fa-mail\"\n [svgHeight]=\"16\"\n [svgWidth]=\"20\"\n text=\"Continue with Mail\"\n bgColor=\"white\"\n textColor=\"#333333\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mb-2\"\n (click)=\"continueWithMail()\"\n ></verbena-button>\n <verbena-button\n svg=\"2fa-sms\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with SMS\"\n bgColor=\"white\"\n textColor=\"#333333\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n (click)=\"continueWithSMS()\"\n ></verbena-button>\n <!-- <div class=\"iconWrapper\" (click)=\"handleSkip()\"> \n <p class=\"{{paragraphClass}}\">Skip for now</p>\n <verben-svg \n icon=\"skip-forward\"\n [height]=\"24\"\n [width]=\"24\"\n />\n </div> -->\n</div>\n</section>", styles: [".setUpBtnWrapper{display:flex;flex-direction:column;gap:12px;margin-top:40px}.iconWrapper{display:flex;cursor:pointer;align-items:center;justify-content:end;gap:12px;margin-bottom:50px}.custom-button{font-weight:500}\n"], dependencies: [{ kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }] });
1671
+ }
1672
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthSetupComponent, decorators: [{
1673
+ type: Component,
1674
+ args: [{ selector: 'verben-two-factor-auth-setup', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">{{headlingText}}</h3>\n <div class=\"setUpBtnWrapper\">\n <verbena-button\n svg=\"2fa-mail\"\n [svgHeight]=\"16\"\n [svgWidth]=\"20\"\n text=\"Continue with Mail\"\n bgColor=\"white\"\n textColor=\"#333333\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mb-2\"\n (click)=\"continueWithMail()\"\n ></verbena-button>\n <verbena-button\n svg=\"2fa-sms\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with SMS\"\n bgColor=\"white\"\n textColor=\"#333333\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n (click)=\"continueWithSMS()\"\n ></verbena-button>\n <!-- <div class=\"iconWrapper\" (click)=\"handleSkip()\"> \n <p class=\"{{paragraphClass}}\">Skip for now</p>\n <verben-svg \n icon=\"skip-forward\"\n [height]=\"24\"\n [width]=\"24\"\n />\n </div> -->\n</div>\n</section>", styles: [".setUpBtnWrapper{display:flex;flex-direction:column;gap:12px;margin-top:40px}.iconWrapper{display:flex;cursor:pointer;align-items:center;justify-content:end;gap:12px;margin-bottom:50px}.custom-button{font-weight:500}\n"] }]
1675
+ }], propDecorators: { customClass: [{
1676
+ type: Input
1677
+ }], headlingClass: [{
1678
+ type: Input
1679
+ }], headlingText: [{
1680
+ type: Input
1681
+ }], paragraphClass: [{
1682
+ type: Input
1683
+ }], buttonClass: [{
1684
+ type: Input
1685
+ }], width: [{
1686
+ type: Input
1687
+ }], maxWidth: [{
1688
+ type: Input
1689
+ }], margin: [{
1690
+ type: Input
1691
+ }], pd: [{
1692
+ type: Input
1693
+ }], bgColor: [{
1694
+ type: Input
1695
+ }], boxShadow: [{
1696
+ type: Input
1697
+ }], border: [{
1698
+ type: Input
1699
+ }], borderRadius: [{
1700
+ type: Input
1701
+ }], textColor: [{
1702
+ type: Input
1703
+ }], height: [{
1704
+ type: Input
1705
+ }], smsClick: [{
1706
+ type: Output
1707
+ }], mailClick: [{
1708
+ type: Output
1709
+ }], skipClick: [{
1710
+ type: Output
1711
+ }] } });
1712
+
1713
+ class TwoFactorAuthSetupModule {
1714
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthSetupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1715
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthSetupModule, declarations: [TwoFactorAuthSetupComponent], imports: [CommonModule, VerbenaButtonModule, SvgModule], exports: [TwoFactorAuthSetupComponent] });
1716
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthSetupModule, imports: [CommonModule, VerbenaButtonModule, SvgModule] });
1717
+ }
1718
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthSetupModule, decorators: [{
1719
+ type: NgModule,
1720
+ args: [{
1721
+ declarations: [TwoFactorAuthSetupComponent],
1722
+ imports: [CommonModule, VerbenaButtonModule, SvgModule],
1723
+ exports: [TwoFactorAuthSetupComponent]
1724
+ }]
1725
+ }] });
1726
+
1727
+ class MailComponent {
1728
+ customClass = '';
1729
+ headlingClass = '';
1730
+ width = '';
1731
+ maxWidth = '';
1732
+ margin = '';
1733
+ pd = '';
1734
+ bgColor = '#fff';
1735
+ boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
1736
+ border = '1px solid #66666680';
1737
+ borderRadius = '24px';
1738
+ textColor = '#333';
1739
+ height = 'auto';
1740
+ buttonClick = new EventEmitter();
1741
+ goToLogin() {
1742
+ this.buttonClick.emit();
1743
+ }
1744
+ get styles() {
1745
+ return {
1746
+ 'background-color': this.bgColor,
1747
+ 'box-shadow': this.boxShadow,
1748
+ 'border': this.border,
1749
+ 'border-radius': this.borderRadius,
1750
+ 'color': this.textColor,
1751
+ 'width': this.width,
1752
+ 'max-width': this.maxWidth,
1753
+ 'margin': this.margin,
1754
+ 'height': this.height,
1755
+ 'padding': this.pd
1756
+ };
1757
+ }
1758
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1759
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MailComponent, selector: "verben-mail-message", inputs: { customClass: "customClass", headlingClass: "headlingClass", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height" }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">Your e-mail has been verified!</h3>\n <lib-button \n text=\"Login\" \n buttonClass=\"\"\n (click)=\"goToLogin()\"\n ></lib-button> \n</section>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ButtonComponent, selector: "lib-button", inputs: ["text", "color", "border", "borderRadius", "bgColor", "width", "pd", "buttonClass", "disabled"], outputs: ["buttonClick"] }] });
1760
+ }
1761
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailComponent, decorators: [{
1762
+ type: Component,
1763
+ args: [{ selector: 'verben-mail-message', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">Your e-mail has been verified!</h3>\n <lib-button \n text=\"Login\" \n buttonClass=\"\"\n (click)=\"goToLogin()\"\n ></lib-button> \n</section>\n" }]
1764
+ }], propDecorators: { customClass: [{
1765
+ type: Input
1766
+ }], headlingClass: [{
1767
+ type: Input
1768
+ }], width: [{
1769
+ type: Input
1770
+ }], maxWidth: [{
1771
+ type: Input
1772
+ }], margin: [{
1773
+ type: Input
1774
+ }], pd: [{
1775
+ type: Input
1776
+ }], bgColor: [{
1777
+ type: Input
1778
+ }], boxShadow: [{
1779
+ type: Input
1780
+ }], border: [{
1781
+ type: Input
1782
+ }], borderRadius: [{
1783
+ type: Input
1784
+ }], textColor: [{
1785
+ type: Input
1786
+ }], height: [{
1787
+ type: Input
1788
+ }], buttonClick: [{
1789
+ type: Output
1790
+ }] } });
1791
+
1792
+ class MailModule {
1793
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1794
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MailModule, declarations: [MailComponent], imports: [CommonModule, FormsModule, RouterLink, ButtonModule], exports: [MailComponent] });
1795
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailModule, imports: [CommonModule, FormsModule, ButtonModule] });
1796
+ }
1797
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailModule, decorators: [{
1798
+ type: NgModule,
1799
+ args: [{
1800
+ declarations: [MailComponent],
1801
+ imports: [CommonModule, FormsModule, RouterLink, ButtonModule],
1802
+ exports: [MailComponent]
1803
+ }]
1804
+ }] });
1805
+
1806
+ class ForgotPasswordComponent {
1807
+ fb;
1808
+ server;
1809
+ utilService;
1810
+ title = 'Forgot Password';
1811
+ subTitle = 'Enter the e-mail you used during registration';
1812
+ buttonCaption = 'Submit';
1813
+ buttonTextColor;
1814
+ buttonBackgroundColor;
1815
+ onSubmit = new EventEmitter();
1816
+ onSubmitEnd = new EventEmitter();
1817
+ forgotPasswordForm;
1818
+ isSubmitted = false;
1819
+ constructor(fb, server, utilService) {
1820
+ this.fb = fb;
1821
+ this.server = server;
1822
+ this.utilService = utilService;
1823
+ this.forgotPasswordForm = this.fb.group({
1824
+ Email: new FormControl(null, [
1825
+ Validators.required,
1826
+ this.emailValidator.bind(this),
1827
+ ]),
1828
+ });
1829
+ }
1830
+ isValidEmail(mail) {
1831
+ const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
1832
+ return emailPattern.test(mail);
1833
+ }
1834
+ emailValidator(control) {
1835
+ const value = control.value;
1836
+ if (this.isValidEmail(value) == false) {
1837
+ return { customValidation: true };
1838
+ }
1839
+ return null;
1840
+ }
1841
+ checkForm() {
1842
+ return this.forgotPasswordForm.valid;
1843
+ }
1844
+ async submit() {
1845
+ if (!this.checkForm()) {
1846
+ return;
1847
+ }
1848
+ var data = {
1849
+ Email: this.forgotPasswordForm.controls['Email'].value,
1850
+ };
1851
+ this.onSubmit.emit(data);
1852
+ this.utilService.sendBI(true);
1853
+ const res = await this.server.get(`User/PasswordChangeRequest/${data.Email}`);
1854
+ this.utilService.sendBI(false);
1855
+ if (res instanceof ErrorResponse) {
1856
+ this.onSubmitEnd.emit(res);
1857
+ }
1858
+ else {
1859
+ var result = res;
1860
+ this.onSubmitEnd.emit(result);
1861
+ this.isSubmitted = true;
1862
+ }
1863
+ }
1864
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordComponent, deps: [{ token: i1$1.FormBuilder }, { token: HttpWebRequestService }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Component });
1865
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ForgotPasswordComponent, selector: "verben-forgot-password", inputs: { title: "title", subTitle: "subTitle", buttonCaption: "buttonCaption", buttonTextColor: "buttonTextColor", buttonBackgroundColor: "buttonBackgroundColor" }, outputs: { onSubmit: "onSubmit", onSubmitEnd: "onSubmitEnd" }, ngImport: i0, template: "<div *ngIf=\"!isSubmitted\" [formGroup]=\"this.forgotPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Email</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"Email\" type=\"email\"></verbena-input>\n </div>\n <verbena-button fontWeight=\"700\" (click)=\"submit()\" [text]=\"buttonCaption\" width=\"100%\" [textColor]=\"buttonTextColor\"\n [bgColor]=\"buttonBackgroundColor\" borderRadius=\"25px\" [disable]=\"!this.checkForm()\"></verbena-button>\n</div>\n<div *ngIf=\"isSubmitted\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-title resend-title\">Follow the link sent to your e-mail to proceed</div>\n <div class=\"flex gap-1\">\n <span class=\"resend-caption\">Didn't get a link?</span> <span class=\"resend-caption resend-link\"\n (click)=\"submit()\">Resend</span>\n </div>\n</div>", styles: ["*{font-family:sans-serif;font-size:16px}.flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}.justify-center{justify-content:center}.justify-end{justify-content:end}.align-items-center{align-items:center}.grid{display:grid}.verben-error-message{font-size:.8rem;color:red}.verben-input{border:1px solid #cbd5e1;outline:none;border-radius:5px;color:#334155;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s,outline-color .2s}.verben-input::placeholder{color:#64748b}.verben-input:hover{border:1px solid #697e97}.verben-input.disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input:disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input.focused{border-color:#3b82f6;outline:none}.verben-input:focus{border-color:#3b82f6;outline:none}.verben-input.ng-invalid{border-color:red}.verben-button{padding:8px 15px;border-radius:4px;border:none;text-align:center}.verben-button.primary{background-color:#ffe681}.verben-button.secondary{background-color:#d9d9d940}.reset-password-container{gap:25px;padding:50px;border:1px solid rgba(102,102,102,.5);box-shadow:4px 4px 4px #00000040;border-radius:24px}.reset-password-title{font-size:30px;font-weight:700}.reset-password-subtitle{font-size:14px;font-weight:500;color:#666}.form-field{gap:5px}.form-field-caption{color:#666}.resend-caption{font-size:13px}.resend-link{color:#00f;cursor:pointer}.resend-link:hover{text-decoration:underline}.resend-title{color:#666}\n"], dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1866
+ }
1867
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordComponent, decorators: [{
1868
+ type: Component,
1869
+ args: [{ selector: 'verben-forgot-password', template: "<div *ngIf=\"!isSubmitted\" [formGroup]=\"this.forgotPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Email</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"Email\" type=\"email\"></verbena-input>\n </div>\n <verbena-button fontWeight=\"700\" (click)=\"submit()\" [text]=\"buttonCaption\" width=\"100%\" [textColor]=\"buttonTextColor\"\n [bgColor]=\"buttonBackgroundColor\" borderRadius=\"25px\" [disable]=\"!this.checkForm()\"></verbena-button>\n</div>\n<div *ngIf=\"isSubmitted\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-title resend-title\">Follow the link sent to your e-mail to proceed</div>\n <div class=\"flex gap-1\">\n <span class=\"resend-caption\">Didn't get a link?</span> <span class=\"resend-caption resend-link\"\n (click)=\"submit()\">Resend</span>\n </div>\n</div>", styles: ["*{font-family:sans-serif;font-size:16px}.flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}.justify-center{justify-content:center}.justify-end{justify-content:end}.align-items-center{align-items:center}.grid{display:grid}.verben-error-message{font-size:.8rem;color:red}.verben-input{border:1px solid #cbd5e1;outline:none;border-radius:5px;color:#334155;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s,outline-color .2s}.verben-input::placeholder{color:#64748b}.verben-input:hover{border:1px solid #697e97}.verben-input.disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input:disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input.focused{border-color:#3b82f6;outline:none}.verben-input:focus{border-color:#3b82f6;outline:none}.verben-input.ng-invalid{border-color:red}.verben-button{padding:8px 15px;border-radius:4px;border:none;text-align:center}.verben-button.primary{background-color:#ffe681}.verben-button.secondary{background-color:#d9d9d940}.reset-password-container{gap:25px;padding:50px;border:1px solid rgba(102,102,102,.5);box-shadow:4px 4px 4px #00000040;border-radius:24px}.reset-password-title{font-size:30px;font-weight:700}.reset-password-subtitle{font-size:14px;font-weight:500;color:#666}.form-field{gap:5px}.form-field-caption{color:#666}.resend-caption{font-size:13px}.resend-link{color:#00f;cursor:pointer}.resend-link:hover{text-decoration:underline}.resend-title{color:#666}\n"] }]
1870
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: HttpWebRequestService }, { type: UtilService }], propDecorators: { title: [{
1871
+ type: Input
1872
+ }], subTitle: [{
1873
+ type: Input
1874
+ }], buttonCaption: [{
1875
+ type: Input
1876
+ }], buttonTextColor: [{
1877
+ type: Input
1878
+ }], buttonBackgroundColor: [{
1879
+ type: Input
1880
+ }], onSubmit: [{
1881
+ type: Output
1882
+ }], onSubmitEnd: [{
1883
+ type: Output
1884
+ }] } });
1885
+
1886
+ class ForgotPasswordModule {
1887
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1888
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordModule, declarations: [ForgotPasswordComponent], imports: [FormsModule,
1889
+ ReactiveFormsModule,
1890
+ VerbenaInputModule,
1891
+ VerbenaButtonModule,
1892
+ CommonModule], exports: [ForgotPasswordComponent] });
1893
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordModule, imports: [FormsModule,
1894
+ ReactiveFormsModule,
1895
+ VerbenaInputModule,
1896
+ VerbenaButtonModule,
1897
+ CommonModule] });
1898
+ }
1899
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordModule, decorators: [{
1900
+ type: NgModule,
1901
+ args: [{
1902
+ declarations: [ForgotPasswordComponent],
1903
+ imports: [
1904
+ FormsModule,
1905
+ ReactiveFormsModule,
1906
+ VerbenaInputModule,
1907
+ VerbenaButtonModule,
1908
+ CommonModule,
1909
+ ],
1910
+ exports: [ForgotPasswordComponent],
1911
+ }]
1912
+ }] });
1913
+
1914
+ const columns$2 = [
1915
+ {
1916
+ id: 'createdAt',
1917
+ header: 'Created',
1918
+ accessorKey: 'CreatedAt',
1919
+ },
1920
+ {
1921
+ id: 'name',
1922
+ header: 'Name',
1923
+ accessorKey: 'Name',
1924
+ },
1925
+ {
1926
+ id: 'description',
1927
+ header: 'Description',
1928
+ accessorKey: 'Description',
1929
+ },
1930
+ {
1931
+ id: 'link',
1932
+ header: 'Link',
1933
+ accessorKey: 'Link',
1934
+ },
1935
+ {
1936
+ id: 'logo',
1937
+ header: 'Logo',
1938
+ accessorKey: 'Logo',
1939
+ },
1940
+ { id: 'actions', header: 'Actions', accessorKey: 'Name' },
1941
+ ];
1942
+
1943
+ const mockData$2 = new Array(10).fill(1).map((id, i) => ({
1944
+ Name: `Name ${id + i}`,
1945
+ Id: id,
1946
+ id: id.toString(),
1947
+ Description: `Sign in option ${id + i}`,
1948
+ Logo: `./assets/images/test-logo.png`,
1949
+ Link: `Link ${id + i}`,
1950
+ CreatedAt: new Date(),
1951
+ UpdatedAt: new Date(),
1952
+ DataState: ObjectState.New,
1953
+ Tenant: `Tenant ${id + i}`,
1954
+ }));
1955
+
1956
+ const baseStyle$2 = {
1957
+ width: '100%',
1958
+ fontFamily: '"Fraunces", serif',
1959
+ fontSize: '125%',
1960
+ whiteSpace: 'nowrap',
1961
+ margin: '0',
1962
+ border: '1px solid #D4A007',
1963
+ borderRadius: '16px',
1964
+ borderCollapse: 'separate',
1965
+ borderSpacing: '0',
1966
+ tableLayout: 'fixed',
1967
+ overflow: 'hidden',
1968
+ rows: {
1969
+ even: {
1970
+ backgroundColor: '#FDFDFD',
1971
+ },
1972
+ odd: {
1973
+ backgroundColor: '#F1F4FB',
1974
+ },
1975
+ height: '68px',
1976
+ },
1977
+ cells: {
1978
+ padding: '0.5rem 1rem',
1979
+ },
1980
+ header: {
1981
+ stickyTop: true,
1982
+ zIndex: 2,
1983
+ backgroundColor: '#EFF2FB',
1984
+ fontWeight: 'bold',
1985
+ textAlign: 'left',
1986
+ padding: '12px 16px',
1987
+ height: '40px',
1988
+ },
1989
+ footer: {
1990
+ stickyBottom: true,
1991
+ zIndex: 2,
1992
+ padding: '3px',
1993
+ },
1994
+ // body: {
1995
+ // background: '#fff',
1996
+ // padding: '4px 5px',
1997
+ // textAlign: 'center',
1998
+ // },
1999
+ // firstColumn: {
2000
+ // stickyLeft: true,
2001
+ // zIndex: 1,
2002
+ // },
2003
+ lastColumn: {
2004
+ stickyRight: true,
2005
+ zIndex: 1,
2006
+ },
2007
+ };
2008
+
2009
+ class SsoFormComponent {
2010
+ fb;
2011
+ isUploading = false;
2012
+ uploadedFileName = null;
2013
+ fileUploadError = null;
2014
+ currentData = null;
2015
+ switchView = new EventEmitter();
2016
+ form;
2017
+ constructor(fb) {
2018
+ this.fb = fb;
2019
+ this.form = this.fb.group({
2020
+ Description: [''],
2021
+ Name: [''],
2022
+ Link: [''],
2023
+ Logo: [''],
2024
+ });
2025
+ }
2026
+ ngOnInit() { }
2027
+ onSave() {
2028
+ if (this.form.valid) {
2029
+ // Emit save event with form value
2030
+ console.log('Form saved:', this.form.value);
2031
+ }
2032
+ }
2033
+ onDelete() {
2034
+ // Emit delete event
2035
+ console.log('Delete requested');
2036
+ }
2037
+ onFileSelected(event) {
2038
+ const input = event.target;
2039
+ if (input.files && input.files.length > 0) {
2040
+ const file = input.files[0];
2041
+ this.fileUploadError = null;
2042
+ if (!file) {
2043
+ this.isUploading = true;
2044
+ }
2045
+ if (file.size > 5000000) {
2046
+ this.fileUploadError = 'File size exceeds 5MB limit.';
2047
+ this.uploadedFileName = null;
2048
+ this.isUploading = false; // Reset isUploading state
2049
+ }
2050
+ else {
2051
+ this.uploadedFileName = file.name;
2052
+ }
2053
+ }
2054
+ else {
2055
+ this.isUploading = false;
2056
+ }
2057
+ }
2058
+ removeFile() {
2059
+ this.uploadedFileName = null;
2060
+ this.fileUploadError = null;
2061
+ const fileInput = document.getElementById('attachment');
2062
+ if (fileInput) {
2063
+ fileInput.value = '';
2064
+ }
2065
+ }
2066
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoFormComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
2067
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SsoFormComponent, selector: "lib-sso-form", inputs: { currentData: "currentData" }, outputs: { switchView: "switchView" }, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative\"\n>\n <verbena-input\n name=\"Name\"\n label=\"Name:\"\n formControlName=\"Name\"\n [(ngModel)]=\"currentData?.data.Name\"\n />\n <verbena-input\n label=\"Description:\"\n name=\"Description\"\n formControlName=\"Description\"\n [(ngModel)]=\"currentData?.data.Description\"\n />\n <verbena-input\n label=\"Link:\"\n name=\"Link\"\n formControlName=\"Link\"\n [(ngModel)]=\"currentData?.data.Link\"\n/>\n<span class=\"block my-2 \">Logo</span>\n<label [style.background-color]=\"'#f9f9f9'\" class=\"border cursor-pointer border-secondary-200 rounded-md w-full px-4 py-2 flex justify-between\">\n <span *ngIf=\"!uploadedFileName\">{{isUploading?\"uploading...\":\"Upload a photo\"}}</span>\n <span *ngIf=\"fileUploadError\" class=\"error\">{{ fileUploadError }}</span>\n <div *ngIf=\"uploadedFileName\" class=\"flex items-center text-sm gap-2 border border-primary rounded-lg px-3 \">\n <span>{{ uploadedFileName }}</span>\n <button\n [style.color]=\"'black'\"\n type=\"button\"\n (click)=\"removeFile()\"\n >\n &#x2715;\n </button>\n </div>\n <input\n id=\"logo\"\n[type]=\"'file'\"\n label=\"Logo:\"\n name=\"Logo\"\n accept=\"image/png\"\n formControlName=\"Logo\"\n (change)=\"onFileSelected($event)\"\n formControlName=\"Logo\"\n/>\n<span class=\"flex gap-2\">\n<span class=\"bg-primary flex icon-container rounded-md justify-center items-center\">\n <img src=\"./assets/icons/cam.png\" class=\"icon-width\"/>\n</span>\n<span class=\"bg-primary flex icon-container rounded-md justify-center items-center\">\n <img src=\"./assets/icons/file.png\" class=\"icon-width2\"/>\n</span>\n</span>\n</label>\n\n <!-- buttons -->\n <div\n class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2 absolute\"\n style=\"\n display: flex;\n justify-content: space-between;\n position: absolute;\n padding: 8px 12px;\n right: 0;\n left: 0;\n bottom: 32;\n \"\n >\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n [bgColor]=\"'#999999'\"\n [textColor]=\"'#404040'\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n text=\"Save\"\n bgColor=\"#28a745\"\n textColor=\"#404040\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n [bgColor]=\"'#FFE681'\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n", styles: ["#logo{display:none}.icon-width{width:20px}.icon-width2{width:15px}.icon-container{width:30px;height:30px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }] });
2068
+ }
2069
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoFormComponent, decorators: [{
2070
+ type: Component,
2071
+ args: [{ selector: 'lib-sso-form', template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative\"\n>\n <verbena-input\n name=\"Name\"\n label=\"Name:\"\n formControlName=\"Name\"\n [(ngModel)]=\"currentData?.data.Name\"\n />\n <verbena-input\n label=\"Description:\"\n name=\"Description\"\n formControlName=\"Description\"\n [(ngModel)]=\"currentData?.data.Description\"\n />\n <verbena-input\n label=\"Link:\"\n name=\"Link\"\n formControlName=\"Link\"\n [(ngModel)]=\"currentData?.data.Link\"\n/>\n<span class=\"block my-2 \">Logo</span>\n<label [style.background-color]=\"'#f9f9f9'\" class=\"border cursor-pointer border-secondary-200 rounded-md w-full px-4 py-2 flex justify-between\">\n <span *ngIf=\"!uploadedFileName\">{{isUploading?\"uploading...\":\"Upload a photo\"}}</span>\n <span *ngIf=\"fileUploadError\" class=\"error\">{{ fileUploadError }}</span>\n <div *ngIf=\"uploadedFileName\" class=\"flex items-center text-sm gap-2 border border-primary rounded-lg px-3 \">\n <span>{{ uploadedFileName }}</span>\n <button\n [style.color]=\"'black'\"\n type=\"button\"\n (click)=\"removeFile()\"\n >\n &#x2715;\n </button>\n </div>\n <input\n id=\"logo\"\n[type]=\"'file'\"\n label=\"Logo:\"\n name=\"Logo\"\n accept=\"image/png\"\n formControlName=\"Logo\"\n (change)=\"onFileSelected($event)\"\n formControlName=\"Logo\"\n/>\n<span class=\"flex gap-2\">\n<span class=\"bg-primary flex icon-container rounded-md justify-center items-center\">\n <img src=\"./assets/icons/cam.png\" class=\"icon-width\"/>\n</span>\n<span class=\"bg-primary flex icon-container rounded-md justify-center items-center\">\n <img src=\"./assets/icons/file.png\" class=\"icon-width2\"/>\n</span>\n</span>\n</label>\n\n <!-- buttons -->\n <div\n class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2 absolute\"\n style=\"\n display: flex;\n justify-content: space-between;\n position: absolute;\n padding: 8px 12px;\n right: 0;\n left: 0;\n bottom: 32;\n \"\n >\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n [bgColor]=\"'#999999'\"\n [textColor]=\"'#404040'\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n text=\"Save\"\n bgColor=\"#28a745\"\n textColor=\"#404040\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n [bgColor]=\"'#FFE681'\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n", styles: ["#logo{display:none}.icon-width{width:20px}.icon-width2{width:15px}.icon-container{width:30px;height:30px}\n"] }]
2072
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { currentData: [{
2073
+ type: Input
2074
+ }], switchView: [{
2075
+ type: Output
2076
+ }] } });
2077
+
2078
+ class SsoComponent {
2079
+ cardDataView;
2080
+ dataView;
2081
+ columns = columns$2;
2082
+ data = mockData$2;
2083
+ filteredColumns = columns$2;
2084
+ styles = baseStyle$2;
2085
+ currentData = null;
2086
+ isGridView = true;
2087
+ selected = null;
2088
+ cardData = mockData$2.map(({ Name, Description, Link, Logo }) => ({
2089
+ selected: false,
2090
+ title: Name,
2091
+ data: { Name, Description, Link, Logo },
2092
+ body: [
2093
+ { title: 'Description', value: Description ?? '' },
2094
+ ],
2095
+ children: [],
2096
+ }));
2097
+ openDetailView(name) {
2098
+ const cardItem = this.getCardDataByMailAddress(name);
2099
+ if (cardItem && this.cardDataView) {
2100
+ this.dataView.toggleView();
2101
+ this.cardData.forEach((item) => {
2102
+ item.selected = false;
2103
+ if (item.children) {
2104
+ item.children.forEach((child) => (child.selected = false));
2105
+ }
2106
+ });
2107
+ cardItem.selected = true;
2108
+ this.currentData = this.cardDataView.onItemClick(cardItem);
2109
+ }
2110
+ }
2111
+ getCardDataByMailAddress(name) {
2112
+ return this.cardData.find(({ data }) => data.Name === name);
2113
+ }
2114
+ onViewChange(isGridView) {
2115
+ isGridView = isGridView;
2116
+ if (this.currentData) {
2117
+ this.cardDataView?.clearData();
2118
+ this.currentData = null;
2119
+ }
2120
+ if (this.selected) {
2121
+ this.cardDataView.onItemClick(this.selected);
2122
+ }
2123
+ }
2124
+ openFormView(index) {
2125
+ const item = this.cardData[index];
2126
+ console.log('ITEM = ', item);
2127
+ }
2128
+ handleExport(exportedData) {
2129
+ console.log('Exported data:', exportedData);
2130
+ this.downloadCSV(exportedData);
2131
+ }
2132
+ /**
2133
+ *
2134
+ * @param data Simple csv export for testing
2135
+ */
2136
+ downloadCSV(data) {
2137
+ const headers = Object.keys(data[0]);
2138
+ const csvContent = [
2139
+ headers.join(','),
2140
+ ...data.map((row) => headers.map((header) => row[header]).join(',')),
2141
+ ].join('\n');
2142
+ const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
2143
+ const link = document.createElement('a');
2144
+ if (link.download !== undefined) {
2145
+ const url = URL.createObjectURL(blob);
2146
+ link.setAttribute('href', url);
2147
+ link.setAttribute('download', 'export.csv');
2148
+ link.style.visibility = 'hidden';
2149
+ document.body.appendChild(link);
2150
+ link.click();
2151
+ document.body.removeChild(link);
2152
+ }
2153
+ }
2154
+ onSelectionChange(selectedRows) {
2155
+ console.log('Selection changed:', selectedRows);
2156
+ // Handle the selection change
2157
+ }
2158
+ /**
2159
+ * Copied over from card view doc until I understand usage
2160
+ */
2161
+ selectedColumnCount = 0;
2162
+ selectedFilterTableCount = 0;
2163
+ isOPen = true;
2164
+ selectedSortCount = 0;
2165
+ showColumn = false;
2166
+ showSort = false;
2167
+ showExport = false;
2168
+ selectedAll = false;
2169
+ showFilter = false;
2170
+ visibleColumns = columns$2.map((col) => ({
2171
+ checked: false,
2172
+ name: typeof col.header === 'string' ? col.header : col.id,
2173
+ type: DataFilterType.Bool,
2174
+ }));
2175
+ filterArray = [
2176
+ {
2177
+ name: 'Name',
2178
+ type: DataFilterType.String,
2179
+ checked: false,
2180
+ },
2181
+ {
2182
+ name: 'Description',
2183
+ type: DataFilterType.String,
2184
+ checked: false,
2185
+ },
2186
+ {
2187
+ name: 'Logo',
2188
+ type: DataFilterType.String,
2189
+ checked: false,
2190
+ },
2191
+ {
2192
+ name: 'Link',
2193
+ type: DataFilterType.String,
2194
+ checked: false,
2195
+ },
2196
+ {
2197
+ name: 'CreatedAt',
2198
+ type: DataFilterType.Date,
2199
+ checked: false,
2200
+ },
2201
+ ];
2202
+ sortOptions = [
2203
+ {
2204
+ name: 'Name',
2205
+ type: DataFilterType.String,
2206
+ checked: false,
2207
+ },
2208
+ {
2209
+ name: 'Description',
2210
+ type: DataFilterType.String,
2211
+ checked: false,
2212
+ },
2213
+ {
2214
+ name: 'Link',
2215
+ type: DataFilterType.String,
2216
+ checked: false,
2217
+ },
2218
+ {
2219
+ name: 'Logo',
2220
+ type: DataFilterType.String,
2221
+ checked: false,
2222
+ },
2223
+ {
2224
+ name: 'CreatedAt',
2225
+ type: DataFilterType.Date,
2226
+ checked: false,
2227
+ },
2228
+ ];
2229
+ clearData() {
2230
+ this.currentData = {};
2231
+ }
2232
+ loadMore() {
2233
+ this.cardData = this.cardData.concat(this.cardData);
2234
+ }
2235
+ onColumnChange(event) {
2236
+ this.showColumn = event;
2237
+ }
2238
+ onSortChange(event) {
2239
+ this.showSort = false;
2240
+ console.log(event);
2241
+ }
2242
+ onColumnsUpdated(updatedColumns) {
2243
+ this.showColumn = false;
2244
+ this.selectedColumnCount = updatedColumns.length;
2245
+ if (updatedColumns) {
2246
+ // Filter columns to include only visible ones
2247
+ this.filteredColumns = this.columns.filter((col) => this.visibleColumns.find((filter) => filter.name === col.header && filter.checked));
2248
+ // Reorder columns based on the order in visibleColumns
2249
+ const visibleColumnOrder = this.visibleColumns
2250
+ .filter((filter) => filter.checked)
2251
+ .map((filter) => filter.name);
2252
+ this.columns.sort((a, b) => {
2253
+ const indexA = visibleColumnOrder.indexOf(a.header);
2254
+ const indexB = visibleColumnOrder.indexOf(b.header);
2255
+ return indexA - indexB;
2256
+ });
2257
+ }
2258
+ }
2259
+ onFilterApplied(appliedFilter) {
2260
+ this.showFilter = false;
2261
+ if (Array.isArray(appliedFilter)) {
2262
+ this.selectedFilterTableCount = appliedFilter.length;
2263
+ }
2264
+ else {
2265
+ console.log('appliedFilter is not an array');
2266
+ }
2267
+ }
2268
+ onSortUpdated(updatedSorts) {
2269
+ this.onSortChange(false);
2270
+ this.selectedSortCount = updatedSorts.length;
2271
+ console.log(updatedSorts);
2272
+ }
2273
+ onStateChange(event) {
2274
+ switch (event.key) {
2275
+ case 'column':
2276
+ this.showColumn = event.value;
2277
+ break;
2278
+ case 'sort':
2279
+ this.showSort = event.value;
2280
+ break;
2281
+ case 'export':
2282
+ this.showExport = event.value;
2283
+ break;
2284
+ case 'filter':
2285
+ this.showFilter = event.value;
2286
+ break;
2287
+ default:
2288
+ break;
2289
+ }
2290
+ }
2291
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2292
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SsoComponent, selector: "lib-sso", viewQueries: [{ propertyName: "cardDataView", first: true, predicate: ["vdcv"], descendants: true }, { propertyName: "dataView", first: true, predicate: ["vdv"], descendants: true }], ngImport: i0, template: "<div class=\"space-y-8\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isToggle:true\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedSortCount]=\"selectedSortCount\"\n [selectedColumnCount]=\"selectedColumnCount\"\n [selectedFilterTableCount]=\"selectedFilterTableCount\"\n [showColumnChild]=\"showColumn\"\n [showSortChild]=\"showSort\"\n [showFilterChild]=\"showFilter\"\n [isTableView]=\"false\"\n [selectedFilterTableCount]=\"0\"\n [cardIcon]=\"'list-view'\"\n [tableIcon]=\"'table-view'\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div table-content>\n <lib-data-table\n [data]=\"data\"\n [columns]=\"filteredColumns\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"logo\">\n <ng-template #cell let-value>\n <img class=\"logo-width\" [src]=\"value\"/>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow let-rowIndex>\n <div class=\"flex space-x-8\" style=\"display: flex; gap: 24px\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n stroke=\"#3479E9\"\n fill=\"white\"\n class=\"cursor-pointer\"\n ></verben-svg>\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n stroke=\"#E20000\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"Link\"\n border=\"5px\"\n [cardDataList]=\"cardData\"\n rbgColor=\"#f5f6f9\"\n >\n <verben-left-card-data-view class=\"\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"Link\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"cardData\"\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"vlcd.showChildren(item)\"\n [ngClass]=\"vlcd.showToggle(item) ? 'visible' : 'invisible'\"\n class=\"items-center flex pr-1 cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\"\n >\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex\">\n <span class=\"font-bold text-sm\">{{ item.data.Name }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"flex items-center justify-between gap-2\">\n <div>\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black text-xs font-semibold\">{{ item.data.Description }}</span>\n </div>\n <img class=\"logo-width\" [alt]=\"ciItem.title\" [src]=\"item.data.Logo\"/>\n </div>\n }\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-sso-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n ></lib-sso-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2 mt-1\">\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n (filtersApplied)=\"onFilterApplied($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: [".flex{display:flex}.w-full{width:100%}.bg-secondary-200{background-color:#e8eaf1}.flex-col{flex-direction:column}.items-center{align-items:center}.bg-primary{background-color:#d4a007}.border-primary{border:1px solid #d4a007}.rounded-lg{border-radius:20px}.w-3{width:6px}.rounded-tr-none{border-top-right-radius:0}.rounded-br-none{border-bottom-right-radius:0}.bg-secondary-100{background-color:#8080800e}.bg-secondary{background-color:#e8eaf1}.p-2{padding:6px}.logo-width{width:70px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.DataViewComponent, selector: "verben-data-view", inputs: ["buttonClass", "iconClass", "activeIconClass", "columnCustomClass", "filterCustomClass", "sortCustomClass", "exportCustomClass", "selectCustomClass", "zIndex", "createCustomClass", "tableIcon", "cardIcon", "cardClass", "tableClass", "searchKey", "searchValue", "viewState", "searchTemplate", "columnTemplate", "filterTemplate", "sortTemplate", "children", "exportTemplate", "createTemplate", "selectedColumnCount", "selectedSortCount", "selectedFilterTableCount", "inputWidth", "showColumnChild", "showSortChild", "showFilterChild", "showExportChild", "create", "showSelected", "isTableView"], outputs: ["viewChange", "stateChange", "onSearchChange"] }, { kind: "component", type: i2.TableFilterComponent, selector: "verben-table-filter", inputs: ["filterOptions", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "maxFilterLength", "tooltip"], outputs: ["filtersApplied"] }, { kind: "component", type: i2.SortTableComponent, selector: "verben-sort-table", inputs: ["enableDragAndDrop", "sortOptions", "resetText", "displayedOptions", "propertyText", "showMoreText", "sortButtonText", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "containerHeight"], outputs: ["selectedOptions"] }, { kind: "component", type: i2.DataExportComponent, selector: "lib-data-export", inputs: ["data"], outputs: ["exportDataEvent"] }, { kind: "component", type: i2.VisibleColumnComponent, selector: "verben-visible-column", inputs: ["columns", "items", "enableDragAndDrop", "displayedColumns", "showMore", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "closeColumn"], outputs: ["columnsUpdated"] }, { kind: "component", type: i2.CardDataViewComponent, selector: "verben-card-data-view", inputs: ["pd", "mg", "lHeight", "rHeight", "rWidth", "lWidth", "textColor", "lbgColor", "rbgColor", "border", "display", "borderRadius", "activeCss", "inActiveCss", "displayAsRow", "cardDataList", "dataId", "totalRecords", "footer", "noOfVisibleChildren", "onItemClick", "onCardChildClick"], outputs: ["loadMoreClick"] }, { kind: "component", type: i2.LeftCardDataComponent, selector: "verben-left-card-data", inputs: ["pd", "mg", "height", "weight", "activeCss", "inActiveCss", "cardDataList", "iconCollapse", "iconExpanded", "parent", "dataId"] }, { kind: "component", type: i2.LeftCardDataViewComponent, selector: "verben-left-card-data-view", inputs: ["cardDataList"] }, { kind: "component", type: i2.RightCardDataViewComponent, selector: "verben-right-card-data-view", inputs: ["parentData", "chilData", "meth"] }, { kind: "component", type: i2.CardDataViewFooterComponent, selector: "verben-card-data-view-footer" }, { kind: "component", type: i2.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "size"] }, { kind: "component", type: i2.DataTableComponent, selector: "lib-data-table", inputs: ["data", "columns", "styleConfig"], outputs: ["rowEdit", "rowSave", "rowDelete", "selectionChange"] }, { kind: "directive", type: i2.ColumnDirective, selector: "[libColumn]", inputs: ["libColumn"] }, { kind: "component", type: SsoFormComponent, selector: "lib-sso-form", inputs: ["currentData"], outputs: ["switchView"] }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }] });
2293
+ }
2294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoComponent, decorators: [{
2295
+ type: Component,
2296
+ args: [{ selector: 'lib-sso', template: "<div class=\"space-y-8\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isToggle:true\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedSortCount]=\"selectedSortCount\"\n [selectedColumnCount]=\"selectedColumnCount\"\n [selectedFilterTableCount]=\"selectedFilterTableCount\"\n [showColumnChild]=\"showColumn\"\n [showSortChild]=\"showSort\"\n [showFilterChild]=\"showFilter\"\n [isTableView]=\"false\"\n [selectedFilterTableCount]=\"0\"\n [cardIcon]=\"'list-view'\"\n [tableIcon]=\"'table-view'\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div table-content>\n <lib-data-table\n [data]=\"data\"\n [columns]=\"filteredColumns\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"logo\">\n <ng-template #cell let-value>\n <img class=\"logo-width\" [src]=\"value\"/>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow let-rowIndex>\n <div class=\"flex space-x-8\" style=\"display: flex; gap: 24px\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n stroke=\"#3479E9\"\n fill=\"white\"\n class=\"cursor-pointer\"\n ></verben-svg>\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n stroke=\"#E20000\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"Link\"\n border=\"5px\"\n [cardDataList]=\"cardData\"\n rbgColor=\"#f5f6f9\"\n >\n <verben-left-card-data-view class=\"\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"Link\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"cardData\"\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"vlcd.showChildren(item)\"\n [ngClass]=\"vlcd.showToggle(item) ? 'visible' : 'invisible'\"\n class=\"items-center flex pr-1 cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\"\n >\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex\">\n <span class=\"font-bold text-sm\">{{ item.data.Name }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"flex items-center justify-between gap-2\">\n <div>\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black text-xs font-semibold\">{{ item.data.Description }}</span>\n </div>\n <img class=\"logo-width\" [alt]=\"ciItem.title\" [src]=\"item.data.Logo\"/>\n </div>\n }\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-sso-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n ></lib-sso-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2 mt-1\">\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n (filtersApplied)=\"onFilterApplied($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: [".flex{display:flex}.w-full{width:100%}.bg-secondary-200{background-color:#e8eaf1}.flex-col{flex-direction:column}.items-center{align-items:center}.bg-primary{background-color:#d4a007}.border-primary{border:1px solid #d4a007}.rounded-lg{border-radius:20px}.w-3{width:6px}.rounded-tr-none{border-top-right-radius:0}.rounded-br-none{border-bottom-right-radius:0}.bg-secondary-100{background-color:#8080800e}.bg-secondary{background-color:#e8eaf1}.p-2{padding:6px}.logo-width{width:70px}\n"] }]
2297
+ }], propDecorators: { cardDataView: [{
2298
+ type: ViewChild,
2299
+ args: ['vdcv']
2300
+ }], dataView: [{
2301
+ type: ViewChild,
2302
+ args: ['vdv']
2303
+ }] } });
2304
+
2305
+ class SsoModule {
2306
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2307
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SsoModule, declarations: [SsoComponent, SsoFormComponent], imports: [CommonModule,
2308
+ FormsModule,
2309
+ ReactiveFormsModule,
2310
+ DataViewModule,
2311
+ TableFilterModule,
2312
+ SortTableModule,
2313
+ DataExportModule,
2314
+ VisibleColumnModule,
2315
+ VerbenaButtonModule,
2316
+ CardDataViewModule,
2317
+ VerbenaInputModule,
2318
+ SvgModule,
2319
+ VerbenaTextareaModule,
2320
+ DataTableModule], exports: [SsoComponent] });
2321
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoModule, imports: [CommonModule,
2322
+ FormsModule,
2323
+ ReactiveFormsModule,
2324
+ DataViewModule,
2325
+ TableFilterModule,
2326
+ SortTableModule,
2327
+ DataExportModule,
2328
+ VisibleColumnModule,
2329
+ VerbenaButtonModule,
2330
+ CardDataViewModule,
2331
+ VerbenaInputModule,
2332
+ SvgModule,
2333
+ VerbenaTextareaModule,
2334
+ DataTableModule] });
2335
+ }
2336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoModule, decorators: [{
2337
+ type: NgModule,
2338
+ args: [{
2339
+ declarations: [SsoComponent, SsoFormComponent],
2340
+ imports: [
2341
+ CommonModule,
2342
+ FormsModule,
2343
+ ReactiveFormsModule,
2344
+ DataViewModule,
2345
+ TableFilterModule,
2346
+ SortTableModule,
2347
+ DataExportModule,
2348
+ VisibleColumnModule,
2349
+ VerbenaButtonModule,
2350
+ CardDataViewModule,
2351
+ VerbenaInputModule,
2352
+ SvgModule,
2353
+ VerbenaTextareaModule,
2354
+ DataTableModule,
2355
+ ],
2356
+ exports: [SsoComponent],
2357
+ }]
2358
+ }] });
2359
+
2360
+ const columns$1 = [
2361
+ {
2362
+ id: 'createdAt',
2363
+ header: 'Created',
2364
+ accessorKey: 'CreatedAt',
2365
+ },
2366
+ {
2367
+ id: 'user',
2368
+ header: 'Name',
2369
+ accessorFn: (row) => `${row.FirstName} ${row.LastName}`,
2370
+ },
2371
+ {
2372
+ id: 'mail',
2373
+ header: 'E-Mail',
2374
+ accessorKey: 'MailAddress',
2375
+ },
2376
+ {
2377
+ id: 'phone',
2378
+ header: 'Phone Number',
2379
+ accessorKey: 'PhoneNumber',
2380
+ },
2381
+ { id: 'actions', header: 'Actions', accessorKey: 'MailAddress' },
2382
+ ];
2383
+
2384
+ const baseStyle$1 = {
2385
+ width: '100%',
2386
+ fontFamily: '"Fraunces", serif',
2387
+ fontSize: '125%',
2388
+ whiteSpace: 'nowrap',
2389
+ margin: '0',
2390
+ border: '1px solid #D4A007',
2391
+ borderRadius: '16px',
2392
+ borderCollapse: 'separate',
2393
+ borderSpacing: '0',
2394
+ tableLayout: 'fixed',
2395
+ overflow: 'hidden',
2396
+ rows: {
2397
+ even: {
2398
+ backgroundColor: '#FDFDFD',
2399
+ },
2400
+ odd: {
2401
+ backgroundColor: '#F1F4FB',
2402
+ },
2403
+ height: '68px',
2404
+ },
2405
+ cells: {
2406
+ padding: '0.5rem 1rem',
2407
+ },
2408
+ header: {
2409
+ // stickyTop: true,
2410
+ // zIndex: 2,
2411
+ backgroundColor: '#EFF2FB',
2412
+ fontWeight: 'bold',
2413
+ textAlign: 'left',
2414
+ padding: '12px 16px',
2415
+ height: '40px',
2416
+ },
2417
+ footer: {
2418
+ // stickyBottom: true,
2419
+ // zIndex: 2,
2420
+ padding: '3px',
2421
+ },
2422
+ // body: {
2423
+ // background: '#fff',
2424
+ // padding: '4px 5px',
2425
+ // textAlign: 'center',
2426
+ // },
2427
+ // firstColumn: {
2428
+ // stickyLeft: true,
2429
+ // zIndex: 1,
2430
+ // },
2431
+ lastColumn: {
2432
+ // stickyRight: true,
2433
+ // zIndex: 1,
2434
+ },
2435
+ };
2436
+
2437
+ class UserAccessRequestService {
2438
+ httpService;
2439
+ BASE_URL = 'User';
2440
+ constructor(httpService) {
2441
+ this.httpService = httpService;
2442
+ }
2443
+ /**
2444
+ * Get user access requests with pagination and sorting
2445
+ * @param skip Number of records to skip
2446
+ * @param limit Number of records to take
2447
+ * @param sortParam Sort parameter
2448
+ * @param sortOrder Sort order ('asc' or 'desc')
2449
+ * @returns Promise containing the user access requests
2450
+ */
2451
+ getUserAccessRequests(skip, limit, sortParam, sortOrder) {
2452
+ const url = `${this.BASE_URL}/GetUserAccessRequests/${skip}/${limit}/${sortParam}/${sortOrder}`;
2453
+ return this.httpService.get(url);
2454
+ }
2455
+ /**
2456
+ * Get user access requests with additional parameter, pagination and sorting
2457
+ * @param param Search parameter
2458
+ * @param skip Number of records to skip
2459
+ * @param limit Number of records to take
2460
+ * @param sortParam Sort parameter
2461
+ * @param sortOrder Sort order ('asc' or 'desc')
2462
+ * @returns Promise containing the filtered user access requests
2463
+ */
2464
+ getUserAccessRequestWithParam(param, skip, limit, sortParam, sortOrder) {
2465
+ const url = `${this.BASE_URL}/GetUserAccessRequestWithParam/${param}/${skip}/${limit}/${sortParam}/${sortOrder}`;
2466
+ return this.httpService.get(url);
2467
+ }
2468
+ /**
2469
+ * Save multiple user access requests
2470
+ * @param requests Array of user access requests to save
2471
+ * @returns Promise containing the save operation result
2472
+ */
2473
+ saveUserAccessRequests(requests) {
2474
+ const url = `${this.BASE_URL}/SaveUserAccessRequests`;
2475
+ return this.httpService.post(url, requests);
2476
+ }
2477
+ /**
2478
+ * Approve or reject multiple user access requests
2479
+ * @param requests Array of user access requests to save
2480
+ * @param isApproval True for approval, false for decline
2481
+ * @returns Promise containing the save operation result
2482
+ */
2483
+ processUserAccessRequests(requests, isApproval) {
2484
+ const url = `${this.BASE_URL}/UserAccessRequestAction/${isApproval}`;
2485
+ return this.httpService.post(url, requests);
2486
+ }
2487
+ /**
2488
+ * Delete multiple user access requests
2489
+ * @param requestIds Array of request IDs to delete
2490
+ * @returns Observable containing the delete operation result
2491
+ */
2492
+ deleteUserAccessRequests(requestIds) {
2493
+ const url = `${this.BASE_URL}/DeleteUserAccessRequests`;
2494
+ return this.httpService.delete(`${url}?data=${requestIds.join(',')}`);
2495
+ }
2496
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestService, deps: [{ token: HttpWebRequestService }], target: i0.ɵɵFactoryTarget.Injectable });
2497
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestService, providedIn: 'root' });
2498
+ }
2499
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestService, decorators: [{
2500
+ type: Injectable,
2501
+ args: [{
2502
+ providedIn: 'root',
2503
+ }]
2504
+ }], ctorParameters: () => [{ type: HttpWebRequestService }] });
2505
+
2506
+ class UserAccessRequestState {
2507
+ updating$ = new BehaviorSubject(false);
2508
+ requests$ = new BehaviorSubject([]);
2509
+ queryParams$ = new BehaviorSubject({
2510
+ skip: 0,
2511
+ limit: 100,
2512
+ sortParam: 'CreatedAt',
2513
+ sortOrder: 'asc',
2514
+ });
2515
+ isUpdating$() {
2516
+ return this.updating$.asObservable();
2517
+ }
2518
+ setUpdating(isUpdating) {
2519
+ this.updating$.next(isUpdating);
2520
+ }
2521
+ getRequests$() {
2522
+ return this.requests$.asObservable();
2523
+ }
2524
+ setRequests(requests) {
2525
+ this.requests$.next(requests);
2526
+ }
2527
+ getQueryParams$() {
2528
+ return this.queryParams$.asObservable();
2529
+ }
2530
+ getQueryParamsValue() {
2531
+ return this.queryParams$.getValue();
2532
+ }
2533
+ updateQueryParams(params) {
2534
+ this.queryParams$.next({ ...this.queryParams$.getValue(), ...params });
2535
+ }
2536
+ addRequest(request) {
2537
+ const currentValue = this.requests$.getValue();
2538
+ this.requests$.next([...currentValue, request]);
2539
+ }
2540
+ updateRequest(updatedRequest) {
2541
+ const requests = this.requests$.getValue();
2542
+ const index = requests.findIndex((r) => r.Id === updatedRequest.Id);
2543
+ if (index !== -1) {
2544
+ requests[index] = updatedRequest;
2545
+ this.requests$.next([...requests]);
2546
+ }
2547
+ }
2548
+ removeRequest(requestId) {
2549
+ const currentValue = this.requests$.getValue();
2550
+ this.requests$.next(currentValue.filter((r) => r.Id !== requestId));
2551
+ }
2552
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2553
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestState, providedIn: 'root' });
2554
+ }
2555
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestState, decorators: [{
2556
+ type: Injectable,
2557
+ args: [{
2558
+ providedIn: 'root',
2559
+ }]
2560
+ }] });
2561
+
2562
+ class UserAccessRequestFacade {
2563
+ userAccessRequestService;
2564
+ userAccessRequestState;
2565
+ constructor(userAccessRequestService, userAccessRequestState) {
2566
+ this.userAccessRequestService = userAccessRequestService;
2567
+ this.userAccessRequestState = userAccessRequestState;
2568
+ }
2569
+ isUpdating$() {
2570
+ return this.userAccessRequestState.isUpdating$();
2571
+ }
2572
+ getRequests$() {
2573
+ return this.userAccessRequestState.getRequests$();
2574
+ }
2575
+ getQueryParams$() {
2576
+ return this.userAccessRequestState.getQueryParams$();
2577
+ }
2578
+ async loadRequests() {
2579
+ try {
2580
+ this.userAccessRequestState.setUpdating(true);
2581
+ const params = this.userAccessRequestState.getQueryParamsValue();
2582
+ const requests = await this.userAccessRequestService.getUserAccessRequests(params.skip, params.limit, params.sortParam || 'createdDate', params.sortOrder);
2583
+ this.userAccessRequestState.setRequests(requests.Result);
2584
+ }
2585
+ catch (error) {
2586
+ console.error('Failed to load requests:', error);
2587
+ throw error;
2588
+ }
2589
+ finally {
2590
+ this.userAccessRequestState.setUpdating(false);
2591
+ }
2592
+ }
2593
+ async loadRequestsWithParam(param) {
2594
+ try {
2595
+ this.userAccessRequestState.setUpdating(true);
2596
+ const params = this.userAccessRequestState.getQueryParamsValue();
2597
+ const requests = await this.userAccessRequestService.getUserAccessRequestWithParam(param, params.skip, params.limit, params.sortParam || 'createdDate', params.sortOrder);
2598
+ this.userAccessRequestState.setRequests(requests.Result);
2599
+ }
2600
+ catch (error) {
2601
+ console.error('Failed to load requests with param:', error);
2602
+ throw error;
2603
+ }
2604
+ finally {
2605
+ this.userAccessRequestState.setUpdating(false);
2606
+ }
2607
+ }
2608
+ updateQueryParams(params) {
2609
+ this.userAccessRequestState.updateQueryParams(params);
2610
+ this.loadRequests();
2611
+ }
2612
+ async addRequest(request) {
2613
+ try {
2614
+ this.userAccessRequestState.setUpdating(true);
2615
+ const newRequest = { ...request };
2616
+ this.userAccessRequestState.addRequest(newRequest);
2617
+ await this.userAccessRequestService.saveUserAccessRequests([newRequest]);
2618
+ await this.loadRequests(); // Reload to get server-side changes
2619
+ }
2620
+ catch (error) {
2621
+ console.error('Failed to add request:', error);
2622
+ this.userAccessRequestState.removeRequest(request.Id);
2623
+ throw error;
2624
+ }
2625
+ finally {
2626
+ this.userAccessRequestState.setUpdating(false);
2627
+ }
2628
+ }
2629
+ async updateRequest(request) {
2630
+ try {
2631
+ this.userAccessRequestState.setUpdating(true);
2632
+ await this.userAccessRequestService.saveUserAccessRequests([request]);
2633
+ this.userAccessRequestState.updateRequest(request);
2634
+ }
2635
+ catch (error) {
2636
+ console.error('Failed to update request:', error);
2637
+ throw error;
2638
+ }
2639
+ finally {
2640
+ this.userAccessRequestState.setUpdating(false);
2641
+ }
2642
+ }
2643
+ async deleteRequest(requestId) {
2644
+ try {
2645
+ this.userAccessRequestState.setUpdating(true);
2646
+ await lastValueFrom(this.userAccessRequestService.deleteUserAccessRequests([requestId]));
2647
+ this.userAccessRequestState.removeRequest(requestId);
2648
+ }
2649
+ catch (error) {
2650
+ console.error('Failed to delete request:', error);
2651
+ throw error;
2652
+ }
2653
+ finally {
2654
+ this.userAccessRequestState.setUpdating(false);
2655
+ }
2656
+ }
2657
+ async approveRequest(request) {
2658
+ try {
2659
+ this.userAccessRequestState.setUpdating(true);
2660
+ const response = await this.userAccessRequestService.processUserAccessRequests([request], true);
2661
+ // console.log(response);
2662
+ const data = response?.[0];
2663
+ if (data) {
2664
+ this.userAccessRequestState.updateRequest(data);
2665
+ }
2666
+ }
2667
+ catch (error) {
2668
+ console.error('Failed to update request:', error);
2669
+ throw error;
2670
+ }
2671
+ finally {
2672
+ this.userAccessRequestState.setUpdating(false);
2673
+ }
2674
+ }
2675
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestFacade, deps: [{ token: UserAccessRequestService }, { token: UserAccessRequestState }], target: i0.ɵɵFactoryTarget.Injectable });
2676
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestFacade, providedIn: 'root' });
2677
+ }
2678
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestFacade, decorators: [{
2679
+ type: Injectable,
2680
+ args: [{
2681
+ providedIn: 'root',
2682
+ }]
2683
+ }], ctorParameters: () => [{ type: UserAccessRequestService }, { type: UserAccessRequestState }] });
2684
+
2685
+ class UserRequestFormComponent {
2686
+ fb;
2687
+ set currentData(value) {
2688
+ if (value?.data) {
2689
+ this.form.patchValue({
2690
+ MailAddress: value.data.MailAddress || '',
2691
+ FirstName: value.data.FirstName || '',
2692
+ LastName: value.data.LastName || '',
2693
+ OtherName: value.data.OtherName || '',
2694
+ PhoneNumber: value.data.PhoneNumber || '',
2695
+ });
2696
+ }
2697
+ else {
2698
+ this.form.reset();
2699
+ }
2700
+ }
2701
+ switchView = new EventEmitter();
2702
+ onApproval = new EventEmitter();
2703
+ form;
2704
+ roles = [
2705
+ { id: 'admin', name: 'Admin' },
2706
+ { id: 'manager', name: 'Manager' },
2707
+ { id: 'staff', name: 'Staff' },
2708
+ ];
2709
+ constructor(fb) {
2710
+ this.fb = fb;
2711
+ this.form = this.fb.group({
2712
+ MailAddress: ['', { readonly: true }],
2713
+ FirstName: ['', { readonly: true }],
2714
+ LastName: ['', { readonly: true }],
2715
+ OtherName: ['', { readonly: true }],
2716
+ PhoneNumber: ['', { readonly: true }],
2717
+ RoleId: [''],
2718
+ });
2719
+ }
2720
+ ngOnInit() { }
2721
+ onSave() {
2722
+ if (this.form.valid) {
2723
+ // Emit save event with form value
2724
+ console.log('Form saved:', this.form.value);
2725
+ }
2726
+ }
2727
+ onDelete() {
2728
+ // Emit delete event
2729
+ console.log('Delete requested');
2730
+ }
2731
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestFormComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
2732
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UserRequestFormComponent, selector: "lib-user-request-form", inputs: { currentData: "currentData" }, outputs: { switchView: "switchView", onApproval: "onApproval" }, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n>\n <verbena-input\n name=\"MailAddress\"\n label=\"Mail Address:\"\n formControlName=\"MailAddress\"\n />\n <verbena-input\n label=\"First Name:\"\n name=\"FirstName\"\n type=\"text\"\n formControlName=\"FirstName\"\n />\n <verbena-input\n label=\"Last Name:\"\n name=\"LastName\"\n type=\"text\"\n formControlName=\"LastName\"\n />\n <verbena-input\n label=\"OtherName:\"\n name=\"OtherName\"\n type=\"text\"\n formControlName=\"OtherName\"\n />\n <verbena-input\n label=\"Phone Number:\"\n name=\"PhoneNumber\"\n type=\"tel\"\n formControlName=\"PhoneNumber\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"role\">Role</label>\n\n <verben-drop-down\n label=\"Role\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [filter]=\"true\"\n [showClear]=\"true\"\n placeholder=\"\"\n [(options)]=\"roles\"\n id=\"role\"\n optionLabel=\"name\"\n optionValue=\"id\"\n formControlName=\"RoleId\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2\">\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Reject\"\n styleType=\"danger\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n (click)=\"onApproval.emit(form.get('MailAddress')?.value)\"\n text=\"Approve\"\n bgColor=\"#28a745\"\n textColor=\"white\"\n border=\"1px solid #28a745\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "component", type: i2.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "disabled", "required", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }] });
2733
+ }
2734
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestFormComponent, decorators: [{
2735
+ type: Component,
2736
+ args: [{ selector: 'lib-user-request-form', template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n>\n <verbena-input\n name=\"MailAddress\"\n label=\"Mail Address:\"\n formControlName=\"MailAddress\"\n />\n <verbena-input\n label=\"First Name:\"\n name=\"FirstName\"\n type=\"text\"\n formControlName=\"FirstName\"\n />\n <verbena-input\n label=\"Last Name:\"\n name=\"LastName\"\n type=\"text\"\n formControlName=\"LastName\"\n />\n <verbena-input\n label=\"OtherName:\"\n name=\"OtherName\"\n type=\"text\"\n formControlName=\"OtherName\"\n />\n <verbena-input\n label=\"Phone Number:\"\n name=\"PhoneNumber\"\n type=\"tel\"\n formControlName=\"PhoneNumber\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"role\">Role</label>\n\n <verben-drop-down\n label=\"Role\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [filter]=\"true\"\n [showClear]=\"true\"\n placeholder=\"\"\n [(options)]=\"roles\"\n id=\"role\"\n optionLabel=\"name\"\n optionValue=\"id\"\n formControlName=\"RoleId\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2\">\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Reject\"\n styleType=\"danger\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n (click)=\"onApproval.emit(form.get('MailAddress')?.value)\"\n text=\"Approve\"\n bgColor=\"#28a745\"\n textColor=\"white\"\n border=\"1px solid #28a745\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n" }]
2737
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { currentData: [{
2738
+ type: Input
2739
+ }], switchView: [{
2740
+ type: Output
2741
+ }], onApproval: [{
2742
+ type: Output
2743
+ }] } });
2744
+
2745
+ var UserAccessRequestStatus;
2746
+ (function (UserAccessRequestStatus) {
2747
+ UserAccessRequestStatus["Pending"] = "Pending";
2748
+ UserAccessRequestStatus["Approved"] = "Approved";
2749
+ UserAccessRequestStatus["Declined"] = "Declined";
2750
+ })(UserAccessRequestStatus || (UserAccessRequestStatus = {}));
2751
+
2752
+ class UserAccessRequestStatusBadgeComponent {
2753
+ status = UserAccessRequestStatus.Pending;
2754
+ badgeConfig() {
2755
+ switch (this.status) {
2756
+ case UserAccessRequestStatus.Approved:
2757
+ return { bgColor: '#CAE1CC', textColor: '#4ABB54', label: 'Approved' };
2758
+ case UserAccessRequestStatus.Declined:
2759
+ return { bgColor: '#FFDFDF', textColor: '#EB5757', label: 'Rejected' };
2760
+ default:
2761
+ return { bgColor: '#827C7C', textColor: '#C3C3C3', label: 'Pending' };
2762
+ }
2763
+ }
2764
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestStatusBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2765
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UserAccessRequestStatusBadgeComponent, selector: "lib-user-access-request-status-badge", inputs: { status: "status" }, ngImport: i0, template: "<verbena-badge\n borderRadius=\"9px\"\n [bgColor]=\"badgeConfig().bgColor\"\n [textColor]=\"badgeConfig().textColor\"\n fontSize=\"12px\"\n [text]=\"badgeConfig().label\"\n></verbena-badge>\n", styles: [""], dependencies: [{ kind: "component", type: i2.VerbenaBadgeComponent, selector: "verbena-badge", inputs: ["text", "bgColor", "textColor", "borderRadius", "pd", "fontSize", "width", "height"] }] });
2766
+ }
2767
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestStatusBadgeComponent, decorators: [{
2768
+ type: Component,
2769
+ args: [{ selector: 'lib-user-access-request-status-badge', template: "<verbena-badge\n borderRadius=\"9px\"\n [bgColor]=\"badgeConfig().bgColor\"\n [textColor]=\"badgeConfig().textColor\"\n fontSize=\"12px\"\n [text]=\"badgeConfig().label\"\n></verbena-badge>\n" }]
2770
+ }], propDecorators: { status: [{
2771
+ type: Input
2772
+ }] } });
2773
+
2774
+ class UserRequestApprovalComponent {
2775
+ cdr;
2776
+ userAccessRequestFacade;
2777
+ cardDataView;
2778
+ dataView;
2779
+ columns = columns$1;
2780
+ // visibleColumnDef: WritableSignal<ColumnDefinition<UserAccessRequest>[]> =
2781
+ // signal(columns);
2782
+ visibleColumnDef = this.columns;
2783
+ data = signal([]);
2784
+ styles = baseStyle$1;
2785
+ currentData = null;
2786
+ isGridView = true;
2787
+ selected = null;
2788
+ cardData = computed(() => this.data()?.map(({ FirstName, LastName, MailAddress, PhoneNumber, RoleID, RequestStatus, }) => ({
2789
+ selected: false,
2790
+ title: `${FirstName} ${LastName}`,
2791
+ data: {
2792
+ FirstName,
2793
+ LastName,
2794
+ MailAddress,
2795
+ PhoneNumber,
2796
+ RoleID,
2797
+ RequestStatus,
2798
+ },
2799
+ body: [
2800
+ { title: 'Name', value: `${FirstName} ${LastName}` },
2801
+ { title: 'E-Mail Address', value: MailAddress },
2802
+ { title: 'Phone Number', value: PhoneNumber ?? '' },
2803
+ ],
2804
+ children: [],
2805
+ })));
2806
+ constructor(cdr,
2807
+ // private service: UserRequestApprovalService,
2808
+ userAccessRequestFacade) {
2809
+ this.cdr = cdr;
2810
+ this.userAccessRequestFacade = userAccessRequestFacade;
2811
+ }
2812
+ async ngOnInit() {
2813
+ // this.data = this.service.getMockUserRequests();
2814
+ this.userAccessRequestFacade.getRequests$().subscribe((data) => {
2815
+ this.data.set(data);
2816
+ });
2817
+ try {
2818
+ await this.userAccessRequestFacade.loadRequests();
2819
+ }
2820
+ catch (error) {
2821
+ // Handle error
2822
+ }
2823
+ }
2824
+ // To search with parameter:
2825
+ async searchRequests(param) {
2826
+ try {
2827
+ await this.userAccessRequestFacade.loadRequestsWithParam(param);
2828
+ }
2829
+ catch (error) {
2830
+ // Handle error
2831
+ }
2832
+ }
2833
+ async onApprove(mailAddress) {
2834
+ const data = this.data().find(({ MailAddress }) => MailAddress === mailAddress);
2835
+ if (data) {
2836
+ await this.userAccessRequestFacade.approveRequest(data);
2837
+ }
2838
+ }
2839
+ openDetailView(mailAddress) {
2840
+ const cardItem = this.getCardDataByMailAddress(mailAddress);
2841
+ if (cardItem && this.cardDataView) {
2842
+ this.dataView.toggleView();
2843
+ // First reset all selections
2844
+ this.cardData().forEach((item) => {
2845
+ item.selected = false;
2846
+ if (item.children) {
2847
+ item.children.forEach((child) => (child.selected = false));
2848
+ }
2849
+ });
2850
+ // Set the selected item
2851
+ cardItem.selected = true;
2852
+ this.currentData = this.cardDataView.onItemClick(cardItem);
2853
+ // Force change detection if needed
2854
+ // this.changeDetectorRef.detectChanges();
2855
+ }
2856
+ }
2857
+ getCardDataByMailAddress(mailAddress) {
2858
+ return this.cardData().find(({ data }) => data.MailAddress === mailAddress);
2859
+ }
2860
+ onViewChange(isGridView) {
2861
+ this.isGridView = isGridView;
2862
+ // Reset selection when switching views
2863
+ if (this.currentData) {
2864
+ this.cardDataView?.clearData();
2865
+ this.currentData = null;
2866
+ }
2867
+ console.log('SELECTED', this.selected);
2868
+ if (this.selected) {
2869
+ this.cardDataView.onItemClick(this.selected);
2870
+ }
2871
+ }
2872
+ openFormView(index) {
2873
+ const item = this.cardData()[index];
2874
+ console.log('ITEM = ', item);
2875
+ }
2876
+ handleExport(exportedData) {
2877
+ console.log('Exported data:', exportedData);
2878
+ this.downloadCSV(exportedData);
2879
+ }
2880
+ /**
2881
+ *
2882
+ * @param data Simple csv export for testing
2883
+ */
2884
+ downloadCSV(data) {
2885
+ const headers = Object.keys(data[0]);
2886
+ const csvContent = [
2887
+ headers.join(','),
2888
+ ...data.map((row) => headers.map((header) => row[header]).join(',')),
2889
+ ].join('\n');
2890
+ const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
2891
+ const link = document.createElement('a');
2892
+ if (link.download !== undefined) {
2893
+ const url = URL.createObjectURL(blob);
2894
+ link.setAttribute('href', url);
2895
+ link.setAttribute('download', 'export.csv');
2896
+ link.style.visibility = 'hidden';
2897
+ document.body.appendChild(link);
2898
+ link.click();
2899
+ document.body.removeChild(link);
2900
+ }
2901
+ }
2902
+ onSelectionChange(selectedRows) {
2903
+ console.log('Selection changed:', selectedRows);
2904
+ // Handle the selection change
2905
+ }
2906
+ /**
2907
+ * Copied over from card view doc until I understand usage
2908
+ */
2909
+ selectedColumnCount = 0;
2910
+ selectedFilterTableCount = 0;
2911
+ isOPen = true;
2912
+ selectedSortCount = 0;
2913
+ showColumn = false;
2914
+ showSort = false;
2915
+ selectedAll = false;
2916
+ visibleColumns = columns$1.map((col) => ({
2917
+ checked: true,
2918
+ name: typeof col.header === 'string' ? col.header : col.id,
2919
+ type: DataFilterType.Bool,
2920
+ }));
2921
+ filterArray = [
2922
+ {
2923
+ name: 'Name',
2924
+ type: DataFilterType.String,
2925
+ checked: false,
2926
+ },
2927
+ {
2928
+ name: 'MailAddress',
2929
+ type: DataFilterType.String,
2930
+ checked: false,
2931
+ },
2932
+ {
2933
+ name: 'PhoneNumber',
2934
+ type: DataFilterType.String,
2935
+ checked: false,
2936
+ },
2937
+ {
2938
+ name: 'CreatedAt',
2939
+ type: DataFilterType.Date,
2940
+ checked: false,
2941
+ },
2942
+ ];
2943
+ sortOptions = [
2944
+ {
2945
+ name: 'Name',
2946
+ type: DataFilterType.String,
2947
+ checked: false,
2948
+ },
2949
+ {
2950
+ name: 'MailAddress',
2951
+ type: DataFilterType.String,
2952
+ checked: false,
2953
+ },
2954
+ {
2955
+ name: 'PhoneNumber',
2956
+ type: DataFilterType.String,
2957
+ checked: false,
2958
+ },
2959
+ {
2960
+ name: 'CreatedAt',
2961
+ type: DataFilterType.Date,
2962
+ checked: false,
2963
+ },
2964
+ ];
2965
+ clearData() {
2966
+ this.currentData = {};
2967
+ }
2968
+ loadMore() {
2969
+ // this.cardData = this.cardData.concat(this.cardData);
2970
+ }
2971
+ onColumnChange(event) {
2972
+ this.showColumn = event;
2973
+ }
2974
+ onSortChange(event) {
2975
+ this.showSort = event;
2976
+ console.log(event);
2977
+ }
2978
+ onColumnsUpdated(updatedColumns) {
2979
+ console.log(updatedColumns);
2980
+ const updatedColumnDef = [];
2981
+ updatedColumns.forEach((col) => {
2982
+ const matchingCol = this.columns.find((column) => column.header === col.name || column.id === col.name);
2983
+ if (matchingCol) {
2984
+ updatedColumnDef.push(matchingCol);
2985
+ }
2986
+ });
2987
+ console.log(updatedColumnDef);
2988
+ this.visibleColumnDef = [...updatedColumnDef];
2989
+ this.cdr.markForCheck();
2990
+ this.onColumnChange(false);
2991
+ this.selectedColumnCount = updatedColumns.length;
2992
+ }
2993
+ onSortUpdated(updatedSorts) {
2994
+ this.onSortChange(false);
2995
+ this.selectedSortCount = updatedSorts.length;
2996
+ console.log(updatedSorts);
2997
+ }
2998
+ onStateChange(event) {
2999
+ console.log(`State changed for ${event.key}:`, event.value);
3000
+ }
3001
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestApprovalComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: UserAccessRequestFacade }], target: i0.ɵɵFactoryTarget.Component });
3002
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UserRequestApprovalComponent, selector: "lib-user-request-approval", viewQueries: [{ propertyName: "cardDataView", first: true, predicate: ["vdcv"], descendants: true }, { propertyName: "dataView", first: true, predicate: ["vdv"], descendants: true }], ngImport: i0, template: "<div class=\"space-y-8\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isCreate: false,\n isToggle: true,\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div table-content>\n <lib-data-table\n [data]=\"data()\"\n [columns]=\"visibleColumnDef\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow>\n <div class=\"flex gap-6\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n class=\"cursor-pointer\"\n ></verben-svg>\n <!-- <button (click)=\"openDetailView(value)\">Open</button>\n <button (click)=\"selected = cardData[rowIndex]; vdv.toggleView()\">\n Switch\n </button> -->\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"MailAddress\"\n border=\"5px\"\n [cardDataList]=\"cardData()\"\n rbgColor=\"#f5f6f9\"\n mg=\"20px\"\n >\n <verben-left-card-data-view class=\"space-y-7\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"MailAddress\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"cardData()\"\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\"\n >\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex items-center gap-4 justify-between\">\n <div class=\"grid gap-y-2\">\n <span class=\"font-semibold text-[#404040]\">{{\n item.title\n }}</span>\n <p class=\"flex items-center\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Phone Number:</label\n >\n <span id=\"phone\" class=\"text-sm\">{{\n item.data.PhoneNumber\n }}</span>\n </p>\n </div>\n\n <div class=\"grid gap-y-2\">\n <p class=\"grid\">\n <label for=\"role\" class=\"text-[10px] font-light\"\n >Role</label\n >\n <span id=\"role\" class=\"text-sm\">Manager</span>\n </p>\n\n <lib-user-access-request-status-badge\n [status]=\"item.data.RequestStatus\"\n ></lib-user-access-request-status-badge>\n </div>\n </div>\n\n <!-- <div class=\"flex\">\n <span class=\"font-normal text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"\">\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black\">{{ ciItem.value }}</span>\n </div>\n } -->\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-user-request-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n (onApproval)=\"onApprove($event)\"\n ></lib-user-request-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2\">\n <!-- <span class=\"paginator-text\"\n >{{ data().length }} records loaded</span\n > -->\n <span></span>\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data()\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: ["*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-8{bottom:2rem}.left-0{left:0}.right-0{right:0}.float-right{float:right}.m-0{margin:0}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[8px\\]{margin-top:8px}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.w-2{width:.5rem}.w-3{width:.75rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-y-2{row-gap:.5rem}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-7>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-wrap{text-wrap:wrap}.break-all{word-break:break-all}.rounded-\\[9px\\]{border-radius:9px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-br-none{border-bottom-right-radius:0}.rounded-tr-none{border-top-right-radius:0}.border,.border-\\[1px\\]{border-width:1px}.border-primary{--tw-border-opacity: 1;border-color:rgb(212 160 7 / var(--tw-border-opacity, 1))}.border-secondary-200{border-color:#d7dbe6}.bg-\\[\\#CAE1CC\\]{--tw-bg-opacity: 1;background-color:rgb(202 225 204 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(212 160 7 / var(--tw-bg-opacity, 1))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(232 234 241 / var(--tw-bg-opacity, 1))}.bg-secondary-100{--tw-bg-opacity: 1;background-color:rgb(245 246 249 / var(--tw-bg-opacity, 1))}.bg-secondary-200{background-color:#d7dbe6}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-\\[6px\\]{padding-top:6px;padding-bottom:6px}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-\\[13px\\]{padding-left:13px}.pr-1{padding-right:.25rem}.pr-\\[3px\\]{padding-right:3px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-\\[13px\\]{font-size:13px}.text-\\[16px\\]{font-size:16px}.text-\\[22px\\]{font-size:22px}.text-\\[24px\\]{font-size:24px}.text-\\[2rem\\]{font-size:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-6{line-height:1.5rem}.leading-\\[29\\.05px\\]{line-height:29.05px}.leading-\\[33px\\]{line-height:33px}.leading-\\[48px\\]{line-height:48px}.text-\\[\\#333\\]{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity, 1))}.text-\\[\\#404040\\]{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.text-\\[\\#4ABB54\\]{--tw-text-opacity: 1;color:rgb(74 187 84 / var(--tw-text-opacity, 1))}.text-\\[black\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-muted{color:#0009}.underline{text-decoration-line:underline}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.DataTableComponent, selector: "lib-data-table", inputs: ["data", "columns", "styleConfig"], outputs: ["rowEdit", "rowSave", "rowDelete", "selectionChange"] }, { kind: "directive", type: i2.ColumnDirective, selector: "[libColumn]", inputs: ["libColumn"] }, { kind: "component", type: i2.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "size"] }, { kind: "component", type: i2.DataViewComponent, selector: "verben-data-view", inputs: ["buttonClass", "iconClass", "activeIconClass", "columnCustomClass", "filterCustomClass", "sortCustomClass", "exportCustomClass", "selectCustomClass", "zIndex", "createCustomClass", "tableIcon", "cardIcon", "cardClass", "tableClass", "searchKey", "searchValue", "viewState", "searchTemplate", "columnTemplate", "filterTemplate", "sortTemplate", "children", "exportTemplate", "createTemplate", "selectedColumnCount", "selectedSortCount", "selectedFilterTableCount", "inputWidth", "showColumnChild", "showSortChild", "showFilterChild", "showExportChild", "create", "showSelected", "isTableView"], outputs: ["viewChange", "stateChange", "onSearchChange"] }, { kind: "component", type: i2.CardDataViewComponent, selector: "verben-card-data-view", inputs: ["pd", "mg", "lHeight", "rHeight", "rWidth", "lWidth", "textColor", "lbgColor", "rbgColor", "border", "display", "borderRadius", "activeCss", "inActiveCss", "displayAsRow", "cardDataList", "dataId", "totalRecords", "footer", "noOfVisibleChildren", "onItemClick", "onCardChildClick"], outputs: ["loadMoreClick"] }, { kind: "component", type: i2.LeftCardDataComponent, selector: "verben-left-card-data", inputs: ["pd", "mg", "height", "weight", "activeCss", "inActiveCss", "cardDataList", "iconCollapse", "iconExpanded", "parent", "dataId"] }, { kind: "component", type: i2.LeftCardDataViewComponent, selector: "verben-left-card-data-view", inputs: ["cardDataList"] }, { kind: "component", type: i2.RightCardDataViewComponent, selector: "verben-right-card-data-view", inputs: ["parentData", "chilData", "meth"] }, { kind: "component", type: i2.CardDataViewFooterComponent, selector: "verben-card-data-view-footer" }, { kind: "component", type: i2.SortTableComponent, selector: "verben-sort-table", inputs: ["enableDragAndDrop", "sortOptions", "resetText", "displayedOptions", "propertyText", "showMoreText", "sortButtonText", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "containerHeight"], outputs: ["selectedOptions"] }, { kind: "component", type: i2.VisibleColumnComponent, selector: "verben-visible-column", inputs: ["columns", "items", "enableDragAndDrop", "displayedColumns", "showMore", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "closeColumn"], outputs: ["columnsUpdated"] }, { kind: "component", type: i2.TableFilterComponent, selector: "verben-table-filter", inputs: ["filterOptions", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "maxFilterLength", "tooltip"], outputs: ["filtersApplied"] }, { kind: "component", type: i2.DataExportComponent, selector: "lib-data-export", inputs: ["data"], outputs: ["exportDataEvent"] }, { kind: "component", type: UserRequestFormComponent, selector: "lib-user-request-form", inputs: ["currentData"], outputs: ["switchView", "onApproval"] }, { kind: "component", type: UserAccessRequestStatusBadgeComponent, selector: "lib-user-access-request-status-badge", inputs: ["status"] }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }] });
3003
+ }
3004
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestApprovalComponent, decorators: [{
3005
+ type: Component,
3006
+ args: [{ selector: 'lib-user-request-approval', template: "<div class=\"space-y-8\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isCreate: false,\n isToggle: true,\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div table-content>\n <lib-data-table\n [data]=\"data()\"\n [columns]=\"visibleColumnDef\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow>\n <div class=\"flex gap-6\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n class=\"cursor-pointer\"\n ></verben-svg>\n <!-- <button (click)=\"openDetailView(value)\">Open</button>\n <button (click)=\"selected = cardData[rowIndex]; vdv.toggleView()\">\n Switch\n </button> -->\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"MailAddress\"\n border=\"5px\"\n [cardDataList]=\"cardData()\"\n rbgColor=\"#f5f6f9\"\n mg=\"20px\"\n >\n <verben-left-card-data-view class=\"space-y-7\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"MailAddress\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"cardData()\"\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\"\n >\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex items-center gap-4 justify-between\">\n <div class=\"grid gap-y-2\">\n <span class=\"font-semibold text-[#404040]\">{{\n item.title\n }}</span>\n <p class=\"flex items-center\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Phone Number:</label\n >\n <span id=\"phone\" class=\"text-sm\">{{\n item.data.PhoneNumber\n }}</span>\n </p>\n </div>\n\n <div class=\"grid gap-y-2\">\n <p class=\"grid\">\n <label for=\"role\" class=\"text-[10px] font-light\"\n >Role</label\n >\n <span id=\"role\" class=\"text-sm\">Manager</span>\n </p>\n\n <lib-user-access-request-status-badge\n [status]=\"item.data.RequestStatus\"\n ></lib-user-access-request-status-badge>\n </div>\n </div>\n\n <!-- <div class=\"flex\">\n <span class=\"font-normal text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"\">\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black\">{{ ciItem.value }}</span>\n </div>\n } -->\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-user-request-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n (onApproval)=\"onApprove($event)\"\n ></lib-user-request-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2\">\n <!-- <span class=\"paginator-text\"\n >{{ data().length }} records loaded</span\n > -->\n <span></span>\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data()\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: ["*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-8{bottom:2rem}.left-0{left:0}.right-0{right:0}.float-right{float:right}.m-0{margin:0}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[8px\\]{margin-top:8px}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.w-2{width:.5rem}.w-3{width:.75rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-y-2{row-gap:.5rem}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-7>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-wrap{text-wrap:wrap}.break-all{word-break:break-all}.rounded-\\[9px\\]{border-radius:9px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-br-none{border-bottom-right-radius:0}.rounded-tr-none{border-top-right-radius:0}.border,.border-\\[1px\\]{border-width:1px}.border-primary{--tw-border-opacity: 1;border-color:rgb(212 160 7 / var(--tw-border-opacity, 1))}.border-secondary-200{border-color:#d7dbe6}.bg-\\[\\#CAE1CC\\]{--tw-bg-opacity: 1;background-color:rgb(202 225 204 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(212 160 7 / var(--tw-bg-opacity, 1))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(232 234 241 / var(--tw-bg-opacity, 1))}.bg-secondary-100{--tw-bg-opacity: 1;background-color:rgb(245 246 249 / var(--tw-bg-opacity, 1))}.bg-secondary-200{background-color:#d7dbe6}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-\\[6px\\]{padding-top:6px;padding-bottom:6px}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-\\[13px\\]{padding-left:13px}.pr-1{padding-right:.25rem}.pr-\\[3px\\]{padding-right:3px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-\\[13px\\]{font-size:13px}.text-\\[16px\\]{font-size:16px}.text-\\[22px\\]{font-size:22px}.text-\\[24px\\]{font-size:24px}.text-\\[2rem\\]{font-size:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-6{line-height:1.5rem}.leading-\\[29\\.05px\\]{line-height:29.05px}.leading-\\[33px\\]{line-height:33px}.leading-\\[48px\\]{line-height:48px}.text-\\[\\#333\\]{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity, 1))}.text-\\[\\#404040\\]{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.text-\\[\\#4ABB54\\]{--tw-text-opacity: 1;color:rgb(74 187 84 / var(--tw-text-opacity, 1))}.text-\\[black\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-muted{color:#0009}.underline{text-decoration-line:underline}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}\n"] }]
3007
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: UserAccessRequestFacade }], propDecorators: { cardDataView: [{
3008
+ type: ViewChild,
3009
+ args: ['vdcv']
3010
+ }], dataView: [{
3011
+ type: ViewChild,
3012
+ args: ['vdv']
3013
+ }] } });
3014
+
3015
+ const roles = [
3016
+ { id: 'admin', name: 'Admin' },
3017
+ { id: 'manager', name: 'Manager' },
3018
+ { id: 'staff', name: 'Staff' },
3019
+ ];
3020
+ const mockData$1 = new Array(10)
3021
+ .fill(1)
3022
+ .map((id, i) => ({
3023
+ FirstName: `First ${id + i}`,
3024
+ LastName: `Last ${id + i}`,
3025
+ OtherName: `Other ${id + i}`,
3026
+ Id: id + i,
3027
+ id: (id + i).toString(),
3028
+ MailAddress: `user${id + i}@mail.com`,
3029
+ PhoneNumber: `+23480000000${id + i}`,
3030
+ RequestStatus: randomEnum$1(UserAccessRequestStatus),
3031
+ RoleID: roles[Math.floor(Math.random() * roles.length)].id,
3032
+ Password: '1234567',
3033
+ ExpireOn: new Date(),
3034
+ IsSeeded: false,
3035
+ OTPExpireOn: new Date(),
3036
+ Tenants: [],
3037
+ CreatedAt: new Date(),
3038
+ UpdatedAt: new Date(),
3039
+ DataState: ObjectState.New,
3040
+ Tenant: `Tenant${id + i}`,
3041
+ }));
3042
+ function randomEnum$1(anEnum) {
3043
+ const enumValues = Object.values(anEnum);
3044
+ const randomIndex = Math.floor(Math.random() * enumValues.length);
3045
+ return enumValues[randomIndex];
3046
+ }
3047
+
3048
+ const SERVICE_CONFIG = new InjectionToken('ServiceConfig');
3049
+ class UserRequestApprovalService {
3050
+ // protected readonly baseUrl: string;
3051
+ resourceEndpoint;
3052
+ roles = [
3053
+ { id: 'admin', name: 'Admin' },
3054
+ { id: 'manager', name: 'Manager' },
3055
+ { id: 'staff', name: 'Staff' },
3056
+ ];
3057
+ constructor() {
3058
+ // this.baseUrl = environment.serviceUrl;
3059
+ // this.resourceEndpoint = config.resourceEndpoint;
3060
+ this.resourceEndpoint = '';
3061
+ }
3062
+ getMockUserRequests() {
3063
+ return mockData$1;
3064
+ }
3065
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestApprovalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3066
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestApprovalService });
3067
+ }
3068
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestApprovalService, decorators: [{
3069
+ type: Injectable
3070
+ }], ctorParameters: () => [] });
3071
+ function randomEnum(anEnum) {
3072
+ const enumValues = Object.values(anEnum);
3073
+ const randomIndex = Math.floor(Math.random() * enumValues.length);
3074
+ return enumValues[randomIndex];
3075
+ }
3076
+
3077
+ class LibUserRequestApprovalModule {
3078
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibUserRequestApprovalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3079
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: LibUserRequestApprovalModule, declarations: [UserRequestApprovalComponent,
3080
+ UserRequestFormComponent,
3081
+ UserAccessRequestStatusBadgeComponent], imports: [CommonModule,
3082
+ DataTableModule,
3083
+ CardModule,
3084
+ SvgModule,
3085
+ DataViewModule,
3086
+ CardDataViewModule,
3087
+ SortTableModule,
3088
+ VisibleColumnModule,
3089
+ TableFilterModule,
3090
+ DataExportModule,
3091
+ FormsModule,
3092
+ ReactiveFormsModule,
3093
+ VerbenaInputModule,
3094
+ VerbenaButtonModule,
3095
+ VerbenaBadgeModule,
3096
+ DropDownModule], exports: [UserRequestApprovalComponent] });
3097
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibUserRequestApprovalModule, providers: [UserRequestApprovalService], imports: [CommonModule,
3098
+ DataTableModule,
3099
+ CardModule,
3100
+ SvgModule,
3101
+ DataViewModule,
3102
+ CardDataViewModule,
3103
+ SortTableModule,
3104
+ VisibleColumnModule,
3105
+ TableFilterModule,
3106
+ DataExportModule,
3107
+ FormsModule,
3108
+ ReactiveFormsModule,
3109
+ VerbenaInputModule,
3110
+ VerbenaButtonModule,
3111
+ VerbenaBadgeModule,
3112
+ DropDownModule] });
3113
+ }
3114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibUserRequestApprovalModule, decorators: [{
3115
+ type: NgModule,
3116
+ args: [{
3117
+ declarations: [
3118
+ UserRequestApprovalComponent,
3119
+ UserRequestFormComponent,
3120
+ UserAccessRequestStatusBadgeComponent,
3121
+ ],
3122
+ imports: [
3123
+ CommonModule,
3124
+ DataTableModule,
3125
+ CardModule,
3126
+ SvgModule,
3127
+ DataViewModule,
3128
+ CardDataViewModule,
3129
+ SortTableModule,
3130
+ VisibleColumnModule,
3131
+ TableFilterModule,
3132
+ DataExportModule,
3133
+ FormsModule,
3134
+ ReactiveFormsModule,
3135
+ VerbenaInputModule,
3136
+ VerbenaButtonModule,
3137
+ VerbenaBadgeModule,
3138
+ DropDownModule,
3139
+ ],
3140
+ providers: [UserRequestApprovalService],
3141
+ exports: [UserRequestApprovalComponent],
3142
+ }]
3143
+ }] });
3144
+
3145
+ const columns = [
3146
+ {
3147
+ id: 'createdAt',
3148
+ header: 'CREATED',
3149
+ accessorKey: 'CreatedAt',
3150
+ },
3151
+ {
3152
+ id: 'user',
3153
+ header: 'NAME',
3154
+ accessorFn: (row) => `${row.FirstName} ${row.LastName}`,
3155
+ },
3156
+ {
3157
+ id: 'mail',
3158
+ header: 'E-Mail',
3159
+ accessorKey: 'MailAddress',
3160
+ },
3161
+ {
3162
+ id: 'phone',
3163
+ header: 'PHONE NUMBER',
3164
+ accessorKey: 'PhoneNumber',
3165
+ },
3166
+ {
3167
+ id: 'address',
3168
+ header: 'ADDRESS',
3169
+ accessorKey: 'Address',
3170
+ },
3171
+ {
3172
+ id: 'role',
3173
+ header: 'ROLE',
3174
+ accessorKey: 'Role',
3175
+ },
3176
+ {
3177
+ id: 'status',
3178
+ header: 'STATUS',
3179
+ accessorKey: 'Status',
3180
+ },
3181
+ {
3182
+ id: 'actions',
3183
+ header: 'ACTIONS',
3184
+ accessorKey: 'MailAddress',
3185
+ },
3186
+ ];
3187
+
3188
+ const mockData = new Array(10)
3189
+ .fill(1)
3190
+ .map((id, i) => ({
3191
+ FirstName: `First ${id + i}`,
3192
+ LastName: `Last ${id + i}`,
3193
+ OtherName: `Other ${id + i}`,
3194
+ Id: id + i,
3195
+ id: (id + i).toString(),
3196
+ MailAddress: `user${id + i}@mail.com`,
3197
+ PhoneNumber: `+23480000000${id + i}`,
3198
+ RequestStatus: UserAccessRequestStatus.Pending,
3199
+ Address: `AAA Block`,
3200
+ Password: '1234567',
3201
+ ExpireOn: new Date(),
3202
+ IsSeeded: false,
3203
+ OTPExpireOn: new Date(),
3204
+ Tenants: [],
3205
+ Role: ['Manager'],
3206
+ CreatedAt: new Date(),
3207
+ UpdatedAt: new Date(),
3208
+ DataState: ObjectState.New,
3209
+ Tenant: `Tenant${id + i}`,
3210
+ }));
3211
+
3212
+ const baseStyle = {
3213
+ width: "100%",
3214
+ fontFamily: '"Fraunces", serif',
3215
+ fontSize: '80%',
3216
+ whiteSpace: 'nowrap',
3217
+ margin: '0',
3218
+ border: '1px solid #D4A007',
3219
+ borderRadius: '16px',
3220
+ borderCollapse: 'separate',
3221
+ borderSpacing: '0',
3222
+ tableLayout: 'fixed',
3223
+ overflow: 'hidden',
3224
+ rows: {
3225
+ even: {
3226
+ backgroundColor: '#FDFDFD',
3227
+ },
3228
+ odd: {
3229
+ backgroundColor: '#F1F4FB',
3230
+ },
3231
+ height: '68px',
3232
+ },
3233
+ cells: {
3234
+ padding: '0.5rem 1rem',
3235
+ },
3236
+ header: {
3237
+ stickyTop: true,
3238
+ zIndex: 2,
3239
+ backgroundColor: '#EFF2FB',
3240
+ fontWeight: 'bold',
3241
+ textAlign: 'left',
3242
+ padding: '12px 16px',
3243
+ height: '40px',
3244
+ },
3245
+ footer: {
3246
+ stickyBottom: true,
3247
+ zIndex: 2,
3248
+ padding: '3px',
3249
+ },
3250
+ // body: {
3251
+ // background: '#fff',
3252
+ // padding: '4px 5px',
3253
+ // textAlign: 'center',
3254
+ // },
3255
+ firstColumn: {
3256
+ stickyLeft: true,
3257
+ zIndex: 1,
3258
+ },
3259
+ lastColumn: {
3260
+ stickyRight: true,
3261
+ zIndex: 1,
3262
+ },
3263
+ };
3264
+
3265
+ class UserManagementFormComponent {
3266
+ fb;
3267
+ set currentData(value) {
3268
+ if (value?.data) {
3269
+ this.form.patchValue({
3270
+ MailAddress: value.data.MailAddress || '',
3271
+ Name: value.data.Name || '',
3272
+ PhoneNumber: value.data.PhoneNumber || '',
3273
+ });
3274
+ }
3275
+ else {
3276
+ this.form.reset();
3277
+ }
3278
+ }
3279
+ switchView = new EventEmitter();
3280
+ form;
3281
+ roles = [
3282
+ { id: 'admin', name: 'Admin' },
3283
+ { id: 'manager', name: 'Manager' },
3284
+ { id: 'staff', name: 'Staff' },
3285
+ ];
3286
+ constructor(fb) {
3287
+ this.fb = fb;
3288
+ this.form = this.fb.group({
3289
+ MailAddress: ['', { readonly: true }],
3290
+ Name: ['', { readonly: true }],
3291
+ PhoneNumber: ['', { readonly: true }],
3292
+ RoleId: [''],
3293
+ });
3294
+ }
3295
+ ngOnInit() { }
3296
+ onSave() {
3297
+ if (this.form.valid) {
3298
+ // Emit save event with form value
3299
+ console.log('Form saved:', this.form.value);
3300
+ }
3301
+ }
3302
+ onDelete() {
3303
+ // Emit delete event
3304
+ console.log('Delete requested');
3305
+ }
3306
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserManagementFormComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
3307
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UserManagementFormComponent, selector: "lib-user-request-form", inputs: { currentData: "currentData" }, outputs: { switchView: "switchView" }, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n>\n <verbena-input\n name=\"MailAddress\"\n label=\"Mail Address:\"\n [type]=\"'email'\"\n formControlName=\"MailAddress\"\n />\n <verbena-input label=\"Name:\" name=\"Name\" type=\"text\" formControlName=\"Name\" />\n <verbena-input\n label=\"Phone Number:\"\n name=\"PhoneNumber\"\n type=\"tel\"\n formControlName=\"PhoneNumber\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"role\">Role</label>\n\n <verben-drop-down\n label=\"Role\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [filter]=\"true\"\n [showClear]=\"true\"\n placeholder=\"\"\n [(options)]=\"roles\"\n id=\"role\"\n optionLabel=\"name\"\n optionValue=\"id\"\n formControlName=\"RoleId\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div\n class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2 absolute\"\n style=\"\n display: flex;\n justify-content: space-between;\n position: absolute;\n padding: 8px 12px;\n right: 0;\n left: 0;\n bottom: 32;\n \"\n >\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Reject\"\n styleType=\"danger\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n text=\"Approve\"\n bgColor=\"#28a745\"\n textColor=\"white\"\n border=\"1px solid #28a745\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "component", type: i2.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "disabled", "required", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }] });
3308
+ }
3309
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserManagementFormComponent, decorators: [{
3310
+ type: Component,
3311
+ args: [{ selector: 'lib-user-request-form', template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n>\n <verbena-input\n name=\"MailAddress\"\n label=\"Mail Address:\"\n [type]=\"'email'\"\n formControlName=\"MailAddress\"\n />\n <verbena-input label=\"Name:\" name=\"Name\" type=\"text\" formControlName=\"Name\" />\n <verbena-input\n label=\"Phone Number:\"\n name=\"PhoneNumber\"\n type=\"tel\"\n formControlName=\"PhoneNumber\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"role\">Role</label>\n\n <verben-drop-down\n label=\"Role\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [filter]=\"true\"\n [showClear]=\"true\"\n placeholder=\"\"\n [(options)]=\"roles\"\n id=\"role\"\n optionLabel=\"name\"\n optionValue=\"id\"\n formControlName=\"RoleId\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div\n class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2 absolute\"\n style=\"\n display: flex;\n justify-content: space-between;\n position: absolute;\n padding: 8px 12px;\n right: 0;\n left: 0;\n bottom: 32;\n \"\n >\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Reject\"\n styleType=\"danger\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n text=\"Approve\"\n bgColor=\"#28a745\"\n textColor=\"white\"\n border=\"1px solid #28a745\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n" }]
3312
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { currentData: [{
3313
+ type: Input
3314
+ }], switchView: [{
3315
+ type: Output
3316
+ }] } });
3317
+
3318
+ class UserManagementComponent {
3319
+ cardDataView;
3320
+ dataView;
3321
+ columns = columns;
3322
+ data = mockData;
3323
+ styles = baseStyle;
3324
+ selectedParent;
3325
+ basicOption;
3326
+ selectedOption = [];
3327
+ selectedOptionTwo = [];
3328
+ selectedOptionThree;
3329
+ missingObject;
3330
+ generateNewUserAccessRequest() {
3331
+ const newId = this.data.length + 1; // Incremental ID based on current data length
3332
+ return {
3333
+ FirstName: `First ${newId}`,
3334
+ LastName: `Last ${newId}`,
3335
+ OtherName: `Other ${newId}`,
3336
+ Id: `${newId}`,
3337
+ id: newId,
3338
+ MailAddress: ` `,
3339
+ PhoneNumber: ``,
3340
+ RequestStatus: UserAccessRequestStatus.Pending,
3341
+ Address: ` `,
3342
+ Password: ' ',
3343
+ ExpireOn: new Date(),
3344
+ IsSeeded: false,
3345
+ OTPExpireOn: new Date(),
3346
+ Tenants: [`Tenant${newId}`],
3347
+ Role: ['User'],
3348
+ CreatedAt: new Date(),
3349
+ UpdatedAt: new Date(),
3350
+ DataState: ObjectState.New,
3351
+ Tenant: `Tenant${newId}`
3352
+ };
3353
+ }
3354
+ // Function to add a new user to mockData
3355
+ addNewUserToMockData() {
3356
+ const newUser = this.generateNewUserAccessRequest();
3357
+ this.data.push(newUser); // Adds the new user to the data array
3358
+ // Optionally, update cardData with the new user entry for card display
3359
+ const fullName = `${newUser.FirstName} ${newUser.LastName}`;
3360
+ const newCardData = {
3361
+ selected: false,
3362
+ title: fullName,
3363
+ data: {
3364
+ Name: fullName,
3365
+ MailAddress: newUser.MailAddress,
3366
+ PhoneNumber: newUser.PhoneNumber,
3367
+ RoleID: newUser.Role,
3368
+ Status: newUser.Status,
3369
+ },
3370
+ body: [
3371
+ { title: 'Name', value: fullName },
3372
+ { title: 'E-Mail Address', value: newUser.MailAddress },
3373
+ { title: 'Phone Number', value: newUser.PhoneNumber ?? '' },
3374
+ ],
3375
+ children: [],
3376
+ };
3377
+ this.cardData.push(newCardData); // Update cardData array with the new user
3378
+ return newUser;
3379
+ }
3380
+ // Grid view properties
3381
+ isGridView = true;
3382
+ currentData;
3383
+ selectedColumnCount = 0;
3384
+ selectedFilterTableCount = 0;
3385
+ isOPen = true;
3386
+ selectedSortCount = 0;
3387
+ showColumn = false;
3388
+ showSort = false;
3389
+ selectedAll = false;
3390
+ visibleColumns = columns.map((col) => ({
3391
+ checked: false,
3392
+ name: typeof col.header === 'string' ? col.header : col.id,
3393
+ type: DataFilterType.Bool,
3394
+ }));
3395
+ filterArray = [
3396
+ { name: 'Name', type: DataFilterType.String, checked: false },
3397
+ { name: 'MailAddress', type: DataFilterType.String, checked: false },
3398
+ { name: 'PhoneNumber', type: DataFilterType.String, checked: false },
3399
+ { name: 'CreatedAt', type: DataFilterType.Date, checked: false },
3400
+ ];
3401
+ sortOptions = [
3402
+ { name: 'Name', type: DataFilterType.String, checked: false },
3403
+ { name: 'MailAddress', type: DataFilterType.String, checked: false },
3404
+ { name: 'PhoneNumber', type: DataFilterType.String, checked: false },
3405
+ { name: 'CreatedAt', type: DataFilterType.Date, checked: false },
3406
+ ];
3407
+ testParents = [
3408
+ { Id: '1', Name: 'Manager' },
3409
+ { Id: '2', Name: 'Administrator' },
3410
+ { Id: '3', Name: 'Jelom' },
3411
+ ];
3412
+ cardData = mockData.map(({ FirstName, LastName, MailAddress, PhoneNumber, RoleID, Status }) => ({
3413
+ selected: false,
3414
+ title: `${FirstName} ${LastName}`,
3415
+ data: {
3416
+ FirstName,
3417
+ LastName,
3418
+ MailAddress,
3419
+ PhoneNumber,
3420
+ RoleID,
3421
+ Status,
3422
+ },
3423
+ body: [
3424
+ { title: 'Name', value: `${FirstName} ${LastName}` },
3425
+ { title: 'E-Mail Address', value: MailAddress },
3426
+ { title: 'Phone Number', value: PhoneNumber ?? '' },
3427
+ ],
3428
+ children: [],
3429
+ }));
3430
+ ngOnInit() {
3431
+ this.selectedParent = '1';
3432
+ this.selectedOption = ['Opt 1'];
3433
+ this.selectedOptionTwo = ['1'];
3434
+ this.selectedOptionThree = '1';
3435
+ }
3436
+ getParentLabel(context) {
3437
+ console.log({ MissingObj: this.missingObject });
3438
+ return this.missingObject.Name;
3439
+ }
3440
+ async loadMoreParents(event) {
3441
+ console.log({ ParentLoadEvent: JSON.parse(JSON.stringify(event)) });
3442
+ return await new Promise((resolve) => setTimeout(() => resolve([
3443
+ { Id: '1', Name: 'Jimly' },
3444
+ { Id: '2', Name: 'Jecil' },
3445
+ { Id: '3', Name: 'Jelom' },
3446
+ { Id: '4', Name: 'Jemima' },
3447
+ { Id: '5', Name: 'Akintunde' },
3448
+ ]), 3000));
3449
+ }
3450
+ onDropdownChange(event) {
3451
+ // console.log({
3452
+ // 'Test Parent Value': this.selectedParent,
3453
+ // ...
3454
+ // });
3455
+ }
3456
+ onSelectionChange(selectedRows) {
3457
+ console.log('Selection changed:', selectedRows);
3458
+ // Handle the selection change
3459
+ }
3460
+ handleExport(exportedData) {
3461
+ console.log('Exported data:', exportedData);
3462
+ this.downloadCSV(exportedData);
3463
+ }
3464
+ downloadCSV(data) {
3465
+ const headers = Object.keys(data[0]);
3466
+ const csvContent = [
3467
+ headers.join(','),
3468
+ ...data.map((row) => headers.map((header) => row[header]).join(',')),
3469
+ ].join('\n');
3470
+ const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
3471
+ const link = document.createElement('a');
3472
+ if (link.download !== undefined) {
3473
+ const url = URL.createObjectURL(blob);
3474
+ link.setAttribute('href', url);
3475
+ link.setAttribute('download', 'export.csv');
3476
+ link.style.visibility = 'hidden';
3477
+ document.body.appendChild(link);
3478
+ link.click();
3479
+ document.body.removeChild(link);
3480
+ }
3481
+ }
3482
+ // applyFilters() {
3483
+ // this.filteredData = this.data.filter((item) => {
3484
+ // return this.filterArray.every((filter) => {
3485
+ // if (filter.checked) {
3486
+ // switch (filter.type) {
3487
+ // case DataFilterType.String:
3488
+ // return item[filter.name].toLowerCase().includes(filter.name.toLowerCase());
3489
+ // case DataFilterType.Date:
3490
+ // return new Date(item[filter.name]) >= new Date(filter.name);
3491
+ // default:
3492
+ // return true;
3493
+ // }
3494
+ // }
3495
+ // return true;
3496
+ // });
3497
+ // });
3498
+ // }
3499
+ getCardDataByMailAddress(mailAddress) {
3500
+ console.log('cardData array:', this.cardData);
3501
+ console.log(mailAddress);
3502
+ return this.cardData.find(({ data }) => data?.MailAddress === mailAddress);
3503
+ }
3504
+ openDetailView(mailAddress) {
3505
+ const cardItem = this.getCardDataByMailAddress(mailAddress);
3506
+ console.log(cardItem);
3507
+ if (cardItem && this.cardDataView) {
3508
+ this.dataView.toggleView();
3509
+ // First reset all selections
3510
+ this.cardData.forEach((item) => {
3511
+ item.selected = false;
3512
+ if (item.children) {
3513
+ item.children.forEach((child) => (child.selected = false));
3514
+ }
3515
+ });
3516
+ // Set the selected item
3517
+ cardItem.selected = true;
3518
+ this.currentData = this.cardDataView.onItemClick(cardItem);
3519
+ // Force change detection if needed
3520
+ // this.changeDetectorRef.detectChanges();
3521
+ }
3522
+ }
3523
+ newItem() {
3524
+ const newData = this.addNewUserToMockData();
3525
+ const newCardData = {
3526
+ selected: true,
3527
+ title: `${newData.FirstName} ${newData.LastName}`,
3528
+ data: {
3529
+ ...newData,
3530
+ },
3531
+ body: [
3532
+ { title: 'Name', value: `${newData.FirstName} ${newData.LastName}` },
3533
+ { title: 'E-Mail Address', value: newData.MailAddress },
3534
+ { title: 'Phone Number', value: newData.PhoneNumber ?? '' },
3535
+ ],
3536
+ children: [],
3537
+ };
3538
+ if (this.dataView.isTableView) {
3539
+ this.dataView.toggleView();
3540
+ }
3541
+ // First reset all selections
3542
+ this.cardData.forEach((item) => {
3543
+ item.selected = false;
3544
+ if (item.children) {
3545
+ item.children.forEach((child) => (child.selected = false));
3546
+ }
3547
+ });
3548
+ // this.cardData = [newCardData].concat(this.cardData);
3549
+ // this.cardDataView.onItemClick(newCardData)
3550
+ this.cardData = [newCardData, ...this.cardData];
3551
+ this.currentData = this.cardDataView.onItemClick(newCardData);
3552
+ }
3553
+ // toggleChildView(action: string) {
3554
+ // if (action === 'create') {
3555
+ // const newCard: CardData = {
3556
+ // selected: false,
3557
+ // title: 'New Card', // Default title, change as needed
3558
+ // data: { Name: '', MailAddress: '', PhoneNumber: '' },
3559
+ // body: [
3560
+ // { title: 'Name', value: '' },
3561
+ // { title: 'E-Mail Address', value: '' },
3562
+ // { title: 'Phone Number', value: '' }
3563
+ // ],
3564
+ // children: []
3565
+ // };
3566
+ // this.cardData.push(newCard);
3567
+ // }
3568
+ // }
3569
+ clearData() {
3570
+ this.currentData = {};
3571
+ }
3572
+ loadMore() {
3573
+ this.cardData = this.cardData.concat(this.cardData);
3574
+ }
3575
+ onColumnChange(event) {
3576
+ this.showColumn = event;
3577
+ }
3578
+ onSortChange(event) {
3579
+ this.showSort = event;
3580
+ console.log(event);
3581
+ }
3582
+ onColumnsUpdated(updatedColumns) {
3583
+ this.onColumnChange(false);
3584
+ this.selectedColumnCount = updatedColumns.length;
3585
+ }
3586
+ onSortUpdated(updatedSorts) {
3587
+ this.onSortChange(false);
3588
+ this.selectedSortCount = updatedSorts.length;
3589
+ console.log(updatedSorts);
3590
+ }
3591
+ onViewChange(isGridView) {
3592
+ console.log('View changed to:', isGridView ? 'Grid View' : 'List View');
3593
+ }
3594
+ onStateChange(event) {
3595
+ console.log(`State changed for ${event.key}:`, event.value);
3596
+ if (event.key === 'create') {
3597
+ console.log('peace is a boy');
3598
+ this.newItem();
3599
+ // const newUser = this.newItem()
3600
+ // if ( newUser && this.cardDataView) {
3601
+ // this.dataView.toggleView();
3602
+ // // First reset all selections
3603
+ // this.cardData.forEach((item) => {
3604
+ // item.selected = false;
3605
+ // if (item.children) {
3606
+ // item.children.forEach((child) => (child.selected = false));
3607
+ // }
3608
+ // });
3609
+ // this.currentData = this.cardDataView.onItemClick(newUser);
3610
+ // // Force change detection if needed
3611
+ // // this.changeDetectorRef.detectChanges();
3612
+ // }
3613
+ }
3614
+ }
3615
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserManagementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3616
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UserManagementComponent, selector: "lib-user-management", viewQueries: [{ propertyName: "cardDataView", first: true, predicate: ["vdcv"], descendants: true }, { propertyName: "dataView", first: true, predicate: ["vdv"], descendants: true }], ngImport: i0, template: "<div class=\"space-y-1 h-full\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isCreate: true,\n isToggle:true\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div table-content>\n <lib-data-table\n [data]=\"data\"\n [columns]=\"columns\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow >\n <div class=\"flex gap-6\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n class=\"cursor-pointer\"\n ></verben-svg>\n\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"status\">\n <ng-template\n #cell\n let-isEditing=\"isEditing\"\n let-toggleRowEdit=\"toggleRowEdit\"\n let-deleteRow=\"deleteRow\"\n let-value=\"value\"\n >\n <verbena-badge\n borderRadius=\"20px\"\n width=\"121px\"\n text=\"{{value}}\"\n bgColor=\"#D6F3E6\"\n textColor=\"#2DB76F\"\n pd=\"5px 15px\"\n fontSize=\"16px\"\n >\n\n\n </verbena-badge>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"role\">\n <ng-template\n #cell\n let-isEditing=\"isEditing\"\n let-toggleRowEdit=\"toggleRowEdit\"\n let-deleteRow=\"deleteRow\"\n let-value=\"value\"\n let-updateValue=\"updateValue\"\n >\n <!-- <verben-drop-down [minChar]=\"3\" [required]=\"true\" placeholder=\"Select Parent\"\n [asyncLabel]=\"this.getParentLabel.bind(this)\" invalidMessage=\"No value was provided\"\n width=\"120px\"\n (onChange)=\"onDropdownChange($event)\" [(ngModel)]=\"selectedParent\" optionLabel=\"Name\" optionValue=\"Id\"\n [options]=\"testParents\"></verben-drop-down> -->\n\n <verben-drop-down\n placeholder=\"Select Value\"\n width=\"120px\"\n (ngModelChange)=\"onDropdownChange($event)\"\n [options]=\"testParents\"\n optionLabel=\"Name\"\n optionValue=\"Name\"\n [ngModel]=\"value\"\n ></verben-drop-down>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"MailAddress\"\n border=\"5px\"\n [cardDataList]=\"cardData\"\n rbgColor=\"#f5f6f9\"\n mg=\"0px\"\n class=\"gap-1\"\n >\n <verben-left-card-data-view class=\"m-0 gap-2\" >\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"MailAddress\"\n class=\"bg-secondary-100 rounded-xl scroll-no border-primary border-[1px] gap-1 h-full justify-pp m-0 overflow-y-auto overflow-hidden\"\n [cardDataList]=\"cardData\"\n\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"vlcd.showChildren(item)\"\n [ngClass]=\"vlcd.showToggle(item) ? 'visible' : 'invisible'\"\n class=\"items-center flex cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer bg-secondary rounded-xl overflow-hidden w-full\"\n >\n <div\n class=\"w-2 rounded-xl rounded-tr-none rounded-br-none overflow-hidden\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-[6px] pr-[3px] \">\n <div class=\"flex items-center gap-4\">\n <div class=\"pl-[13px]\">\n <span class=\"font-semibold text-[16px] text-[#404040]\">{{\n item.title\n }}</span>\n <p class=\"flex items-center\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Phone Number:</label\n >\n <span id=\"phone\" class=\"text-[13px] font-medium truncate text-wrap\">{{\n item.data.PhoneNumber\n }}</span>\n </p>\n </div>\n\n <div class=\" \">\n <p class=\"grid\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Role</label\n >\n <span id=\"phone\" class=\"text-sm font-medium\"\n >Manager</span\n >\n <span class=\" bg-[#CAE1CC] text-center text-[#4ABB54] text-[13px] mt-[8px] rounded-[9px]\">\n {{item.data.Status}}\n </span>\n </p>\n <!-- <lib-user-access-request-status-badge\n [status]=\"item.data.Status\"\n ></lib-user-access-request-status-badge> -->\n </div>\n </div>\n\n <!-- <div class=\"flex\">\n <span class=\"font-normal text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"\">\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black\">{{ ciItem.value }}</span>\n </div>\n } -->\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-user-request-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n ></lib-user-request-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2\">\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: ["*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-8{bottom:2rem}.left-0{left:0}.right-0{right:0}.float-right{float:right}.m-0{margin:0}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[8px\\]{margin-top:8px}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.w-2{width:.5rem}.w-3{width:.75rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-y-2{row-gap:.5rem}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-7>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-wrap{text-wrap:wrap}.break-all{word-break:break-all}.rounded-\\[9px\\]{border-radius:9px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-br-none{border-bottom-right-radius:0}.rounded-tr-none{border-top-right-radius:0}.border,.border-\\[1px\\]{border-width:1px}.border-primary{--tw-border-opacity: 1;border-color:rgb(212 160 7 / var(--tw-border-opacity, 1))}.border-secondary-200{border-color:#d7dbe6}.bg-\\[\\#CAE1CC\\]{--tw-bg-opacity: 1;background-color:rgb(202 225 204 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(212 160 7 / var(--tw-bg-opacity, 1))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(232 234 241 / var(--tw-bg-opacity, 1))}.bg-secondary-100{--tw-bg-opacity: 1;background-color:rgb(245 246 249 / var(--tw-bg-opacity, 1))}.bg-secondary-200{background-color:#d7dbe6}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-\\[6px\\]{padding-top:6px;padding-bottom:6px}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-\\[13px\\]{padding-left:13px}.pr-1{padding-right:.25rem}.pr-\\[3px\\]{padding-right:3px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-\\[13px\\]{font-size:13px}.text-\\[16px\\]{font-size:16px}.text-\\[22px\\]{font-size:22px}.text-\\[24px\\]{font-size:24px}.text-\\[2rem\\]{font-size:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-6{line-height:1.5rem}.leading-\\[29\\.05px\\]{line-height:29.05px}.leading-\\[33px\\]{line-height:33px}.leading-\\[48px\\]{line-height:48px}.text-\\[\\#333\\]{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity, 1))}.text-\\[\\#404040\\]{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.text-\\[\\#4ABB54\\]{--tw-text-opacity: 1;color:rgb(74 187 84 / var(--tw-text-opacity, 1))}.text-\\[black\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-muted{color:#0009}.underline{text-decoration-line:underline}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.master-only-contanier{margin-top:0!important}.scroll-no::-webkit-scrollbar{width:4px}.scroll-no::-webkit-scrollbar-thumb{background:gray}.justify-pp{justify-content:start!important;margin-top:0!important}.toolbar{margin:0!important}@media screen and (max-width: 1024px){.scroll-no{padding:5px}}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.DataTableComponent, selector: "lib-data-table", inputs: ["data", "columns", "styleConfig"], outputs: ["rowEdit", "rowSave", "rowDelete", "selectionChange"] }, { kind: "directive", type: i2.ColumnDirective, selector: "[libColumn]", inputs: ["libColumn"] }, { kind: "component", type: i2.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "size"] }, { kind: "component", type: i2.DataViewComponent, selector: "verben-data-view", inputs: ["buttonClass", "iconClass", "activeIconClass", "columnCustomClass", "filterCustomClass", "sortCustomClass", "exportCustomClass", "selectCustomClass", "zIndex", "createCustomClass", "tableIcon", "cardIcon", "cardClass", "tableClass", "searchKey", "searchValue", "viewState", "searchTemplate", "columnTemplate", "filterTemplate", "sortTemplate", "children", "exportTemplate", "createTemplate", "selectedColumnCount", "selectedSortCount", "selectedFilterTableCount", "inputWidth", "showColumnChild", "showSortChild", "showFilterChild", "showExportChild", "create", "showSelected", "isTableView"], outputs: ["viewChange", "stateChange", "onSearchChange"] }, { kind: "component", type: i2.CardDataViewComponent, selector: "verben-card-data-view", inputs: ["pd", "mg", "lHeight", "rHeight", "rWidth", "lWidth", "textColor", "lbgColor", "rbgColor", "border", "display", "borderRadius", "activeCss", "inActiveCss", "displayAsRow", "cardDataList", "dataId", "totalRecords", "footer", "noOfVisibleChildren", "onItemClick", "onCardChildClick"], outputs: ["loadMoreClick"] }, { kind: "component", type: i2.LeftCardDataComponent, selector: "verben-left-card-data", inputs: ["pd", "mg", "height", "weight", "activeCss", "inActiveCss", "cardDataList", "iconCollapse", "iconExpanded", "parent", "dataId"] }, { kind: "component", type: i2.LeftCardDataViewComponent, selector: "verben-left-card-data-view", inputs: ["cardDataList"] }, { kind: "component", type: i2.RightCardDataViewComponent, selector: "verben-right-card-data-view", inputs: ["parentData", "chilData", "meth"] }, { kind: "component", type: i2.CardDataViewFooterComponent, selector: "verben-card-data-view-footer" }, { kind: "component", type: i2.SortTableComponent, selector: "verben-sort-table", inputs: ["enableDragAndDrop", "sortOptions", "resetText", "displayedOptions", "propertyText", "showMoreText", "sortButtonText", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "containerHeight"], outputs: ["selectedOptions"] }, { kind: "component", type: i2.VisibleColumnComponent, selector: "verben-visible-column", inputs: ["columns", "items", "enableDragAndDrop", "displayedColumns", "showMore", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "closeColumn"], outputs: ["columnsUpdated"] }, { kind: "component", type: i2.TableFilterComponent, selector: "verben-table-filter", inputs: ["filterOptions", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "maxFilterLength", "tooltip"], outputs: ["filtersApplied"] }, { kind: "component", type: i2.DataExportComponent, selector: "lib-data-export", inputs: ["data"], outputs: ["exportDataEvent"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.VerbenaBadgeComponent, selector: "verbena-badge", inputs: ["text", "bgColor", "textColor", "borderRadius", "pd", "fontSize", "width", "height"] }, { kind: "component", type: i2.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "disabled", "required", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }, { kind: "component", type: UserManagementFormComponent, selector: "lib-user-request-form", inputs: ["currentData"], outputs: ["switchView"] }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }] });
3617
+ }
3618
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserManagementComponent, decorators: [{
3619
+ type: Component,
3620
+ args: [{ selector: 'lib-user-management', template: "<div class=\"space-y-1 h-full\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isCreate: true,\n isToggle:true\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div table-content>\n <lib-data-table\n [data]=\"data\"\n [columns]=\"columns\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow >\n <div class=\"flex gap-6\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n class=\"cursor-pointer\"\n ></verben-svg>\n\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"status\">\n <ng-template\n #cell\n let-isEditing=\"isEditing\"\n let-toggleRowEdit=\"toggleRowEdit\"\n let-deleteRow=\"deleteRow\"\n let-value=\"value\"\n >\n <verbena-badge\n borderRadius=\"20px\"\n width=\"121px\"\n text=\"{{value}}\"\n bgColor=\"#D6F3E6\"\n textColor=\"#2DB76F\"\n pd=\"5px 15px\"\n fontSize=\"16px\"\n >\n\n\n </verbena-badge>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"role\">\n <ng-template\n #cell\n let-isEditing=\"isEditing\"\n let-toggleRowEdit=\"toggleRowEdit\"\n let-deleteRow=\"deleteRow\"\n let-value=\"value\"\n let-updateValue=\"updateValue\"\n >\n <!-- <verben-drop-down [minChar]=\"3\" [required]=\"true\" placeholder=\"Select Parent\"\n [asyncLabel]=\"this.getParentLabel.bind(this)\" invalidMessage=\"No value was provided\"\n width=\"120px\"\n (onChange)=\"onDropdownChange($event)\" [(ngModel)]=\"selectedParent\" optionLabel=\"Name\" optionValue=\"Id\"\n [options]=\"testParents\"></verben-drop-down> -->\n\n <verben-drop-down\n placeholder=\"Select Value\"\n width=\"120px\"\n (ngModelChange)=\"onDropdownChange($event)\"\n [options]=\"testParents\"\n optionLabel=\"Name\"\n optionValue=\"Name\"\n [ngModel]=\"value\"\n ></verben-drop-down>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"MailAddress\"\n border=\"5px\"\n [cardDataList]=\"cardData\"\n rbgColor=\"#f5f6f9\"\n mg=\"0px\"\n class=\"gap-1\"\n >\n <verben-left-card-data-view class=\"m-0 gap-2\" >\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"MailAddress\"\n class=\"bg-secondary-100 rounded-xl scroll-no border-primary border-[1px] gap-1 h-full justify-pp m-0 overflow-y-auto overflow-hidden\"\n [cardDataList]=\"cardData\"\n\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"vlcd.showChildren(item)\"\n [ngClass]=\"vlcd.showToggle(item) ? 'visible' : 'invisible'\"\n class=\"items-center flex cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer bg-secondary rounded-xl overflow-hidden w-full\"\n >\n <div\n class=\"w-2 rounded-xl rounded-tr-none rounded-br-none overflow-hidden\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-[6px] pr-[3px] \">\n <div class=\"flex items-center gap-4\">\n <div class=\"pl-[13px]\">\n <span class=\"font-semibold text-[16px] text-[#404040]\">{{\n item.title\n }}</span>\n <p class=\"flex items-center\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Phone Number:</label\n >\n <span id=\"phone\" class=\"text-[13px] font-medium truncate text-wrap\">{{\n item.data.PhoneNumber\n }}</span>\n </p>\n </div>\n\n <div class=\" \">\n <p class=\"grid\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Role</label\n >\n <span id=\"phone\" class=\"text-sm font-medium\"\n >Manager</span\n >\n <span class=\" bg-[#CAE1CC] text-center text-[#4ABB54] text-[13px] mt-[8px] rounded-[9px]\">\n {{item.data.Status}}\n </span>\n </p>\n <!-- <lib-user-access-request-status-badge\n [status]=\"item.data.Status\"\n ></lib-user-access-request-status-badge> -->\n </div>\n </div>\n\n <!-- <div class=\"flex\">\n <span class=\"font-normal text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"\">\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black\">{{ ciItem.value }}</span>\n </div>\n } -->\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-user-request-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n ></lib-user-request-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2\">\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: ["*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-8{bottom:2rem}.left-0{left:0}.right-0{right:0}.float-right{float:right}.m-0{margin:0}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[8px\\]{margin-top:8px}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.w-2{width:.5rem}.w-3{width:.75rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-y-2{row-gap:.5rem}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-7>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-wrap{text-wrap:wrap}.break-all{word-break:break-all}.rounded-\\[9px\\]{border-radius:9px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-br-none{border-bottom-right-radius:0}.rounded-tr-none{border-top-right-radius:0}.border,.border-\\[1px\\]{border-width:1px}.border-primary{--tw-border-opacity: 1;border-color:rgb(212 160 7 / var(--tw-border-opacity, 1))}.border-secondary-200{border-color:#d7dbe6}.bg-\\[\\#CAE1CC\\]{--tw-bg-opacity: 1;background-color:rgb(202 225 204 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(212 160 7 / var(--tw-bg-opacity, 1))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(232 234 241 / var(--tw-bg-opacity, 1))}.bg-secondary-100{--tw-bg-opacity: 1;background-color:rgb(245 246 249 / var(--tw-bg-opacity, 1))}.bg-secondary-200{background-color:#d7dbe6}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-\\[6px\\]{padding-top:6px;padding-bottom:6px}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-\\[13px\\]{padding-left:13px}.pr-1{padding-right:.25rem}.pr-\\[3px\\]{padding-right:3px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-\\[13px\\]{font-size:13px}.text-\\[16px\\]{font-size:16px}.text-\\[22px\\]{font-size:22px}.text-\\[24px\\]{font-size:24px}.text-\\[2rem\\]{font-size:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-6{line-height:1.5rem}.leading-\\[29\\.05px\\]{line-height:29.05px}.leading-\\[33px\\]{line-height:33px}.leading-\\[48px\\]{line-height:48px}.text-\\[\\#333\\]{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity, 1))}.text-\\[\\#404040\\]{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.text-\\[\\#4ABB54\\]{--tw-text-opacity: 1;color:rgb(74 187 84 / var(--tw-text-opacity, 1))}.text-\\[black\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-muted{color:#0009}.underline{text-decoration-line:underline}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.master-only-contanier{margin-top:0!important}.scroll-no::-webkit-scrollbar{width:4px}.scroll-no::-webkit-scrollbar-thumb{background:gray}.justify-pp{justify-content:start!important;margin-top:0!important}.toolbar{margin:0!important}@media screen and (max-width: 1024px){.scroll-no{padding:5px}}\n"] }]
3621
+ }], propDecorators: { cardDataView: [{
3622
+ type: ViewChild,
3623
+ args: ['vdcv']
3624
+ }], dataView: [{
3625
+ type: ViewChild,
3626
+ args: ['vdv']
3627
+ }] } });
3628
+
3629
+ class LibUserManagementModule {
3630
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibUserManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3631
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: LibUserManagementModule, declarations: [UserManagementComponent, UserManagementFormComponent], imports: [CommonModule,
3632
+ DataTableModule,
3633
+ CardModule,
3634
+ SvgModule,
3635
+ DataViewModule,
3636
+ CardDataViewModule,
3637
+ SortTableModule,
3638
+ VisibleColumnModule,
3639
+ TableFilterModule,
3640
+ DataExportModule,
3641
+ FormsModule,
3642
+ ReactiveFormsModule,
3643
+ VerbenaInputModule,
3644
+ VerbenaButtonModule,
3645
+ VerbenaBadgeModule,
3646
+ DropDownModule], exports: [UserManagementComponent] });
3647
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibUserManagementModule, imports: [CommonModule,
3648
+ DataTableModule,
3649
+ CardModule,
3650
+ SvgModule,
3651
+ DataViewModule,
3652
+ CardDataViewModule,
3653
+ SortTableModule,
3654
+ VisibleColumnModule,
3655
+ TableFilterModule,
3656
+ DataExportModule,
3657
+ FormsModule,
3658
+ ReactiveFormsModule,
3659
+ VerbenaInputModule,
3660
+ VerbenaButtonModule,
3661
+ VerbenaBadgeModule,
3662
+ DropDownModule] });
3663
+ }
3664
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibUserManagementModule, decorators: [{
3665
+ type: NgModule,
3666
+ args: [{
3667
+ declarations: [UserManagementComponent, UserManagementFormComponent],
3668
+ imports: [
3669
+ CommonModule,
3670
+ DataTableModule,
3671
+ CardModule,
3672
+ SvgModule,
3673
+ DataViewModule,
3674
+ CardDataViewModule,
3675
+ SortTableModule,
3676
+ VisibleColumnModule,
3677
+ TableFilterModule,
3678
+ DataExportModule,
3679
+ FormsModule,
3680
+ ReactiveFormsModule,
3681
+ VerbenaInputModule,
3682
+ VerbenaButtonModule,
3683
+ VerbenaBadgeModule,
3684
+ DropDownModule
3685
+ ],
3686
+ exports: [UserManagementComponent],
3687
+ }]
3688
+ }] });
3689
+
3690
+ /*
3691
+ * Public API Surface of verben-ng-ui
3692
+ */
3693
+ // export * from './lib/verben-ng-ui.service';
3694
+ // export * from './lib/verben-ng-ui.component';
3695
+ // Exporting modules
3696
+
3697
+ /**
3698
+ * Generated bundle index. Do not edit.
3699
+ */
3700
+
3701
+ export { ENVIRONMENT, EnvironmentService, ForgotPasswordComponent, ForgotPasswordModule, LibUserManagementModule, LibUserRequestApprovalModule, MailComponent, MailModule, MailValidationComponent, MailValidationModule, ResetPasswordComponent, ResetPasswordModule, SERVICE_CONFIG, SignInComponent, SignInModule, SignUpComponent, SignUpModule, SsoComponent, SsoModule, TwoFactorAuthOtpComponent, TwoFactorAuthOtpModule, TwoFactorAuthSetupComponent, TwoFactorAuthSetupModule, UserManagementComponent, UserRequestApprovalComponent, UserRequestApprovalService, UserRequestComponent, UserRequestModule };
3702
+ //# sourceMappingURL=verben-authentication-ui.mjs.map