@keycloakify/angular 0.0.1-rc.0

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 (396) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/lib/i18n.d.ts +4 -0
  4. package/lib/i18n.js +6 -0
  5. package/lib/i18n.js.map +1 -0
  6. package/lib/models/index.d.ts +1 -0
  7. package/lib/models/index.js +2 -0
  8. package/lib/models/index.js.map +1 -0
  9. package/lib/models/script.model.d.ts +6 -0
  10. package/lib/models/script.model.js +2 -0
  11. package/lib/models/script.model.js.map +1 -0
  12. package/lib/providers/keycloakify-angular.providers.d.ts +150 -0
  13. package/lib/providers/keycloakify-angular.providers.js +58 -0
  14. package/lib/providers/keycloakify-angular.providers.js.map +1 -0
  15. package/lib/public-api.d.ts +10 -0
  16. package/lib/public-api.js +4 -0
  17. package/lib/public-api.js.map +1 -0
  18. package/lib/services/i18n.service.d.ts +3 -0
  19. package/lib/services/i18n.service.js +14 -0
  20. package/lib/services/i18n.service.js.map +1 -0
  21. package/lib/services/index.d.ts +2 -0
  22. package/lib/services/index.js +3 -0
  23. package/lib/services/index.js.map +1 -0
  24. package/lib/services/resource-injector.service.d.ts +7 -0
  25. package/lib/services/resource-injector.service.js +57 -0
  26. package/lib/services/resource-injector.service.js.map +1 -0
  27. package/login/DefaultPage.d.ts +260 -0
  28. package/login/DefaultPage.js +121 -0
  29. package/login/DefaultPage.js.map +1 -0
  30. package/login/KcContext.d.ts +1 -0
  31. package/login/KcContext.js +2 -0
  32. package/login/KcContext.js.map +1 -0
  33. package/login/classes/component-reference.class.d.ts +5 -0
  34. package/login/classes/component-reference.class.js +3 -0
  35. package/login/classes/component-reference.class.js.map +1 -0
  36. package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.d.ts +13 -0
  37. package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.html +24 -0
  38. package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.js +123 -0
  39. package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.js.map +1 -0
  40. package/login/components/field-errors/field-errors.component.d.ts +11 -0
  41. package/login/components/field-errors/field-errors.component.html +15 -0
  42. package/login/components/field-errors/field-errors.component.js +45 -0
  43. package/login/components/field-errors/field-errors.component.js.map +1 -0
  44. package/login/components/group-label/group-label.component.d.ts +10 -0
  45. package/login/components/group-label/group-label.component.html +30 -0
  46. package/login/components/group-label/group-label.component.js +55 -0
  47. package/login/components/group-label/group-label.component.js.map +1 -0
  48. package/login/components/index.d.ts +11 -0
  49. package/login/components/index.js +12 -0
  50. package/login/components/index.js.map +1 -0
  51. package/login/components/input-field-by-type/input-field-by-type.component.d.ts +13 -0
  52. package/login/components/input-field-by-type/input-field-by-type.component.html +63 -0
  53. package/login/components/input-field-by-type/input-field-by-type.component.js +63 -0
  54. package/login/components/input-field-by-type/input-field-by-type.component.js.map +1 -0
  55. package/login/components/input-tag/input-tag.component.d.ts +17 -0
  56. package/login/components/input-tag/input-tag.component.html +49 -0
  57. package/login/components/input-tag/input-tag.component.js +107 -0
  58. package/login/components/input-tag/input-tag.component.js.map +1 -0
  59. package/login/components/input-tag-selects/input-tag-selects.component.d.ts +23 -0
  60. package/login/components/input-tag-selects/input-tag-selects.component.html +29 -0
  61. package/login/components/input-tag-selects/input-tag-selects.component.js +132 -0
  62. package/login/components/input-tag-selects/input-tag-selects.component.js.map +1 -0
  63. package/login/components/logout-other-sessions/logout-other-sessions.component.d.ts +6 -0
  64. package/login/components/logout-other-sessions/logout-other-sessions.component.html +19 -0
  65. package/login/components/logout-other-sessions/logout-other-sessions.component.js +43 -0
  66. package/login/components/logout-other-sessions/logout-other-sessions.component.js.map +1 -0
  67. package/login/components/password-wrapper/password-wrapper.component.d.ts +12 -0
  68. package/login/components/password-wrapper/password-wrapper.component.html +15 -0
  69. package/login/components/password-wrapper/password-wrapper.component.js +57 -0
  70. package/login/components/password-wrapper/password-wrapper.component.js.map +1 -0
  71. package/login/components/select-tag/select-tag.component.d.ts +16 -0
  72. package/login/components/select-tag/select-tag.component.html +31 -0
  73. package/login/components/select-tag/select-tag.component.js +97 -0
  74. package/login/components/select-tag/select-tag.component.js.map +1 -0
  75. package/login/components/textarea-tag/textarea-tag.component.d.ts +14 -0
  76. package/login/components/textarea-tag/textarea-tag.component.html +18 -0
  77. package/login/components/textarea-tag/textarea-tag.component.js +63 -0
  78. package/login/components/textarea-tag/textarea-tag.component.js.map +1 -0
  79. package/login/components/user-profile-form-fields/user-profile-form-fields.component.d.ts +25 -0
  80. package/login/components/user-profile-form-fields/user-profile-form-fields.component.html +85 -0
  81. package/login/components/user-profile-form-fields/user-profile-form-fields.component.js +74 -0
  82. package/login/components/user-profile-form-fields/user-profile-form-fields.component.js.map +1 -0
  83. package/login/containers/template.component.d.ts +28 -0
  84. package/login/containers/template.component.html +203 -0
  85. package/login/containers/template.component.js +78 -0
  86. package/login/containers/template.component.js.map +1 -0
  87. package/login/directives/attributes.directive.d.ts +5 -0
  88. package/login/directives/attributes.directive.js +34 -0
  89. package/login/directives/attributes.directive.js.map +1 -0
  90. package/login/directives/index.d.ts +2 -0
  91. package/login/directives/index.js +3 -0
  92. package/login/directives/index.js.map +1 -0
  93. package/login/directives/kc-class.directive.d.ts +23 -0
  94. package/login/directives/kc-class.directive.js +146 -0
  95. package/login/directives/kc-class.directive.js.map +1 -0
  96. package/login/i18n.d.ts +4 -0
  97. package/login/i18n.js +2 -0
  98. package/login/i18n.js.map +1 -0
  99. package/login/pages/code/code.component.d.ts +8 -0
  100. package/login/pages/code/code.component.html +26 -0
  101. package/login/pages/code/code.component.js +38 -0
  102. package/login/pages/code/code.component.js.map +1 -0
  103. package/login/pages/delete-account-confirm/delete-account-confirm.component.d.ts +8 -0
  104. package/login/pages/delete-account-confirm/delete-account-confirm.component.html +46 -0
  105. package/login/pages/delete-account-confirm/delete-account-confirm.component.js +38 -0
  106. package/login/pages/delete-account-confirm/delete-account-confirm.component.js.map +1 -0
  107. package/login/pages/delete-credential/delete-credential.component.d.ts +13 -0
  108. package/login/pages/delete-credential/delete-credential.component.html +35 -0
  109. package/login/pages/delete-credential/delete-credential.component.js +43 -0
  110. package/login/pages/delete-credential/delete-credential.component.js.map +1 -0
  111. package/login/pages/error/error.component.d.ts +8 -0
  112. package/login/pages/error/error.component.html +25 -0
  113. package/login/pages/error/error.component.js +38 -0
  114. package/login/pages/error/error.component.js.map +1 -0
  115. package/login/pages/frontchannel-logout/frontchannel-logout.component.d.ts +14 -0
  116. package/login/pages/frontchannel-logout/frontchannel-logout.component.html +35 -0
  117. package/login/pages/frontchannel-logout/frontchannel-logout.component.js +47 -0
  118. package/login/pages/frontchannel-logout/frontchannel-logout.component.js.map +1 -0
  119. package/login/pages/idp-review-user-profile/idp-review-user-profile.component.d.ts +15 -0
  120. package/login/pages/idp-review-user-profile/idp-review-user-profile.component.html +41 -0
  121. package/login/pages/idp-review-user-profile/idp-review-user-profile.component.js +54 -0
  122. package/login/pages/idp-review-user-profile/idp-review-user-profile.component.js.map +1 -0
  123. package/login/pages/info/info.component.d.ts +20 -0
  124. package/login/pages/info/info.component.html +54 -0
  125. package/login/pages/info/info.component.js +61 -0
  126. package/login/pages/info/info.component.js.map +1 -0
  127. package/login/pages/login/login.component.d.ts +14 -0
  128. package/login/pages/login/login.component.html +212 -0
  129. package/login/pages/login/login.component.js +58 -0
  130. package/login/pages/login/login.component.js.map +1 -0
  131. package/login/pages/login-config-totp/login-config-totp.component.d.ts +13 -0
  132. package/login/pages/login-config-totp/login-config-totp.component.html +190 -0
  133. package/login/pages/login-config-totp/login-config-totp.component.js +53 -0
  134. package/login/pages/login-config-totp/login-config-totp.component.js.map +1 -0
  135. package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.d.ts +13 -0
  136. package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.html +41 -0
  137. package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.js +43 -0
  138. package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.js.map +1 -0
  139. package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.d.ts +13 -0
  140. package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.html +40 -0
  141. package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.js +43 -0
  142. package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.js.map +1 -0
  143. package/login/pages/login-idp-link-email/login-idp-link-email.component.d.ts +13 -0
  144. package/login/pages/login-idp-link-email/login-idp-link-email.component.html +37 -0
  145. package/login/pages/login-idp-link-email/login-idp-link-email.component.js +43 -0
  146. package/login/pages/login-idp-link-email/login-idp-link-email.component.js.map +1 -0
  147. package/login/pages/login-oauth-grant/login-oauth-grant.component.d.ts +13 -0
  148. package/login/pages/login-oauth-grant/login-oauth-grant.component.html +92 -0
  149. package/login/pages/login-oauth-grant/login-oauth-grant.component.js +44 -0
  150. package/login/pages/login-oauth-grant/login-oauth-grant.component.js.map +1 -0
  151. package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.d.ts +13 -0
  152. package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.html +63 -0
  153. package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.js +43 -0
  154. package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.js.map +1 -0
  155. package/login/pages/login-otp/login-otp.component.d.ts +13 -0
  156. package/login/pages/login-otp/login-otp.component.html +103 -0
  157. package/login/pages/login-otp/login-otp.component.js +44 -0
  158. package/login/pages/login-otp/login-otp.component.js.map +1 -0
  159. package/login/pages/login-page-expired/login-page-expired.component.d.ts +13 -0
  160. package/login/pages/login-page-expired/login-page-expired.component.html +35 -0
  161. package/login/pages/login-page-expired/login-page-expired.component.js +42 -0
  162. package/login/pages/login-page-expired/login-page-expired.component.js.map +1 -0
  163. package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.d.ts +16 -0
  164. package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.html +203 -0
  165. package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.js +91 -0
  166. package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.js.map +1 -0
  167. package/login/pages/login-password/login-password.component.d.ts +14 -0
  168. package/login/pages/login-password/login-password.component.html +90 -0
  169. package/login/pages/login-password/login-password.component.js +52 -0
  170. package/login/pages/login-password/login-password.component.js.map +1 -0
  171. package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.d.ts +15 -0
  172. package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.html +155 -0
  173. package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.js +51 -0
  174. package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.js.map +1 -0
  175. package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.d.ts +13 -0
  176. package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.html +76 -0
  177. package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.js +44 -0
  178. package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.js.map +1 -0
  179. package/login/pages/login-reset-otp/login-reset-otp.component.d.ts +13 -0
  180. package/login/pages/login-reset-otp/login-reset-otp.component.html +65 -0
  181. package/login/pages/login-reset-otp/login-reset-otp.component.js +43 -0
  182. package/login/pages/login-reset-otp/login-reset-otp.component.js.map +1 -0
  183. package/login/pages/login-reset-password/login-reset-password.component.d.ts +13 -0
  184. package/login/pages/login-reset-password/login-reset-password.component.html +95 -0
  185. package/login/pages/login-reset-password/login-reset-password.component.js +44 -0
  186. package/login/pages/login-reset-password/login-reset-password.component.js.map +1 -0
  187. package/login/pages/login-update-password/login-update-password.component.d.ts +13 -0
  188. package/login/pages/login-update-password/login-update-password.component.html +116 -0
  189. package/login/pages/login-update-password/login-update-password.component.js +53 -0
  190. package/login/pages/login-update-password/login-update-password.component.js.map +1 -0
  191. package/login/pages/login-update-profile/login-update-profile.component.d.ts +14 -0
  192. package/login/pages/login-update-profile/login-update-profile.component.html +59 -0
  193. package/login/pages/login-update-profile/login-update-profile.component.js +50 -0
  194. package/login/pages/login-update-profile/login-update-profile.component.js.map +1 -0
  195. package/login/pages/login-username/login-username.component.d.ts +14 -0
  196. package/login/pages/login-username/login-username.component.html +161 -0
  197. package/login/pages/login-username/login-username.component.js +56 -0
  198. package/login/pages/login-username/login-username.component.js.map +1 -0
  199. package/login/pages/login-verify-email/login-verify-email.component.d.ts +13 -0
  200. package/login/pages/login-verify-email/login-verify-email.component.html +27 -0
  201. package/login/pages/login-verify-email/login-verify-email.component.js +43 -0
  202. package/login/pages/login-verify-email/login-verify-email.component.js.map +1 -0
  203. package/login/pages/login-x509-info/login-x509-info.component.d.ts +13 -0
  204. package/login/pages/login-x509-info/login-x509-info.component.html +102 -0
  205. package/login/pages/login-x509-info/login-x509-info.component.js +43 -0
  206. package/login/pages/login-x509-info/login-x509-info.component.js.map +1 -0
  207. package/login/pages/logout-confirm/logout-confirm.component.d.ts +13 -0
  208. package/login/pages/logout-confirm/logout-confirm.component.html +59 -0
  209. package/login/pages/logout-confirm/logout-confirm.component.js +43 -0
  210. package/login/pages/logout-confirm/logout-confirm.component.js.map +1 -0
  211. package/login/pages/register/register.component.d.ts +16 -0
  212. package/login/pages/register/register.component.html +126 -0
  213. package/login/pages/register/register.component.js +62 -0
  214. package/login/pages/register/register.component.js.map +1 -0
  215. package/login/pages/saml-post-form/saml-post-form.component.d.ts +16 -0
  216. package/login/pages/saml-post-form/saml-post-form.component.html +51 -0
  217. package/login/pages/saml-post-form/saml-post-form.component.js +55 -0
  218. package/login/pages/saml-post-form/saml-post-form.component.js.map +1 -0
  219. package/login/pages/select-authenticator/select-authenticator.component.d.ts +13 -0
  220. package/login/pages/select-authenticator/select-authenticator.component.html +49 -0
  221. package/login/pages/select-authenticator/select-authenticator.component.js +51 -0
  222. package/login/pages/select-authenticator/select-authenticator.component.js.map +1 -0
  223. package/login/pages/terms/terms.component.d.ts +13 -0
  224. package/login/pages/terms/terms.component.html +36 -0
  225. package/login/pages/terms/terms.component.js +43 -0
  226. package/login/pages/terms/terms.component.js.map +1 -0
  227. package/login/pages/update-email/update-email.component.d.ts +14 -0
  228. package/login/pages/update-email/update-email.component.html +58 -0
  229. package/login/pages/update-email/update-email.component.js +52 -0
  230. package/login/pages/update-email/update-email.component.js.map +1 -0
  231. package/login/pages/webauthn-authenticate/webauthn-authenticate.component.d.ts +20 -0
  232. package/login/pages/webauthn-authenticate/webauthn-authenticate.component.html +162 -0
  233. package/login/pages/webauthn-authenticate/webauthn-authenticate.component.js +93 -0
  234. package/login/pages/webauthn-authenticate/webauthn-authenticate.component.js.map +1 -0
  235. package/login/pages/webauthn-error/webauthn-error.component.d.ts +14 -0
  236. package/login/pages/webauthn-error/webauthn-error.component.html +60 -0
  237. package/login/pages/webauthn-error/webauthn-error.component.js +57 -0
  238. package/login/pages/webauthn-error/webauthn-error.component.js.map +1 -0
  239. package/login/pages/webauthn-register/webauthn-register.component.d.ts +19 -0
  240. package/login/pages/webauthn-register/webauthn-register.component.html +82 -0
  241. package/login/pages/webauthn-register/webauthn-register.component.js +86 -0
  242. package/login/pages/webauthn-register/webauthn-register.component.js.map +1 -0
  243. package/login/pipes/advanced-msg-str.pipe.d.ts +5 -0
  244. package/login/pipes/advanced-msg-str.pipe.js +31 -0
  245. package/login/pipes/advanced-msg-str.pipe.js.map +1 -0
  246. package/login/pipes/index.d.ts +6 -0
  247. package/login/pipes/index.js +7 -0
  248. package/login/pipes/index.js.map +1 -0
  249. package/login/pipes/input-type.pipe.d.ts +4 -0
  250. package/login/pipes/input-type.pipe.js +23 -0
  251. package/login/pipes/input-type.pipe.js.map +1 -0
  252. package/login/pipes/kc-sanitize.pipe.d.ts +7 -0
  253. package/login/pipes/kc-sanitize.pipe.js +36 -0
  254. package/login/pipes/kc-sanitize.pipe.js.map +1 -0
  255. package/login/pipes/msg-str.pipe.d.ts +6 -0
  256. package/login/pipes/msg-str.pipe.js +31 -0
  257. package/login/pipes/msg-str.pipe.js.map +1 -0
  258. package/login/pipes/to-array.pipe.d.ts +4 -0
  259. package/login/pipes/to-array.pipe.js +24 -0
  260. package/login/pipes/to-array.pipe.js.map +1 -0
  261. package/login/pipes/to-number.pipe.d.ts +4 -0
  262. package/login/pipes/to-number.pipe.js +23 -0
  263. package/login/pipes/to-number.pipe.js.map +1 -0
  264. package/login/services/index.d.ts +2 -0
  265. package/login/services/index.js +3 -0
  266. package/login/services/index.js.map +1 -0
  267. package/login/services/login-resource-injector.service.d.ts +8 -0
  268. package/login/services/login-resource-injector.service.js +71 -0
  269. package/login/services/login-resource-injector.service.js.map +1 -0
  270. package/login/services/user-profile-form.service.d.ts +82 -0
  271. package/login/services/user-profile-form.service.js +1031 -0
  272. package/login/services/user-profile-form.service.js.map +1 -0
  273. package/package.json +450 -0
  274. package/src/lib/i18n.ts +9 -0
  275. package/src/lib/models/index.ts +1 -0
  276. package/src/lib/models/script.model.ts +6 -0
  277. package/src/lib/providers/keycloakify-angular.providers.ts +92 -0
  278. package/src/lib/public-api.ts +12 -0
  279. package/src/lib/services/i18n.service.ts +5 -0
  280. package/src/lib/services/index.ts +2 -0
  281. package/src/lib/services/resource-injector.service.ts +50 -0
  282. package/src/login/DefaultPage.ts +208 -0
  283. package/src/login/KcContext.ts +1 -0
  284. package/src/login/classes/component-reference.class.ts +5 -0
  285. package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.html +24 -0
  286. package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.ts +144 -0
  287. package/src/login/components/field-errors/field-errors.component.html +15 -0
  288. package/src/login/components/field-errors/field-errors.component.ts +41 -0
  289. package/src/login/components/group-label/group-label.component.html +30 -0
  290. package/src/login/components/group-label/group-label.component.ts +50 -0
  291. package/src/login/components/index.ts +11 -0
  292. package/src/login/components/input-field-by-type/input-field-by-type.component.html +63 -0
  293. package/src/login/components/input-field-by-type/input-field-by-type.component.ts +67 -0
  294. package/src/login/components/input-tag/input-tag.component.html +49 -0
  295. package/src/login/components/input-tag/input-tag.component.ts +108 -0
  296. package/src/login/components/input-tag-selects/input-tag-selects.component.html +29 -0
  297. package/src/login/components/input-tag-selects/input-tag-selects.component.ts +150 -0
  298. package/src/login/components/logout-other-sessions/logout-other-sessions.component.html +19 -0
  299. package/src/login/components/logout-other-sessions/logout-other-sessions.component.ts +31 -0
  300. package/src/login/components/password-wrapper/password-wrapper.component.html +15 -0
  301. package/src/login/components/password-wrapper/password-wrapper.component.ts +61 -0
  302. package/src/login/components/select-tag/select-tag.component.html +31 -0
  303. package/src/login/components/select-tag/select-tag.component.ts +109 -0
  304. package/src/login/components/textarea-tag/textarea-tag.component.html +18 -0
  305. package/src/login/components/textarea-tag/textarea-tag.component.ts +63 -0
  306. package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.html +85 -0
  307. package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.ts +84 -0
  308. package/src/login/containers/template.component.html +203 -0
  309. package/src/login/containers/template.component.ts +94 -0
  310. package/src/login/directives/attributes.directive.ts +23 -0
  311. package/src/login/directives/index.ts +2 -0
  312. package/src/login/directives/kc-class.directive.ts +167 -0
  313. package/src/login/i18n.ts +4 -0
  314. package/src/login/pages/code/code.component.html +26 -0
  315. package/src/login/pages/code/code.component.ts +31 -0
  316. package/src/login/pages/delete-account-confirm/delete-account-confirm.component.html +46 -0
  317. package/src/login/pages/delete-account-confirm/delete-account-confirm.component.ts +32 -0
  318. package/src/login/pages/delete-credential/delete-credential.component.html +35 -0
  319. package/src/login/pages/delete-credential/delete-credential.component.ts +43 -0
  320. package/src/login/pages/error/error.component.html +25 -0
  321. package/src/login/pages/error/error.component.ts +31 -0
  322. package/src/login/pages/frontchannel-logout/frontchannel-logout.component.html +35 -0
  323. package/src/login/pages/frontchannel-logout/frontchannel-logout.component.ts +49 -0
  324. package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.html +41 -0
  325. package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.ts +55 -0
  326. package/src/login/pages/info/info.component.html +54 -0
  327. package/src/login/pages/info/info.component.ts +65 -0
  328. package/src/login/pages/login/login.component.html +212 -0
  329. package/src/login/pages/login/login.component.ts +61 -0
  330. package/src/login/pages/login-config-totp/login-config-totp.component.html +190 -0
  331. package/src/login/pages/login-config-totp/login-config-totp.component.ts +57 -0
  332. package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.html +41 -0
  333. package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.ts +43 -0
  334. package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.html +40 -0
  335. package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.ts +45 -0
  336. package/src/login/pages/login-idp-link-email/login-idp-link-email.component.html +37 -0
  337. package/src/login/pages/login-idp-link-email/login-idp-link-email.component.ts +43 -0
  338. package/src/login/pages/login-oauth-grant/login-oauth-grant.component.html +92 -0
  339. package/src/login/pages/login-oauth-grant/login-oauth-grant.component.ts +44 -0
  340. package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.html +63 -0
  341. package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.ts +45 -0
  342. package/src/login/pages/login-otp/login-otp.component.html +103 -0
  343. package/src/login/pages/login-otp/login-otp.component.ts +43 -0
  344. package/src/login/pages/login-page-expired/login-page-expired.component.html +35 -0
  345. package/src/login/pages/login-page-expired/login-page-expired.component.ts +42 -0
  346. package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.html +203 -0
  347. package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.ts +101 -0
  348. package/src/login/pages/login-password/login-password.component.html +90 -0
  349. package/src/login/pages/login-password/login-password.component.ts +53 -0
  350. package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.html +155 -0
  351. package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.ts +55 -0
  352. package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.html +76 -0
  353. package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.ts +47 -0
  354. package/src/login/pages/login-reset-otp/login-reset-otp.component.html +65 -0
  355. package/src/login/pages/login-reset-otp/login-reset-otp.component.ts +42 -0
  356. package/src/login/pages/login-reset-password/login-reset-password.component.html +95 -0
  357. package/src/login/pages/login-reset-password/login-reset-password.component.ts +44 -0
  358. package/src/login/pages/login-update-password/login-update-password.component.html +116 -0
  359. package/src/login/pages/login-update-password/login-update-password.component.ts +56 -0
  360. package/src/login/pages/login-update-profile/login-update-profile.component.html +59 -0
  361. package/src/login/pages/login-update-profile/login-update-profile.component.ts +52 -0
  362. package/src/login/pages/login-username/login-username.component.html +161 -0
  363. package/src/login/pages/login-username/login-username.component.ts +56 -0
  364. package/src/login/pages/login-verify-email/login-verify-email.component.html +27 -0
  365. package/src/login/pages/login-verify-email/login-verify-email.component.ts +43 -0
  366. package/src/login/pages/login-x509-info/login-x509-info.component.html +102 -0
  367. package/src/login/pages/login-x509-info/login-x509-info.component.ts +42 -0
  368. package/src/login/pages/logout-confirm/logout-confirm.component.html +59 -0
  369. package/src/login/pages/logout-confirm/logout-confirm.component.ts +42 -0
  370. package/src/login/pages/register/register.component.html +126 -0
  371. package/src/login/pages/register/register.component.ts +62 -0
  372. package/src/login/pages/saml-post-form/saml-post-form.component.html +51 -0
  373. package/src/login/pages/saml-post-form/saml-post-form.component.ts +58 -0
  374. package/src/login/pages/select-authenticator/select-authenticator.component.html +49 -0
  375. package/src/login/pages/select-authenticator/select-authenticator.component.ts +51 -0
  376. package/src/login/pages/terms/terms.component.html +36 -0
  377. package/src/login/pages/terms/terms.component.ts +42 -0
  378. package/src/login/pages/update-email/update-email.component.html +58 -0
  379. package/src/login/pages/update-email/update-email.component.ts +52 -0
  380. package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.html +162 -0
  381. package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.ts +106 -0
  382. package/src/login/pages/webauthn-error/webauthn-error.component.html +60 -0
  383. package/src/login/pages/webauthn-error/webauthn-error.component.ts +57 -0
  384. package/src/login/pages/webauthn-register/webauthn-register.component.html +82 -0
  385. package/src/login/pages/webauthn-register/webauthn-register.component.ts +106 -0
  386. package/src/login/pipes/advanced-msg-str.pipe.ts +13 -0
  387. package/src/login/pipes/index.ts +6 -0
  388. package/src/login/pipes/input-type.pipe.ts +15 -0
  389. package/src/login/pipes/kc-sanitize.pipe.ts +36 -0
  390. package/src/login/pipes/msg-str.pipe.ts +14 -0
  391. package/src/login/pipes/to-array.pipe.ts +15 -0
  392. package/src/login/pipes/to-number.pipe.ts +13 -0
  393. package/src/login/services/index.ts +2 -0
  394. package/src/login/services/login-resource-injector.service.ts +72 -0
  395. package/src/login/services/user-profile-form.service.ts +1504 -0
  396. package/src/tsconfig.json +18 -0
