@keycloakify/angular 0.0.1-rc.2 → 0.0.1-rc.4

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 (321) hide show
  1. package/lib/tokens/use-default-css.token.d.ts +2 -0
  2. package/lib/tokens/use-default-css.token.js +3 -0
  3. package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.d.ts +3 -1
  4. package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.js +106 -0
  5. package/login/components/field-errors/field-errors.component.d.ts +2 -2
  6. package/login/components/field-errors/field-errors.component.js +33 -0
  7. package/login/components/group-label/group-label.component.d.ts +3 -1
  8. package/login/components/group-label/group-label.component.js +43 -0
  9. package/login/components/input-field-by-type/input-field-by-type.component.js +46 -0
  10. package/login/components/input-tag/input-tag.component.d.ts +4 -2
  11. package/login/components/input-tag/input-tag.component.js +90 -0
  12. package/login/components/input-tag-selects/input-tag-selects.component.d.ts +4 -2
  13. package/login/components/input-tag-selects/input-tag-selects.component.js +117 -0
  14. package/login/components/logout-other-sessions/logout-other-sessions.component.d.ts +3 -1
  15. package/login/components/logout-other-sessions/logout-other-sessions.component.js +32 -0
  16. package/login/components/password-wrapper/password-wrapper.component.d.ts +3 -1
  17. package/login/components/password-wrapper/password-wrapper.component.js +46 -0
  18. package/login/components/select-tag/select-tag.component.d.ts +4 -2
  19. package/login/components/select-tag/select-tag.component.js +82 -0
  20. package/login/components/textarea-tag/textarea-tag.component.js +49 -0
  21. package/login/components/user-profile-form-fields/user-profile-form-fields.component.d.ts +4 -2
  22. package/login/components/user-profile-form-fields/user-profile-form-fields.component.js +59 -0
  23. package/login/containers/template.component.js +72 -0
  24. package/login/pages/code/code.component.d.ts +4 -2
  25. package/login/pages/code/code.component.js +35 -0
  26. package/login/pages/delete-account-confirm/delete-account-confirm.component.d.ts +4 -2
  27. package/login/pages/delete-account-confirm/delete-account-confirm.component.js +35 -0
  28. package/login/pages/delete-credential/delete-credential.component.d.ts +4 -2
  29. package/login/pages/delete-credential/delete-credential.component.js +40 -0
  30. package/login/pages/error/error.component.d.ts +4 -2
  31. package/login/pages/error/error.component.js +35 -0
  32. package/login/pages/frontchannel-logout/frontchannel-logout.component.d.ts +4 -2
  33. package/login/pages/frontchannel-logout/frontchannel-logout.component.js +44 -0
  34. package/login/pages/idp-review-user-profile/idp-review-user-profile.component.d.ts +4 -2
  35. package/login/pages/idp-review-user-profile/idp-review-user-profile.component.js +45 -0
  36. package/login/pages/info/info.component.d.ts +4 -8
  37. package/login/pages/info/info.component.js +49 -0
  38. package/login/pages/login/login.component.d.ts +4 -2
  39. package/login/pages/login/login.component.js +44 -0
  40. package/login/pages/login-config-totp/login-config-totp.component.d.ts +4 -2
  41. package/login/pages/login-config-totp/login-config-totp.component.js +42 -0
  42. package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.d.ts +4 -2
  43. package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.js +40 -0
  44. package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.d.ts +4 -2
  45. package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.js +40 -0
  46. package/login/pages/login-idp-link-email/login-idp-link-email.component.d.ts +4 -2
  47. package/login/pages/login-idp-link-email/login-idp-link-email.component.js +40 -0
  48. package/login/pages/login-oauth-grant/login-oauth-grant.component.d.ts +4 -2
  49. package/login/pages/login-oauth-grant/login-oauth-grant.component.js +40 -0
  50. package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.d.ts +4 -2
  51. package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.js +40 -0
  52. package/login/pages/login-otp/login-otp.component.d.ts +4 -2
  53. package/login/pages/login-otp/login-otp.component.js +41 -0
  54. package/login/pages/login-page-expired/login-page-expired.component.d.ts +4 -2
  55. package/login/pages/login-page-expired/login-page-expired.component.js +39 -0
  56. package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.d.ts +5 -5
  57. package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.js +84 -0
  58. package/login/pages/login-password/login-password.component.d.ts +4 -2
  59. package/login/pages/login-password/login-password.component.js +43 -0
  60. package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.d.ts +4 -2
  61. package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.js +43 -0
  62. package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.d.ts +4 -2
  63. package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.js +41 -0
  64. package/login/pages/login-reset-otp/login-reset-otp.component.d.ts +4 -2
  65. package/login/pages/login-reset-otp/login-reset-otp.component.js +40 -0
  66. package/login/pages/login-reset-password/login-reset-password.component.d.ts +4 -2
  67. package/login/pages/login-reset-password/login-reset-password.component.js +41 -0
  68. package/login/pages/login-update-password/login-update-password.component.d.ts +4 -2
  69. package/login/pages/login-update-password/login-update-password.component.js +43 -0
  70. package/login/pages/login-update-profile/login-update-profile.component.d.ts +4 -2
  71. package/login/pages/login-update-profile/login-update-profile.component.js +42 -0
  72. package/login/pages/login-username/login-username.component.d.ts +4 -2
  73. package/login/pages/login-username/login-username.component.js +43 -0
  74. package/login/pages/login-verify-email/login-verify-email.component.d.ts +4 -2
  75. package/login/pages/login-verify-email/login-verify-email.component.js +40 -0
  76. package/login/pages/login-x509-info/login-x509-info.component.d.ts +4 -2
  77. package/login/pages/login-x509-info/login-x509-info.component.js +40 -0
  78. package/login/pages/logout-confirm/logout-confirm.component.d.ts +4 -2
  79. package/login/pages/logout-confirm/logout-confirm.component.js +40 -0
  80. package/login/pages/register/register.component.d.ts +4 -2
  81. package/login/pages/register/register.component.js +48 -0
  82. package/login/pages/saml-post-form/saml-post-form.component.d.ts +4 -2
  83. package/login/pages/saml-post-form/saml-post-form.component.js +52 -0
  84. package/login/pages/select-authenticator/select-authenticator.component.d.ts +4 -2
  85. package/login/pages/select-authenticator/select-authenticator.component.js +41 -0
  86. package/login/pages/terms/terms.component.d.ts +4 -2
  87. package/login/pages/terms/terms.component.js +40 -0
  88. package/login/pages/update-email/update-email.component.d.ts +4 -2
  89. package/login/pages/update-email/update-email.component.js +43 -0
  90. package/login/pages/webauthn-authenticate/webauthn-authenticate.component.d.ts +5 -5
  91. package/login/pages/webauthn-authenticate/webauthn-authenticate.component.js +80 -0
  92. package/login/pages/webauthn-error/webauthn-error.component.d.ts +4 -2
  93. package/login/pages/webauthn-error/webauthn-error.component.js +49 -0
  94. package/login/pages/webauthn-register/webauthn-register.component.d.ts +5 -5
  95. package/login/pages/webauthn-register/webauthn-register.component.js +76 -0
  96. package/login/pipes/kc-sanitize.pipe.d.ts +3 -4
  97. package/login/pipes/kc-sanitize.pipe.js +29 -0
  98. package/login/pipes/{to-array.pipe.mjs → to-array.pipe.js} +1 -2
  99. package/login/providers/keycloakify-angular.providers.d.ts +16 -0
  100. package/login/providers/keycloakify-angular.providers.js +53 -0
  101. package/login/services/i18n.service.d.ts +6 -0
  102. package/{lib/services/i18n.service.mjs → login/services/i18n.service.js} +1 -1
  103. package/login/services/login-resource-injector.service.d.ts +1 -1
  104. package/login/services/login-resource-injector.service.js +68 -0
  105. package/login/services/user-profile-form.service.js +1019 -0
  106. package/{lib/providers/keycloakify-angular.providers.d.ts → login/tokens/classes.token.d.ts} +1 -24
  107. package/login/tokens/classes.token.js +3 -0
  108. package/login/tokens/i18n.token.d.ts +2 -0
  109. package/login/tokens/i18n.token.js +3 -0
  110. package/login/tokens/kc-context.token.d.ts +3 -0
  111. package/login/tokens/kc-context.token.js +3 -0
  112. package/login/tokens/make-user-confirm-password.token.d.ts +2 -0
  113. package/login/tokens/make-user-confirm-password.token.js +3 -0
  114. package/package.json +89 -108
  115. package/src/lib/tokens/use-default-css.token.ts +3 -0
  116. package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.html +19 -19
  117. package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.ts +7 -15
  118. package/src/login/components/field-errors/field-errors.component.html +10 -10
  119. package/src/login/components/field-errors/field-errors.component.ts +6 -11
  120. package/src/login/components/group-label/group-label.component.html +25 -25
  121. package/src/login/components/group-label/group-label.component.ts +10 -14
  122. package/src/login/components/input-field-by-type/input-field-by-type.component.html +57 -57
  123. package/src/login/components/input-field-by-type/input-field-by-type.component.ts +6 -23
  124. package/src/login/components/input-tag/input-tag.component.html +41 -45
  125. package/src/login/components/input-tag/input-tag.component.ts +13 -22
  126. package/src/login/components/input-tag-selects/input-tag-selects.component.html +22 -22
  127. package/src/login/components/input-tag-selects/input-tag-selects.component.ts +12 -23
  128. package/src/login/components/logout-other-sessions/logout-other-sessions.component.html +15 -15
  129. package/src/login/components/logout-other-sessions/logout-other-sessions.component.ts +8 -5
  130. package/src/login/components/password-wrapper/password-wrapper.component.html +13 -13
  131. package/src/login/components/password-wrapper/password-wrapper.component.ts +10 -20
  132. package/src/login/components/select-tag/select-tag.component.html +26 -26
  133. package/src/login/components/select-tag/select-tag.component.ts +13 -25
  134. package/src/login/components/textarea-tag/textarea-tag.component.html +13 -15
  135. package/src/login/components/textarea-tag/textarea-tag.component.ts +5 -14
  136. package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.html +71 -71
  137. package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.ts +15 -34
  138. package/src/login/containers/template.component.html +183 -183
  139. package/src/login/containers/template.component.ts +12 -28
  140. package/src/login/pages/code/code.component.html +21 -21
  141. package/src/login/pages/code/code.component.ts +11 -11
  142. package/src/login/pages/delete-account-confirm/delete-account-confirm.component.html +44 -42
  143. package/src/login/pages/delete-account-confirm/delete-account-confirm.component.ts +12 -13
  144. package/src/login/pages/delete-credential/delete-credential.component.html +29 -29
  145. package/src/login/pages/delete-credential/delete-credential.component.ts +12 -19
  146. package/src/login/pages/error/error.component.html +20 -20
  147. package/src/login/pages/error/error.component.ts +11 -11
  148. package/src/login/pages/frontchannel-logout/frontchannel-logout.component.html +31 -31
  149. package/src/login/pages/frontchannel-logout/frontchannel-logout.component.ts +12 -20
  150. package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.html +36 -36
  151. package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.ts +12 -25
  152. package/src/login/pages/info/info.component.html +45 -45
  153. package/src/login/pages/info/info.component.ts +13 -30
  154. package/src/login/pages/login/login.component.html +194 -194
  155. package/src/login/pages/login/login.component.ts +14 -35
  156. package/src/login/pages/login-config-totp/login-config-totp.component.html +189 -179
  157. package/src/login/pages/login-config-totp/login-config-totp.component.ts +13 -32
  158. package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.html +35 -35
  159. package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.ts +12 -19
  160. package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.html +34 -34
  161. package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.ts +12 -21
  162. package/src/login/pages/login-idp-link-email/login-idp-link-email.component.html +32 -30
  163. package/src/login/pages/login-idp-link-email/login-idp-link-email.component.ts +12 -19
  164. package/src/login/pages/login-oauth-grant/login-oauth-grant.component.html +83 -81
  165. package/src/login/pages/login-oauth-grant/login-oauth-grant.component.ts +12 -20
  166. package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.html +57 -57
  167. package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.ts +12 -21
  168. package/src/login/pages/login-otp/login-otp.component.html +96 -96
  169. package/src/login/pages/login-otp/login-otp.component.ts +12 -18
  170. package/src/login/pages/login-page-expired/login-page-expired.component.html +31 -31
  171. package/src/login/pages/login-page-expired/login-page-expired.component.ts +12 -19
  172. package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.html +183 -181
  173. package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.ts +15 -22
  174. package/src/login/pages/login-password/login-password.component.html +82 -82
  175. package/src/login/pages/login-password/login-password.component.ts +12 -25
  176. package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.html +142 -142
  177. package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.ts +13 -28
  178. package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.html +67 -67
  179. package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.ts +14 -24
  180. package/src/login/pages/login-reset-otp/login-reset-otp.component.html +61 -59
  181. package/src/login/pages/login-reset-otp/login-reset-otp.component.ts +13 -19
  182. package/src/login/pages/login-reset-password/login-reset-password.component.html +84 -84
  183. package/src/login/pages/login-reset-password/login-reset-password.component.ts +13 -20
  184. package/src/login/pages/login-update-password/login-update-password.component.html +107 -107
  185. package/src/login/pages/login-update-password/login-update-password.component.ts +14 -31
  186. package/src/login/pages/login-update-profile/login-update-profile.component.html +53 -53
  187. package/src/login/pages/login-update-profile/login-update-profile.component.ts +13 -26
  188. package/src/login/pages/login-username/login-username.component.html +146 -146
  189. package/src/login/pages/login-username/login-username.component.ts +13 -30
  190. package/src/login/pages/login-verify-email/login-verify-email.component.html +22 -22
  191. package/src/login/pages/login-verify-email/login-verify-email.component.ts +13 -20
  192. package/src/login/pages/login-x509-info/login-x509-info.component.html +96 -96
  193. package/src/login/pages/login-x509-info/login-x509-info.component.ts +13 -19
  194. package/src/login/pages/logout-confirm/logout-confirm.component.html +51 -51
  195. package/src/login/pages/logout-confirm/logout-confirm.component.ts +13 -19
  196. package/src/login/pages/register/register.component.html +113 -113
  197. package/src/login/pages/register/register.component.ts +12 -29
  198. package/src/login/pages/saml-post-form/saml-post-form.component.html +47 -48
  199. package/src/login/pages/saml-post-form/saml-post-form.component.ts +12 -20
  200. package/src/login/pages/select-authenticator/select-authenticator.component.html +43 -44
  201. package/src/login/pages/select-authenticator/select-authenticator.component.ts +13 -27
  202. package/src/login/pages/terms/terms.component.html +32 -32
  203. package/src/login/pages/terms/terms.component.ts +13 -19
  204. package/src/login/pages/update-email/update-email.component.html +52 -52
  205. package/src/login/pages/update-email/update-email.component.ts +13 -26
  206. package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.html +146 -148
  207. package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.ts +17 -41
  208. package/src/login/pages/webauthn-error/webauthn-error.component.html +53 -53
  209. package/src/login/pages/webauthn-error/webauthn-error.component.ts +13 -24
  210. package/src/login/pages/webauthn-register/webauthn-register.component.html +73 -73
  211. package/src/login/pages/webauthn-register/webauthn-register.component.ts +18 -32
  212. package/src/login/pipes/kc-sanitize.pipe.ts +9 -11
  213. package/src/login/pipes/to-array.pipe.ts +0 -1
  214. package/src/login/providers/keycloakify-angular.providers.ts +68 -0
  215. package/src/{lib → login}/services/i18n.service.ts +3 -2
  216. package/src/login/services/login-resource-injector.service.ts +4 -3
  217. package/src/login/services/user-profile-form.service.ts +5 -7
  218. package/src/login/tokens/classes.token.ts +6 -0
  219. package/src/login/tokens/i18n.token.ts +3 -0
  220. package/src/login/tokens/kc-context.token.ts +4 -0
  221. package/src/login/tokens/make-user-confirm-password.token.ts +5 -0
  222. package/src/tsconfig.json +6 -1
  223. package/lib/i18n.d.ts +0 -4
  224. package/lib/i18n.mjs +0 -6
  225. package/lib/models/index.d.ts +0 -1
  226. package/lib/models/index.mjs +0 -2
  227. package/lib/providers/keycloakify-angular.providers.mjs +0 -54
  228. package/lib/public-api.d.ts +0 -10
  229. package/lib/public-api.mjs +0 -4
  230. package/lib/services/i18n.service.d.ts +0 -6
  231. package/lib/services/index.d.ts +0 -2
  232. package/lib/services/index.mjs +0 -3
  233. package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.mjs +0 -105
  234. package/login/components/field-errors/field-errors.component.mjs +0 -32
  235. package/login/components/group-label/group-label.component.mjs +0 -41
  236. package/login/components/hello-world/hello-world.component.d.ts +0 -5
  237. package/login/components/hello-world/hello-world.component.mjs +0 -11
  238. package/login/components/index.d.ts +0 -11
  239. package/login/components/index.mjs +0 -12
  240. package/login/components/input-field-by-type/input-field-by-type.component.mjs +0 -52
  241. package/login/components/input-tag/input-tag.component.mjs +0 -89
  242. package/login/components/input-tag-selects/input-tag-selects.component.mjs +0 -115
  243. package/login/components/logout-other-sessions/logout-other-sessions.component.mjs +0 -30
  244. package/login/components/password-wrapper/password-wrapper.component.mjs +0 -44
  245. package/login/components/select-tag/select-tag.component.mjs +0 -80
  246. package/login/components/textarea-tag/textarea-tag.component.mjs +0 -48
  247. package/login/components/user-profile-form-fields/user-profile-form-fields.component.mjs +0 -62
  248. package/login/containers/template.component.mjs +0 -71
  249. package/login/directives/index.d.ts +0 -2
  250. package/login/directives/index.mjs +0 -3
  251. package/login/pages/code/code.component.mjs +0 -32
  252. package/login/pages/delete-account-confirm/delete-account-confirm.component.mjs +0 -32
  253. package/login/pages/delete-credential/delete-credential.component.mjs +0 -37
  254. package/login/pages/error/error.component.mjs +0 -32
  255. package/login/pages/frontchannel-logout/frontchannel-logout.component.mjs +0 -41
  256. package/login/pages/idp-review-user-profile/idp-review-user-profile.component.mjs +0 -47
  257. package/login/pages/info/info.component.mjs +0 -58
  258. package/login/pages/login/login.component.mjs +0 -51
  259. package/login/pages/login-config-totp/login-config-totp.component.mjs +0 -47
  260. package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.mjs +0 -37
  261. package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.mjs +0 -37
  262. package/login/pages/login-idp-link-email/login-idp-link-email.component.mjs +0 -37
  263. package/login/pages/login-oauth-grant/login-oauth-grant.component.mjs +0 -38
  264. package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.mjs +0 -37
  265. package/login/pages/login-otp/login-otp.component.mjs +0 -38
  266. package/login/pages/login-page-expired/login-page-expired.component.mjs +0 -36
  267. package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.mjs +0 -85
  268. package/login/pages/login-password/login-password.component.mjs +0 -46
  269. package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.mjs +0 -45
  270. package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.mjs +0 -38
  271. package/login/pages/login-reset-otp/login-reset-otp.component.mjs +0 -37
  272. package/login/pages/login-reset-password/login-reset-password.component.mjs +0 -38
  273. package/login/pages/login-update-password/login-update-password.component.mjs +0 -47
  274. package/login/pages/login-update-profile/login-update-profile.component.mjs +0 -44
  275. package/login/pages/login-username/login-username.component.mjs +0 -49
  276. package/login/pages/login-verify-email/login-verify-email.component.mjs +0 -37
  277. package/login/pages/login-x509-info/login-x509-info.component.mjs +0 -37
  278. package/login/pages/logout-confirm/logout-confirm.component.mjs +0 -37
  279. package/login/pages/register/register.component.mjs +0 -55
  280. package/login/pages/saml-post-form/saml-post-form.component.mjs +0 -49
  281. package/login/pages/select-authenticator/select-authenticator.component.mjs +0 -45
  282. package/login/pages/terms/terms.component.mjs +0 -37
  283. package/login/pages/update-email/update-email.component.mjs +0 -46
  284. package/login/pages/webauthn-authenticate/webauthn-authenticate.component.mjs +0 -87
  285. package/login/pages/webauthn-error/webauthn-error.component.mjs +0 -51
  286. package/login/pages/webauthn-register/webauthn-register.component.mjs +0 -81
  287. package/login/pipes/advanced-msg-str.pipe.d.ts +0 -8
  288. package/login/pipes/advanced-msg-str.pipe.mjs +0 -19
  289. package/login/pipes/index.d.ts +0 -6
  290. package/login/pipes/index.mjs +0 -7
  291. package/login/pipes/kc-sanitize.pipe.mjs +0 -34
  292. package/login/pipes/msg-str.pipe.d.ts +0 -9
  293. package/login/pipes/msg-str.pipe.mjs +0 -19
  294. package/login/services/index.d.ts +0 -2
  295. package/login/services/index.mjs +0 -3
  296. package/login/services/login-resource-injector.service.mjs +0 -68
  297. package/login/services/user-profile-form.service.mjs +0 -1017
  298. package/src/lib/i18n.ts +0 -9
  299. package/src/lib/models/index.ts +0 -1
  300. package/src/lib/providers/keycloakify-angular.providers.ts +0 -92
  301. package/src/lib/public-api.ts +0 -12
  302. package/src/lib/services/index.ts +0 -2
  303. package/src/login/components/hello-world/hello-world.component.css +0 -0
  304. package/src/login/components/hello-world/hello-world.component.html +0 -1
  305. package/src/login/components/hello-world/hello-world.component.ts +0 -10
  306. package/src/login/components/index.ts +0 -11
  307. package/src/login/directives/index.ts +0 -2
  308. package/src/login/pipes/advanced-msg-str.pipe.ts +0 -13
  309. package/src/login/pipes/index.ts +0 -6
  310. package/src/login/pipes/msg-str.pipe.ts +0 -14
  311. package/src/login/services/index.ts +0 -2
  312. /package/lib/models/{script.model.mjs → script.model.js} +0 -0
  313. /package/lib/services/{resource-injector.service.mjs → resource-injector.service.js} +0 -0
  314. /package/login/{DefaultPage.mjs → DefaultPage.js} +0 -0
  315. /package/login/{KcContext.mjs → KcContext.js} +0 -0
  316. /package/login/classes/{component-reference.class.mjs → component-reference.class.js} +0 -0
  317. /package/login/directives/{attributes.directive.mjs → attributes.directive.js} +0 -0
  318. /package/login/directives/{kc-class.directive.mjs → kc-class.directive.js} +0 -0
  319. /package/login/{i18n.mjs → i18n.js} +0 -0
  320. /package/login/pipes/{input-type.pipe.mjs → input-type.pipe.js} +0 -0
  321. /package/login/pipes/{to-number.pipe.mjs → to-number.pipe.js} +0 -0
