@keycloakify/angular 0.0.1-rc.0 → 0.0.1-rc.11
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/account/DefaultPage.d.ts +38 -0
- package/account/DefaultPage.js +34 -0
- package/account/KcContext.d.ts +1 -0
- package/account/KcContext.js +2 -0
- package/account/classes/component-reference.class.d.ts +6 -0
- package/account/classes/component-reference.class.js +3 -0
- package/account/containers/template.component.d.ts +26 -0
- package/account/containers/template.component.js +66 -0
- package/account/directives/kc-class.directive.d.ts +26 -0
- package/account/directives/kc-class.directive.js +137 -0
- package/account/i18n.d.ts +4 -0
- package/account/i18n.js +2 -0
- package/account/pages/account/account.component.d.ts +14 -0
- package/account/pages/account/account.component.js +39 -0
- package/account/pages/applications/applications.component.d.ts +13 -0
- package/account/pages/applications/applications.component.js +37 -0
- package/account/pages/federatedIdentity/federatedIdentity.component.d.ts +13 -0
- package/account/pages/federatedIdentity/federatedIdentity.component.js +36 -0
- package/account/pages/log/log.component.d.ts +13 -0
- package/account/pages/log/log.component.js +36 -0
- package/account/pages/password/password.component.d.ts +28 -0
- package/account/pages/password/password.component.js +107 -0
- package/account/pages/sessions/sessions.component.d.ts +13 -0
- package/account/pages/sessions/sessions.component.js +36 -0
- package/account/pages/totp/totp.component.d.ts +13 -0
- package/account/pages/totp/totp.component.js +37 -0
- package/account/providers/keycloakify-angular.providers.d.ts +15 -0
- package/account/providers/keycloakify-angular.providers.js +48 -0
- package/account/services/i18n.service.d.ts +6 -0
- package/account/services/i18n.service.js +12 -0
- package/account/services/resource-injector.service.d.ts +10 -0
- package/account/services/resource-injector.service.js +37 -0
- package/account/tokens/classes.token.d.ts +16 -0
- package/account/tokens/classes.token.js +3 -0
- package/account/tokens/i18n.token.d.ts +2 -0
- package/account/tokens/i18n.token.js +3 -0
- package/account/tokens/kc-context.token.d.ts +3 -0
- package/account/tokens/kc-context.token.js +3 -0
- package/lib/directives/attributes.directive.d.ts +8 -0
- package/lib/directives/attributes.directive.js +26 -0
- package/lib/models/script.model.js +1 -1
- package/lib/pipes/input-type.pipe.d.ts +7 -0
- package/lib/pipes/input-type.pipe.js +20 -0
- package/lib/pipes/is-array-with-empty-object.pipe.d.ts +7 -0
- package/lib/pipes/is-array-with-empty-object.pipe.js +20 -0
- package/lib/pipes/kc-sanitize.pipe.d.ts +9 -0
- package/lib/pipes/kc-sanitize.pipe.js +29 -0
- package/lib/pipes/to-array.pipe.d.ts +7 -0
- package/lib/pipes/to-array.pipe.js +21 -0
- package/lib/pipes/to-number.pipe.d.ts +7 -0
- package/lib/pipes/to-number.pipe.js +20 -0
- package/lib/services/resource-injector.service.d.ts +5 -2
- package/lib/services/resource-injector.service.js +19 -22
- package/lib/tokens/use-default-css.token.d.ts +2 -0
- package/lib/tokens/use-default-css.token.js +3 -0
- package/login/DefaultPage.d.ts +28 -28
- package/login/DefaultPage.js +74 -74
- package/login/KcContext.d.ts +1 -1
- package/login/KcContext.js +1 -1
- package/login/classes/component-reference.class.d.ts +1 -1
- package/login/classes/component-reference.class.js +1 -1
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.d.ts +7 -2
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.js +19 -36
- package/login/components/field-errors/field-errors.component.d.ts +7 -4
- package/login/components/field-errors/field-errors.component.js +23 -35
- package/login/components/group-label/group-label.component.d.ts +8 -3
- package/login/components/group-label/group-label.component.js +29 -41
- package/login/components/input-field-by-type/input-field-by-type.component.d.ts +7 -4
- package/login/components/input-field-by-type/input-field-by-type.component.js +33 -50
- package/login/components/input-tag/input-tag.component.d.ts +9 -4
- package/login/components/input-tag/input-tag.component.js +47 -64
- package/login/components/input-tag-selects/input-tag-selects.component.d.ts +11 -6
- package/login/components/input-tag-selects/input-tag-selects.component.js +41 -56
- package/login/components/logout-other-sessions/logout-other-sessions.component.d.ts +7 -2
- package/login/components/logout-other-sessions/logout-other-sessions.component.js +25 -36
- package/login/components/password-wrapper/password-wrapper.component.d.ts +8 -3
- package/login/components/password-wrapper/password-wrapper.component.js +27 -38
- package/login/components/select-tag/select-tag.component.d.ts +9 -4
- package/login/components/select-tag/select-tag.component.js +32 -47
- package/login/components/textarea-tag/textarea-tag.component.d.ts +7 -4
- package/login/components/textarea-tag/textarea-tag.component.js +28 -42
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.d.ts +11 -5
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.js +45 -57
- package/login/containers/template.component.d.ts +11 -8
- package/login/containers/template.component.js +36 -42
- package/login/directives/kc-class.directive.d.ts +5 -2
- package/login/directives/kc-class.directive.js +35 -43
- package/login/i18n.d.ts +2 -2
- package/login/i18n.js +1 -1
- package/login/pages/code/code.component.d.ts +8 -3
- package/login/pages/code/code.component.js +28 -31
- package/login/pages/delete-account-confirm/delete-account-confirm.component.d.ts +8 -3
- package/login/pages/delete-account-confirm/delete-account-confirm.component.js +28 -31
- package/login/pages/delete-credential/delete-credential.component.d.ts +8 -3
- package/login/pages/delete-credential/delete-credential.component.js +28 -31
- package/login/pages/error/error.component.d.ts +8 -3
- package/login/pages/error/error.component.js +28 -31
- package/login/pages/frontchannel-logout/frontchannel-logout.component.d.ts +9 -4
- package/login/pages/frontchannel-logout/frontchannel-logout.component.js +28 -31
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.d.ts +13 -3
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.js +40 -41
- package/login/pages/info/info.component.d.ts +8 -9
- package/login/pages/info/info.component.js +31 -43
- package/login/pages/login/login.component.d.ts +8 -3
- package/login/pages/login/login.component.js +33 -47
- package/login/pages/login-config-totp/login-config-totp.component.d.ts +8 -3
- package/login/pages/login-config-totp/login-config-totp.component.js +31 -42
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.d.ts +8 -3
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.js +28 -31
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.d.ts +8 -3
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.js +28 -31
- package/login/pages/login-idp-link-email/login-idp-link-email.component.d.ts +8 -3
- package/login/pages/login-idp-link-email/login-idp-link-email.component.js +28 -31
- package/login/pages/login-oauth-grant/login-oauth-grant.component.d.ts +8 -3
- package/login/pages/login-oauth-grant/login-oauth-grant.component.js +29 -33
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.d.ts +8 -3
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.js +28 -31
- package/login/pages/login-otp/login-otp.component.d.ts +8 -3
- package/login/pages/login-otp/login-otp.component.js +30 -33
- package/login/pages/login-page-expired/login-page-expired.component.d.ts +8 -3
- package/login/pages/login-page-expired/login-page-expired.component.js +27 -30
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.d.ts +9 -6
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.js +37 -44
- package/login/pages/login-password/login-password.component.d.ts +8 -3
- package/login/pages/login-password/login-password.component.js +31 -40
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.d.ts +8 -3
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.js +30 -38
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.d.ts +8 -3
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.js +30 -33
- package/login/pages/login-reset-otp/login-reset-otp.component.d.ts +8 -3
- package/login/pages/login-reset-otp/login-reset-otp.component.js +29 -32
- package/login/pages/login-reset-password/login-reset-password.component.d.ts +8 -3
- package/login/pages/login-reset-password/login-reset-password.component.js +30 -33
- package/login/pages/login-update-password/login-update-password.component.d.ts +8 -3
- package/login/pages/login-update-password/login-update-password.component.js +32 -42
- package/login/pages/login-update-profile/login-update-profile.component.d.ts +13 -3
- package/login/pages/login-update-profile/login-update-profile.component.js +39 -39
- package/login/pages/login-username/login-username.component.d.ts +8 -3
- package/login/pages/login-username/login-username.component.js +32 -45
- package/login/pages/login-verify-email/login-verify-email.component.d.ts +8 -3
- package/login/pages/login-verify-email/login-verify-email.component.js +28 -31
- package/login/pages/login-x509-info/login-x509-info.component.d.ts +8 -3
- package/login/pages/login-x509-info/login-x509-info.component.js +28 -31
- package/login/pages/logout-confirm/logout-confirm.component.d.ts +8 -3
- package/login/pages/logout-confirm/logout-confirm.component.js +28 -31
- package/login/pages/register/register.component.d.ts +13 -3
- package/login/pages/register/register.component.js +41 -48
- package/login/pages/saml-post-form/saml-post-form.component.d.ts +9 -4
- package/login/pages/saml-post-form/saml-post-form.component.js +32 -35
- package/login/pages/select-authenticator/select-authenticator.component.d.ts +8 -3
- package/login/pages/select-authenticator/select-authenticator.component.js +29 -39
- package/login/pages/terms/terms.component.d.ts +8 -3
- package/login/pages/terms/terms.component.js +28 -31
- package/login/pages/update-email/update-email.component.d.ts +13 -3
- package/login/pages/update-email/update-email.component.js +40 -41
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.d.ts +9 -6
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.js +37 -50
- package/login/pages/webauthn-error/webauthn-error.component.d.ts +8 -3
- package/login/pages/webauthn-error/webauthn-error.component.js +32 -40
- package/login/pages/webauthn-register/webauthn-register.component.d.ts +9 -6
- package/login/pages/webauthn-register/webauthn-register.component.js +36 -46
- package/login/providers/keycloakify-angular.providers.d.ts +16 -0
- package/login/providers/keycloakify-angular.providers.js +53 -0
- package/login/services/i18n.service.d.ts +6 -0
- package/login/services/i18n.service.js +12 -0
- package/login/services/login-resource-injector.service.d.ts +4 -1
- package/login/services/login-resource-injector.service.js +22 -25
- package/login/services/submit.service.d.ts +9 -0
- package/login/services/submit.service.js +20 -0
- package/login/services/user-profile-form.service.d.ts +16 -12
- package/login/services/user-profile-form.service.js +293 -305
- package/{lib/providers/keycloakify-angular.providers.d.ts → login/tokens/classes.token.d.ts} +14 -37
- package/login/tokens/classes.token.js +3 -0
- package/login/tokens/i18n.token.d.ts +2 -0
- package/login/tokens/i18n.token.js +3 -0
- package/login/tokens/kc-context.token.d.ts +3 -0
- package/login/tokens/kc-context.token.js +3 -0
- package/login/tokens/make-user-confirm-password.token.d.ts +2 -0
- package/login/tokens/make-user-confirm-password.token.js +3 -0
- package/package.json +123 -181
- package/src/account/DefaultPage.ts +51 -0
- package/src/account/KcContext.ts +1 -0
- package/src/account/classes/component-reference.class.ts +6 -0
- package/src/account/containers/template.component.html +125 -0
- package/src/account/containers/template.component.ts +71 -0
- package/src/account/directives/kc-class.directive.ts +150 -0
- package/src/account/i18n.ts +4 -0
- package/src/account/pages/account/account.component.html +165 -0
- package/src/account/pages/account/account.component.ts +34 -0
- package/src/account/pages/applications/applications.component.html +156 -0
- package/src/account/pages/applications/applications.component.ts +32 -0
- package/src/account/pages/federatedIdentity/federatedIdentity.component.html +97 -0
- package/src/account/pages/federatedIdentity/federatedIdentity.component.ts +31 -0
- package/src/account/pages/log/log.component.html +44 -0
- package/src/account/pages/log/log.component.ts +31 -0
- package/src/account/pages/password/password.component.html +131 -0
- package/src/account/pages/password/password.component.ts +110 -0
- package/src/account/pages/sessions/sessions.component.html +63 -0
- package/src/account/pages/sessions/sessions.component.ts +31 -0
- package/src/account/pages/totp/totp.component.html +258 -0
- package/src/account/pages/totp/totp.component.ts +32 -0
- package/src/account/providers/keycloakify-angular.providers.ts +64 -0
- package/src/account/services/i18n.service.ts +7 -0
- package/src/account/services/resource-injector.service.ts +37 -0
- package/src/account/tokens/classes.token.ts +6 -0
- package/src/account/tokens/i18n.token.ts +3 -0
- package/src/account/tokens/kc-context.token.ts +4 -0
- package/src/{login → lib}/directives/attributes.directive.ts +2 -2
- package/src/{login → lib}/pipes/input-type.pipe.ts +4 -4
- package/src/lib/pipes/is-array-with-empty-object.pipe.ts +16 -0
- package/src/lib/pipes/kc-sanitize.pipe.ts +34 -0
- package/src/lib/pipes/to-array.pipe.ts +15 -0
- package/src/lib/pipes/to-number.pipe.ts +13 -0
- package/src/lib/services/resource-injector.service.ts +7 -7
- package/src/lib/tokens/use-default-css.token.ts +3 -0
- package/src/login/DefaultPage.ts +76 -76
- package/src/login/KcContext.ts +1 -1
- package/src/login/classes/component-reference.class.ts +1 -1
- package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.html +19 -19
- package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.ts +15 -23
- package/src/login/components/field-errors/field-errors.component.html +10 -10
- package/src/login/components/field-errors/field-errors.component.ts +11 -16
- package/src/login/components/group-label/group-label.component.html +25 -25
- package/src/login/components/group-label/group-label.component.ts +17 -21
- package/src/login/components/input-field-by-type/input-field-by-type.component.html +57 -57
- package/src/login/components/input-field-by-type/input-field-by-type.component.ts +18 -35
- package/src/login/components/input-tag/input-tag.component.html +41 -45
- package/src/login/components/input-tag/input-tag.component.ts +25 -34
- package/src/login/components/input-tag-selects/input-tag-selects.component.html +22 -22
- package/src/login/components/input-tag-selects/input-tag-selects.component.ts +32 -43
- package/src/login/components/logout-other-sessions/logout-other-sessions.component.html +15 -15
- package/src/login/components/logout-other-sessions/logout-other-sessions.component.ts +13 -10
- package/src/login/components/password-wrapper/password-wrapper.component.html +13 -13
- package/src/login/components/password-wrapper/password-wrapper.component.ts +15 -25
- package/src/login/components/select-tag/select-tag.component.html +26 -26
- package/src/login/components/select-tag/select-tag.component.ts +23 -35
- package/src/login/components/textarea-tag/textarea-tag.component.html +13 -15
- package/src/login/components/textarea-tag/textarea-tag.component.ts +16 -25
- package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.html +70 -73
- package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.ts +33 -47
- package/src/login/containers/template.component.html +183 -183
- package/src/login/containers/template.component.ts +26 -42
- package/src/login/directives/kc-class.directive.ts +11 -11
- package/src/login/i18n.ts +2 -2
- package/src/login/pages/code/code.component.html +21 -21
- package/src/login/pages/code/code.component.ts +17 -17
- package/src/login/pages/delete-account-confirm/delete-account-confirm.component.html +44 -42
- package/src/login/pages/delete-account-confirm/delete-account-confirm.component.ts +17 -18
- package/src/login/pages/delete-credential/delete-credential.component.html +29 -29
- package/src/login/pages/delete-credential/delete-credential.component.ts +17 -24
- package/src/login/pages/error/error.component.html +20 -20
- package/src/login/pages/error/error.component.ts +17 -17
- package/src/login/pages/frontchannel-logout/frontchannel-logout.component.html +31 -31
- package/src/login/pages/frontchannel-logout/frontchannel-logout.component.ts +17 -25
- package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.html +36 -36
- package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.ts +34 -33
- package/src/login/pages/info/info.component.html +45 -45
- package/src/login/pages/info/info.component.ts +20 -37
- package/src/login/pages/login/login.component.html +194 -194
- package/src/login/pages/login/login.component.ts +22 -43
- package/src/login/pages/login-config-totp/login-config-totp.component.html +189 -179
- package/src/login/pages/login-config-totp/login-config-totp.component.ts +20 -39
- package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.html +35 -35
- package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.ts +17 -24
- package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.html +34 -34
- package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.ts +17 -26
- package/src/login/pages/login-idp-link-email/login-idp-link-email.component.html +32 -30
- package/src/login/pages/login-idp-link-email/login-idp-link-email.component.ts +17 -24
- package/src/login/pages/login-oauth-grant/login-oauth-grant.component.html +83 -81
- package/src/login/pages/login-oauth-grant/login-oauth-grant.component.ts +18 -26
- package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.html +57 -57
- package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.ts +17 -26
- package/src/login/pages/login-otp/login-otp.component.html +96 -96
- package/src/login/pages/login-otp/login-otp.component.ts +19 -25
- package/src/login/pages/login-page-expired/login-page-expired.component.html +31 -31
- package/src/login/pages/login-page-expired/login-page-expired.component.ts +16 -23
- package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.html +183 -181
- package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.ts +25 -32
- package/src/login/pages/login-password/login-password.component.html +82 -82
- package/src/login/pages/login-password/login-password.component.ts +20 -33
- package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.html +142 -142
- package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.ts +19 -34
- package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.html +67 -67
- package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.ts +19 -29
- package/src/login/pages/login-reset-otp/login-reset-otp.component.html +61 -59
- package/src/login/pages/login-reset-otp/login-reset-otp.component.ts +18 -24
- package/src/login/pages/login-reset-password/login-reset-password.component.html +84 -84
- package/src/login/pages/login-reset-password/login-reset-password.component.ts +19 -26
- package/src/login/pages/login-update-password/login-update-password.component.html +107 -107
- package/src/login/pages/login-update-password/login-update-password.component.ts +21 -38
- package/src/login/pages/login-update-profile/login-update-profile.component.html +52 -53
- package/src/login/pages/login-update-profile/login-update-profile.component.ts +31 -32
- package/src/login/pages/login-username/login-username.component.html +146 -146
- package/src/login/pages/login-username/login-username.component.ts +21 -38
- package/src/login/pages/login-verify-email/login-verify-email.component.html +22 -22
- package/src/login/pages/login-verify-email/login-verify-email.component.ts +17 -24
- package/src/login/pages/login-x509-info/login-x509-info.component.html +96 -96
- package/src/login/pages/login-x509-info/login-x509-info.component.ts +17 -23
- package/src/login/pages/logout-confirm/logout-confirm.component.html +51 -51
- package/src/login/pages/logout-confirm/logout-confirm.component.ts +17 -23
- package/src/login/pages/register/register.component.html +113 -113
- package/src/login/pages/register/register.component.ts +33 -39
- package/src/login/pages/saml-post-form/saml-post-form.component.html +47 -48
- package/src/login/pages/saml-post-form/saml-post-form.component.ts +19 -27
- package/src/login/pages/select-authenticator/select-authenticator.component.html +43 -44
- package/src/login/pages/select-authenticator/select-authenticator.component.ts +18 -32
- package/src/login/pages/terms/terms.component.html +32 -32
- package/src/login/pages/terms/terms.component.ts +17 -23
- package/src/login/pages/update-email/update-email.component.html +52 -52
- package/src/login/pages/update-email/update-email.component.ts +33 -33
- package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.html +146 -148
- package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.ts +26 -50
- package/src/login/pages/webauthn-error/webauthn-error.component.html +53 -53
- package/src/login/pages/webauthn-error/webauthn-error.component.ts +21 -32
- package/src/login/pages/webauthn-register/webauthn-register.component.html +73 -73
- package/src/login/pages/webauthn-register/webauthn-register.component.ts +26 -40
- package/src/login/providers/keycloakify-angular.providers.ts +68 -0
- package/src/login/services/i18n.service.ts +7 -0
- package/src/login/services/login-resource-injector.service.ts +13 -12
- package/src/login/services/submit.service.ts +12 -0
- package/src/login/services/user-profile-form.service.ts +185 -187
- package/src/login/tokens/classes.token.ts +6 -0
- package/src/login/tokens/i18n.token.ts +3 -0
- package/src/login/tokens/kc-context.token.ts +4 -0
- package/src/login/tokens/make-user-confirm-password.token.ts +5 -0
- package/src/tsconfig.json +6 -1
- package/stories/login/pages/login/login.stories.ts +146 -0
- package/lib/i18n.d.ts +0 -4
- package/lib/i18n.js +0 -6
- package/lib/i18n.js.map +0 -1
- package/lib/models/index.d.ts +0 -1
- package/lib/models/index.js +0 -2
- package/lib/models/index.js.map +0 -1
- package/lib/models/script.model.js.map +0 -1
- package/lib/providers/keycloakify-angular.providers.js +0 -58
- package/lib/providers/keycloakify-angular.providers.js.map +0 -1
- package/lib/public-api.d.ts +0 -10
- package/lib/public-api.js +0 -4
- package/lib/public-api.js.map +0 -1
- package/lib/services/i18n.service.d.ts +0 -3
- package/lib/services/i18n.service.js +0 -14
- package/lib/services/i18n.service.js.map +0 -1
- package/lib/services/index.d.ts +0 -2
- package/lib/services/index.js +0 -3
- package/lib/services/index.js.map +0 -1
- package/lib/services/resource-injector.service.js.map +0 -1
- package/login/DefaultPage.js.map +0 -1
- package/login/KcContext.js.map +0 -1
- package/login/classes/component-reference.class.js.map +0 -1
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.html +0 -24
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.js.map +0 -1
- package/login/components/field-errors/field-errors.component.html +0 -15
- package/login/components/field-errors/field-errors.component.js.map +0 -1
- package/login/components/group-label/group-label.component.html +0 -30
- package/login/components/group-label/group-label.component.js.map +0 -1
- package/login/components/index.d.ts +0 -11
- package/login/components/index.js +0 -12
- package/login/components/index.js.map +0 -1
- package/login/components/input-field-by-type/input-field-by-type.component.html +0 -63
- package/login/components/input-field-by-type/input-field-by-type.component.js.map +0 -1
- package/login/components/input-tag/input-tag.component.html +0 -49
- package/login/components/input-tag/input-tag.component.js.map +0 -1
- package/login/components/input-tag-selects/input-tag-selects.component.html +0 -29
- package/login/components/input-tag-selects/input-tag-selects.component.js.map +0 -1
- package/login/components/logout-other-sessions/logout-other-sessions.component.html +0 -19
- package/login/components/logout-other-sessions/logout-other-sessions.component.js.map +0 -1
- package/login/components/password-wrapper/password-wrapper.component.html +0 -15
- package/login/components/password-wrapper/password-wrapper.component.js.map +0 -1
- package/login/components/select-tag/select-tag.component.html +0 -31
- package/login/components/select-tag/select-tag.component.js.map +0 -1
- package/login/components/textarea-tag/textarea-tag.component.html +0 -18
- package/login/components/textarea-tag/textarea-tag.component.js.map +0 -1
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.html +0 -85
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.js.map +0 -1
- package/login/containers/template.component.html +0 -203
- package/login/containers/template.component.js.map +0 -1
- package/login/directives/attributes.directive.d.ts +0 -5
- package/login/directives/attributes.directive.js +0 -34
- package/login/directives/attributes.directive.js.map +0 -1
- package/login/directives/index.d.ts +0 -2
- package/login/directives/index.js +0 -3
- package/login/directives/index.js.map +0 -1
- package/login/directives/kc-class.directive.js.map +0 -1
- package/login/i18n.js.map +0 -1
- package/login/pages/code/code.component.html +0 -26
- package/login/pages/code/code.component.js.map +0 -1
- package/login/pages/delete-account-confirm/delete-account-confirm.component.html +0 -46
- package/login/pages/delete-account-confirm/delete-account-confirm.component.js.map +0 -1
- package/login/pages/delete-credential/delete-credential.component.html +0 -35
- package/login/pages/delete-credential/delete-credential.component.js.map +0 -1
- package/login/pages/error/error.component.html +0 -25
- package/login/pages/error/error.component.js.map +0 -1
- package/login/pages/frontchannel-logout/frontchannel-logout.component.html +0 -35
- package/login/pages/frontchannel-logout/frontchannel-logout.component.js.map +0 -1
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.html +0 -41
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.js.map +0 -1
- package/login/pages/info/info.component.html +0 -54
- package/login/pages/info/info.component.js.map +0 -1
- package/login/pages/login/login.component.html +0 -212
- package/login/pages/login/login.component.js.map +0 -1
- package/login/pages/login-config-totp/login-config-totp.component.html +0 -190
- package/login/pages/login-config-totp/login-config-totp.component.js.map +0 -1
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.html +0 -41
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.js.map +0 -1
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.html +0 -40
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.js.map +0 -1
- package/login/pages/login-idp-link-email/login-idp-link-email.component.html +0 -37
- package/login/pages/login-idp-link-email/login-idp-link-email.component.js.map +0 -1
- package/login/pages/login-oauth-grant/login-oauth-grant.component.html +0 -92
- package/login/pages/login-oauth-grant/login-oauth-grant.component.js.map +0 -1
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.html +0 -63
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.js.map +0 -1
- package/login/pages/login-otp/login-otp.component.html +0 -103
- package/login/pages/login-otp/login-otp.component.js.map +0 -1
- package/login/pages/login-page-expired/login-page-expired.component.html +0 -35
- package/login/pages/login-page-expired/login-page-expired.component.js.map +0 -1
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.html +0 -203
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.js.map +0 -1
- package/login/pages/login-password/login-password.component.html +0 -90
- package/login/pages/login-password/login-password.component.js.map +0 -1
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.html +0 -155
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.js.map +0 -1
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.html +0 -76
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.js.map +0 -1
- package/login/pages/login-reset-otp/login-reset-otp.component.html +0 -65
- package/login/pages/login-reset-otp/login-reset-otp.component.js.map +0 -1
- package/login/pages/login-reset-password/login-reset-password.component.html +0 -95
- package/login/pages/login-reset-password/login-reset-password.component.js.map +0 -1
- package/login/pages/login-update-password/login-update-password.component.html +0 -116
- package/login/pages/login-update-password/login-update-password.component.js.map +0 -1
- package/login/pages/login-update-profile/login-update-profile.component.html +0 -59
- package/login/pages/login-update-profile/login-update-profile.component.js.map +0 -1
- package/login/pages/login-username/login-username.component.html +0 -161
- package/login/pages/login-username/login-username.component.js.map +0 -1
- package/login/pages/login-verify-email/login-verify-email.component.html +0 -27
- package/login/pages/login-verify-email/login-verify-email.component.js.map +0 -1
- package/login/pages/login-x509-info/login-x509-info.component.html +0 -102
- package/login/pages/login-x509-info/login-x509-info.component.js.map +0 -1
- package/login/pages/logout-confirm/logout-confirm.component.html +0 -59
- package/login/pages/logout-confirm/logout-confirm.component.js.map +0 -1
- package/login/pages/register/register.component.html +0 -126
- package/login/pages/register/register.component.js.map +0 -1
- package/login/pages/saml-post-form/saml-post-form.component.html +0 -51
- package/login/pages/saml-post-form/saml-post-form.component.js.map +0 -1
- package/login/pages/select-authenticator/select-authenticator.component.html +0 -49
- package/login/pages/select-authenticator/select-authenticator.component.js.map +0 -1
- package/login/pages/terms/terms.component.html +0 -36
- package/login/pages/terms/terms.component.js.map +0 -1
- package/login/pages/update-email/update-email.component.html +0 -58
- package/login/pages/update-email/update-email.component.js.map +0 -1
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.html +0 -162
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.js.map +0 -1
- package/login/pages/webauthn-error/webauthn-error.component.html +0 -60
- package/login/pages/webauthn-error/webauthn-error.component.js.map +0 -1
- package/login/pages/webauthn-register/webauthn-register.component.html +0 -82
- package/login/pages/webauthn-register/webauthn-register.component.js.map +0 -1
- package/login/pipes/advanced-msg-str.pipe.d.ts +0 -5
- package/login/pipes/advanced-msg-str.pipe.js +0 -31
- package/login/pipes/advanced-msg-str.pipe.js.map +0 -1
- package/login/pipes/index.d.ts +0 -6
- package/login/pipes/index.js +0 -7
- package/login/pipes/index.js.map +0 -1
- package/login/pipes/input-type.pipe.d.ts +0 -4
- package/login/pipes/input-type.pipe.js +0 -23
- package/login/pipes/input-type.pipe.js.map +0 -1
- package/login/pipes/kc-sanitize.pipe.d.ts +0 -7
- package/login/pipes/kc-sanitize.pipe.js +0 -36
- package/login/pipes/kc-sanitize.pipe.js.map +0 -1
- package/login/pipes/msg-str.pipe.d.ts +0 -6
- package/login/pipes/msg-str.pipe.js +0 -31
- package/login/pipes/msg-str.pipe.js.map +0 -1
- package/login/pipes/to-array.pipe.d.ts +0 -4
- package/login/pipes/to-array.pipe.js +0 -24
- package/login/pipes/to-array.pipe.js.map +0 -1
- package/login/pipes/to-number.pipe.d.ts +0 -4
- package/login/pipes/to-number.pipe.js +0 -23
- package/login/pipes/to-number.pipe.js.map +0 -1
- package/login/services/index.d.ts +0 -2
- package/login/services/index.js +0 -3
- package/login/services/index.js.map +0 -1
- package/login/services/login-resource-injector.service.js.map +0 -1
- package/login/services/user-profile-form.service.js.map +0 -1
- package/src/lib/i18n.ts +0 -9
- package/src/lib/models/index.ts +0 -1
- package/src/lib/providers/keycloakify-angular.providers.ts +0 -92
- package/src/lib/public-api.ts +0 -12
- package/src/lib/services/i18n.service.ts +0 -5
- package/src/lib/services/index.ts +0 -2
- package/src/login/components/index.ts +0 -11
- package/src/login/directives/index.ts +0 -2
- package/src/login/pipes/advanced-msg-str.pipe.ts +0 -13
- package/src/login/pipes/index.ts +0 -6
- package/src/login/pipes/kc-sanitize.pipe.ts +0 -36
- package/src/login/pipes/msg-str.pipe.ts +0 -14
- package/src/login/pipes/to-array.pipe.ts +0 -15
- package/src/login/pipes/to-number.pipe.ts +0 -13
- package/src/login/services/index.ts +0 -2
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
@let attr = attribute();
|
|
2
2
|
@if (attr) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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>
|
|
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>
|
|
41
28
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
+
}
|
|
59
61
|
}
|
|
60
|
-
}
|
|
61
62
|
}
|
|
62
|
-
}
|
|
63
63
|
}
|
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
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";
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, forwardRef, inject, input, output } from '@angular/core';
|
|
2
|
+
import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css.token';
|
|
3
|
+
import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes.token';
|
|
4
|
+
import { type Attribute } from 'keycloakify/login/KcContext';
|
|
5
|
+
import { type ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
6
|
+
import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference.class';
|
|
7
|
+
import { ToArrayPipe } from '@keycloakify/angular/lib/pipes/to-array.pipe';
|
|
8
|
+
import { FormAction, FormFieldError } from '@keycloakify/angular/login/services/user-profile-form.service';
|
|
9
|
+
import { InputTagSelectsComponent } from '@keycloakify/angular/login/components/input-tag-selects/input-tag-selects.component';
|
|
10
|
+
import { InputTagComponent } from '@keycloakify/angular/login/components/input-tag/input-tag.component';
|
|
11
|
+
import { PasswordWrapperComponent } from '@keycloakify/angular/login/components/password-wrapper/password-wrapper.component';
|
|
12
|
+
import { SelectTagComponent } from '@keycloakify/angular/login/components/select-tag/select-tag.component';
|
|
13
|
+
import { TextareaTagComponent } from '@keycloakify/angular/login/components/textarea-tag/textarea-tag.component';
|
|
24
14
|
|
|
25
15
|
@Component({
|
|
26
16
|
standalone: true,
|
|
@@ -31,16 +21,9 @@ import { TextareaTagComponent } from "@keycloakify/angular/login/components/text
|
|
|
31
21
|
}
|
|
32
22
|
`
|
|
33
23
|
],
|
|
34
|
-
imports: [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
SelectTagComponent,
|
|
38
|
-
InputTagSelectsComponent,
|
|
39
|
-
InputTagComponent,
|
|
40
|
-
PasswordWrapperComponent
|
|
41
|
-
],
|
|
42
|
-
selector: "kc-input-field-by-type",
|
|
43
|
-
templateUrl: "input-field-by-type.component.html",
|
|
24
|
+
imports: [ToArrayPipe, TextareaTagComponent, SelectTagComponent, InputTagSelectsComponent, InputTagComponent, PasswordWrapperComponent],
|
|
25
|
+
selector: 'kc-input-field-by-type',
|
|
26
|
+
templateUrl: 'input-field-by-type.component.html',
|
|
44
27
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
45
28
|
providers: [
|
|
46
29
|
{
|
|
@@ -55,13 +38,13 @@ export class InputFieldByTypeComponent extends ComponentReference {
|
|
|
55
38
|
displayableErrors = input<FormFieldError[]>();
|
|
56
39
|
dispatchFormAction = output<FormAction>();
|
|
57
40
|
override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
|
|
58
|
-
override classes = inject<Partial<Record<ClassKey, string>>>(
|
|
41
|
+
override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);
|
|
59
42
|
|
|
60
43
|
attributePassword = computed<Attribute>(() => {
|
|
61
44
|
const attribute: Attribute = this.attribute() ?? ({} as Attribute);
|
|
62
45
|
return {
|
|
63
46
|
...attribute,
|
|
64
|
-
annotations: { ...(attribute.annotations ?? {}), inputType:
|
|
47
|
+
annotations: { ...(attribute.annotations ?? {}), inputType: 'password' }
|
|
65
48
|
};
|
|
66
49
|
});
|
|
67
50
|
}
|
|
@@ -1,49 +1,45 @@
|
|
|
1
1
|
@let attr = attribute();
|
|
2
2
|
@let index = fieldIndex();
|
|
3
3
|
@if (attr) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
[fieldIndex]="index"
|
|
46
|
-
(dispatchFormAction)="dispatchFormAction.emit($event)"
|
|
47
|
-
></kc-add-remove-buttons-multi-valued-attribute>
|
|
48
|
-
}
|
|
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]="i18n.advancedMsgStr(attr.annotations.inputTypePlaceholder ?? '')"
|
|
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]="!attr.annotations.inputTypeMaxlength ? undefined : (attr.annotations.inputTypeMaxlength | toNumber)"
|
|
23
|
+
[attr.minlength]="!attr.annotations.inputTypeMinlength ? undefined : (attr.annotations.inputTypeMinlength | toNumber)"
|
|
24
|
+
[attr.max]="attr.annotations.inputTypeMax"
|
|
25
|
+
[attr.min]="attr.annotations.inputTypeMin"
|
|
26
|
+
[attr.step]="attr.annotations.inputTypeStep"
|
|
27
|
+
[kcAttributes]="attr.html5DataAnnotations"
|
|
28
|
+
(change)="onChange($event)"
|
|
29
|
+
(blur)="onBlur()"
|
|
30
|
+
/>
|
|
31
|
+
@if (index !== undefined) {
|
|
32
|
+
@let values = valueOrValues() ?? [] | toArray;
|
|
33
|
+
<kc-field-errors
|
|
34
|
+
[attribute]="attr"
|
|
35
|
+
[displayableErrors]="displayableErrors()"
|
|
36
|
+
[fieldIndex]="index"
|
|
37
|
+
></kc-field-errors>
|
|
38
|
+
<kc-add-remove-buttons-multi-valued-attribute
|
|
39
|
+
[attribute]="attr"
|
|
40
|
+
[values]="values"
|
|
41
|
+
[fieldIndex]="index"
|
|
42
|
+
(dispatchFormAction)="dispatchFormAction.emit($event)"
|
|
43
|
+
></kc-add-remove-buttons-multi-valued-attribute>
|
|
44
|
+
}
|
|
49
45
|
}
|
|
@@ -1,28 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
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";
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, forwardRef, inject, input, output } from '@angular/core';
|
|
2
|
+
import { AttributesDirective } from '@keycloakify/angular/lib/directives/attributes.directive';
|
|
3
|
+
import { InputTypePipe } from '@keycloakify/angular/lib/pipes/input-type.pipe';
|
|
4
|
+
import { ToArrayPipe } from '@keycloakify/angular/lib/pipes/to-array.pipe';
|
|
5
|
+
import { ToNumberPipe } from '@keycloakify/angular/lib/pipes/to-number.pipe';
|
|
6
|
+
import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css.token';
|
|
7
|
+
import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference.class';
|
|
8
|
+
import { AddRemoveButtonsMultiValuedAttributeComponent } from '@keycloakify/angular/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component';
|
|
9
|
+
import { FieldErrorsComponent } from '@keycloakify/angular/login/components/field-errors/field-errors.component';
|
|
10
|
+
import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class.directive';
|
|
11
|
+
import { FormAction, FormFieldError } from '@keycloakify/angular/login/services/user-profile-form.service';
|
|
12
|
+
import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes.token';
|
|
13
|
+
import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n.token';
|
|
14
|
+
import { type Attribute } from 'keycloakify/login/KcContext';
|
|
15
|
+
import { type ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
16
|
+
import { type I18n } from '../../i18n';
|
|
26
17
|
|
|
27
18
|
@Component({
|
|
28
19
|
standalone: true,
|
|
@@ -40,11 +31,10 @@ import { FieldErrorsComponent } from "@keycloakify/angular/login/components/fiel
|
|
|
40
31
|
AttributesDirective,
|
|
41
32
|
ToArrayPipe,
|
|
42
33
|
FieldErrorsComponent,
|
|
43
|
-
AddRemoveButtonsMultiValuedAttributeComponent
|
|
44
|
-
AdvancedMsgStrPipe
|
|
34
|
+
AddRemoveButtonsMultiValuedAttributeComponent
|
|
45
35
|
],
|
|
46
|
-
selector:
|
|
47
|
-
templateUrl:
|
|
36
|
+
selector: 'kc-input-tag',
|
|
37
|
+
templateUrl: 'input-tag.component.html',
|
|
48
38
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
49
39
|
providers: [
|
|
50
40
|
{
|
|
@@ -54,6 +44,7 @@ import { FieldErrorsComponent } from "@keycloakify/angular/login/components/fiel
|
|
|
54
44
|
]
|
|
55
45
|
})
|
|
56
46
|
export class InputTagComponent extends ComponentReference {
|
|
47
|
+
i18n = inject<I18n>(LOGIN_I18N);
|
|
57
48
|
attribute = input<Attribute>();
|
|
58
49
|
valueOrValues = input<string | string[]>();
|
|
59
50
|
fieldIndex = input<number | undefined>(undefined);
|
|
@@ -61,7 +52,7 @@ export class InputTagComponent extends ComponentReference {
|
|
|
61
52
|
displayableErrors = input<FormFieldError[]>();
|
|
62
53
|
dispatchFormAction = output<FormAction>();
|
|
63
54
|
override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
|
|
64
|
-
override classes = inject<Partial<Record<ClassKey, string>>>(
|
|
55
|
+
override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);
|
|
65
56
|
|
|
66
57
|
value = computed(() => {
|
|
67
58
|
const valueOrValues = this.valueOrValues();
|
|
@@ -78,8 +69,8 @@ export class InputTagComponent extends ComponentReference {
|
|
|
78
69
|
onChange(event: Event) {
|
|
79
70
|
const valueOrValues = this.valueOrValues();
|
|
80
71
|
this.dispatchFormAction.emit({
|
|
81
|
-
action:
|
|
82
|
-
name: this.attribute()?.name ??
|
|
72
|
+
action: 'update',
|
|
73
|
+
name: this.attribute()?.name ?? '',
|
|
83
74
|
valueOrValues: (() => {
|
|
84
75
|
if (this.fieldIndex !== undefined) {
|
|
85
76
|
if (valueOrValues instanceof Array) {
|
|
@@ -100,8 +91,8 @@ export class InputTagComponent extends ComponentReference {
|
|
|
100
91
|
|
|
101
92
|
onBlur() {
|
|
102
93
|
this.dispatchFormAction.emit({
|
|
103
|
-
action:
|
|
104
|
-
name: this.attribute()?.name ??
|
|
94
|
+
action: 'focus lost',
|
|
95
|
+
name: this.attribute()?.name ?? '',
|
|
105
96
|
fieldIndex: this.fieldIndex()
|
|
106
97
|
});
|
|
107
98
|
}
|
|
@@ -4,26 +4,26 @@
|
|
|
4
4
|
@let classDiv = context()?.classDiv;
|
|
5
5
|
@let attr = attribute();
|
|
6
6
|
@if (attr) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
+
{{ i18n.advancedMsgStr(option) }}
|
|
26
|
+
</label>
|
|
27
|
+
</div>
|
|
28
|
+
}
|
|
29
29
|
}
|
|
@@ -1,23 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from
|
|
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";
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, forwardRef, inject, input, output, Signal } from '@angular/core';
|
|
2
|
+
import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css.token';
|
|
3
|
+
import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference.class';
|
|
4
|
+
import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class.directive';
|
|
5
|
+
import { type FormAction, type FormFieldError } from '@keycloakify/angular/login/services/user-profile-form.service';
|
|
6
|
+
import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes.token';
|
|
7
|
+
import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n.token';
|
|
8
|
+
import { type Attribute } from 'keycloakify/login/KcContext';
|
|
9
|
+
import { type ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
10
|
+
import { type I18n } from '../../i18n';
|
|
21
11
|
|
|
22
12
|
@Component({
|
|
23
13
|
standalone: true,
|
|
@@ -28,9 +18,9 @@ import {
|
|
|
28
18
|
}
|
|
29
19
|
`
|
|
30
20
|
],
|
|
31
|
-
imports: [KcClassDirective
|
|
32
|
-
selector:
|
|
33
|
-
templateUrl:
|
|
21
|
+
imports: [KcClassDirective],
|
|
22
|
+
selector: 'kc-input-tag-selects',
|
|
23
|
+
templateUrl: 'input-tag-selects.component.html',
|
|
34
24
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
35
25
|
providers: [
|
|
36
26
|
{
|
|
@@ -40,15 +30,16 @@ import {
|
|
|
40
30
|
]
|
|
41
31
|
})
|
|
42
32
|
export class InputTagSelectsComponent extends ComponentReference {
|
|
33
|
+
i18n = inject<I18n>(LOGIN_I18N);
|
|
43
34
|
attribute = input<Attribute>();
|
|
44
35
|
valueOrValues = input<string | string[]>();
|
|
45
36
|
dispatchFormAction = output<FormAction>();
|
|
46
37
|
displayableErrors = input<FormFieldError[]>();
|
|
47
38
|
override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
|
|
48
|
-
override classes = inject<Partial<Record<ClassKey, string>>>(
|
|
39
|
+
override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);
|
|
49
40
|
|
|
50
41
|
context: Signal<{
|
|
51
|
-
inputType:
|
|
42
|
+
inputType: 'radio' | 'checkbox';
|
|
52
43
|
classDiv: ClassKey;
|
|
53
44
|
classInput: ClassKey;
|
|
54
45
|
classLabel: ClassKey;
|
|
@@ -57,19 +48,19 @@ export class InputTagSelectsComponent extends ComponentReference {
|
|
|
57
48
|
if (attribute) {
|
|
58
49
|
const { inputType } = attribute.annotations;
|
|
59
50
|
switch (inputType) {
|
|
60
|
-
case
|
|
51
|
+
case 'select-radiobuttons':
|
|
61
52
|
return {
|
|
62
|
-
inputType:
|
|
63
|
-
classDiv:
|
|
64
|
-
classInput:
|
|
65
|
-
classLabel:
|
|
53
|
+
inputType: 'radio',
|
|
54
|
+
classDiv: 'kcInputClassRadio',
|
|
55
|
+
classInput: 'kcInputClassRadioInput',
|
|
56
|
+
classLabel: 'kcInputClassRadioLabel'
|
|
66
57
|
};
|
|
67
|
-
case
|
|
58
|
+
case 'multiselect-checkboxes':
|
|
68
59
|
return {
|
|
69
|
-
inputType:
|
|
70
|
-
classDiv:
|
|
71
|
-
classInput:
|
|
72
|
-
classLabel:
|
|
60
|
+
inputType: 'checkbox',
|
|
61
|
+
classDiv: 'kcInputClassCheckbox',
|
|
62
|
+
classInput: 'kcInputClassCheckboxInput',
|
|
63
|
+
classLabel: 'kcInputClassCheckboxLabel'
|
|
73
64
|
};
|
|
74
65
|
}
|
|
75
66
|
}
|
|
@@ -87,9 +78,7 @@ export class InputTagSelectsComponent extends ComponentReference {
|
|
|
87
78
|
break walk;
|
|
88
79
|
}
|
|
89
80
|
|
|
90
|
-
const validator = (
|
|
91
|
-
attribute.validators as Record<string, { options?: string[] }>
|
|
92
|
-
)[inputOptionsFromValidation];
|
|
81
|
+
const validator = (attribute.validators as Record<string, { options?: string[] }>)[inputOptionsFromValidation];
|
|
93
82
|
|
|
94
83
|
if (validator === undefined) {
|
|
95
84
|
break walk;
|
|
@@ -120,8 +109,8 @@ export class InputTagSelectsComponent extends ComponentReference {
|
|
|
120
109
|
const valueOrValues = this.valueOrValues();
|
|
121
110
|
const isChecked = (event.target as HTMLInputElement).checked;
|
|
122
111
|
this.dispatchFormAction.emit({
|
|
123
|
-
action:
|
|
124
|
-
name: this.attribute()?.name ??
|
|
112
|
+
action: 'update',
|
|
113
|
+
name: this.attribute()?.name ?? '',
|
|
125
114
|
valueOrValues: (() => {
|
|
126
115
|
if (valueOrValues instanceof Array) {
|
|
127
116
|
const newValues = [...valueOrValues];
|
|
@@ -135,15 +124,15 @@ export class InputTagSelectsComponent extends ComponentReference {
|
|
|
135
124
|
return newValues;
|
|
136
125
|
}
|
|
137
126
|
|
|
138
|
-
return (event.target as HTMLInputElement)?.checked ? option :
|
|
127
|
+
return (event.target as HTMLInputElement)?.checked ? option : '';
|
|
139
128
|
})()
|
|
140
129
|
});
|
|
141
130
|
}
|
|
142
131
|
|
|
143
132
|
onBlur() {
|
|
144
133
|
this.dispatchFormAction.emit({
|
|
145
|
-
action:
|
|
146
|
-
name: this.attribute()?.name ??
|
|
134
|
+
action: 'focus lost',
|
|
135
|
+
name: this.attribute()?.name ?? '',
|
|
147
136
|
fieldIndex: undefined
|
|
148
137
|
});
|
|
149
138
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<div
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
id="kc-form-options"
|
|
3
|
+
[kcClass]="'kcFormOptionsClass'"
|
|
4
4
|
>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
+
{{ i18n.msgStr('logoutOtherSessions') }}
|
|
16
|
+
</label>
|
|
17
|
+
</div>
|
|
17
18
|
</div>
|
|
18
|
-
</div>
|
|
19
19
|
</div>
|