@@ -0,0 +1,50 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ computed,
5
+ forwardRef,
6
+ inject,
7
+ input
8
+ } from "@angular/core";
9
+ import { CLASSES, USE_DEFAULT_CSS } from "@keycloakify/angular/lib/public-api";
10
+ import { Attribute } from "keycloakify/login/KcContext";
11
+ import { ClassKey } from "keycloakify/login/lib/kcClsx";
12
+ import { ComponentReference } from "@keycloakify/angular/login/classes/component-reference.class";
13
+ import { AttributesDirective } from "@keycloakify/angular/login/directives/attributes.directive";
14
+ import { KcClassDirective } from "@keycloakify/angular/login/directives/kc-class.directive";
15
+ import { AdvancedMsgStrPipe } from "@keycloakify/angular/login/pipes/advanced-msg-str.pipe";
16
+
17
+ @Component({
18
+ standalone: true,
19
+ styles: [
20
+ `
21
+ :host {
22
+ display: contents;
23
+ }
24
+ `
25
+ ],
26
+ imports: [KcClassDirective, AttributesDirective, AdvancedMsgStrPipe],
27
+ selector: "kc-group-label",
28
+ templateUrl: "group-label.component.html",
29
+ changeDetection: ChangeDetectionStrategy.OnPush,
30
+ providers: [
31
+ {
32
+ provide: ComponentReference,
33
+ useExisting: forwardRef(() => GroupLabelComponent)
34
+ }
35
+ ]
36
+ })
37
+ export class GroupLabelComponent extends ComponentReference {
38
+ attribute = input<Attribute>();
39
+ groupName = input<string>();
40
+ override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
41
+ override classes = inject<Partial<Record<ClassKey, string>>>(CLASSES);
42
+ groupNameRef = computed(() => {
43
+ const attribute = this.attribute();
44
+ const groupName = this.groupName();
45
+ if (attribute?.group?.name !== groupName) {
46
+ return attribute?.group?.name ?? "";
47
+ }
48
+ return "";
49
+ });
50
+ }
@@ -0,0 +1,11 @@
1
+ export * from "./add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component";
2
+ export * from "./field-errors/field-errors.component";
3
+ export * from "./group-label/group-label.component";
4
+ export * from "./input-field-by-type/input-field-by-type.component";
5
+ export * from "./input-tag/input-tag.component";
6
+ export * from "./input-tag-selects/input-tag-selects.component";
7
+ export * from "./logout-other-sessions/logout-other-sessions.component";
8
+ export * from "./password-wrapper/password-wrapper.component";
9
+ export * from "./select-tag/select-tag.component";
10
+ export * from "./textarea-tag/textarea-tag.component";
11
+ export * from "./user-profile-form-fields/user-profile-form-fields.component";
@@ -0,0 +1,63 @@
1
+ @let attr = attribute();
2
+ @if (attr) {
3
+ @let type = attr.annotations.inputType;
4
+ @switch (type) {
5
+ @case ('textarea') {
6
+ <kc-textarea-tag
7
+ [attribute]="attribute()"
8
+ [value]="$any(valueOrValues())"
9
+ [displayableErrors]="displayableErrors()"
10
+ (dispatchFormAction)="dispatchFormAction.emit($event)"
11
+ ></kc-textarea-tag>
12
+ }
13
+ @case (type === 'select' || type === 'multiselect' ? type : '') {
14
+ <kc-select-tag
15
+ [attribute]="attribute()"
16
+ [valueOrValues]="valueOrValues()"
17
+ [displayableErrors]="displayableErrors()"
18
+ (dispatchFormAction)="dispatchFormAction.emit($event)"
19
+ ></kc-select-tag>
20
+ }
21
+ @case (type === 'select-radiobuttons' || type === 'multiselect-checkboxes' ? type : '') {
22
+ <kc-input-tag-selects
23
+ [attribute]="attribute()"
24
+ [valueOrValues]="valueOrValues()"
25
+ [displayableErrors]="displayableErrors()"
26
+ (dispatchFormAction)="dispatchFormAction.emit($event)"
27
+ ></kc-input-tag-selects>
28
+ }
29
+ @default {
30
+ @let values = valueOrValues();
31
+ <!-- if valueOrValues is string skip -->
32
+ @if (values && (values | toArray: true).length) {
33
+ @for (value of values; track value; let i = $index) {
34
+ <kc-input-tag
35
+ [attribute]="attribute()"
36
+ [valueOrValues]="valueOrValues()"
37
+ [fieldIndex]="i"
38
+ [displayableErrors]="displayableErrors()"
39
+ (dispatchFormAction)="dispatchFormAction.emit($event)"
40
+ ></kc-input-tag>
41
+ }
42
+ } @else {
43
+ @if (attr.name === 'password' || attr.name === 'password-confirm') {
44
+ <kc-password-wrapper [passwordInputId]="attr.name">
45
+ <kc-input-tag
46
+ [attribute]="attributePassword()"
47
+ [valueOrValues]="valueOrValues()"
48
+ [displayableErrors]="displayableErrors()"
49
+ (dispatchFormAction)="dispatchFormAction.emit($event)"
50
+ ></kc-input-tag>
51
+ </kc-password-wrapper>
52
+ } @else {
53
+ <kc-input-tag
54
+ [attribute]="attribute()"
55
+ [valueOrValues]="valueOrValues()"
56
+ [displayableErrors]="displayableErrors()"
57
+ (dispatchFormAction)="dispatchFormAction.emit($event)"
58
+ ></kc-input-tag>
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,67 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ computed,
5
+ forwardRef,
6
+ inject,
7
+ input,
8
+ output
9
+ } from "@angular/core";
10
+ import { CLASSES, USE_DEFAULT_CSS } from "@keycloakify/angular/lib/public-api";
11
+ import { Attribute } from "keycloakify/login/KcContext";
12
+ import { ClassKey } from "keycloakify/login/lib/kcClsx";
13
+ import { ComponentReference } from "@keycloakify/angular/login/classes/component-reference.class";
14
+ import { ToArrayPipe } from "@keycloakify/angular/login/pipes/to-array.pipe";
15
+ import {
16
+ FormAction,
17
+ FormFieldError
18
+ } from "@keycloakify/angular/login/services/user-profile-form.service";
19
+ import { InputTagSelectsComponent } from "@keycloakify/angular/login/components/input-tag-selects/input-tag-selects.component";
20
+ import { InputTagComponent } from "@keycloakify/angular/login/components/input-tag/input-tag.component";
21
+ import { PasswordWrapperComponent } from "@keycloakify/angular/login/components/password-wrapper/password-wrapper.component";
22
+ import { SelectTagComponent } from "@keycloakify/angular/login/components/select-tag/select-tag.component";
23
+ import { TextareaTagComponent } from "@keycloakify/angular/login/components/textarea-tag/textarea-tag.component";
24
+
25
+ @Component({
26
+ standalone: true,
27
+ styles: [
28
+ `
29
+ :host {
30
+ display: contents;
31
+ }
32
+ `
33
+ ],
34
+ imports: [
35
+ ToArrayPipe,
36
+ TextareaTagComponent,
37
+ SelectTagComponent,
38
+ InputTagSelectsComponent,
39
+ InputTagComponent,
40
+ PasswordWrapperComponent
41
+ ],
42
+ selector: "kc-input-field-by-type",
43
+ templateUrl: "input-field-by-type.component.html",
44
+ changeDetection: ChangeDetectionStrategy.OnPush,
45
+ providers: [
46
+ {
47
+ provide: ComponentReference,
48
+ useExisting: forwardRef(() => InputFieldByTypeComponent)
49
+ }
50
+ ]
51
+ })
52
+ export class InputFieldByTypeComponent extends ComponentReference {
53
+ attribute = input<Attribute>();
54
+ valueOrValues = input<string | string[]>();
55
+ displayableErrors = input<FormFieldError[]>();
56
+ dispatchFormAction = output<FormAction>();
57
+ override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
58
+ override classes = inject<Partial<Record<ClassKey, string>>>(CLASSES);
59
+
60
+ attributePassword = computed<Attribute>(() => {
61
+ const attribute: Attribute = this.attribute() ?? ({} as Attribute);
62
+ return {
63
+ ...attribute,
64
+ annotations: { ...(attribute.annotations ?? {}), inputType: "password" }
65
+ };
66
+ });
67
+ }
@@ -0,0 +1,49 @@
1
+ @let attr = attribute();
2
+ @let index = fieldIndex();
3
+ @if (attr) {
4
+ <input
5
+ [type]="attr.annotations.inputType | inputType"
6
+ [id]="attr.name"
7
+ [name]="attr.name"
8
+ [value]="value()"
9
+ [kcClass]="'kcInputClass'"
10
+ [attr.aria-invalid]="index && displayableErrors()?.[index] !== undefined"
11
+ [disabled]="attr.readOnly"
12
+ [autocomplete]="attr.autocomplete"
13
+ [placeholder]="attr.annotations.inputTypePlaceholder ?? '' | advancedMsgStr"
14
+ [attr.pattern]="attr.annotations.inputTypePattern"
15
+ [attr.size]="
16
+ !attr.annotations.inputTypeSize
17
+ ? undefined
18
+ : (attr.annotations.inputTypeSize | toNumber) === 0
19
+ ? undefined
20
+ : (attr.annotations.inputTypeSize | toNumber)
21
+ "
22
+ [attr.maxlength]="
23
+ !attr.annotations.inputTypeMaxlength ? undefined : (attr.annotations.inputTypeMaxlength | toNumber)
24
+ "
25
+ [attr.minlength]="
26
+ !attr.annotations.inputTypeMinlength ? undefined : (attr.annotations.inputTypeMinlength | toNumber)
27
+ "
28
+ [attr.max]="attr.annotations.inputTypeMax"
29
+ [attr.min]="attr.annotations.inputTypeMin"
30
+ [attr.step]="attr.annotations.inputTypeStep"
31
+ [kcAttributes]="attr.html5DataAnnotations"
32
+ (change)="onChange($event)"
33
+ (blur)="onBlur()"
34
+ />
35
+ @if (index !== undefined) {
36
+ @let values = valueOrValues() ?? [] | toArray;
37
+ <kc-field-errors
38
+ [attribute]="attr"
39
+ [displayableErrors]="displayableErrors()"
40
+ [fieldIndex]="index"
41
+ ></kc-field-errors>
42
+ <kc-add-remove-buttons-multi-valued-attribute
43
+ [attribute]="attr"
44
+ [values]="values"
45
+ [fieldIndex]="index"
46
+ (dispatchFormAction)="dispatchFormAction.emit($event)"
47
+ ></kc-add-remove-buttons-multi-valued-attribute>
48
+ }
49
+ }
@@ -0,0 +1,108 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ computed,
5
+ forwardRef,
6
+ inject,
7
+ input,
8
+ output
9
+ } from "@angular/core";
10
+ import { CLASSES, USE_DEFAULT_CSS } from "@keycloakify/angular/lib/public-api";
11
+ import { Attribute } from "keycloakify/login/KcContext";
12
+ import { ClassKey } from "keycloakify/login/lib/kcClsx";
13
+ import { ComponentReference } from "@keycloakify/angular/login/classes/component-reference.class";
14
+ import { AttributesDirective } from "@keycloakify/angular/login/directives/attributes.directive";
15
+ import { KcClassDirective } from "@keycloakify/angular/login/directives/kc-class.directive";
16
+ import { AdvancedMsgStrPipe } from "@keycloakify/angular/login/pipes/advanced-msg-str.pipe";
17
+ import { InputTypePipe } from "@keycloakify/angular/login/pipes/input-type.pipe";
18
+ import { ToArrayPipe } from "@keycloakify/angular/login/pipes/to-array.pipe";
19
+ import { ToNumberPipe } from "@keycloakify/angular/login/pipes/to-number.pipe";
20
+ import {
21
+ FormAction,
22
+ FormFieldError
23
+ } from "@keycloakify/angular/login/services/user-profile-form.service";
24
+ import { AddRemoveButtonsMultiValuedAttributeComponent } from "@keycloakify/angular/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component";
25
+ import { FieldErrorsComponent } from "@keycloakify/angular/login/components/field-errors/field-errors.component";
26
+
27
+ @Component({
28
+ standalone: true,
29
+ styles: [
30
+ `
31
+ :host {
32
+ display: contents;
33
+ }
34
+ `
35
+ ],
36
+ imports: [
37
+ InputTypePipe,
38
+ KcClassDirective,
39
+ ToNumberPipe,
40
+ AttributesDirective,
41
+ ToArrayPipe,
42
+ FieldErrorsComponent,
43
+ AddRemoveButtonsMultiValuedAttributeComponent,
44
+ AdvancedMsgStrPipe
45
+ ],
46
+ selector: "kc-input-tag",
47
+ templateUrl: "input-tag.component.html",
48
+ changeDetection: ChangeDetectionStrategy.OnPush,
49
+ providers: [
50
+ {
51
+ provide: ComponentReference,
52
+ useExisting: forwardRef(() => InputTagComponent)
53
+ }
54
+ ]
55
+ })
56
+ export class InputTagComponent extends ComponentReference {
57
+ attribute = input<Attribute>();
58
+ valueOrValues = input<string | string[]>();
59
+ fieldIndex = input<number | undefined>(undefined);
60
+ values = input<string[]>();
61
+ displayableErrors = input<FormFieldError[]>();
62
+ dispatchFormAction = output<FormAction>();
63
+ override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
64
+ override classes = inject<Partial<Record<ClassKey, string>>>(CLASSES);
65
+
66
+ value = computed(() => {
67
+ const valueOrValues = this.valueOrValues();
68
+ const index = this.fieldIndex();
69
+ if (valueOrValues instanceof Array) {
70
+ if (index) {
71
+ return valueOrValues[index] ?? null;
72
+ }
73
+ return null;
74
+ }
75
+ return valueOrValues ?? null;
76
+ });
77
+
78
+ onChange(event: Event) {
79
+ const valueOrValues = this.valueOrValues();
80
+ this.dispatchFormAction.emit({
81
+ action: "update",
82
+ name: this.attribute()?.name ?? "",
83
+ valueOrValues: (() => {
84
+ if (this.fieldIndex !== undefined) {
85
+ if (valueOrValues instanceof Array) {
86
+ return valueOrValues.map((value, i) => {
87
+ if (i === this.fieldIndex()) {
88
+ return (event.target as HTMLInputElement)?.value;
89
+ }
90
+
91
+ return value;
92
+ });
93
+ }
94
+ }
95
+
96
+ return (event.target as HTMLInputElement)?.value;
97
+ })()
98
+ });
99
+ }
100
+
101
+ onBlur() {
102
+ this.dispatchFormAction.emit({
103
+ action: "focus lost",
104
+ name: this.attribute()?.name ?? "",
105
+ fieldIndex: this.fieldIndex()
106
+ });
107
+ }
108
+ }
@@ -0,0 +1,29 @@
1
+ @let inputType = context()?.inputType;
2
+ @let classInput = context()?.classInput;
3
+ @let classLabel = context()?.classLabel;
4
+ @let classDiv = context()?.classDiv;
5
+ @let attr = attribute();
6
+ @if (attr) {
7
+ @for (option of options(); track option) {
8
+ <div [kcClass]="classDiv">
9
+ <input
10
+ [type]="inputType"
11
+ [id]="attr.name + '-' + option"
12
+ [name]="attr.name"
13
+ [value]="option"
14
+ [kcClass]="classInput"
15
+ [attr.aria-invalid]="!!displayableErrors()?.length"
16
+ [disabled]="attr.readOnly"
17
+ [checked]="checked(option)"
18
+ (change)="onChange($event, option)"
19
+ (blur)="onBlur()"
20
+ />
21
+ <label
22
+ [for]="attr.name + '-' + option"
23
+ [kcClass]="[classLabel!, attr.readOnly ? 'kcInputClassRadioCheckboxLabelDisabled' : $any('')]"
24
+ >
25
+ {{ option | advancedMsgStr }}
26
+ </label>
27
+ </div>
28
+ }
29
+ }
@@ -0,0 +1,150 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ computed,
5
+ forwardRef,
6
+ inject,
7
+ input,
8
+ output,
9
+ Signal
10
+ } from "@angular/core";
11
+ import { CLASSES, USE_DEFAULT_CSS } from "@keycloakify/angular/lib/public-api";
12
+ import { Attribute } from "keycloakify/login/KcContext";
13
+ import { ClassKey } from "keycloakify/login/lib/kcClsx";
14
+ import { ComponentReference } from "@keycloakify/angular/login/classes/component-reference.class";
15
+ import { KcClassDirective } from "@keycloakify/angular/login/directives/kc-class.directive";
16
+ import { AdvancedMsgStrPipe } from "@keycloakify/angular/login/pipes/advanced-msg-str.pipe";
17
+ import {
18
+ FormAction,
19
+ FormFieldError
20
+ } from "@keycloakify/angular/login/services/user-profile-form.service";
21
+
22
+ @Component({
23
+ standalone: true,
24
+ styles: [
25
+ `
26
+ :host {
27
+ display: contents;
28
+ }
29
+ `
30
+ ],
31
+ imports: [KcClassDirective, AdvancedMsgStrPipe],
32
+ selector: "kc-input-tag-selects",
33
+ templateUrl: "input-tag-selects.component.html",
34
+ changeDetection: ChangeDetectionStrategy.OnPush,
35
+ providers: [
36
+ {
37
+ provide: ComponentReference,
38
+ useExisting: forwardRef(() => InputTagSelectsComponent)
39
+ }
40
+ ]
41
+ })
42
+ export class InputTagSelectsComponent extends ComponentReference {
43
+ attribute = input<Attribute>();
44
+ valueOrValues = input<string | string[]>();
45
+ dispatchFormAction = output<FormAction>();
46
+ displayableErrors = input<FormFieldError[]>();
47
+ override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
48
+ override classes = inject<Partial<Record<ClassKey, string>>>(CLASSES);
49
+
50
+ context: Signal<{
51
+ inputType: "radio" | "checkbox";
52
+ classDiv: ClassKey;
53
+ classInput: ClassKey;
54
+ classLabel: ClassKey;
55
+ } | null> = computed(() => {
56
+ const attribute = this.attribute();
57
+ if (attribute) {
58
+ const { inputType } = attribute.annotations;
59
+ switch (inputType) {
60
+ case "select-radiobuttons":
61
+ return {
62
+ inputType: "radio",
63
+ classDiv: "kcInputClassRadio",
64
+ classInput: "kcInputClassRadioInput",
65
+ classLabel: "kcInputClassRadioLabel"
66
+ };
67
+ case "multiselect-checkboxes":
68
+ return {
69
+ inputType: "checkbox",
70
+ classDiv: "kcInputClassCheckbox",
71
+ classInput: "kcInputClassCheckboxInput",
72
+ classLabel: "kcInputClassCheckboxLabel"
73
+ };
74
+ }
75
+ }
76
+ return null;
77
+ });
78
+
79
+ options = computed(() => {
80
+ const attribute = this.attribute();
81
+ if (attribute) {
82
+ return (() => {
83
+ walk: {
84
+ const { inputOptionsFromValidation } = attribute.annotations;
85
+
86
+ if (inputOptionsFromValidation === undefined) {
87
+ break walk;
88
+ }
89
+
90
+ const validator = (
91
+ attribute.validators as Record<string, { options?: string[] }>
92
+ )[inputOptionsFromValidation];
93
+
94
+ if (validator === undefined) {
95
+ break walk;
96
+ }
97
+
98
+ if (validator.options === undefined) {
99
+ break walk;
100
+ }
101
+
102
+ return validator.options;
103
+ }
104
+
105
+ return attribute.validators.options?.options ?? [];
106
+ })();
107
+ }
108
+ return [];
109
+ });
110
+
111
+ checked(option: string) {
112
+ const valueOrValues = this.valueOrValues();
113
+ if (valueOrValues instanceof Array) {
114
+ return valueOrValues.includes(option);
115
+ }
116
+ return valueOrValues === option;
117
+ }
118
+
119
+ onChange(event: Event, option: string) {
120
+ const valueOrValues = this.valueOrValues();
121
+ const isChecked = (event.target as HTMLInputElement).checked;
122
+ this.dispatchFormAction.emit({
123
+ action: "update",
124
+ name: this.attribute()?.name ?? "",
125
+ valueOrValues: (() => {
126
+ if (valueOrValues instanceof Array) {
127
+ const newValues = [...valueOrValues];
128
+
129
+ if (isChecked) {
130
+ newValues.push(option);
131
+ } else {
132
+ newValues.splice(newValues.indexOf(option), 1);
133
+ }
134
+
135
+ return newValues;
136
+ }
137
+
138
+ return (event.target as HTMLInputElement)?.checked ? option : "";
139
+ })()
140
+ });
141
+ }
142
+
143
+ onBlur() {
144
+ this.dispatchFormAction.emit({
145
+ action: "focus lost",
146
+ name: this.attribute()?.name ?? "",
147
+ fieldIndex: undefined
148
+ });
149
+ }
150
+ }
@@ -0,0 +1,19 @@
1
+ <div
2
+ id="kc-form-options"
3
+ [kcClass]="'kcFormOptionsClass'"
4
+ >
5
+ <div [kcClass]="'kcFormOptionsWrapperClass'">
6
+ <div class="checkbox">
7
+ <label for="logout-sessions">
8
+ <input
9
+ type="checkbox"
10
+ id="logout-sessions"
11
+ name="logout-sessions"
12
+ value="on"
13
+ defaultChecked="true"
14
+ />
15
+ {{ 'logoutOtherSessions' | msgStr }}
16
+ </label>
17
+ </div>
18
+ </div>
19
+ </div>
@@ -0,0 +1,31 @@
1
+ import { ChangeDetectionStrategy, Component, forwardRef, inject } from "@angular/core";
2
+ import { CLASSES, USE_DEFAULT_CSS } from "@keycloakify/angular/lib/public-api";
3
+ import { ClassKey } from "keycloakify/login/lib/kcClsx";
4
+ import { ComponentReference } from "@keycloakify/angular/login/classes/component-reference.class";
5
+ import { KcClassDirective } from "@keycloakify/angular/login/directives/kc-class.directive";
6
+ import { MsgStrPipe } from "@keycloakify/angular/login/pipes/msg-str.pipe";
7
+
8
+ @Component({
9
+ selector: "kc-logout-other-sessions",
10
+ styles: [
11
+ `
12
+ :host {
13
+ display: contents;
14
+ }
15
+ `
16
+ ],
17
+ standalone: true,
18
+ imports: [KcClassDirective, MsgStrPipe],
19
+ changeDetection: ChangeDetectionStrategy.OnPush,
20
+ templateUrl: "./logout-other-sessions.component.html",
21
+ providers: [
22
+ {
23
+ provide: ComponentReference,
24
+ useExisting: forwardRef(() => LogoutOtherSessionsComponent)
25
+ }
26
+ ]
27
+ })
28
+ export class LogoutOtherSessionsComponent extends ComponentReference {
29
+ override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
30
+ override classes = inject<Partial<Record<ClassKey, string>>>(CLASSES);
31
+ }
@@ -0,0 +1,15 @@
1
+ <div [kcClass]="'kcInputGroup'">
2
+ <ng-content></ng-content>
3
+ <button
4
+ type="button"
5
+ [kcClass]="'kcFormPasswordVisibilityButtonClass'"
6
+ [attr.aria-label]="(isPasswordRevealed() ? 'hidePassword' : 'showPassword') | msgStr"
7
+ [attr.aria-controls]="passwordInputId()"
8
+ (click)="togglePasswordVisibility()"
9
+ >
10
+ <i
11
+ [kcClass]="isPasswordRevealed() ? 'kcFormPasswordVisibilityIconHide' : 'kcFormPasswordVisibilityIconShow'"
12
+ aria-hidden="true"
13
+ ></i>
14
+ </button>
15
+ </div>
@@ -0,0 +1,61 @@
1
+ import { AsyncPipe } from "@angular/common";
2
+ import {
3
+ ChangeDetectionStrategy,
4
+ Component,
5
+ forwardRef,
6
+ inject,
7
+ input,
8
+ Renderer2,
9
+ signal,
10
+ WritableSignal
11
+ } from "@angular/core";
12
+ import { CLASSES, USE_DEFAULT_CSS } from "@keycloakify/angular/lib/public-api";
13
+ import { ClassKey } from "keycloakify/login/lib/kcClsx";
14
+ import { ComponentReference } from "@keycloakify/angular/login/classes/component-reference.class";
15
+ import { KcClassDirective } from "@keycloakify/angular/login/directives/kc-class.directive";
16
+ import { MsgStrPipe } from "@keycloakify/angular/login/pipes/msg-str.pipe";
17
+
18
+ @Component({
19
+ selector: "kc-password-wrapper",
20
+ styles: [
21
+ `
22
+ :host {
23
+ display: contents;
24
+ }
25
+ `
26
+ ],
27
+ standalone: true,
28
+ changeDetection: ChangeDetectionStrategy.OnPush,
29
+ imports: [KcClassDirective, AsyncPipe, MsgStrPipe],
30
+ templateUrl: "./password-wrapper.component.html",
31
+ providers: [
32
+ {
33
+ provide: ComponentReference,
34
+ useExisting: forwardRef(() => PasswordWrapperComponent)
35
+ }
36
+ ]
37
+ })
38
+ export class PasswordWrapperComponent extends ComponentReference {
39
+ private renderer = inject(Renderer2);
40
+ passwordInputId = input.required<string>();
41
+ override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
42
+ override classes = inject<Partial<Record<ClassKey, string>>>(CLASSES);
43
+
44
+ isPasswordRevealed: WritableSignal<boolean> = signal(false);
45
+
46
+ togglePasswordVisibility(): void {
47
+ this.isPasswordRevealed.update(revealed => !revealed);
48
+ this.setPasswordInputType();
49
+ }
50
+
51
+ private setPasswordInputType(): void {
52
+ const input = document.getElementById(this.passwordInputId());
53
+ if (input) {
54
+ this.renderer.setProperty(
55
+ input,
56
+ "type",
57
+ this.isPasswordRevealed() ? "text" : "password"
58
+ );
59
+ }
60
+ }
61
+ }