@@ -1,35 +1,21 @@
1
- import {
2
- ChangeDetectionStrategy,
3
- Component,
4
- forwardRef,
5
- inject,
6
- input
7
- } from '@angular/core';
8
- import {
9
- CLASSES,
10
- KC_CONTEXT,
11
- USE_DEFAULT_CSS
12
- } from '@keycloakify/angular/lib/public-api';
13
- import { ClassKey } from 'keycloakify/login/lib/kcClsx';
14
- import { KcContext } from 'keycloakify/login/KcContext';
1
+ import { ChangeDetectionStrategy, Component, forwardRef, inject, input } from '@angular/core';
2
+ import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css.token';
15
3
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference.class';
16
4
  import { LogoutOtherSessionsComponent } from '@keycloakify/angular/login/components/logout-other-sessions/logout-other-sessions.component';
17
5
  import { PasswordWrapperComponent } from '@keycloakify/angular/login/components/password-wrapper/password-wrapper.component';
18
6
  import { TemplateComponent } from '@keycloakify/angular/login/containers/template.component';
19
- import { KcClassDirective } from '@keycloakify/angular/login/directives';
7
+ import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class.directive';
20
8
  import { KcSanitizePipe } from '@keycloakify/angular/login/pipes/kc-sanitize.pipe';
