@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,92 @@
|
|
|
1
|
+
import { DOCUMENT } from "@angular/common";
|
|
2
|
+
import {
|
|
3
|
+
APP_INITIALIZER,
|
|
4
|
+
InjectionToken,
|
|
5
|
+
LOCALE_ID,
|
|
6
|
+
makeEnvironmentProviders
|
|
7
|
+
} from "@angular/core";
|
|
8
|
+
import { I18n } from "../i18n";
|
|
9
|
+
import { I18nService } from "../services";
|
|
10
|
+
|
|
11
|
+
export const I18N = new InjectionToken<I18n>("i18n");
|
|
12
|
+
export const KC_CONTEXT = new InjectionToken<KcContext>("keycloak context");
|
|
13
|
+
export const USE_DEFAULT_CSS = new InjectionToken<boolean>("use default css");
|
|
14
|
+
export const CLASSES = new InjectionToken<{ [key in ClassKey]?: string }>("classes");
|
|
15
|
+
export const DO_MAKE_USER_CONFIRM_PASSWORD = new InjectionToken<boolean>(
|
|
16
|
+
"doMakeUserConfirmPassword"
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
type ClassKey =
|
|
20
|
+
| import("keycloakify/login/lib/kcClsx").ClassKey
|
|
21
|
+
| import("keycloakify/account/lib/kcClsx").ClassKey;
|
|
22
|
+
type KcContextLike =
|
|
23
|
+
| import("keycloakify/login/i18n/noJsx").KcContextLike
|
|
24
|
+
| import("keycloakify/account/i18n/noJsx").KcContextLike;
|
|
25
|
+
type KcContext =
|
|
26
|
+
| import("keycloakify/login/KcContext").KcContext
|
|
27
|
+
| import("keycloakify/account/KcContext").KcContext;
|
|
28
|
+
|
|
29
|
+
export type KeycloakifyAngularConfig = {
|
|
30
|
+
doMakeUserConfirmPassword?: boolean;
|
|
31
|
+
doUseDefaultCss?: boolean;
|
|
32
|
+
classes?: { [key in ClassKey]?: string };
|
|
33
|
+
getI18n: (params: { kcContext: KcContextLike }) => {
|
|
34
|
+
i18n: unknown;
|
|
35
|
+
prI18n_currentLanguage: Promise<unknown> | undefined;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const provideKeycloakifyAngular = (config: KeycloakifyAngularConfig) =>
|
|
40
|
+
makeEnvironmentProviders([
|
|
41
|
+
{
|
|
42
|
+
provide: KC_CONTEXT,
|
|
43
|
+
useValue: window.kcContext
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
provide: DO_MAKE_USER_CONFIRM_PASSWORD,
|
|
47
|
+
useValue: config?.doMakeUserConfirmPassword ?? true
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
provide: LOCALE_ID,
|
|
51
|
+
useFactory: (document: Document) => {
|
|
52
|
+
return document.documentElement.lang ?? "en";
|
|
53
|
+
},
|
|
54
|
+
deps: [DOCUMENT]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
provide: APP_INITIALIZER,
|
|
58
|
+
multi: true,
|
|
59
|
+
useFactory:
|
|
60
|
+
(
|
|
61
|
+
i18nService: I18nService<ReturnType<typeof config.getI18n>["i18n"]>,
|
|
62
|
+
kcContext: KcContext
|
|
63
|
+
) =>
|
|
64
|
+
async () => {
|
|
65
|
+
const getI18n = config.getI18n;
|
|
66
|
+
|
|
67
|
+
const { i18n, prI18n_currentLanguage } = getI18n({
|
|
68
|
+
kcContext
|
|
69
|
+
});
|
|
70
|
+
let i18nPromise = new Promise<typeof i18n>(resolve => resolve(i18n));
|
|
71
|
+
if (prI18n_currentLanguage) {
|
|
72
|
+
i18nPromise = prI18n_currentLanguage;
|
|
73
|
+
}
|
|
74
|
+
return i18nPromise.then(i18n => {
|
|
75
|
+
i18nService.i18n = i18n;
|
|
76
|
+
return true;
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
deps: [I18nService, KC_CONTEXT]
|
|
80
|
+
},
|
|
81
|
+
{ provide: USE_DEFAULT_CSS, useValue: config?.doUseDefaultCss ?? true },
|
|
82
|
+
{ provide: CLASSES, useValue: config?.classes ?? {} },
|
|
83
|
+
{
|
|
84
|
+
provide: I18N,
|
|
85
|
+
useFactory: (
|
|
86
|
+
i18nService: I18nService<ReturnType<typeof config.getI18n>["i18n"]>
|
|
87
|
+
) => {
|
|
88
|
+
return i18nService.i18n;
|
|
89
|
+
},
|
|
90
|
+
deps: [I18nService]
|
|
91
|
+
}
|
|
92
|
+
]);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { KcContext as KcAccountContext } from "keycloakify/account/KcContext";
|
|
2
|
+
import { KcContext as KcLoginContext } from "keycloakify/login/KcContext";
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
interface Window {
|
|
6
|
+
kcContext?: KcLoginContext | KcAccountContext;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export * from "./models";
|
|
11
|
+
export * from "./providers/keycloakify-angular.providers";
|
|
12
|
+
export * from "./services";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { inject, Injectable, Renderer2, RendererFactory2 } from "@angular/core";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { Script } from "../models/script.model";
|
|
4
|
+
|
|
5
|
+
@Injectable({
|
|
6
|
+
providedIn: "root"
|
|
7
|
+
})
|
|
8
|
+
export class ResourceInjectorService {
|
|
9
|
+
private renderer: Renderer2 = inject(RendererFactory2).createRenderer(null, null);
|
|
10
|
+
|
|
11
|
+
createLink(url: string): Observable<void> {
|
|
12
|
+
return new Observable<void>(observer => {
|
|
13
|
+
// check if the style is already injected
|
|
14
|
+
if (Array.from(document.styleSheets).some(s => s.href?.includes(url))) {
|
|
15
|
+
observer.next();
|
|
16
|
+
observer.complete();
|
|
17
|
+
console.debug(`stylesheet: ${url} already loaded`);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const link = document.createElement("link");
|
|
21
|
+
link.rel = "stylesheet";
|
|
22
|
+
link.href = url;
|
|
23
|
+
|
|
24
|
+
link.onload = () => {
|
|
25
|
+
observer.next();
|
|
26
|
+
observer.complete();
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
link.onerror = () => {
|
|
30
|
+
observer.error(new Error(`Failed to load stylesheet: ${url}`));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
this.renderer.appendChild(document.head, link);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
createScript({ type, id, src, textContent }: Script): void {
|
|
37
|
+
// check if the script is already injected
|
|
38
|
+
if (Array.from(document.scripts).some(s => s.id?.includes(id))) {
|
|
39
|
+
console.debug(`script: ${src} already injected`);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const script = document.createElement("script");
|
|
43
|
+
script.type = type;
|
|
44
|
+
if (src) script.src = src;
|
|
45
|
+
if (textContent) script.textContent = textContent;
|
|
46
|
+
script.id = id;
|
|
47
|
+
|
|
48
|
+
this.renderer.appendChild(document.head, script);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { Type } from "@angular/core";
|
|
2
|
+
import { ClassKey } from "keycloakify/login/lib/kcClsx";
|
|
3
|
+
import { KcContext } from "keycloakify/login/KcContext";
|
|
4
|
+
|
|
5
|
+
const DefaultPage = async (
|
|
6
|
+
pageId: KcContext["pageId"],
|
|
7
|
+
doMakeUserConfirmPassword = true,
|
|
8
|
+
doUseDefaultCss = true,
|
|
9
|
+
classes: { [key in ClassKey]?: string } = {}
|
|
10
|
+
): Promise<{
|
|
11
|
+
ComponentBootstrap: Type<unknown>;
|
|
12
|
+
doMakeUserConfirmPassword: boolean;
|
|
13
|
+
doUseDefaultCss: boolean;
|
|
14
|
+
classes: { [key in ClassKey]?: string };
|
|
15
|
+
}> => {
|
|
16
|
+
let ComponentBootstrapPromise;
|
|
17
|
+
switch (pageId) {
|
|
18
|
+
case "login.ftl":
|
|
19
|
+
ComponentBootstrapPromise = import(
|
|
20
|
+
"@keycloakify/angular/login/pages/login/login.component"
|
|
21
|
+
).then(c => c.LoginComponent);
|
|
22
|
+
break;
|
|
23
|
+
case "login-username.ftl":
|
|
24
|
+
ComponentBootstrapPromise = import(
|
|
25
|
+
"@keycloakify/angular/login/pages/login-username/login-username.component"
|
|
26
|
+
).then(c => c.LoginUsernameComponent);
|
|
27
|
+
break;
|
|
28
|
+
case "login-password.ftl":
|
|
29
|
+
ComponentBootstrapPromise = import(
|
|
30
|
+
"@keycloakify/angular/login/pages/login-password/login-password.component"
|
|
31
|
+
).then(c => c.LoginPasswordComponent);
|
|
32
|
+
break;
|
|
33
|
+
case "webauthn-authenticate.ftl":
|
|
34
|
+
ComponentBootstrapPromise = import(
|
|
35
|
+
"@keycloakify/angular/login/pages/webauthn-authenticate/webauthn-authenticate.component"
|
|
36
|
+
).then(c => c.WebauthnAuthenticateComponent);
|
|
37
|
+
break;
|
|
38
|
+
case "webauthn-register.ftl":
|
|
39
|
+
ComponentBootstrapPromise = import(
|
|
40
|
+
"@keycloakify/angular/login/pages/webauthn-register/webauthn-register.component"
|
|
41
|
+
).then(c => c.WebauthnRegisterComponent);
|
|
42
|
+
break;
|
|
43
|
+
case "register.ftl":
|
|
44
|
+
ComponentBootstrapPromise = import(
|
|
45
|
+
"@keycloakify/angular/login/pages/register/register.component"
|
|
46
|
+
).then(c => c.RegisterComponent);
|
|
47
|
+
break;
|
|
48
|
+
case "info.ftl":
|
|
49
|
+
ComponentBootstrapPromise = import(
|
|
50
|
+
"@keycloakify/angular/login/pages/info/info.component"
|
|
51
|
+
).then(c => c.InfoComponent);
|
|
52
|
+
break;
|
|
53
|
+
case "error.ftl":
|
|
54
|
+
ComponentBootstrapPromise = import(
|
|
55
|
+
"@keycloakify/angular/login/pages/error/error.component"
|
|
56
|
+
).then(c => c.ErrorComponent);
|
|
57
|
+
break;
|
|
58
|
+
case "login-reset-password.ftl":
|
|
59
|
+
ComponentBootstrapPromise = import(
|
|
60
|
+
"@keycloakify/angular/login/pages/login-reset-password/login-reset-password.component"
|
|
61
|
+
).then(c => c.LoginResetPasswordComponent);
|
|
62
|
+
break;
|
|
63
|
+
case "login-verify-email.ftl":
|
|
64
|
+
ComponentBootstrapPromise = import(
|
|
65
|
+
"@keycloakify/angular/login/pages/login-verify-email/login-verify-email.component"
|
|
66
|
+
).then(c => c.LoginVerifyEmailComponent);
|
|
67
|
+
break;
|
|
68
|
+
case "terms.ftl":
|
|
69
|
+
ComponentBootstrapPromise = import(
|
|
70
|
+
"@keycloakify/angular/login/pages/terms/terms.component"
|
|
71
|
+
).then(c => c.TermsComponent);
|
|
72
|
+
break;
|
|
73
|
+
case "login-oauth2-device-verify-user-code.ftl":
|
|
74
|
+
ComponentBootstrapPromise = import(
|
|
75
|
+
"@keycloakify/angular/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component"
|
|
76
|
+
).then(c => c.LoginOauth2DeviceVerifyUserCodeComponent);
|
|
77
|
+
break;
|
|
78
|
+
case "login-oauth-grant.ftl":
|
|
79
|
+
ComponentBootstrapPromise = import(
|
|
80
|
+
"@keycloakify/angular/login/pages/login-oauth-grant/login-oauth-grant.component"
|
|
81
|
+
).then(c => c.LoginOauthGrantComponent);
|
|
82
|
+
break;
|
|
83
|
+
case "login-otp.ftl":
|
|
84
|
+
ComponentBootstrapPromise = import(
|
|
85
|
+
"@keycloakify/angular/login/pages/login-otp/login-otp.component"
|
|
86
|
+
).then(c => c.LoginOtpComponent);
|
|
87
|
+
|
|
88
|
+
break;
|
|
89
|
+
case "login-update-profile.ftl":
|
|
90
|
+
ComponentBootstrapPromise = import(
|
|
91
|
+
"@keycloakify/angular/login/pages/login-update-profile/login-update-profile.component"
|
|
92
|
+
).then(c => c.LoginUpdateProfileComponent);
|
|
93
|
+
break;
|
|
94
|
+
case "login-update-password.ftl":
|
|
95
|
+
ComponentBootstrapPromise = import(
|
|
96
|
+
"@keycloakify/angular/login/pages/login-update-password/login-update-password.component"
|
|
97
|
+
).then(c => c.LoginUpdatePasswordComponent);
|
|
98
|
+
break;
|
|
99
|
+
case "login-idp-link-confirm.ftl":
|
|
100
|
+
ComponentBootstrapPromise = import(
|
|
101
|
+
"@keycloakify/angular/login/pages/login-idp-link-confirm/login-idp-link-confirm.component"
|
|
102
|
+
).then(c => c.LoginIdpLinkConfirmComponent);
|
|
103
|
+
break;
|
|
104
|
+
case "login-idp-link-email.ftl":
|
|
105
|
+
ComponentBootstrapPromise = import(
|
|
106
|
+
"@keycloakify/angular/login/pages/login-idp-link-email/login-idp-link-email.component"
|
|
107
|
+
).then(c => c.LoginIdpLinkEmailComponent);
|
|
108
|
+
break;
|
|
109
|
+
case "login-page-expired.ftl":
|
|
110
|
+
ComponentBootstrapPromise = import(
|
|
111
|
+
"@keycloakify/angular/login/pages/login-page-expired/login-page-expired.component"
|
|
112
|
+
).then(c => c.LoginPageExpiredComponent);
|
|
113
|
+
break;
|
|
114
|
+
case "login-config-totp.ftl":
|
|
115
|
+
ComponentBootstrapPromise = import(
|
|
116
|
+
"@keycloakify/angular/login/pages/login-config-totp/login-config-totp.component"
|
|
117
|
+
).then(c => c.LoginConfigTotpComponent);
|
|
118
|
+
break;
|
|
119
|
+
case "logout-confirm.ftl":
|
|
120
|
+
ComponentBootstrapPromise = import(
|
|
121
|
+
"@keycloakify/angular/login/pages/logout-confirm/logout-confirm.component"
|
|
122
|
+
).then(c => c.LogoutConfirmComponent);
|
|
123
|
+
break;
|
|
124
|
+
case "idp-review-user-profile.ftl":
|
|
125
|
+
ComponentBootstrapPromise = import(
|
|
126
|
+
"@keycloakify/angular/login/pages/idp-review-user-profile/idp-review-user-profile.component"
|
|
127
|
+
).then(c => c.IdpReviewUserProfileComponent);
|
|
128
|
+
break;
|
|
129
|
+
case "update-email.ftl":
|
|
130
|
+
ComponentBootstrapPromise = import(
|
|
131
|
+
"@keycloakify/angular/login/pages/update-email/update-email.component"
|
|
132
|
+
).then(c => c.UpdateEmailComponent);
|
|
133
|
+
break;
|
|
134
|
+
case "select-authenticator.ftl":
|
|
135
|
+
ComponentBootstrapPromise = import(
|
|
136
|
+
"@keycloakify/angular/login/pages/select-authenticator/select-authenticator.component"
|
|
137
|
+
).then(c => c.SelectAuthenticatorComponent);
|
|
138
|
+
break;
|
|
139
|
+
case "saml-post-form.ftl":
|
|
140
|
+
ComponentBootstrapPromise = import(
|
|
141
|
+
"@keycloakify/angular/login/pages/saml-post-form/saml-post-form.component"
|
|
142
|
+
).then(c => c.SamlPostFormComponent);
|
|
143
|
+
break;
|
|
144
|
+
case "delete-credential.ftl":
|
|
145
|
+
ComponentBootstrapPromise = import(
|
|
146
|
+
"@keycloakify/angular/login/pages/delete-credential/delete-credential.component"
|
|
147
|
+
).then(c => c.DeleteCredentialComponent);
|
|
148
|
+
break;
|
|
149
|
+
case "code.ftl":
|
|
150
|
+
ComponentBootstrapPromise = import(
|
|
151
|
+
"@keycloakify/angular/login/pages/code/code.component"
|
|
152
|
+
).then(c => c.CodeComponent);
|
|
153
|
+
break;
|
|
154
|
+
case "delete-account-confirm.ftl":
|
|
155
|
+
ComponentBootstrapPromise = import(
|
|
156
|
+
"@keycloakify/angular/login/pages/delete-account-confirm/delete-account-confirm.component"
|
|
157
|
+
).then(c => c.DeleteAccountConfirmComponent);
|
|
158
|
+
break;
|
|
159
|
+
case "frontchannel-logout.ftl":
|
|
160
|
+
ComponentBootstrapPromise = import(
|
|
161
|
+
"@keycloakify/angular/login/pages/frontchannel-logout/frontchannel-logout.component"
|
|
162
|
+
).then(c => c.FrontchannelLogoutComponent);
|
|
163
|
+
break;
|
|
164
|
+
case "login-recovery-authn-code-config.ftl":
|
|
165
|
+
ComponentBootstrapPromise = import(
|
|
166
|
+
"@keycloakify/angular/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component"
|
|
167
|
+
).then(c => c.LoginRecoveryAuthnCodeConfigComponent);
|
|
168
|
+
break;
|
|
169
|
+
case "login-recovery-authn-code-input.ftl":
|
|
170
|
+
ComponentBootstrapPromise = import(
|
|
171
|
+
"@keycloakify/angular/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component"
|
|
172
|
+
).then(c => c.LoginRecoveryAuthnCodeInputComponent);
|
|
173
|
+
break;
|
|
174
|
+
case "login-reset-otp.ftl":
|
|
175
|
+
ComponentBootstrapPromise = import(
|
|
176
|
+
"@keycloakify/angular/login/pages/login-reset-otp/login-reset-otp.component"
|
|
177
|
+
).then(c => c.LoginResetOtpComponent);
|
|
178
|
+
break;
|
|
179
|
+
case "login-x509-info.ftl":
|
|
180
|
+
ComponentBootstrapPromise = import(
|
|
181
|
+
"@keycloakify/angular/login/pages/login-x509-info/login-x509-info.component"
|
|
182
|
+
).then(c => c.LoginX509InfoComponent);
|
|
183
|
+
break;
|
|
184
|
+
case "webauthn-error.ftl":
|
|
185
|
+
ComponentBootstrapPromise = import(
|
|
186
|
+
"@keycloakify/angular/login/pages/webauthn-error/webauthn-error.component"
|
|
187
|
+
).then(c => c.WebauthnErrorComponent);
|
|
188
|
+
break;
|
|
189
|
+
case "login-passkeys-conditional-authenticate.ftl":
|
|
190
|
+
ComponentBootstrapPromise = import(
|
|
191
|
+
"@keycloakify/angular/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component"
|
|
192
|
+
).then(c => c.LoginPasskeysConditionalAuthenticateComponent);
|
|
193
|
+
break;
|
|
194
|
+
case "login-idp-link-confirm-override.ftl":
|
|
195
|
+
ComponentBootstrapPromise = import(
|
|
196
|
+
"@keycloakify/angular/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component"
|
|
197
|
+
).then(c => c.LoginIdpLinkConfirmOverrideComponent);
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
return ComponentBootstrapPromise?.then(ComponentBootstrap => ({
|
|
201
|
+
ComponentBootstrap,
|
|
202
|
+
doMakeUserConfirmPassword,
|
|
203
|
+
doUseDefaultCss,
|
|
204
|
+
classes
|
|
205
|
+
}));
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
export { DefaultPage };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { KcContext } from "keycloakify/login/KcContext";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@let idPostfix = attribute()?.name ?? '' + '-' + (fieldIndex() ?? 0 + 1);
|
|
2
|
+
@if (hasRemove()) {
|
|
3
|
+
<button
|
|
4
|
+
[id]="'kc-remove-' + idPostfix"
|
|
5
|
+
type="button"
|
|
6
|
+
class="pf-c-button pf-m-inline pf-m-link"
|
|
7
|
+
(click)="onRemove()"
|
|
8
|
+
>
|
|
9
|
+
{{ 'remove' | msgStr }}
|
|
10
|
+
</button>
|
|
11
|
+
@if (hasAdd()) {
|
|
12
|
+
|
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
@if (hasAdd()) {
|
|
16
|
+
<button
|
|
17
|
+
[id]="'kc-add-' + idPostfix"
|
|
18
|
+
type="button"
|
|
19
|
+
class="pf-c-button pf-m-inline pf-m-link"
|
|
20
|
+
(click)="onAdd()"
|
|
21
|
+
>
|
|
22
|
+
{{ 'addValue' | msgStr }}
|
|
23
|
+
</button>
|
|
24
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
computed,
|
|
5
|
+
input,
|
|
6
|
+
output
|
|
7
|
+
} from "@angular/core";
|
|
8
|
+
import { Attribute } from "keycloakify/login/KcContext";
|
|
9
|
+
import { MsgStrPipe } from "@keycloakify/angular/login/pipes/msg-str.pipe";
|
|
10
|
+
import { FormAction } from "@keycloakify/angular/login/services/user-profile-form.service";
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
standalone: true,
|
|
14
|
+
styles: [
|
|
15
|
+
`
|
|
16
|
+
:host {
|
|
17
|
+
display: contents;
|
|
18
|
+
}
|
|
19
|
+
`
|
|
20
|
+
],
|
|
21
|
+
imports: [MsgStrPipe],
|
|
22
|
+
selector: "kc-add-remove-buttons-multi-valued-attribute",
|
|
23
|
+
templateUrl: "add-remove-buttons-multi-valued-attribute.component.html",
|
|
24
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
25
|
+
})
|
|
26
|
+
export class AddRemoveButtonsMultiValuedAttributeComponent {
|
|
27
|
+
attribute = input<Attribute>();
|
|
28
|
+
values = input<string[]>();
|
|
29
|
+
fieldIndex = input<number>();
|
|
30
|
+
dispatchFormAction = output<FormAction>();
|
|
31
|
+
|
|
32
|
+
hasRemove = computed(() => {
|
|
33
|
+
const attribute = this.attribute();
|
|
34
|
+
const values = this.values();
|
|
35
|
+
const fieldIndex = this.fieldIndex();
|
|
36
|
+
if (attribute && values && fieldIndex) {
|
|
37
|
+
return this.getButtonToDisplayForMultivaluedAttributeField({
|
|
38
|
+
attribute,
|
|
39
|
+
values,
|
|
40
|
+
fieldIndex
|
|
41
|
+
}).hasRemove;
|
|
42
|
+
}
|
|
43
|
+
return false;
|
|
44
|
+
});
|
|
45
|
+
hasAdd = computed(() => {
|
|
46
|
+
const attribute = this.attribute();
|
|
47
|
+
const values = this.values();
|
|
48
|
+
const fieldIndex = this.fieldIndex();
|
|
49
|
+
if (attribute && values && fieldIndex) {
|
|
50
|
+
return this.getButtonToDisplayForMultivaluedAttributeField({
|
|
51
|
+
attribute,
|
|
52
|
+
values,
|
|
53
|
+
fieldIndex
|
|
54
|
+
}).hasAdd;
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
onAdd() {
|
|
60
|
+
this.dispatchFormAction.emit({
|
|
61
|
+
action: "update",
|
|
62
|
+
name: this.attribute()?.name ?? "",
|
|
63
|
+
valueOrValues: [...(this.values() ?? []), ""]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
onRemove() {
|
|
68
|
+
this.dispatchFormAction.emit({
|
|
69
|
+
action: "update",
|
|
70
|
+
name: this.attribute()?.name ?? "",
|
|
71
|
+
valueOrValues: (this.values() ?? []).filter((_, i) => i !== this.fieldIndex())
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private getButtonToDisplayForMultivaluedAttributeField(params: {
|
|
76
|
+
attribute: Attribute;
|
|
77
|
+
values: string[];
|
|
78
|
+
fieldIndex: number;
|
|
79
|
+
}) {
|
|
80
|
+
const { attribute, values, fieldIndex } = params;
|
|
81
|
+
|
|
82
|
+
const hasRemove = (() => {
|
|
83
|
+
if (values.length === 1) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const minCount = (() => {
|
|
88
|
+
const { multivalued } = attribute.validators;
|
|
89
|
+
|
|
90
|
+
if (multivalued === undefined) {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const minStr = multivalued.min;
|
|
95
|
+
|
|
96
|
+
if (minStr === undefined) {
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return parseInt(`${minStr}`);
|
|
101
|
+
})();
|
|
102
|
+
|
|
103
|
+
if (minCount === undefined) {
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (values.length === minCount) {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return true;
|
|
112
|
+
})();
|
|
113
|
+
|
|
114
|
+
const hasAdd = (() => {
|
|
115
|
+
if (fieldIndex + 1 !== values.length) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const maxCount = (() => {
|
|
120
|
+
const { multivalued } = attribute.validators;
|
|
121
|
+
|
|
122
|
+
if (multivalued === undefined) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const maxStr = multivalued.max;
|
|
127
|
+
|
|
128
|
+
if (maxStr === undefined) {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return parseInt(`${maxStr}`);
|
|
133
|
+
})();
|
|
134
|
+
|
|
135
|
+
if (maxCount === undefined) {
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return values.length !== maxCount;
|
|
140
|
+
})();
|
|
141
|
+
|
|
142
|
+
return { hasRemove, hasAdd };
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@let index = fieldIndex();
|
|
2
|
+
<span
|
|
3
|
+
[id]="'input-error-' + attribute.name + (index === undefined ? '' : '-' + index)"
|
|
4
|
+
[kcClass]="'kcInputErrorMessageClass'"
|
|
5
|
+
aria-live="polite"
|
|
6
|
+
>
|
|
7
|
+
@for (error of displayableErrors(); track error; let i = $index) {
|
|
8
|
+
@if (error.fieldIndex === index) {
|
|
9
|
+
<span [innerHTML]="error.errorMessage"></span>
|
|
10
|
+
@if (displayableErrors()?.length ?? 0 - 1 !== i) {
|
|
11
|
+
<br />
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
</span>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
forwardRef,
|
|
5
|
+
inject,
|
|
6
|
+
input
|
|
7
|
+
} from "@angular/core";
|
|
8
|
+
import { CLASSES, USE_DEFAULT_CSS } from "@keycloakify/angular/lib/public-api";
|
|
9
|
+
import { Attribute } from "keycloakify/login/KcContext";
|
|
10
|
+
import { ClassKey } from "keycloakify/login/lib/kcClsx";
|
|
11
|
+
import { ComponentReference } from "@keycloakify/angular/login/classes/component-reference.class";
|
|
12
|
+
import { KcClassDirective } from "@keycloakify/angular/login/directives/kc-class.directive";
|
|
13
|
+
import { FormFieldError } from "@keycloakify/angular/login/services/user-profile-form.service";
|
|
14
|
+
|
|
15
|
+
@Component({
|
|
16
|
+
standalone: true,
|
|
17
|
+
styles: [
|
|
18
|
+
`
|
|
19
|
+
:host {
|
|
20
|
+
display: contents;
|
|
21
|
+
}
|
|
22
|
+
`
|
|
23
|
+
],
|
|
24
|
+
imports: [KcClassDirective],
|
|
25
|
+
selector: "kc-field-errors",
|
|
26
|
+
templateUrl: "field-errors.component.html",
|
|
27
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
28
|
+
providers: [
|
|
29
|
+
{
|
|
30
|
+
provide: ComponentReference,
|
|
31
|
+
useExisting: forwardRef(() => FieldErrorsComponent)
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
})
|
|
35
|
+
export class FieldErrorsComponent extends ComponentReference {
|
|
36
|
+
attribute = input<Attribute>();
|
|
37
|
+
displayableErrors = input<FormFieldError[]>();
|
|
38
|
+
fieldIndex = input<number>();
|
|
39
|
+
override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
|
|
40
|
+
override classes = inject<Partial<Record<ClassKey, string>>>(CLASSES);
|
|
41
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@let attr = attribute();
|
|
2
|
+
@let groupName = groupNameRef();
|
|
3
|
+
@if (attr && groupName !== '') {
|
|
4
|
+
<div
|
|
5
|
+
[kcClass]="'kcFormGroupClass'"
|
|
6
|
+
[kcAttributes]="attr.group?.html5DataAnnotations"
|
|
7
|
+
>
|
|
8
|
+
@let groupDisplayHeader = attr.group?.displayHeader ?? '';
|
|
9
|
+
@let groupHeaderText = groupDisplayHeader !== '' ? groupDisplayHeader : (attr.group?.name ?? '');
|
|
10
|
+
<div [kcClass]="'kcContentWrapperClass'">
|
|
11
|
+
<label
|
|
12
|
+
[id]="'header-' + attr.group?.name"
|
|
13
|
+
[kcClass]="'kcFormGroupHeader'"
|
|
14
|
+
>
|
|
15
|
+
{{ groupHeaderText | advancedMsgStr }}
|
|
16
|
+
</label>
|
|
17
|
+
</div>
|
|
18
|
+
@let groupDisplayDescription = attr.group?.displayDescription ?? '';
|
|
19
|
+
@if (groupDisplayDescription !== '') {
|
|
20
|
+
<div [kcClass]="'kcLabelWrapperClass'">
|
|
21
|
+
<label
|
|
22
|
+
[id]="'description-' + attr.group?.name"
|
|
23
|
+
[kcClass]="'kcLabelClass'"
|
|
24
|
+
>
|
|
25
|
+
{{ groupDisplayDescription | advancedMsgStr }}
|
|
26
|
+
</label>
|
|
27
|
+
</div>
|
|
28
|
+
}
|
|
29
|
+
</div>
|
|
30
|
+
}
|