@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.
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/lib/i18n.d.ts +4 -0
- package/lib/i18n.js +6 -0
- package/lib/i18n.js.map +1 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/models/index.js +2 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/script.model.d.ts +6 -0
- package/lib/models/script.model.js +2 -0
- package/lib/models/script.model.js.map +1 -0
- package/lib/providers/keycloakify-angular.providers.d.ts +150 -0
- package/lib/providers/keycloakify-angular.providers.js +58 -0
- package/lib/providers/keycloakify-angular.providers.js.map +1 -0
- package/lib/public-api.d.ts +10 -0
- package/lib/public-api.js +4 -0
- package/lib/public-api.js.map +1 -0
- package/lib/services/i18n.service.d.ts +3 -0
- package/lib/services/i18n.service.js +14 -0
- package/lib/services/i18n.service.js.map +1 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.js +3 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/resource-injector.service.d.ts +7 -0
- package/lib/services/resource-injector.service.js +57 -0
- package/lib/services/resource-injector.service.js.map +1 -0
- package/login/DefaultPage.d.ts +260 -0
- package/login/DefaultPage.js +121 -0
- package/login/DefaultPage.js.map +1 -0
- package/login/KcContext.d.ts +1 -0
- package/login/KcContext.js +2 -0
- package/login/KcContext.js.map +1 -0
- package/login/classes/component-reference.class.d.ts +5 -0
- package/login/classes/component-reference.class.js +3 -0
- package/login/classes/component-reference.class.js.map +1 -0
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.d.ts +13 -0
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.html +24 -0
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.js +123 -0
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.js.map +1 -0
- package/login/components/field-errors/field-errors.component.d.ts +11 -0
- package/login/components/field-errors/field-errors.component.html +15 -0
- package/login/components/field-errors/field-errors.component.js +45 -0
- package/login/components/field-errors/field-errors.component.js.map +1 -0
- package/login/components/group-label/group-label.component.d.ts +10 -0
- package/login/components/group-label/group-label.component.html +30 -0
- package/login/components/group-label/group-label.component.js +55 -0
- package/login/components/group-label/group-label.component.js.map +1 -0
- package/login/components/index.d.ts +11 -0
- package/login/components/index.js +12 -0
- package/login/components/index.js.map +1 -0
- package/login/components/input-field-by-type/input-field-by-type.component.d.ts +13 -0
- package/login/components/input-field-by-type/input-field-by-type.component.html +63 -0
- package/login/components/input-field-by-type/input-field-by-type.component.js +63 -0
- package/login/components/input-field-by-type/input-field-by-type.component.js.map +1 -0
- package/login/components/input-tag/input-tag.component.d.ts +17 -0
- package/login/components/input-tag/input-tag.component.html +49 -0
- package/login/components/input-tag/input-tag.component.js +107 -0
- package/login/components/input-tag/input-tag.component.js.map +1 -0
- package/login/components/input-tag-selects/input-tag-selects.component.d.ts +23 -0
- package/login/components/input-tag-selects/input-tag-selects.component.html +29 -0
- package/login/components/input-tag-selects/input-tag-selects.component.js +132 -0
- package/login/components/input-tag-selects/input-tag-selects.component.js.map +1 -0
- package/login/components/logout-other-sessions/logout-other-sessions.component.d.ts +6 -0
- package/login/components/logout-other-sessions/logout-other-sessions.component.html +19 -0
- package/login/components/logout-other-sessions/logout-other-sessions.component.js +43 -0
- package/login/components/logout-other-sessions/logout-other-sessions.component.js.map +1 -0
- package/login/components/password-wrapper/password-wrapper.component.d.ts +12 -0
- package/login/components/password-wrapper/password-wrapper.component.html +15 -0
- package/login/components/password-wrapper/password-wrapper.component.js +57 -0
- package/login/components/password-wrapper/password-wrapper.component.js.map +1 -0
- package/login/components/select-tag/select-tag.component.d.ts +16 -0
- package/login/components/select-tag/select-tag.component.html +31 -0
- package/login/components/select-tag/select-tag.component.js +97 -0
- package/login/components/select-tag/select-tag.component.js.map +1 -0
- package/login/components/textarea-tag/textarea-tag.component.d.ts +14 -0
- package/login/components/textarea-tag/textarea-tag.component.html +18 -0
- package/login/components/textarea-tag/textarea-tag.component.js +63 -0
- package/login/components/textarea-tag/textarea-tag.component.js.map +1 -0
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.d.ts +25 -0
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.html +85 -0
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.js +74 -0
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.js.map +1 -0
- package/login/containers/template.component.d.ts +28 -0
- package/login/containers/template.component.html +203 -0
- package/login/containers/template.component.js +78 -0
- package/login/containers/template.component.js.map +1 -0
- package/login/directives/attributes.directive.d.ts +5 -0
- package/login/directives/attributes.directive.js +34 -0
- package/login/directives/attributes.directive.js.map +1 -0
- package/login/directives/index.d.ts +2 -0
- package/login/directives/index.js +3 -0
- package/login/directives/index.js.map +1 -0
- package/login/directives/kc-class.directive.d.ts +23 -0
- package/login/directives/kc-class.directive.js +146 -0
- package/login/directives/kc-class.directive.js.map +1 -0
- package/login/i18n.d.ts +4 -0
- package/login/i18n.js +2 -0
- package/login/i18n.js.map +1 -0
- package/login/pages/code/code.component.d.ts +8 -0
- package/login/pages/code/code.component.html +26 -0
- package/login/pages/code/code.component.js +38 -0
- package/login/pages/code/code.component.js.map +1 -0
- package/login/pages/delete-account-confirm/delete-account-confirm.component.d.ts +8 -0
- package/login/pages/delete-account-confirm/delete-account-confirm.component.html +46 -0
- package/login/pages/delete-account-confirm/delete-account-confirm.component.js +38 -0
- package/login/pages/delete-account-confirm/delete-account-confirm.component.js.map +1 -0
- package/login/pages/delete-credential/delete-credential.component.d.ts +13 -0
- package/login/pages/delete-credential/delete-credential.component.html +35 -0
- package/login/pages/delete-credential/delete-credential.component.js +43 -0
- package/login/pages/delete-credential/delete-credential.component.js.map +1 -0
- package/login/pages/error/error.component.d.ts +8 -0
- package/login/pages/error/error.component.html +25 -0
- package/login/pages/error/error.component.js +38 -0
- package/login/pages/error/error.component.js.map +1 -0
- package/login/pages/frontchannel-logout/frontchannel-logout.component.d.ts +14 -0
- package/login/pages/frontchannel-logout/frontchannel-logout.component.html +35 -0
- package/login/pages/frontchannel-logout/frontchannel-logout.component.js +47 -0
- package/login/pages/frontchannel-logout/frontchannel-logout.component.js.map +1 -0
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.d.ts +15 -0
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.html +41 -0
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.js +54 -0
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.js.map +1 -0
- package/login/pages/info/info.component.d.ts +20 -0
- package/login/pages/info/info.component.html +54 -0
- package/login/pages/info/info.component.js +61 -0
- package/login/pages/info/info.component.js.map +1 -0
- package/login/pages/login/login.component.d.ts +14 -0
- package/login/pages/login/login.component.html +212 -0
- package/login/pages/login/login.component.js +58 -0
- package/login/pages/login/login.component.js.map +1 -0
- package/login/pages/login-config-totp/login-config-totp.component.d.ts +13 -0
- package/login/pages/login-config-totp/login-config-totp.component.html +190 -0
- package/login/pages/login-config-totp/login-config-totp.component.js +53 -0
- package/login/pages/login-config-totp/login-config-totp.component.js.map +1 -0
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.d.ts +13 -0
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.html +41 -0
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.js +43 -0
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.js.map +1 -0
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.d.ts +13 -0
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.html +40 -0
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.js +43 -0
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.js.map +1 -0
- package/login/pages/login-idp-link-email/login-idp-link-email.component.d.ts +13 -0
- package/login/pages/login-idp-link-email/login-idp-link-email.component.html +37 -0
- package/login/pages/login-idp-link-email/login-idp-link-email.component.js +43 -0
- package/login/pages/login-idp-link-email/login-idp-link-email.component.js.map +1 -0
- package/login/pages/login-oauth-grant/login-oauth-grant.component.d.ts +13 -0
- package/login/pages/login-oauth-grant/login-oauth-grant.component.html +92 -0
- package/login/pages/login-oauth-grant/login-oauth-grant.component.js +44 -0
- package/login/pages/login-oauth-grant/login-oauth-grant.component.js.map +1 -0
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.d.ts +13 -0
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.html +63 -0
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.js +43 -0
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.js.map +1 -0
- package/login/pages/login-otp/login-otp.component.d.ts +13 -0
- package/login/pages/login-otp/login-otp.component.html +103 -0
- package/login/pages/login-otp/login-otp.component.js +44 -0
- package/login/pages/login-otp/login-otp.component.js.map +1 -0
- package/login/pages/login-page-expired/login-page-expired.component.d.ts +13 -0
- package/login/pages/login-page-expired/login-page-expired.component.html +35 -0
- package/login/pages/login-page-expired/login-page-expired.component.js +42 -0
- package/login/pages/login-page-expired/login-page-expired.component.js.map +1 -0
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.d.ts +16 -0
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.html +203 -0
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.js +91 -0
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.js.map +1 -0
- package/login/pages/login-password/login-password.component.d.ts +14 -0
- package/login/pages/login-password/login-password.component.html +90 -0
- package/login/pages/login-password/login-password.component.js +52 -0
- package/login/pages/login-password/login-password.component.js.map +1 -0
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.d.ts +15 -0
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.html +155 -0
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.js +51 -0
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.js.map +1 -0
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.d.ts +13 -0
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.html +76 -0
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.js +44 -0
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.js.map +1 -0
- package/login/pages/login-reset-otp/login-reset-otp.component.d.ts +13 -0
- package/login/pages/login-reset-otp/login-reset-otp.component.html +65 -0
- package/login/pages/login-reset-otp/login-reset-otp.component.js +43 -0
- package/login/pages/login-reset-otp/login-reset-otp.component.js.map +1 -0
- package/login/pages/login-reset-password/login-reset-password.component.d.ts +13 -0
- package/login/pages/login-reset-password/login-reset-password.component.html +95 -0
- package/login/pages/login-reset-password/login-reset-password.component.js +44 -0
- package/login/pages/login-reset-password/login-reset-password.component.js.map +1 -0
- package/login/pages/login-update-password/login-update-password.component.d.ts +13 -0
- package/login/pages/login-update-password/login-update-password.component.html +116 -0
- package/login/pages/login-update-password/login-update-password.component.js +53 -0
- package/login/pages/login-update-password/login-update-password.component.js.map +1 -0
- package/login/pages/login-update-profile/login-update-profile.component.d.ts +14 -0
- package/login/pages/login-update-profile/login-update-profile.component.html +59 -0
- package/login/pages/login-update-profile/login-update-profile.component.js +50 -0
- package/login/pages/login-update-profile/login-update-profile.component.js.map +1 -0
- package/login/pages/login-username/login-username.component.d.ts +14 -0
- package/login/pages/login-username/login-username.component.html +161 -0
- package/login/pages/login-username/login-username.component.js +56 -0
- package/login/pages/login-username/login-username.component.js.map +1 -0
- package/login/pages/login-verify-email/login-verify-email.component.d.ts +13 -0
- package/login/pages/login-verify-email/login-verify-email.component.html +27 -0
- package/login/pages/login-verify-email/login-verify-email.component.js +43 -0
- package/login/pages/login-verify-email/login-verify-email.component.js.map +1 -0
- package/login/pages/login-x509-info/login-x509-info.component.d.ts +13 -0
- package/login/pages/login-x509-info/login-x509-info.component.html +102 -0
- package/login/pages/login-x509-info/login-x509-info.component.js +43 -0
- package/login/pages/login-x509-info/login-x509-info.component.js.map +1 -0
- package/login/pages/logout-confirm/logout-confirm.component.d.ts +13 -0
- package/login/pages/logout-confirm/logout-confirm.component.html +59 -0
- package/login/pages/logout-confirm/logout-confirm.component.js +43 -0
- package/login/pages/logout-confirm/logout-confirm.component.js.map +1 -0
- package/login/pages/register/register.component.d.ts +16 -0
- package/login/pages/register/register.component.html +126 -0
- package/login/pages/register/register.component.js +62 -0
- package/login/pages/register/register.component.js.map +1 -0
- package/login/pages/saml-post-form/saml-post-form.component.d.ts +16 -0
- package/login/pages/saml-post-form/saml-post-form.component.html +51 -0
- package/login/pages/saml-post-form/saml-post-form.component.js +55 -0
- package/login/pages/saml-post-form/saml-post-form.component.js.map +1 -0
- package/login/pages/select-authenticator/select-authenticator.component.d.ts +13 -0
- package/login/pages/select-authenticator/select-authenticator.component.html +49 -0
- package/login/pages/select-authenticator/select-authenticator.component.js +51 -0
- package/login/pages/select-authenticator/select-authenticator.component.js.map +1 -0
- package/login/pages/terms/terms.component.d.ts +13 -0
- package/login/pages/terms/terms.component.html +36 -0
- package/login/pages/terms/terms.component.js +43 -0
- package/login/pages/terms/terms.component.js.map +1 -0
- package/login/pages/update-email/update-email.component.d.ts +14 -0
- package/login/pages/update-email/update-email.component.html +58 -0
- package/login/pages/update-email/update-email.component.js +52 -0
- package/login/pages/update-email/update-email.component.js.map +1 -0
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.d.ts +20 -0
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.html +162 -0
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.js +93 -0
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.js.map +1 -0
- package/login/pages/webauthn-error/webauthn-error.component.d.ts +14 -0
- package/login/pages/webauthn-error/webauthn-error.component.html +60 -0
- package/login/pages/webauthn-error/webauthn-error.component.js +57 -0
- package/login/pages/webauthn-error/webauthn-error.component.js.map +1 -0
- package/login/pages/webauthn-register/webauthn-register.component.d.ts +19 -0
- package/login/pages/webauthn-register/webauthn-register.component.html +82 -0
- package/login/pages/webauthn-register/webauthn-register.component.js +86 -0
- package/login/pages/webauthn-register/webauthn-register.component.js.map +1 -0
- package/login/pipes/advanced-msg-str.pipe.d.ts +5 -0
- package/login/pipes/advanced-msg-str.pipe.js +31 -0
- package/login/pipes/advanced-msg-str.pipe.js.map +1 -0
- package/login/pipes/index.d.ts +6 -0
- package/login/pipes/index.js +7 -0
- package/login/pipes/index.js.map +1 -0
- package/login/pipes/input-type.pipe.d.ts +4 -0
- package/login/pipes/input-type.pipe.js +23 -0
- package/login/pipes/input-type.pipe.js.map +1 -0
- package/login/pipes/kc-sanitize.pipe.d.ts +7 -0
- package/login/pipes/kc-sanitize.pipe.js +36 -0
- package/login/pipes/kc-sanitize.pipe.js.map +1 -0
- package/login/pipes/msg-str.pipe.d.ts +6 -0
- package/login/pipes/msg-str.pipe.js +31 -0
- package/login/pipes/msg-str.pipe.js.map +1 -0
- package/login/pipes/to-array.pipe.d.ts +4 -0
- package/login/pipes/to-array.pipe.js +24 -0
- package/login/pipes/to-array.pipe.js.map +1 -0
- package/login/pipes/to-number.pipe.d.ts +4 -0
- package/login/pipes/to-number.pipe.js +23 -0
- package/login/pipes/to-number.pipe.js.map +1 -0
- package/login/services/index.d.ts +2 -0
- package/login/services/index.js +3 -0
- package/login/services/index.js.map +1 -0
- package/login/services/login-resource-injector.service.d.ts +8 -0
- package/login/services/login-resource-injector.service.js +71 -0
- package/login/services/login-resource-injector.service.js.map +1 -0
- package/login/services/user-profile-form.service.d.ts +82 -0
- package/login/services/user-profile-form.service.js +1031 -0
- package/login/services/user-profile-form.service.js.map +1 -0
- package/package.json +450 -0
- package/src/lib/i18n.ts +9 -0
- package/src/lib/models/index.ts +1 -0
- package/src/lib/models/script.model.ts +6 -0
- package/src/lib/providers/keycloakify-angular.providers.ts +92 -0
- package/src/lib/public-api.ts +12 -0
- package/src/lib/services/i18n.service.ts +5 -0
- package/src/lib/services/index.ts +2 -0
- package/src/lib/services/resource-injector.service.ts +50 -0
- package/src/login/DefaultPage.ts +208 -0
- package/src/login/KcContext.ts +1 -0
- package/src/login/classes/component-reference.class.ts +5 -0
- package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.html +24 -0
- package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.ts +144 -0
- package/src/login/components/field-errors/field-errors.component.html +15 -0
- package/src/login/components/field-errors/field-errors.component.ts +41 -0
- package/src/login/components/group-label/group-label.component.html +30 -0
- package/src/login/components/group-label/group-label.component.ts +50 -0
- package/src/login/components/index.ts +11 -0
- package/src/login/components/input-field-by-type/input-field-by-type.component.html +63 -0
- package/src/login/components/input-field-by-type/input-field-by-type.component.ts +67 -0
- package/src/login/components/input-tag/input-tag.component.html +49 -0
- package/src/login/components/input-tag/input-tag.component.ts +108 -0
- package/src/login/components/input-tag-selects/input-tag-selects.component.html +29 -0
- package/src/login/components/input-tag-selects/input-tag-selects.component.ts +150 -0
- package/src/login/components/logout-other-sessions/logout-other-sessions.component.html +19 -0
- package/src/login/components/logout-other-sessions/logout-other-sessions.component.ts +31 -0
- package/src/login/components/password-wrapper/password-wrapper.component.html +15 -0
- package/src/login/components/password-wrapper/password-wrapper.component.ts +61 -0
- package/src/login/components/select-tag/select-tag.component.html +31 -0
- package/src/login/components/select-tag/select-tag.component.ts +109 -0
- package/src/login/components/textarea-tag/textarea-tag.component.html +18 -0
- package/src/login/components/textarea-tag/textarea-tag.component.ts +63 -0
- package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.html +85 -0
- package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.ts +84 -0
- package/src/login/containers/template.component.html +203 -0
- package/src/login/containers/template.component.ts +94 -0
- package/src/login/directives/attributes.directive.ts +23 -0
- package/src/login/directives/index.ts +2 -0
- package/src/login/directives/kc-class.directive.ts +167 -0
- package/src/login/i18n.ts +4 -0
- package/src/login/pages/code/code.component.html +26 -0
- package/src/login/pages/code/code.component.ts +31 -0
- package/src/login/pages/delete-account-confirm/delete-account-confirm.component.html +46 -0
- package/src/login/pages/delete-account-confirm/delete-account-confirm.component.ts +32 -0
- package/src/login/pages/delete-credential/delete-credential.component.html +35 -0
- package/src/login/pages/delete-credential/delete-credential.component.ts +43 -0
- package/src/login/pages/error/error.component.html +25 -0
- package/src/login/pages/error/error.component.ts +31 -0
- package/src/login/pages/frontchannel-logout/frontchannel-logout.component.html +35 -0
- package/src/login/pages/frontchannel-logout/frontchannel-logout.component.ts +49 -0
- package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.html +41 -0
- package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.ts +55 -0
- package/src/login/pages/info/info.component.html +54 -0
- package/src/login/pages/info/info.component.ts +65 -0
- package/src/login/pages/login/login.component.html +212 -0
- package/src/login/pages/login/login.component.ts +61 -0
- package/src/login/pages/login-config-totp/login-config-totp.component.html +190 -0
- package/src/login/pages/login-config-totp/login-config-totp.component.ts +57 -0
- package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.html +41 -0
- package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.ts +43 -0
- package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.html +40 -0
- package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.ts +45 -0
- package/src/login/pages/login-idp-link-email/login-idp-link-email.component.html +37 -0
- package/src/login/pages/login-idp-link-email/login-idp-link-email.component.ts +43 -0
- package/src/login/pages/login-oauth-grant/login-oauth-grant.component.html +92 -0
- package/src/login/pages/login-oauth-grant/login-oauth-grant.component.ts +44 -0
- package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.html +63 -0
- package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.ts +45 -0
- package/src/login/pages/login-otp/login-otp.component.html +103 -0
- package/src/login/pages/login-otp/login-otp.component.ts +43 -0
- package/src/login/pages/login-page-expired/login-page-expired.component.html +35 -0
- package/src/login/pages/login-page-expired/login-page-expired.component.ts +42 -0
- package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.html +203 -0
- package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.ts +101 -0
- package/src/login/pages/login-password/login-password.component.html +90 -0
- package/src/login/pages/login-password/login-password.component.ts +53 -0
- package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.html +155 -0
- package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.ts +55 -0
- package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.html +76 -0
- package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.ts +47 -0
- package/src/login/pages/login-reset-otp/login-reset-otp.component.html +65 -0
- package/src/login/pages/login-reset-otp/login-reset-otp.component.ts +42 -0
- package/src/login/pages/login-reset-password/login-reset-password.component.html +95 -0
- package/src/login/pages/login-reset-password/login-reset-password.component.ts +44 -0
- package/src/login/pages/login-update-password/login-update-password.component.html +116 -0
- package/src/login/pages/login-update-password/login-update-password.component.ts +56 -0
- package/src/login/pages/login-update-profile/login-update-profile.component.html +59 -0
- package/src/login/pages/login-update-profile/login-update-profile.component.ts +52 -0
- package/src/login/pages/login-username/login-username.component.html +161 -0
- package/src/login/pages/login-username/login-username.component.ts +56 -0
- package/src/login/pages/login-verify-email/login-verify-email.component.html +27 -0
- package/src/login/pages/login-verify-email/login-verify-email.component.ts +43 -0
- package/src/login/pages/login-x509-info/login-x509-info.component.html +102 -0
- package/src/login/pages/login-x509-info/login-x509-info.component.ts +42 -0
- package/src/login/pages/logout-confirm/logout-confirm.component.html +59 -0
- package/src/login/pages/logout-confirm/logout-confirm.component.ts +42 -0
- package/src/login/pages/register/register.component.html +126 -0
- package/src/login/pages/register/register.component.ts +62 -0
- package/src/login/pages/saml-post-form/saml-post-form.component.html +51 -0
- package/src/login/pages/saml-post-form/saml-post-form.component.ts +58 -0
- package/src/login/pages/select-authenticator/select-authenticator.component.html +49 -0
- package/src/login/pages/select-authenticator/select-authenticator.component.ts +51 -0
- package/src/login/pages/terms/terms.component.html +36 -0
- package/src/login/pages/terms/terms.component.ts +42 -0
- package/src/login/pages/update-email/update-email.component.html +58 -0
- package/src/login/pages/update-email/update-email.component.ts +52 -0
- package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.html +162 -0
- package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.ts +106 -0
- package/src/login/pages/webauthn-error/webauthn-error.component.html +60 -0
- package/src/login/pages/webauthn-error/webauthn-error.component.ts +57 -0
- package/src/login/pages/webauthn-register/webauthn-register.component.html +82 -0
- package/src/login/pages/webauthn-register/webauthn-register.component.ts +106 -0
- package/src/login/pipes/advanced-msg-str.pipe.ts +13 -0
- package/src/login/pipes/index.ts +6 -0
- package/src/login/pipes/input-type.pipe.ts +15 -0
- package/src/login/pipes/kc-sanitize.pipe.ts +36 -0
- package/src/login/pipes/msg-str.pipe.ts +14 -0
- package/src/login/pipes/to-array.pipe.ts +15 -0
- package/src/login/pipes/to-number.pipe.ts +13 -0
- package/src/login/services/index.ts +2 -0
- package/src/login/services/login-resource-injector.service.ts +72 -0
- package/src/login/services/user-profile-form.service.ts +1504 -0
- 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
|
+
}
|