21
- import { MsgStrPipe } from '@keycloakify/angular/login/pipes/msg-str.pipe';
9
+ import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes.token';
10
+ import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n.token';
11
+ import { KC_LOGIN_CONTEXT } from '@keycloakify/angular/login/tokens/kc-context.token';
12
+ import { ClassKey } from 'keycloakify/login/lib/kcClsx';
13
+ import { I18n } from '../../i18n';
14
+ import { KcContext } from '../../KcContext';
22
15
 
23
16
  @Component({
24
17
  standalone: true,
25
- imports: [
26
- TemplateComponent,
27
- MsgStrPipe,
28
- KcClassDirective,
29
- PasswordWrapperComponent,
30
- KcSanitizePipe,
31
- LogoutOtherSessionsComponent
32
- ],
18
+ imports: [TemplateComponent, KcClassDirective, PasswordWrapperComponent, KcSanitizePipe, LogoutOtherSessionsComponent],
33
19
  selector: 'kc-root',
34
20
  templateUrl: 'login-update-password.component.html',
35
21
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -41,16 +27,13 @@ import { MsgStrPipe } from '@keycloakify/angular/login/pipes/msg-str.pipe';
41
27
  ]
42
28
  })
43
29
  export class LoginUpdatePasswordComponent extends ComponentReference {
44
- kcContext =
45
- inject<Extract<KcContext, { pageId: 'login-update-password.ftl' }>>(KC_CONTEXT);
30
+ kcContext = inject<Extract<KcContext, { pageId: 'login-update-password.ftl' }>>(KC_LOGIN_CONTEXT);
31
+ i18n = inject<I18n>(LOGIN_I18N);
46
32
  override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
47
- override classes = inject<Partial<Record<ClassKey, string>>>(CLASSES);
33
+ override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);
48
34
  displayRequiredFields = input(false);
49
35
  documentTitle = input<string>();
50
36
  bodyClassName = input<string>();
51
37
  displayInfo = false;
52
- displayMessage = !this.kcContext.messagesPerField.existsError(
53
- 'password',
54
- 'password-confirm'
55
- );
38
+ displayMessage = !this.kcContext.messagesPerField.existsError('password', 'password-confirm');
56
39
  }
@@ -1,59 +1,59 @@
1
1
  @let url = kcContext.url;
2
2
  @let isAppInitiatedAction = kcContext.isAppInitiatedAction;
3
3
  <kc-login-template
4
- [displayInfo]="displayInfo"
5
- [bodyClassName]="bodyClassName()"
6
- [displayMessage]="displayMessage"
7
- [displayRequiredFields]="displayRequiredFields()"
8
- [documentTitle]="documentTitle()"
4
+ [displayInfo]="displayInfo"
5
+ [bodyClassName]="bodyClassName()"
6
+ [displayMessage]="displayMessage"
7
+ [displayRequiredFields]="displayRequiredFields()"
8
+ [documentTitle]="documentTitle()"
9
9
  >
10
- <ng-container headerNode>
11
- {{ 'loginProfileTitle' | msgStr }}
12
- </ng-container>
13
- <ng-container content>
14
- <form
15
- id="kc-update-profile-form"
16
- [kcClass]="'kcFormClass'"
17
- [action]="url.loginAction"
18
- method="post"
19
- >
20
- <kc-user-profile-form-fields (onIsFormSubmittable)="isFormSubmittable.set($event)"></kc-user-profile-form-fields>
21
-
22
- <div [kcClass]="'kcFormGroupClass'">
23
- <div
24
- id="kc-form-options"
25
- [kcClass]="'kcFormOptionsClass'"
26
- >
27
- <div [kcClass]="'kcFormOptionsWrapperClass'"></div>
28
- </div>
29
- <div
30
- id="kc-form-buttons"
31
- [kcClass]="'kcFormButtonsClass'"
10
+ <ng-container headerNode>
11
+ {{ i18n.msgStr('loginProfileTitle') }}
12
+ </ng-container>
13
+ <ng-container content>
14
+ <form
15
+ id="kc-update-profile-form"
16
+ [kcClass]="'kcFormClass'"
17
+ [action]="url.loginAction"
18
+ method="post"
32
19
  >
33
- <input
34
- [disabled]="!isFormSubmittable"
35
- [kcClass]="{
36
- kcButtonClass: true,
37
- kcButtonPrimaryClass: true,
38
- kcButtonBlockClass: !isAppInitiatedAction,
39
- kcButtonLargeClass: true,
40
- }"
41
- type="submit"
42
- value="{{ 'doSubmit' | msgStr }}"
43
- />
44
- @if (isAppInitiatedAction) {
45
- <button
46
- [kcClass]="['kcButtonClass', 'kcButtonDefaultClass', 'kcButtonLargeClass']"
47
- type="submit"
48
- name="cancel-aia"
49
- value="true"
50
- formNoValidate
51
- >
52
- {{ 'doCancel' | msgStr }}
53
- </button>
54
- }
55
- </div>
56
- </div>
57
- </form>
58
- </ng-container>
20
+ <kc-user-profile-form-fields (onIsFormSubmittable)="isFormSubmittable.set($event)"></kc-user-profile-form-fields>
21
+
22
+ <div [kcClass]="'kcFormGroupClass'">
23
+ <div
24
+ id="kc-form-options"
25
+ [kcClass]="'kcFormOptionsClass'"
26
+ >
27
+ <div [kcClass]="'kcFormOptionsWrapperClass'"></div>
28
+ </div>
29
+ <div
30
+ id="kc-form-buttons"
31
+ [kcClass]="'kcFormButtonsClass'"
32
+ >
33
+ <input
34
+ [disabled]="!isFormSubmittable"
35
+ [kcClass]="{
36
+ kcButtonClass: true,
37
+ kcButtonPrimaryClass: true,
38
+ kcButtonBlockClass: !isAppInitiatedAction,
39
+ kcButtonLargeClass: true
40
+ }"
41
+ type="submit"
42
+ [value]="i18n.msgStr('doSubmit')"
43
+ />
44
+ @if (isAppInitiatedAction) {
45
+ <button
46
+ [kcClass]="['kcButtonClass', 'kcButtonDefaultClass', 'kcButtonLargeClass']"
47
+ type="submit"
48
+ name="cancel-aia"
49
+ value="true"
50
+ formNoValidate
51
+ >
52
+ {{ i18n.msgStr('doCancel') }}
53
+ </button>
54
+ }
55
+ </div>
56
+ </div>
57
+ </form>
58
+ </ng-container>
59
59
  </kc-login-template>
@@ -1,32 +1,19 @@
1
- import {
2
- ChangeDetectionStrategy,
3
- Component,
4
- forwardRef,
5
- inject,
6
- input,
7
- signal
8
- } from '@angular/core';
9
- import {
10
- CLASSES,
11
- KC_CONTEXT,
12
- USE_DEFAULT_CSS
13
- } from '@keycloakify/angular/lib/public-api';
14
- import { ClassKey } from 'keycloakify/login/lib/kcClsx';
15
- import { KcContext } from 'keycloakify/login/KcContext';
1
+ import { ChangeDetectionStrategy, Component, forwardRef, inject, input, signal } from '@angular/core';
2
+ import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css.token';
16
3
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference.class';
17
4
  import { UserProfileFormFieldsComponent } from '@keycloakify/angular/login/components/user-profile-form-fields/user-profile-form-fields.component';
18
5
  import { TemplateComponent } from '@keycloakify/angular/login/containers/template.component';
19
- import { KcClassDirective } from '@keycloakify/angular/login/directives';
20
- import { MsgStrPipe } from '@keycloakify/angular/login/pipes/msg-str.pipe';
6
+ import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class.directive';
7
+ import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes.token';
8
+ import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n.token';
9
+ import { KC_LOGIN_CONTEXT } from '@keycloakify/angular/login/tokens/kc-context.token';
10
+ import { ClassKey } from 'keycloakify/login/lib/kcClsx';
11
+ import { I18n } from '../../i18n';
12
+ import { KcContext } from '../../KcContext';
21
13
 
22
14
  @Component({
23
15
  standalone: true,
24
- imports: [
25
- TemplateComponent,
26
- KcClassDirective,
27
- MsgStrPipe,
28
- UserProfileFormFieldsComponent
29
- ],
16
+ imports: [TemplateComponent, KcClassDirective, UserProfileFormFieldsComponent],
30
17
  selector: 'kc-root',
31
18
  templateUrl: 'login-update-profile.component.html',
32
19
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -38,10 +25,10 @@ import { MsgStrPipe } from '@keycloakify/angular/login/pipes/msg-str.pipe';
38
25
  ]
39
26
  })
40
27
  export class LoginUpdateProfileComponent extends ComponentReference {
41
- kcContext =
42
- inject<Extract<KcContext, { pageId: 'login-update-profile.ftl' }>>(KC_CONTEXT);
28
+ kcContext = inject<Extract<KcContext, { pageId: 'login-update-profile.ftl' }>>(KC_LOGIN_CONTEXT);
29
+ i18n = inject<I18n>(LOGIN_I18N);
43
30
  override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
44
- override classes = inject<Partial<Record<ClassKey, string>>>(CLASSES);
31
+ override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);
45
32
  displayRequiredFields = input(true);
46
33
  documentTitle = input<string>();
47
34
  bodyClassName = input<string>();
@@ -6,156 +6,156 @@
6
6
  @let login = kcContext.login;
7
7
 
8
8
  <kc-login-template
9
- [displayInfo]="displayInfo"
10
- [bodyClassName]="bodyClassName()"
11
- [displayMessage]="displayMessage"
12
- [displayRequiredFields]="displayRequiredFields()"
13
- [documentTitle]="documentTitle()"
9
+ [displayInfo]="displayInfo"
10
+ [bodyClassName]="bodyClassName()"
11
+ [displayMessage]="displayMessage"
12
+ [displayRequiredFields]="displayRequiredFields()"
13
+ [documentTitle]="documentTitle()"
14
14
  >
15
- <ng-container headerNode>
16
- {{ 'doLogIn' | msgStr }}
17
- </ng-container>
18
- <ng-container infoNode>
19
- <div id="kc-registration">
20
- <span>
21
- {{ 'noAccount' | msgStr }}
22
- <a
23
- tabindex="6"
24
- [href]="url?.registrationUrl"
25
- >
26
- {{ 'doRegister' | msgStr }}
27
- </a>
28
- </span>
29
- </div>
30
- </ng-container>
31
- <ng-container socialProvidersNode>
32
- @if (!!realm?.password && !!social?.providers?.length) {
33
- <div
34
- id="kc-social-providers"
35
- [kcClass]="'kcFormSocialAccountSectionClass'"
36
- >
37
- <hr />
38
- <h2>{{ 'identity-provider-login-label' | msgStr }}</h2>
39
- <ul
40
- [kcClass]="{
41
- kcFormSocialAccountListClass: true,
42
- kcFormSocialAccountListGridClass: (social?.providers?.length ?? 0) > 3,
43
- }"
44
- >
45
- @for (provider of social?.providers; track provider.alias; let idx = $index) {
46
- <li>
47
- <a
48
- [id]="provider.alias"
49
- [kcClass]="{
50
- kcFormSocialAccountListButtonClass: true,
51
- kcFormSocialAccountGridItem: (social?.providers?.length ?? 0) > 3,
52
- }"
53
- type="button"
54
- [href]="provider.loginUrl"
55
- >
56
- @if (provider.iconClasses) {
57
- <i
58
- [ngClass]="provider.iconClasses"
59
- [kcClass]="'kcCommonLogoIdP'"
60
- aria-hidden="true"
61
- ></i>
62
- }
63
- <span
64
- [ngClass]="{
65
- 'kc-social-icon-text': provider.iconClasses,
66
- }"
67
- [kcClass]="'kcFormSocialAccountNameClass'"
68
- [innerHTML]="provider.displayName | kcSanitize: 'html'"
69
- ></span>
70
- </a>
71
- </li>
72
- }
73
- </ul>
74
- </div>
75
- }
76
- </ng-container>
77
- <ng-container content>
78
- <div id="kc-form">
79
- <div id="kc-form-wrapper">
80
- @if (realm.password) {
81
- <form
82
- id="kc-form-login"
83
- (onSubmit)="isLoginButtonDisabled.set(true)"
84
- [action]="url?.loginAction"
85
- method="post"
86
- >
87
- @if (!usernameHidden) {
88
- <div [kcClass]="'kcFormGroupClass'">
89
- <label
90
- for="username"
91
- [kcClass]="'kcLabelClass'"
15
+ <ng-container headerNode>
16
+ {{ i18n.msgStr('doLogIn') }}
17
+ </ng-container>
18
+ <ng-container infoNode>
19
+ <div id="kc-registration">
20
+ <span>
21
+ {{ i18n.msgStr('noAccount') }}
22
+ <a
23
+ tabindex="6"
24
+ [href]="url?.registrationUrl"
92
25
  >
93
- @if (!realm?.loginWithEmailAllowed) {
94
- {{ 'username' | msgStr }}
95
- } @else if (!realm?.registrationEmailAsUsername) {
96
- {{ 'usernameOrEmail' | msgStr }}
97
- } @else {
98
- {{ 'email' | msgStr }}
99
- }
100
- </label>
101
- <input
102
- tabindex="2"
103
- id="username"
104
- [kcClass]="'kcInputClass'"
105
- name="username"
106
- type="text"
107
- autofocus
108
- autoComplete="off"
109
- [defaultValue]="login?.username || ''"
110
- [attr.aria-invalid]="messagesPerField?.existsError('username')"
111
- />
112
- @if (messagesPerField?.existsError('username')) {
113
- <span
114
- id="input-error"
115
- [kcClass]="'kcInputErrorMessageClass'"
116
- aria-live="polite"
117
- [innerHTML]="messagesPerField?.getFirstError('username') | kcSanitize: 'html'"
118
- >
119
- </span>
120
- }
121
- <!---->
122
- </div>
123
- }
124
-
125
- <div [kcClass]="['kcFormGroupClass', 'kcFormSettingClass']">
126
- <div id="kc-form-options">
127
- @if (realm.rememberMe && !usernameHidden) {
128
- <div class="checkbox">
129
- <label>
130
- <input
131
- tabindex="5"
132
- id="rememberMe"
133
- name="rememberMe"
134
- type="checkbox"
135
- [defaultChecked]="!!login?.rememberMe"
136
- />
137
- {{ 'rememberMe' | msgStr }}
138
- </label>
139
- </div>
140
- }
141
- </div>
142
- </div>
26
+ {{ i18n.msgStr('doRegister') }}
27
+ </a>
28
+ </span>
29
+ </div>
30
+ </ng-container>
31
+ <ng-container socialProvidersNode>
32
+ @if (!!realm?.password && !!social?.providers?.length) {
143
33
  <div
144
- id="kc-form-buttons"
145
- [kcClass]="'kcFormGroupClass'"
34
+ id="kc-social-providers"
35
+ [kcClass]="'kcFormSocialAccountSectionClass'"
146
36
  >
147
- <input
148
- tabindex="4"
149
- [kcClass]="['kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonBlockClass', 'kcButtonLargeClass']"
150
- name="login"
151
- id="kc-login"
152
- type="submit"
153
- [value]="'doLogIn' | msgStr"
154
- />
37
+ <hr />
38
+ <h2>{{ i18n.msgStr('identity-provider-login-label') }}</h2>
39
+ <ul
40
+ [kcClass]="{
41
+ kcFormSocialAccountListClass: true,
42
+ kcFormSocialAccountListGridClass: (social?.providers?.length ?? 0) > 3
43
+ }"
44
+ >
45
+ @for (provider of social?.providers; track provider.alias; let idx = $index) {
46
+ <li>
47
+ <a
48
+ [id]="provider.alias"
49
+ [kcClass]="{
50
+ kcFormSocialAccountListButtonClass: true,
51
+ kcFormSocialAccountGridItem: (social?.providers?.length ?? 0) > 3
52
+ }"
53
+ type="button"
54
+ [href]="provider.loginUrl"
55
+ >
56
+ @if (provider.iconClasses) {
57
+ <i
58
+ [ngClass]="provider.iconClasses"
59
+ [kcClass]="'kcCommonLogoIdP'"
60
+ aria-hidden="true"
61
+ ></i>
62
+ }
63
+ <span
64
+ [ngClass]="{
65
+ 'kc-social-icon-text': provider.iconClasses
66
+ }"
67
+ [kcClass]="'kcFormSocialAccountNameClass'"
68
+ [innerHTML]="provider.displayName | kcSanitize: 'html'"
69
+ ></span>
70
+ </a>
71
+ </li>
72
+ }
73
+ </ul>
155
74
  </div>
156
- </form>
157
75
  }
158
- </div>
159
- </div>
160
- </ng-container>
76
+ </ng-container>
77
+ <ng-container content>
78
+ <div id="kc-form">
79
+ <div id="kc-form-wrapper">
80
+ @if (realm.password) {
81
+ <form
82
+ id="kc-form-login"
83
+ (onSubmit)="isLoginButtonDisabled.set(true)"
84
+ [action]="url?.loginAction"
85
+ method="post"
86
+ >
87
+ @if (!usernameHidden) {
88
+ <div [kcClass]="'kcFormGroupClass'">
89
+ <label
90
+ for="username"
91
+ [kcClass]="'kcLabelClass'"
92
+ >
93
+ @if (!realm?.loginWithEmailAllowed) {
94
+ {{ i18n.msgStr('username') }}
95
+ } @else if (!realm?.registrationEmailAsUsername) {
96
+ {{ i18n.msgStr('usernameOrEmail') }}
97
+ } @else {
98
+ {{ i18n.msgStr('email') }}
99
+ }
100
+ </label>
101
+ <input
102
+ tabindex="2"
103
+ id="username"
104
+ [kcClass]="'kcInputClass'"
105
+ name="username"
106
+ type="text"
107
+ autofocus
108
+ autoComplete="off"
109
+ [defaultValue]="login?.username || ''"
110
+ [attr.aria-invalid]="messagesPerField?.existsError('username')"
111
+ />
112
+ @if (messagesPerField?.existsError('username')) {
113
+ <span
114
+ id="input-error"
115
+ [kcClass]="'kcInputErrorMessageClass'"
116
+ aria-live="polite"
117
+ [innerHTML]="messagesPerField.getFirstError('username') | kcSanitize: 'html'"
118
+ >
119
+ </span>
120
+ }
121
+ <!---->
122
+ </div>
123
+ }
124
+
125
+ <div [kcClass]="['kcFormGroupClass', 'kcFormSettingClass']">
126
+ <div id="kc-form-options">
127
+ @if (realm.rememberMe && !usernameHidden) {
128
+ <div class="checkbox">
129
+ <label>
130
+ <input
131
+ tabindex="5"
132
+ id="rememberMe"
133
+ name="rememberMe"
134
+ type="checkbox"
135
+ [defaultChecked]="!!login?.rememberMe"
136
+ />
137
+ {{ i18n.msgStr('rememberMe') }}
138
+ </label>
139
+ </div>
140
+ }
141
+ </div>
142
+ </div>
143
+ <div
144
+ id="kc-form-buttons"
145
+ [kcClass]="'kcFormGroupClass'"
146
+ >
147
+ <input
148
+ tabindex="4"
149
+ [kcClass]="['kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonBlockClass', 'kcButtonLargeClass']"
150
+ name="login"
151
+ id="kc-login"
152
+ type="submit"
153
+ [value]="i18n.msgStr('doLogIn')"
154
+ />
155
+ </div>
156
+ </form>
157
+ }
158
+ </div>
159
+ </div>
160
+ </ng-container>
161
161
  </kc-login-template>
@@ -1,38 +1,23 @@
1
1
  import { AsyncPipe, NgClass } from '@angular/common';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- forwardRef,
6
- inject,
7
- input,
8
- signal
9
- } from '@angular/core';
10
- import {
11
- CLASSES,
12
- KC_CONTEXT,
13
- USE_DEFAULT_CSS
14
- } from '@keycloakify/angular/lib/public-api';
15
- import { ClassKey } from 'keycloakify/login/lib/kcClsx';
16
- import { KcContext } from 'keycloakify/login/KcContext';
2
+ import { ChangeDetectionStrategy, Component, forwardRef, inject, input, signal } from '@angular/core';
3
+ import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css.token';
17
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference.class';
18
5
  import { TemplateComponent } from '@keycloakify/angular/login/containers/template.component';
19
6
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class.directive';
20
7
  import { KcSanitizePipe } from '@keycloakify/angular/login/pipes/kc-sanitize.pipe';
21
- import { MsgStrPipe } from '@keycloakify/angular/login/pipes/msg-str.pipe';
8
+ import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes.token';
9
+ import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n.token';
10
+ import { KC_LOGIN_CONTEXT } from '@keycloakify/angular/login/tokens/kc-context.token';
11
+ import { ClassKey } from 'keycloakify/login/lib/kcClsx';
12
+ import { I18n } from '../../i18n';
13
+ import { KcContext } from '../../KcContext';
22
14
 
23
15
  @Component({
24
16
  selector: 'kc-root',
25
17
  templateUrl: './login-username.component.html',
26
18
  standalone: true,
27
19
  changeDetection: ChangeDetectionStrategy.OnPush,
28
- imports: [
29
- KcClassDirective,
30
- AsyncPipe,
31
- KcSanitizePipe,
32
- NgClass,
33
- TemplateComponent,
34
- MsgStrPipe
35
- ],
20
+ imports: [KcClassDirective, AsyncPipe, KcSanitizePipe, NgClass, TemplateComponent],
36
21
  providers: [
37
22
  {
38
23
  provide: ComponentReference,
@@ -41,16 +26,14 @@ import { MsgStrPipe } from '@keycloakify/angular/login/pipes/msg-str.pipe';
41
26
  ]
42
27
  })
43
28
  export class LoginUsernameComponent extends ComponentReference {
44
- kcContext = inject<Extract<KcContext, { pageId: 'login-username.ftl' }>>(KC_CONTEXT);
29
+ kcContext = inject<Extract<KcContext, { pageId: 'login-username.ftl' }>>(KC_LOGIN_CONTEXT);
45
30
  displayRequiredFields = input(false);
46
31
  documentTitle = input<string>();
47
32
  bodyClassName = input<string>();
33
+ i18n = inject<I18n>(LOGIN_I18N);
48
34
  override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
49
- override classes = inject<Partial<Record<ClassKey, string>>>(CLASSES);
35
+ override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);
50
36
  isLoginButtonDisabled = signal(false);
51
- displayInfo: boolean =
52
- !!this.kcContext?.realm?.password &&
53
- !!this.kcContext?.realm?.registrationAllowed &&
54
- !this.kcContext?.registrationDisabled;
37
+ displayInfo: boolean = !!this.kcContext?.realm?.password && !!this.kcContext?.realm?.registrationAllowed && !this.kcContext?.registrationDisabled;
55
38
  displayMessage: boolean = !this.kcContext?.messagesPerField?.existsError('username');
56
39
  }
@@ -1,27 +1,27 @@
1
1
  @let url = kcContext.url;
2
2
  @let user = kcContext.user;
3
3
  <kc-login-template
4
- [displayInfo]="displayInfo"
5
- [bodyClassName]="bodyClassName()"
6
- [displayMessage]="displayMessage"
7
- [displayRequiredFields]="displayRequiredFields()"
8
- [documentTitle]="documentTitle()"
4
+ [displayInfo]="displayInfo"
5
+ [bodyClassName]="bodyClassName()"
6
+ [displayMessage]="displayMessage"
7
+ [displayRequiredFields]="displayRequiredFields()"
8
+ [documentTitle]="documentTitle()"
9
9
  >
10
- <ng-container headerNode>
11
- {{ 'emailVerifyTitle' | msgStr }}
12
- </ng-container>
13
- <ng-container infoNode>
14
- <p class="instruction">
15
- {{ 'emailVerifyInstruction2' | msgStr }}
16
- <br />
17
- <a [href]="url.loginAction">{{ 'doClickHere' | msgStr }}</a>
18
- &nbsp;
19
- {{ 'emailVerifyInstruction3' | msgStr }}
20
- </p>
21
- </ng-container>
22
- <ng-container content>
23
- <p class="instruction">
24
- {{ 'emailVerifyInstruction1' | msgStr: user?.email ?? '' }}
25
- </p></ng-container
26
- >
10
+ <ng-container headerNode>
11
+ {{ i18n.msgStr('emailVerifyTitle') }}
12
+ </ng-container>
13
+ <ng-container infoNode>
14
+ <p class="instruction">
15
+ {{ i18n.msgStr('emailVerifyInstruction2') }}
16
+ <br />
17
+ <a [href]="url.loginAction">{{ i18n.msgStr('doClickHere') }}</a>
18
+ &nbsp;
19
+ {{ i18n.msgStr('emailVerifyInstruction3') }}
20
+ </p>
21
+ </ng-container>
22
+ <ng-container content>
23
+ <p class="instruction">
24
+ {{ i18n.msgStr('emailVerifyInstruction1', user?.email ?? '') }}
25
+ </p></ng-container
26
+ >
27
27
  </kc-login-template>