@keycloakify/angular 0.0.1-rc.0 → 0.0.1-rc.2
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/lib/i18n.d.ts +2 -2
- package/lib/i18n.mjs +6 -0
- package/lib/models/index.d.ts +1 -1
- package/lib/models/index.mjs +2 -0
- package/lib/models/script.model.mjs +2 -0
- package/lib/providers/keycloakify-angular.providers.d.ts +5 -5
- package/lib/providers/keycloakify-angular.providers.mjs +54 -0
- package/lib/public-api.d.ts +5 -5
- package/lib/public-api.mjs +4 -0
- package/lib/services/i18n.service.d.ts +3 -0
- package/lib/services/i18n.service.mjs +11 -0
- package/lib/services/index.d.ts +2 -2
- package/lib/services/index.mjs +3 -0
- package/lib/services/resource-injector.service.d.ts +5 -2
- package/lib/services/resource-injector.service.mjs +54 -0
- package/login/DefaultPage.d.ts +4 -4
- package/login/DefaultPage.mjs +121 -0
- package/login/KcContext.d.ts +1 -1
- package/login/KcContext.mjs +2 -0
- package/login/classes/component-reference.class.d.ts +1 -1
- package/login/classes/component-reference.class.mjs +3 -0
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.d.ts +5 -2
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.mjs +105 -0
- package/login/components/field-errors/field-errors.component.d.ts +7 -4
- package/login/components/field-errors/field-errors.component.mjs +32 -0
- package/login/components/group-label/group-label.component.d.ts +6 -3
- package/login/components/group-label/group-label.component.mjs +41 -0
- package/login/components/hello-world/hello-world.component.d.ts +5 -0
- package/login/components/hello-world/hello-world.component.mjs +11 -0
- package/login/components/index.d.ts +11 -11
- package/login/components/index.mjs +12 -0
- 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.mjs +52 -0
- package/login/components/input-tag/input-tag.component.d.ts +7 -4
- package/login/components/input-tag/input-tag.component.mjs +89 -0
- package/login/components/input-tag-selects/input-tag-selects.component.d.ts +9 -6
- package/login/components/input-tag-selects/input-tag-selects.component.mjs +115 -0
- package/login/components/logout-other-sessions/logout-other-sessions.component.d.ts +5 -2
- package/login/components/logout-other-sessions/logout-other-sessions.component.mjs +30 -0
- package/login/components/password-wrapper/password-wrapper.component.d.ts +6 -3
- package/login/components/password-wrapper/password-wrapper.component.mjs +44 -0
- package/login/components/select-tag/select-tag.component.d.ts +7 -4
- package/login/components/select-tag/select-tag.component.mjs +80 -0
- package/login/components/textarea-tag/textarea-tag.component.d.ts +7 -4
- package/login/components/textarea-tag/textarea-tag.component.mjs +48 -0
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.d.ts +8 -5
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.mjs +62 -0
- package/login/containers/template.component.d.ts +11 -8
- package/login/containers/template.component.mjs +71 -0
- package/login/directives/attributes.directive.d.ts +3 -0
- package/login/directives/attributes.directive.mjs +26 -0
- package/login/directives/index.d.ts +2 -2
- package/login/directives/index.mjs +3 -0
- package/login/directives/kc-class.directive.d.ts +5 -2
- package/login/directives/kc-class.directive.mjs +138 -0
- package/login/i18n.d.ts +2 -2
- package/login/i18n.mjs +2 -0
- package/login/pages/code/code.component.d.ts +6 -3
- package/login/pages/code/code.component.mjs +32 -0
- package/login/pages/delete-account-confirm/delete-account-confirm.component.d.ts +6 -3
- package/login/pages/delete-account-confirm/delete-account-confirm.component.mjs +32 -0
- package/login/pages/delete-credential/delete-credential.component.d.ts +6 -3
- package/login/pages/delete-credential/delete-credential.component.mjs +37 -0
- package/login/pages/error/error.component.d.ts +6 -3
- package/login/pages/error/error.component.mjs +32 -0
- package/login/pages/frontchannel-logout/frontchannel-logout.component.d.ts +7 -4
- package/login/pages/frontchannel-logout/frontchannel-logout.component.mjs +41 -0
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.d.ts +6 -3
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.mjs +47 -0
- package/login/pages/info/info.component.d.ts +9 -6
- package/login/pages/info/info.component.mjs +58 -0
- package/login/pages/login/login.component.d.ts +6 -3
- package/login/pages/login/login.component.mjs +51 -0
- package/login/pages/login-config-totp/login-config-totp.component.d.ts +6 -3
- package/login/pages/login-config-totp/login-config-totp.component.mjs +47 -0
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.d.ts +6 -3
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.mjs +37 -0
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.d.ts +6 -3
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.mjs +37 -0
- package/login/pages/login-idp-link-email/login-idp-link-email.component.d.ts +6 -3
- package/login/pages/login-idp-link-email/login-idp-link-email.component.mjs +37 -0
- package/login/pages/login-oauth-grant/login-oauth-grant.component.d.ts +6 -3
- package/login/pages/login-oauth-grant/login-oauth-grant.component.mjs +38 -0
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.d.ts +6 -3
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.mjs +37 -0
- package/login/pages/login-otp/login-otp.component.d.ts +6 -3
- package/login/pages/login-otp/login-otp.component.mjs +38 -0
- package/login/pages/login-page-expired/login-page-expired.component.d.ts +6 -3
- package/login/pages/login-page-expired/login-page-expired.component.mjs +36 -0
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.d.ts +8 -5
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.mjs +85 -0
- package/login/pages/login-password/login-password.component.d.ts +6 -3
- package/login/pages/login-password/login-password.component.mjs +46 -0
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.d.ts +6 -3
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.mjs +45 -0
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.d.ts +6 -3
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.mjs +38 -0
- package/login/pages/login-reset-otp/login-reset-otp.component.d.ts +6 -3
- package/login/pages/login-reset-otp/login-reset-otp.component.mjs +37 -0
- package/login/pages/login-reset-password/login-reset-password.component.d.ts +6 -3
- package/login/pages/login-reset-password/login-reset-password.component.mjs +38 -0
- package/login/pages/login-update-password/login-update-password.component.d.ts +6 -3
- package/login/pages/login-update-password/login-update-password.component.mjs +47 -0
- package/login/pages/login-update-profile/login-update-profile.component.d.ts +6 -3
- package/login/pages/login-update-profile/login-update-profile.component.mjs +44 -0
- package/login/pages/login-username/login-username.component.d.ts +6 -3
- package/login/pages/login-username/login-username.component.mjs +49 -0
- package/login/pages/login-verify-email/login-verify-email.component.d.ts +6 -3
- package/login/pages/login-verify-email/login-verify-email.component.mjs +37 -0
- package/login/pages/login-x509-info/login-x509-info.component.d.ts +6 -3
- package/login/pages/login-x509-info/login-x509-info.component.mjs +37 -0
- package/login/pages/logout-confirm/logout-confirm.component.d.ts +6 -3
- package/login/pages/logout-confirm/logout-confirm.component.mjs +37 -0
- package/login/pages/register/register.component.d.ts +6 -3
- package/login/pages/register/register.component.mjs +55 -0
- package/login/pages/saml-post-form/saml-post-form.component.d.ts +7 -4
- package/login/pages/saml-post-form/saml-post-form.component.mjs +49 -0
- package/login/pages/select-authenticator/select-authenticator.component.d.ts +6 -3
- package/login/pages/select-authenticator/select-authenticator.component.mjs +45 -0
- package/login/pages/terms/terms.component.d.ts +6 -3
- package/login/pages/terms/terms.component.mjs +37 -0
- package/login/pages/update-email/update-email.component.d.ts +6 -3
- package/login/pages/update-email/update-email.component.mjs +46 -0
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.d.ts +8 -5
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.mjs +87 -0
- package/login/pages/webauthn-error/webauthn-error.component.d.ts +6 -3
- package/login/pages/webauthn-error/webauthn-error.component.mjs +51 -0
- package/login/pages/webauthn-register/webauthn-register.component.d.ts +8 -5
- package/login/pages/webauthn-register/webauthn-register.component.mjs +81 -0
- package/login/pipes/advanced-msg-str.pipe.d.ts +4 -1
- package/login/pipes/advanced-msg-str.pipe.mjs +19 -0
- package/login/pipes/index.d.ts +6 -6
- package/login/pipes/index.mjs +7 -0
- package/login/pipes/input-type.pipe.d.ts +4 -1
- package/login/pipes/input-type.pipe.mjs +20 -0
- package/login/pipes/kc-sanitize.pipe.d.ts +5 -2
- package/login/pipes/kc-sanitize.pipe.mjs +34 -0
- package/login/pipes/msg-str.pipe.d.ts +5 -2
- package/login/pipes/msg-str.pipe.mjs +19 -0
- package/login/pipes/to-array.pipe.d.ts +4 -1
- package/login/pipes/to-array.pipe.mjs +21 -0
- package/login/pipes/to-number.pipe.d.ts +4 -1
- package/login/pipes/to-number.pipe.mjs +20 -0
- package/login/services/index.d.ts +2 -2
- package/login/services/index.mjs +3 -0
- package/login/services/login-resource-injector.service.d.ts +4 -1
- package/login/services/login-resource-injector.service.mjs +68 -0
- package/login/services/user-profile-form.service.d.ts +15 -12
- package/login/services/user-profile-form.service.mjs +1017 -0
- package/package.json +90 -200
- package/src/lib/i18n.ts +2 -2
- package/src/lib/models/index.ts +1 -1
- package/src/lib/providers/keycloakify-angular.providers.ts +18 -18
- package/src/lib/public-api.ts +5 -5
- package/src/lib/services/i18n.service.ts +2 -2
- package/src/lib/services/index.ts +2 -2
- package/src/lib/services/resource-injector.service.ts +7 -7
- 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.ts +11 -11
- package/src/login/components/field-errors/field-errors.component.ts +9 -9
- package/src/login/components/group-label/group-label.component.ts +12 -12
- package/src/login/components/hello-world/hello-world.component.css +0 -0
- package/src/login/components/hello-world/hello-world.component.html +1 -0
- package/src/login/components/hello-world/hello-world.component.ts +10 -0
- package/src/login/components/index.ts +11 -11
- package/src/login/components/input-field-by-type/input-field-by-type.component.ts +15 -15
- package/src/login/components/input-tag/input-tag.component.ts +20 -20
- package/src/login/components/input-tag-selects/input-tag-selects.component.ts +26 -26
- package/src/login/components/logout-other-sessions/logout-other-sessions.component.ts +8 -8
- package/src/login/components/password-wrapper/password-wrapper.component.ts +11 -11
- package/src/login/components/select-tag/select-tag.component.ts +16 -16
- package/src/login/components/textarea-tag/textarea-tag.component.ts +14 -14
- package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.ts +16 -16
- package/src/login/containers/template.component.ts +19 -19
- package/src/login/directives/attributes.directive.ts +2 -2
- package/src/login/directives/index.ts +2 -2
- package/src/login/directives/kc-class.directive.ts +11 -11
- package/src/login/i18n.ts +2 -2
- package/src/login/pages/code/code.component.ts +11 -11
- package/src/login/pages/delete-account-confirm/delete-account-confirm.component.ts +11 -11
- package/src/login/pages/delete-credential/delete-credential.component.ts +11 -11
- package/src/login/pages/error/error.component.ts +11 -11
- package/src/login/pages/frontchannel-logout/frontchannel-logout.component.ts +11 -11
- package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.ts +14 -14
- package/src/login/pages/info/info.component.ts +15 -15
- package/src/login/pages/login/login.component.ts +16 -16
- package/src/login/pages/login-config-totp/login-config-totp.component.ts +16 -16
- package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.ts +11 -11
- package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.ts +11 -11
- package/src/login/pages/login-idp-link-email/login-idp-link-email.component.ts +11 -11
- package/src/login/pages/login-oauth-grant/login-oauth-grant.component.ts +13 -13
- package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.ts +11 -11
- package/src/login/pages/login-otp/login-otp.component.ts +13 -13
- package/src/login/pages/login-page-expired/login-page-expired.component.ts +10 -10
- package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.ts +21 -21
- package/src/login/pages/login-password/login-password.component.ts +14 -14
- package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.ts +13 -13
- package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.ts +13 -13
- package/src/login/pages/login-reset-otp/login-reset-otp.component.ts +12 -12
- package/src/login/pages/login-reset-password/login-reset-password.component.ts +13 -13
- package/src/login/pages/login-update-password/login-update-password.component.ts +16 -16
- package/src/login/pages/login-update-profile/login-update-profile.component.ts +13 -13
- package/src/login/pages/login-username/login-username.component.ts +14 -14
- package/src/login/pages/login-verify-email/login-verify-email.component.ts +11 -11
- package/src/login/pages/login-x509-info/login-x509-info.component.ts +11 -11
- package/src/login/pages/logout-confirm/logout-confirm.component.ts +11 -11
- package/src/login/pages/register/register.component.ts +17 -17
- package/src/login/pages/saml-post-form/saml-post-form.component.ts +13 -13
- package/src/login/pages/select-authenticator/select-authenticator.component.ts +13 -13
- package/src/login/pages/terms/terms.component.ts +11 -11
- package/src/login/pages/update-email/update-email.component.ts +14 -14
- package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.ts +21 -21
- package/src/login/pages/webauthn-error/webauthn-error.component.ts +15 -15
- package/src/login/pages/webauthn-register/webauthn-register.component.ts +20 -20
- package/src/login/pipes/advanced-msg-str.pipe.ts +4 -4
- package/src/login/pipes/index.ts +6 -6
- package/src/login/pipes/input-type.pipe.ts +4 -4
- package/src/login/pipes/kc-sanitize.pipe.ts +8 -8
- package/src/login/pipes/msg-str.pipe.ts +5 -5
- package/src/login/pipes/to-array.pipe.ts +2 -2
- package/src/login/pipes/to-number.pipe.ts +3 -3
- package/src/login/services/index.ts +2 -2
- package/src/login/services/login-resource-injector.service.ts +11 -11
- package/src/login/services/user-profile-form.service.ts +178 -178
- package/stories/login/pages/login/login.stories.ts +146 -0
- package/lib/i18n.js +0 -6
- package/lib/i18n.js.map +0 -1
- package/lib/models/index.js +0 -2
- package/lib/models/index.js.map +0 -1
- package/lib/models/script.model.js +0 -2
- 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.js +0 -4
- package/lib/public-api.js.map +0 -1
- package/lib/services/i18n.service.js +0 -14
- package/lib/services/i18n.service.js.map +0 -1
- package/lib/services/index.js +0 -3
- package/lib/services/index.js.map +0 -1
- package/lib/services/resource-injector.service.js +0 -57
- package/lib/services/resource-injector.service.js.map +0 -1
- package/login/DefaultPage.js +0 -121
- package/login/DefaultPage.js.map +0 -1
- package/login/KcContext.js +0 -2
- package/login/KcContext.js.map +0 -1
- package/login/classes/component-reference.class.js +0 -3
- 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 +0 -123
- 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 +0 -45
- 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 +0 -55
- package/login/components/group-label/group-label.component.js.map +0 -1
- 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 +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 +0 -107
- 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 +0 -132
- 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 +0 -43
- 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 +0 -57
- 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 +0 -97
- 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 +0 -63
- 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 +0 -74
- 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 +0 -78
- package/login/containers/template.component.js.map +0 -1
- package/login/directives/attributes.directive.js +0 -34
- package/login/directives/attributes.directive.js.map +0 -1
- package/login/directives/index.js +0 -3
- package/login/directives/index.js.map +0 -1
- package/login/directives/kc-class.directive.js +0 -146
- package/login/directives/kc-class.directive.js.map +0 -1
- package/login/i18n.js +0 -2
- package/login/i18n.js.map +0 -1
- package/login/pages/code/code.component.html +0 -26
- package/login/pages/code/code.component.js +0 -38
- 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 +0 -38
- 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 +0 -43
- 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 +0 -38
- 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 +0 -47
- 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 +0 -54
- 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 +0 -61
- 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 +0 -58
- 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 +0 -53
- 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 +0 -43
- 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 +0 -43
- 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 +0 -43
- 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 +0 -44
- 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 +0 -43
- 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 +0 -44
- 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 +0 -42
- 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 +0 -91
- 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 +0 -52
- 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 +0 -51
- 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 +0 -44
- 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 +0 -43
- 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 +0 -44
- 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 +0 -53
- 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 +0 -50
- 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 +0 -56
- 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 +0 -43
- 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 +0 -43
- 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 +0 -43
- 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 +0 -62
- 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 +0 -55
- 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 +0 -51
- 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 +0 -43
- 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 +0 -52
- 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 +0 -93
- 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 +0 -57
- 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 +0 -86
- package/login/pages/webauthn-register/webauthn-register.component.js.map +0 -1
- 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.js +0 -7
- package/login/pipes/index.js.map +0 -1
- 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.js +0 -36
- package/login/pipes/kc-sanitize.pipe.js.map +0 -1
- 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.js +0 -24
- package/login/pipes/to-array.pipe.js.map +0 -1
- package/login/pipes/to-number.pipe.js +0 -23
- package/login/pipes/to-number.pipe.js.map +0 -1
- package/login/services/index.js +0 -3
- package/login/services/index.js.map +0 -1
- package/login/services/login-resource-injector.service.js +0 -71
- package/login/services/login-resource-injector.service.js.map +0 -1
- package/login/services/user-profile-form.service.js +0 -1031
- package/login/services/user-profile-form.service.js.map +0 -1
|
@@ -8,32 +8,32 @@ import {
|
|
|
8
8
|
signal,
|
|
9
9
|
Signal,
|
|
10
10
|
WritableSignal
|
|
11
|
-
} from
|
|
12
|
-
import { DomSanitizer, SafeHtml } from
|
|
11
|
+
} from '@angular/core';
|
|
12
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
13
13
|
import {
|
|
14
14
|
DO_MAKE_USER_CONFIRM_PASSWORD,
|
|
15
15
|
I18N,
|
|
16
16
|
KC_CONTEXT
|
|
17
|
-
} from
|
|
17
|
+
} from '@keycloakify/angular/lib/public-api';
|
|
18
18
|
import {
|
|
19
19
|
Attribute,
|
|
20
20
|
KcContext,
|
|
21
21
|
PasswordPolicies,
|
|
22
22
|
Validators
|
|
23
|
-
} from
|
|
23
|
+
} from 'keycloakify/login/KcContext';
|
|
24
24
|
import type {
|
|
25
25
|
KcContextLike as KcContextLike_i18n,
|
|
26
26
|
MessageKey_defaultSet
|
|
27
|
-
} from
|
|
28
|
-
import type { I18n } from
|
|
29
|
-
import { emailRegexp } from
|
|
30
|
-
import { formatNumber } from
|
|
31
|
-
import { structuredCloneButFunctions } from
|
|
32
|
-
import { assert, id } from
|
|
33
|
-
import { LoginResourceInjectorService } from
|
|
27
|
+
} from 'keycloakify/login/i18n/noJsx';
|
|
28
|
+
import type { I18n } from '../i18n';
|
|
29
|
+
import { emailRegexp } from 'keycloakify/tools/emailRegExp';
|
|
30
|
+
import { formatNumber } from 'keycloakify/tools/formatNumber';
|
|
31
|
+
import { structuredCloneButFunctions } from 'keycloakify/tools/structuredCloneButFunctions';
|
|
32
|
+
import { assert, id } from 'tsafe';
|
|
33
|
+
import { LoginResourceInjectorService } from './login-resource-injector.service';
|
|
34
34
|
|
|
35
35
|
type KcContextLike_useGetErrors = KcContextLike_i18n & {
|
|
36
|
-
messagesPerField: Pick<KcContext[
|
|
36
|
+
messagesPerField: Pick<KcContext['messagesPerField'], 'existsError' | 'get'>;
|
|
37
37
|
passwordPolicies?: PasswordPolicies;
|
|
38
38
|
};
|
|
39
39
|
export namespace FormFieldError {
|
|
@@ -45,20 +45,20 @@ export namespace FormFieldError {
|
|
|
45
45
|
|
|
46
46
|
export namespace Source {
|
|
47
47
|
export type Validator = {
|
|
48
|
-
type:
|
|
48
|
+
type: 'validator';
|
|
49
49
|
name: keyof Validators;
|
|
50
50
|
};
|
|
51
51
|
export type PasswordPolicy = {
|
|
52
|
-
type:
|
|
52
|
+
type: 'passwordPolicy';
|
|
53
53
|
name: keyof PasswordPolicies;
|
|
54
54
|
};
|
|
55
55
|
export type Server = {
|
|
56
|
-
type:
|
|
56
|
+
type: 'server';
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
export type Other = {
|
|
60
|
-
type:
|
|
61
|
-
rule:
|
|
60
|
+
type: 'other';
|
|
61
|
+
rule: 'passwordConfirmMatchesPassword' | 'requiredField';
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -104,22 +104,22 @@ type FormState = {
|
|
|
104
104
|
};
|
|
105
105
|
export type FormAction =
|
|
106
106
|
| {
|
|
107
|
-
action:
|
|
107
|
+
action: 'update';
|
|
108
108
|
name: string;
|
|
109
109
|
valueOrValues: string | string[];
|
|
110
110
|
/** Default false */
|
|
111
111
|
displayErrorsImmediately?: boolean;
|
|
112
112
|
}
|
|
113
113
|
| {
|
|
114
|
-
action:
|
|
114
|
+
action: 'focus lost';
|
|
115
115
|
name: string;
|
|
116
116
|
fieldIndex: number | undefined;
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
-
@Injectable({ providedIn:
|
|
119
|
+
@Injectable({ providedIn: 'root' })
|
|
120
120
|
export class UserProfileFormService {
|
|
121
121
|
private kcContext: KcContextLike =
|
|
122
|
-
inject<Extract<KcContext, { pageId:
|
|
122
|
+
inject<Extract<KcContext, { pageId: 'register.ftl' }>>(KC_CONTEXT);
|
|
123
123
|
private i18n = inject<I18n>(I18N);
|
|
124
124
|
private doMakeUserConfirmPassword = inject(DO_MAKE_USER_CONFIRM_PASSWORD);
|
|
125
125
|
private loginResourceInjectorService = inject(LoginResourceInjectorService);
|
|
@@ -128,22 +128,22 @@ export class UserProfileFormService {
|
|
|
128
128
|
const attributes: Attribute[] = (() => {
|
|
129
129
|
mock_user_profile_attributes_for_older_keycloak_versions: {
|
|
130
130
|
if (
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
'profile' in this.kcContext &&
|
|
132
|
+
'attributesByName' in this.kcContext.profile &&
|
|
133
133
|
Object.keys(this.kcContext.profile.attributesByName).length !== 0
|
|
134
134
|
) {
|
|
135
135
|
break mock_user_profile_attributes_for_older_keycloak_versions;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
if (
|
|
139
|
-
|
|
139
|
+
'register' in this.kcContext &&
|
|
140
140
|
this.kcContext.register instanceof Object &&
|
|
141
|
-
|
|
141
|
+
'formData' in this.kcContext.register
|
|
142
142
|
) {
|
|
143
143
|
//NOTE: Handle legacy register.ftl page
|
|
144
|
-
return ([
|
|
144
|
+
return (['firstName', 'lastName', 'email', 'username'] as const)
|
|
145
145
|
.filter(name =>
|
|
146
|
-
name !==
|
|
146
|
+
name !== 'username'
|
|
147
147
|
? true
|
|
148
148
|
: !this.kcContext.realm.registrationEmailAsUsername
|
|
149
149
|
)
|
|
@@ -155,17 +155,17 @@ export class UserProfileFormService {
|
|
|
155
155
|
),
|
|
156
156
|
required: true,
|
|
157
157
|
value:
|
|
158
|
-
(this.kcContext as any).register.formData[name] ??
|
|
158
|
+
(this.kcContext as any).register.formData[name] ?? '',
|
|
159
159
|
html5DataAnnotations: {},
|
|
160
160
|
readOnly: false,
|
|
161
161
|
validators: {},
|
|
162
162
|
annotations: {},
|
|
163
163
|
autocomplete: (() => {
|
|
164
164
|
switch (name) {
|
|
165
|
-
case
|
|
166
|
-
return
|
|
167
|
-
case
|
|
168
|
-
return
|
|
165
|
+
case 'email':
|
|
166
|
+
return 'email';
|
|
167
|
+
case 'username':
|
|
168
|
+
return 'username';
|
|
169
169
|
default:
|
|
170
170
|
return undefined;
|
|
171
171
|
}
|
|
@@ -174,11 +174,11 @@ export class UserProfileFormService {
|
|
|
174
174
|
);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
if (
|
|
177
|
+
if ('user' in this.kcContext && this.kcContext.user instanceof Object) {
|
|
178
178
|
//NOTE: Handle legacy login-update-profile.ftl
|
|
179
|
-
return ([
|
|
179
|
+
return (['username', 'email', 'firstName', 'lastName'] as const)
|
|
180
180
|
.filter(name =>
|
|
181
|
-
name !==
|
|
181
|
+
name !== 'username'
|
|
182
182
|
? true
|
|
183
183
|
: (this.kcContext as any).user.editUsernameAllowed
|
|
184
184
|
)
|
|
@@ -189,17 +189,17 @@ export class UserProfileFormService {
|
|
|
189
189
|
`\${${name}}`
|
|
190
190
|
),
|
|
191
191
|
required: true,
|
|
192
|
-
value: (this.kcContext as any).user[name] ??
|
|
192
|
+
value: (this.kcContext as any).user[name] ?? '',
|
|
193
193
|
html5DataAnnotations: {},
|
|
194
194
|
readOnly: false,
|
|
195
195
|
validators: {},
|
|
196
196
|
annotations: {},
|
|
197
197
|
autocomplete: (() => {
|
|
198
198
|
switch (name) {
|
|
199
|
-
case
|
|
200
|
-
return
|
|
201
|
-
case
|
|
202
|
-
return
|
|
199
|
+
case 'email':
|
|
200
|
+
return 'email';
|
|
201
|
+
case 'username':
|
|
202
|
+
return 'username';
|
|
203
203
|
default:
|
|
204
204
|
return undefined;
|
|
205
205
|
}
|
|
@@ -208,24 +208,24 @@ export class UserProfileFormService {
|
|
|
208
208
|
);
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
if (
|
|
211
|
+
if ('email' in this.kcContext && this.kcContext.email instanceof Object) {
|
|
212
212
|
//NOTE: Handle legacy update-email.ftl
|
|
213
213
|
return [
|
|
214
214
|
id<Attribute>({
|
|
215
|
-
name:
|
|
215
|
+
name: 'email',
|
|
216
216
|
displayName: id<`\${${MessageKey_defaultSet}}`>(`\${email}`),
|
|
217
217
|
required: true,
|
|
218
|
-
value: (this.kcContext.email as any).value ??
|
|
218
|
+
value: (this.kcContext.email as any).value ?? '',
|
|
219
219
|
html5DataAnnotations: {},
|
|
220
220
|
readOnly: false,
|
|
221
221
|
validators: {},
|
|
222
222
|
annotations: {},
|
|
223
|
-
autocomplete:
|
|
223
|
+
autocomplete: 'email'
|
|
224
224
|
})
|
|
225
225
|
];
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
assert(false,
|
|
228
|
+
assert(false, 'Unable to mock user profile from the current kcContext');
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
return Object.values(this.kcContext.profile.attributesByName).map(
|
|
@@ -235,7 +235,7 @@ export class UserProfileFormService {
|
|
|
235
235
|
// Retro-compatibility and consistency patches
|
|
236
236
|
attributes.forEach(attribute => {
|
|
237
237
|
patch_legacy_group: {
|
|
238
|
-
if (typeof attribute.group !==
|
|
238
|
+
if (typeof attribute.group !== 'string') {
|
|
239
239
|
break patch_legacy_group;
|
|
240
240
|
}
|
|
241
241
|
|
|
@@ -259,7 +259,7 @@ export class UserProfileFormService {
|
|
|
259
259
|
// @ts-expect-error
|
|
260
260
|
delete attribute.groupAnnotations;
|
|
261
261
|
|
|
262
|
-
if (group ===
|
|
262
|
+
if (group === '') {
|
|
263
263
|
break patch_legacy_group;
|
|
264
264
|
}
|
|
265
265
|
|
|
@@ -277,7 +277,7 @@ export class UserProfileFormService {
|
|
|
277
277
|
attribute.validators.options !== undefined &&
|
|
278
278
|
attribute.annotations.inputType === undefined
|
|
279
279
|
) {
|
|
280
|
-
attribute.annotations.inputType =
|
|
280
|
+
attribute.annotations.inputType = 'select';
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
// Consistency patch on values/value property
|
|
@@ -305,8 +305,8 @@ export class UserProfileFormService {
|
|
|
305
305
|
if (
|
|
306
306
|
attribute.name !==
|
|
307
307
|
(this.kcContext.realm.registrationEmailAsUsername
|
|
308
|
-
?
|
|
309
|
-
:
|
|
308
|
+
? 'email'
|
|
309
|
+
: 'username')
|
|
310
310
|
) {
|
|
311
311
|
// NOTE: We want to add password and password-confirm after the field that identifies the user.
|
|
312
312
|
// It's either email or username.
|
|
@@ -317,25 +317,25 @@ export class UserProfileFormService {
|
|
|
317
317
|
i + 1,
|
|
318
318
|
0,
|
|
319
319
|
{
|
|
320
|
-
name:
|
|
321
|
-
displayName: id<`\${${MessageKey_defaultSet}}`>(
|
|
320
|
+
name: 'password',
|
|
321
|
+
displayName: id<`\${${MessageKey_defaultSet}}`>('${password}'),
|
|
322
322
|
required: true,
|
|
323
323
|
readOnly: false,
|
|
324
324
|
validators: {},
|
|
325
325
|
annotations: {},
|
|
326
|
-
autocomplete:
|
|
326
|
+
autocomplete: 'new-password',
|
|
327
327
|
html5DataAnnotations: {}
|
|
328
328
|
},
|
|
329
329
|
{
|
|
330
|
-
name:
|
|
330
|
+
name: 'password-confirm',
|
|
331
331
|
displayName:
|
|
332
|
-
id<`\${${MessageKey_defaultSet}}`>(
|
|
332
|
+
id<`\${${MessageKey_defaultSet}}`>('${passwordConfirm}'),
|
|
333
333
|
required: true,
|
|
334
334
|
readOnly: false,
|
|
335
335
|
validators: {},
|
|
336
336
|
annotations: {},
|
|
337
337
|
html5DataAnnotations: {},
|
|
338
|
-
autocomplete:
|
|
338
|
+
autocomplete: 'new-password'
|
|
339
339
|
}
|
|
340
340
|
);
|
|
341
341
|
});
|
|
@@ -351,7 +351,7 @@ export class UserProfileFormService {
|
|
|
351
351
|
break handle_multi_valued_attribute;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
-
const values = attribute.values?.length ? attribute.values : [
|
|
354
|
+
const values = attribute.values?.length ? attribute.values : [''];
|
|
355
355
|
|
|
356
356
|
apply_validator_min_range: {
|
|
357
357
|
if (this.getIsMultivaluedSingleField({ attribute })) {
|
|
@@ -373,7 +373,7 @@ export class UserProfileFormService {
|
|
|
373
373
|
const min = parseInt(`${minStr}`);
|
|
374
374
|
|
|
375
375
|
for (let index = values.length; index < min; index++) {
|
|
376
|
-
values.push(
|
|
376
|
+
values.push('');
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
|
|
@@ -387,7 +387,7 @@ export class UserProfileFormService {
|
|
|
387
387
|
|
|
388
388
|
initialFormFieldState.push({
|
|
389
389
|
attribute,
|
|
390
|
-
valueOrValues: attribute.value ??
|
|
390
|
+
valueOrValues: attribute.value ?? ''
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
|
|
@@ -425,7 +425,7 @@ export class UserProfileFormService {
|
|
|
425
425
|
}) => ({
|
|
426
426
|
displayableErrors: errors.filter(error => {
|
|
427
427
|
const hasLostFocusAtLeastOnce =
|
|
428
|
-
typeof hasLostFocusAtLeastOnceOrArr ===
|
|
428
|
+
typeof hasLostFocusAtLeastOnceOrArr === 'boolean'
|
|
429
429
|
? hasLostFocusAtLeastOnceOrArr
|
|
430
430
|
: error.fieldIndex !== undefined
|
|
431
431
|
? hasLostFocusAtLeastOnceOrArr[error.fieldIndex]
|
|
@@ -434,64 +434,64 @@ export class UserProfileFormService {
|
|
|
434
434
|
];
|
|
435
435
|
let value = false;
|
|
436
436
|
switch (error.source.type) {
|
|
437
|
-
case
|
|
437
|
+
case 'server':
|
|
438
438
|
value = true;
|
|
439
439
|
break;
|
|
440
|
-
case
|
|
440
|
+
case 'other':
|
|
441
441
|
switch (error.source.rule) {
|
|
442
|
-
case
|
|
442
|
+
case 'requiredField':
|
|
443
443
|
value = hasLostFocusAtLeastOnce;
|
|
444
444
|
break;
|
|
445
|
-
case
|
|
445
|
+
case 'passwordConfirmMatchesPassword':
|
|
446
446
|
value = hasLostFocusAtLeastOnce;
|
|
447
447
|
break;
|
|
448
448
|
}
|
|
449
449
|
// assert<Equals<typeof error.source.rule, never>>(false);
|
|
450
450
|
break;
|
|
451
|
-
case
|
|
451
|
+
case 'passwordPolicy':
|
|
452
452
|
switch (error.source.name) {
|
|
453
|
-
case
|
|
453
|
+
case 'length':
|
|
454
454
|
value = hasLostFocusAtLeastOnce;
|
|
455
455
|
break;
|
|
456
|
-
case
|
|
456
|
+
case 'digits':
|
|
457
457
|
value = hasLostFocusAtLeastOnce;
|
|
458
458
|
break;
|
|
459
|
-
case
|
|
459
|
+
case 'lowerCase':
|
|
460
460
|
value = hasLostFocusAtLeastOnce;
|
|
461
461
|
break;
|
|
462
|
-
case
|
|
462
|
+
case 'upperCase':
|
|
463
463
|
value = hasLostFocusAtLeastOnce;
|
|
464
464
|
break;
|
|
465
|
-
case
|
|
465
|
+
case 'specialChars':
|
|
466
466
|
value = hasLostFocusAtLeastOnce;
|
|
467
467
|
break;
|
|
468
|
-
case
|
|
468
|
+
case 'notUsername':
|
|
469
469
|
value = true;
|
|
470
470
|
break;
|
|
471
|
-
case
|
|
471
|
+
case 'notEmail':
|
|
472
472
|
value = true;
|
|
473
473
|
break;
|
|
474
474
|
}
|
|
475
475
|
// assert<Equals<typeof error.source, never>>(false);
|
|
476
476
|
break;
|
|
477
|
-
case
|
|
477
|
+
case 'validator':
|
|
478
478
|
switch (error.source.name) {
|
|
479
|
-
case
|
|
479
|
+
case 'length':
|
|
480
480
|
value = hasLostFocusAtLeastOnce;
|
|
481
481
|
break;
|
|
482
|
-
case
|
|
482
|
+
case 'pattern':
|
|
483
483
|
value = hasLostFocusAtLeastOnce;
|
|
484
484
|
break;
|
|
485
|
-
case
|
|
485
|
+
case 'email':
|
|
486
486
|
value = hasLostFocusAtLeastOnce;
|
|
487
487
|
break;
|
|
488
|
-
case
|
|
488
|
+
case 'integer':
|
|
489
489
|
value = hasLostFocusAtLeastOnce;
|
|
490
490
|
break;
|
|
491
|
-
case
|
|
491
|
+
case 'multivalued':
|
|
492
492
|
value = hasLostFocusAtLeastOnce;
|
|
493
493
|
break;
|
|
494
|
-
case
|
|
494
|
+
case 'options':
|
|
495
495
|
value = hasLostFocusAtLeastOnce;
|
|
496
496
|
break;
|
|
497
497
|
}
|
|
@@ -513,9 +513,9 @@ export class UserProfileFormService {
|
|
|
513
513
|
constructor() {
|
|
514
514
|
this.loginResourceInjectorService.insertAdditionalScripts(
|
|
515
515
|
Object.keys(this.kcContext.profile?.html5DataAnnotations ?? {})
|
|
516
|
-
.filter(key => key !==
|
|
516
|
+
.filter(key => key !== 'kcMultivalued' && key !== 'kcNumberFormat') // NOTE: Keycloakify handles it.
|
|
517
517
|
.map(key => ({
|
|
518
|
-
type:
|
|
518
|
+
type: 'module',
|
|
519
519
|
src: `${this.kcContext.url.resourcesPath}/js/${key}.js`,
|
|
520
520
|
id: `${this.kcContext.url.resourcesPath}/js/${key}.js`
|
|
521
521
|
}))
|
|
@@ -530,7 +530,7 @@ export class UserProfileFormService {
|
|
|
530
530
|
);
|
|
531
531
|
assert(formFieldState !== undefined);
|
|
532
532
|
switch (formAction.action) {
|
|
533
|
-
case
|
|
533
|
+
case 'update':
|
|
534
534
|
formFieldState.valueOrValues = formAction.valueOrValues;
|
|
535
535
|
|
|
536
536
|
apply_formatters: {
|
|
@@ -570,7 +570,7 @@ export class UserProfileFormService {
|
|
|
570
570
|
? formAction.valueOrValues.map((...[, index]) => index)
|
|
571
571
|
: [undefined]) {
|
|
572
572
|
this.dispatchFormAction({
|
|
573
|
-
action:
|
|
573
|
+
action: 'focus lost',
|
|
574
574
|
name: formAction.name,
|
|
575
575
|
fieldIndex
|
|
576
576
|
});
|
|
@@ -582,13 +582,13 @@ export class UserProfileFormService {
|
|
|
582
582
|
break update_password_confirm;
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
-
if (formAction.name !==
|
|
585
|
+
if (formAction.name !== 'password') {
|
|
586
586
|
break update_password_confirm;
|
|
587
587
|
}
|
|
588
588
|
|
|
589
589
|
this.dispatchFormAction({
|
|
590
|
-
action:
|
|
591
|
-
name:
|
|
590
|
+
action: 'update',
|
|
591
|
+
name: 'password-confirm',
|
|
592
592
|
valueOrValues: formAction.valueOrValues,
|
|
593
593
|
displayErrorsImmediately: formAction.displayErrorsImmediately
|
|
594
594
|
});
|
|
@@ -599,16 +599,16 @@ export class UserProfileFormService {
|
|
|
599
599
|
break trigger_password_confirm_validation_on_password_change;
|
|
600
600
|
}
|
|
601
601
|
|
|
602
|
-
if (formAction.name !==
|
|
602
|
+
if (formAction.name !== 'password') {
|
|
603
603
|
break trigger_password_confirm_validation_on_password_change;
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
this.dispatchFormAction({
|
|
607
|
-
action:
|
|
608
|
-
name:
|
|
607
|
+
action: 'update',
|
|
608
|
+
name: 'password-confirm',
|
|
609
609
|
valueOrValues: (() => {
|
|
610
610
|
const formFieldState = state.formFieldStates.find(
|
|
611
|
-
({ attribute }) => attribute.name ===
|
|
611
|
+
({ attribute }) => attribute.name === 'password-confirm'
|
|
612
612
|
);
|
|
613
613
|
|
|
614
614
|
assert(formFieldState !== undefined);
|
|
@@ -620,7 +620,7 @@ export class UserProfileFormService {
|
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
break;
|
|
623
|
-
case
|
|
623
|
+
case 'focus lost':
|
|
624
624
|
if (formFieldState.hasLostFocusAtLeastOnce instanceof Array) {
|
|
625
625
|
const { fieldIndex } = formAction;
|
|
626
626
|
assert(fieldIndex !== undefined);
|
|
@@ -643,7 +643,7 @@ export class UserProfileFormService {
|
|
|
643
643
|
private getIsMultivaluedSingleField(params: { attribute: Attribute }) {
|
|
644
644
|
const { attribute } = params;
|
|
645
645
|
|
|
646
|
-
return attribute.annotations.inputType?.startsWith(
|
|
646
|
+
return attribute.annotations.inputType?.startsWith('multiselect') ?? false;
|
|
647
647
|
}
|
|
648
648
|
|
|
649
649
|
private getErrors(params: {
|
|
@@ -692,7 +692,7 @@ export class UserProfileFormService {
|
|
|
692
692
|
|
|
693
693
|
server_side_error: {
|
|
694
694
|
if (attribute.multivalued) {
|
|
695
|
-
const defaultValues = attribute.values?.length ? attribute.values : [
|
|
695
|
+
const defaultValues = attribute.values?.length ? attribute.values : [''];
|
|
696
696
|
|
|
697
697
|
assert(valueOrValues instanceof Array);
|
|
698
698
|
|
|
@@ -705,9 +705,9 @@ export class UserProfileFormService {
|
|
|
705
705
|
break server_side_error;
|
|
706
706
|
}
|
|
707
707
|
} else {
|
|
708
|
-
const defaultValue = attribute.value ??
|
|
708
|
+
const defaultValue = attribute.value ?? '';
|
|
709
709
|
|
|
710
|
-
assert(typeof valueOrValues ===
|
|
710
|
+
assert(typeof valueOrValues === 'string');
|
|
711
711
|
|
|
712
712
|
const value = valueOrValues;
|
|
713
713
|
|
|
@@ -738,7 +738,7 @@ export class UserProfileFormService {
|
|
|
738
738
|
),
|
|
739
739
|
fieldIndex: undefined,
|
|
740
740
|
source: {
|
|
741
|
-
type:
|
|
741
|
+
type: 'server'
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
744
|
];
|
|
@@ -784,8 +784,8 @@ export class UserProfileFormService {
|
|
|
784
784
|
return specificValueErrors
|
|
785
785
|
.filter(error => {
|
|
786
786
|
if (
|
|
787
|
-
error.source.type ===
|
|
788
|
-
error.source.rule ===
|
|
787
|
+
error.source.type === 'other' &&
|
|
788
|
+
error.source.rule === 'requiredField'
|
|
789
789
|
) {
|
|
790
790
|
return false;
|
|
791
791
|
}
|
|
@@ -806,11 +806,11 @@ export class UserProfileFormService {
|
|
|
806
806
|
break required_field;
|
|
807
807
|
}
|
|
808
808
|
|
|
809
|
-
if (values.every(value => value !==
|
|
809
|
+
if (values.every(value => value !== '')) {
|
|
810
810
|
break required_field;
|
|
811
811
|
}
|
|
812
812
|
|
|
813
|
-
const msgArgs = [
|
|
813
|
+
const msgArgs = ['error-user-attribute-required'] as const;
|
|
814
814
|
|
|
815
815
|
errors.push({
|
|
816
816
|
errorMessage: this.sanitizer.bypassSecurityTrustHtml(
|
|
@@ -819,8 +819,8 @@ export class UserProfileFormService {
|
|
|
819
819
|
errorMessageStr: msgStr(...msgArgs),
|
|
820
820
|
fieldIndex: undefined,
|
|
821
821
|
source: {
|
|
822
|
-
type:
|
|
823
|
-
rule:
|
|
822
|
+
type: 'other',
|
|
823
|
+
rule: 'requiredField'
|
|
824
824
|
}
|
|
825
825
|
});
|
|
826
826
|
}
|
|
@@ -837,7 +837,7 @@ export class UserProfileFormService {
|
|
|
837
837
|
break handle_multi_valued_single_field;
|
|
838
838
|
}
|
|
839
839
|
|
|
840
|
-
const validatorName =
|
|
840
|
+
const validatorName = 'multivalued';
|
|
841
841
|
|
|
842
842
|
const validator = attribute.validators[validatorName];
|
|
843
843
|
|
|
@@ -866,7 +866,7 @@ export class UserProfileFormService {
|
|
|
866
866
|
}
|
|
867
867
|
|
|
868
868
|
const msgArgs = [
|
|
869
|
-
|
|
869
|
+
'error-invalid-multivalued-size',
|
|
870
870
|
`${min}`,
|
|
871
871
|
`${max}`
|
|
872
872
|
] as const;
|
|
@@ -879,21 +879,21 @@ export class UserProfileFormService {
|
|
|
879
879
|
errorMessageStr: msgStr(...msgArgs),
|
|
880
880
|
fieldIndex: undefined,
|
|
881
881
|
source: {
|
|
882
|
-
type:
|
|
882
|
+
type: 'validator',
|
|
883
883
|
name: validatorName
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
886
|
];
|
|
887
887
|
}
|
|
888
888
|
|
|
889
|
-
assert(typeof valueOrValues ===
|
|
889
|
+
assert(typeof valueOrValues === 'string');
|
|
890
890
|
|
|
891
891
|
const value = valueOrValues;
|
|
892
892
|
|
|
893
893
|
const errors: FormFieldError[] = [];
|
|
894
894
|
|
|
895
895
|
check_password_policies: {
|
|
896
|
-
if (attributeName !==
|
|
896
|
+
if (attributeName !== 'password') {
|
|
897
897
|
break check_password_policies;
|
|
898
898
|
}
|
|
899
899
|
|
|
@@ -902,7 +902,7 @@ export class UserProfileFormService {
|
|
|
902
902
|
}
|
|
903
903
|
|
|
904
904
|
check_password_policy_x: {
|
|
905
|
-
const policyName =
|
|
905
|
+
const policyName = 'length';
|
|
906
906
|
|
|
907
907
|
const policy = passwordPolicies[policyName];
|
|
908
908
|
|
|
@@ -917,7 +917,7 @@ export class UserProfileFormService {
|
|
|
917
917
|
}
|
|
918
918
|
|
|
919
919
|
const msgArgs = [
|
|
920
|
-
|
|
920
|
+
'invalidPasswordMinLengthMessage',
|
|
921
921
|
`${minLength}`
|
|
922
922
|
] as const;
|
|
923
923
|
|
|
@@ -928,14 +928,14 @@ export class UserProfileFormService {
|
|
|
928
928
|
errorMessageStr: msgStr(...msgArgs),
|
|
929
929
|
fieldIndex: undefined,
|
|
930
930
|
source: {
|
|
931
|
-
type:
|
|
931
|
+
type: 'passwordPolicy',
|
|
932
932
|
name: policyName
|
|
933
933
|
}
|
|
934
934
|
});
|
|
935
935
|
}
|
|
936
936
|
|
|
937
937
|
check_password_policy_x: {
|
|
938
|
-
const policyName =
|
|
938
|
+
const policyName = 'digits';
|
|
939
939
|
|
|
940
940
|
const policy = passwordPolicies[policyName];
|
|
941
941
|
|
|
@@ -946,14 +946,14 @@ export class UserProfileFormService {
|
|
|
946
946
|
const minNumberOfDigits = policy;
|
|
947
947
|
|
|
948
948
|
if (
|
|
949
|
-
value.split(
|
|
949
|
+
value.split('').filter(char => !isNaN(parseInt(char))).length >=
|
|
950
950
|
minNumberOfDigits
|
|
951
951
|
) {
|
|
952
952
|
break check_password_policy_x;
|
|
953
953
|
}
|
|
954
954
|
|
|
955
955
|
const msgArgs = [
|
|
956
|
-
|
|
956
|
+
'invalidPasswordMinDigitsMessage',
|
|
957
957
|
`${minNumberOfDigits}`
|
|
958
958
|
] as const;
|
|
959
959
|
|
|
@@ -964,14 +964,14 @@ export class UserProfileFormService {
|
|
|
964
964
|
errorMessageStr: msgStr(...msgArgs),
|
|
965
965
|
fieldIndex: undefined,
|
|
966
966
|
source: {
|
|
967
|
-
type:
|
|
967
|
+
type: 'passwordPolicy',
|
|
968
968
|
name: policyName
|
|
969
969
|
}
|
|
970
970
|
});
|
|
971
971
|
}
|
|
972
972
|
|
|
973
973
|
check_password_policy_x: {
|
|
974
|
-
const policyName =
|
|
974
|
+
const policyName = 'lowerCase';
|
|
975
975
|
|
|
976
976
|
const policy = passwordPolicies[policyName];
|
|
977
977
|
|
|
@@ -983,7 +983,7 @@ export class UserProfileFormService {
|
|
|
983
983
|
|
|
984
984
|
if (
|
|
985
985
|
value
|
|
986
|
-
.split(
|
|
986
|
+
.split('')
|
|
987
987
|
.filter(
|
|
988
988
|
char =>
|
|
989
989
|
char === char.toLowerCase() && char !== char.toUpperCase()
|
|
@@ -993,7 +993,7 @@ export class UserProfileFormService {
|
|
|
993
993
|
}
|
|
994
994
|
|
|
995
995
|
const msgArgs = [
|
|
996
|
-
|
|
996
|
+
'invalidPasswordMinLowerCaseCharsMessage',
|
|
997
997
|
`${minNumberOfLowerCaseChar}`
|
|
998
998
|
] as const;
|
|
999
999
|
|
|
@@ -1004,14 +1004,14 @@ export class UserProfileFormService {
|
|
|
1004
1004
|
errorMessageStr: msgStr(...msgArgs),
|
|
1005
1005
|
fieldIndex: undefined,
|
|
1006
1006
|
source: {
|
|
1007
|
-
type:
|
|
1007
|
+
type: 'passwordPolicy',
|
|
1008
1008
|
name: policyName
|
|
1009
1009
|
}
|
|
1010
1010
|
});
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
1013
|
check_password_policy_x: {
|
|
1014
|
-
const policyName =
|
|
1014
|
+
const policyName = 'upperCase';
|
|
1015
1015
|
|
|
1016
1016
|
const policy = passwordPolicies[policyName];
|
|
1017
1017
|
|
|
@@ -1023,7 +1023,7 @@ export class UserProfileFormService {
|
|
|
1023
1023
|
|
|
1024
1024
|
if (
|
|
1025
1025
|
value
|
|
1026
|
-
.split(
|
|
1026
|
+
.split('')
|
|
1027
1027
|
.filter(
|
|
1028
1028
|
char =>
|
|
1029
1029
|
char === char.toUpperCase() && char !== char.toLowerCase()
|
|
@@ -1033,7 +1033,7 @@ export class UserProfileFormService {
|
|
|
1033
1033
|
}
|
|
1034
1034
|
|
|
1035
1035
|
const msgArgs = [
|
|
1036
|
-
|
|
1036
|
+
'invalidPasswordMinUpperCaseCharsMessage',
|
|
1037
1037
|
`${minNumberOfUpperCaseChar}`
|
|
1038
1038
|
] as const;
|
|
1039
1039
|
|
|
@@ -1044,14 +1044,14 @@ export class UserProfileFormService {
|
|
|
1044
1044
|
errorMessageStr: msgStr(...msgArgs),
|
|
1045
1045
|
fieldIndex: undefined,
|
|
1046
1046
|
source: {
|
|
1047
|
-
type:
|
|
1047
|
+
type: 'passwordPolicy',
|
|
1048
1048
|
name: policyName
|
|
1049
1049
|
}
|
|
1050
1050
|
});
|
|
1051
1051
|
}
|
|
1052
1052
|
|
|
1053
1053
|
check_password_policy_x: {
|
|
1054
|
-
const policyName =
|
|
1054
|
+
const policyName = 'specialChars';
|
|
1055
1055
|
|
|
1056
1056
|
const policy = passwordPolicies[policyName];
|
|
1057
1057
|
|
|
@@ -1062,14 +1062,14 @@ export class UserProfileFormService {
|
|
|
1062
1062
|
const minNumberOfSpecialChar = policy;
|
|
1063
1063
|
|
|
1064
1064
|
if (
|
|
1065
|
-
value.split(
|
|
1065
|
+
value.split('').filter(char => !char.match(/[a-zA-Z0-9]/)).length >=
|
|
1066
1066
|
minNumberOfSpecialChar
|
|
1067
1067
|
) {
|
|
1068
1068
|
break check_password_policy_x;
|
|
1069
1069
|
}
|
|
1070
1070
|
|
|
1071
1071
|
const msgArgs = [
|
|
1072
|
-
|
|
1072
|
+
'invalidPasswordMinSpecialCharsMessage',
|
|
1073
1073
|
`${minNumberOfSpecialChar}`
|
|
1074
1074
|
] as const;
|
|
1075
1075
|
|
|
@@ -1080,14 +1080,14 @@ export class UserProfileFormService {
|
|
|
1080
1080
|
errorMessageStr: msgStr(...msgArgs),
|
|
1081
1081
|
fieldIndex: undefined,
|
|
1082
1082
|
source: {
|
|
1083
|
-
type:
|
|
1083
|
+
type: 'passwordPolicy',
|
|
1084
1084
|
name: policyName
|
|
1085
1085
|
}
|
|
1086
1086
|
});
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
1089
|
check_password_policy_x: {
|
|
1090
|
-
const policyName =
|
|
1090
|
+
const policyName = 'notUsername';
|
|
1091
1091
|
|
|
1092
1092
|
const notUsername = passwordPolicies[policyName];
|
|
1093
1093
|
|
|
@@ -1096,7 +1096,7 @@ export class UserProfileFormService {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
|
|
1098
1098
|
const usernameFormFieldState = formFieldStates.find(
|
|
1099
|
-
formFieldState => formFieldState.attribute.name ===
|
|
1099
|
+
formFieldState => formFieldState.attribute.name === 'username'
|
|
1100
1100
|
);
|
|
1101
1101
|
|
|
1102
1102
|
if (!usernameFormFieldState) {
|
|
@@ -1106,7 +1106,7 @@ export class UserProfileFormService {
|
|
|
1106
1106
|
const usernameValue = (() => {
|
|
1107
1107
|
let { valueOrValues } = usernameFormFieldState;
|
|
1108
1108
|
|
|
1109
|
-
assert(typeof valueOrValues ===
|
|
1109
|
+
assert(typeof valueOrValues === 'string');
|
|
1110
1110
|
|
|
1111
1111
|
unFormat_number: {
|
|
1112
1112
|
const { kcNumberUnFormat } = attribute.html5DataAnnotations ?? {};
|
|
@@ -1121,7 +1121,7 @@ export class UserProfileFormService {
|
|
|
1121
1121
|
return valueOrValues;
|
|
1122
1122
|
})();
|
|
1123
1123
|
|
|
1124
|
-
if (usernameValue ===
|
|
1124
|
+
if (usernameValue === '') {
|
|
1125
1125
|
break check_password_policy_x;
|
|
1126
1126
|
}
|
|
1127
1127
|
|
|
@@ -1129,7 +1129,7 @@ export class UserProfileFormService {
|
|
|
1129
1129
|
break check_password_policy_x;
|
|
1130
1130
|
}
|
|
1131
1131
|
|
|
1132
|
-
const msgArgs = [
|
|
1132
|
+
const msgArgs = ['invalidPasswordNotUsernameMessage'] as const;
|
|
1133
1133
|
|
|
1134
1134
|
errors.push({
|
|
1135
1135
|
errorMessage: this.sanitizer.bypassSecurityTrustHtml(
|
|
@@ -1138,14 +1138,14 @@ export class UserProfileFormService {
|
|
|
1138
1138
|
errorMessageStr: msgStr(...msgArgs),
|
|
1139
1139
|
fieldIndex: undefined,
|
|
1140
1140
|
source: {
|
|
1141
|
-
type:
|
|
1141
|
+
type: 'passwordPolicy',
|
|
1142
1142
|
name: policyName
|
|
1143
1143
|
}
|
|
1144
1144
|
});
|
|
1145
1145
|
}
|
|
1146
1146
|
|
|
1147
1147
|
check_password_policy_x: {
|
|
1148
|
-
const policyName =
|
|
1148
|
+
const policyName = 'notEmail';
|
|
1149
1149
|
|
|
1150
1150
|
const notEmail = passwordPolicies[policyName];
|
|
1151
1151
|
|
|
@@ -1154,19 +1154,19 @@ export class UserProfileFormService {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
|
|
1156
1156
|
const emailFormFieldState = formFieldStates.find(
|
|
1157
|
-
formFieldState => formFieldState.attribute.name ===
|
|
1157
|
+
formFieldState => formFieldState.attribute.name === 'email'
|
|
1158
1158
|
);
|
|
1159
1159
|
|
|
1160
1160
|
if (!emailFormFieldState) {
|
|
1161
1161
|
break check_password_policy_x;
|
|
1162
1162
|
}
|
|
1163
1163
|
|
|
1164
|
-
assert(typeof emailFormFieldState.valueOrValues ===
|
|
1164
|
+
assert(typeof emailFormFieldState.valueOrValues === 'string');
|
|
1165
1165
|
|
|
1166
1166
|
{
|
|
1167
1167
|
const emailValue = emailFormFieldState.valueOrValues;
|
|
1168
1168
|
|
|
1169
|
-
if (emailValue ===
|
|
1169
|
+
if (emailValue === '') {
|
|
1170
1170
|
break check_password_policy_x;
|
|
1171
1171
|
}
|
|
1172
1172
|
|
|
@@ -1175,7 +1175,7 @@ export class UserProfileFormService {
|
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
1177
|
|
|
1178
|
-
const msgArgs = [
|
|
1178
|
+
const msgArgs = ['invalidPasswordNotEmailMessage'] as const;
|
|
1179
1179
|
|
|
1180
1180
|
errors.push({
|
|
1181
1181
|
errorMessage: this.sanitizer.bypassSecurityTrustHtml(
|
|
@@ -1184,7 +1184,7 @@ export class UserProfileFormService {
|
|
|
1184
1184
|
errorMessageStr: msgStr(...msgArgs),
|
|
1185
1185
|
fieldIndex: undefined,
|
|
1186
1186
|
source: {
|
|
1187
|
-
type:
|
|
1187
|
+
type: 'passwordPolicy',
|
|
1188
1188
|
name: policyName
|
|
1189
1189
|
}
|
|
1190
1190
|
});
|
|
@@ -1192,17 +1192,17 @@ export class UserProfileFormService {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
1194
|
password_confirm_matches_password: {
|
|
1195
|
-
if (attributeName !==
|
|
1195
|
+
if (attributeName !== 'password-confirm') {
|
|
1196
1196
|
break password_confirm_matches_password;
|
|
1197
1197
|
}
|
|
1198
1198
|
|
|
1199
1199
|
const passwordFormFieldState = formFieldStates.find(
|
|
1200
|
-
formFieldState => formFieldState.attribute.name ===
|
|
1200
|
+
formFieldState => formFieldState.attribute.name === 'password'
|
|
1201
1201
|
);
|
|
1202
1202
|
|
|
1203
1203
|
assert(passwordFormFieldState !== undefined);
|
|
1204
1204
|
|
|
1205
|
-
assert(typeof passwordFormFieldState.valueOrValues ===
|
|
1205
|
+
assert(typeof passwordFormFieldState.valueOrValues === 'string');
|
|
1206
1206
|
|
|
1207
1207
|
{
|
|
1208
1208
|
const passwordValue = passwordFormFieldState.valueOrValues;
|
|
@@ -1212,7 +1212,7 @@ export class UserProfileFormService {
|
|
|
1212
1212
|
}
|
|
1213
1213
|
}
|
|
1214
1214
|
|
|
1215
|
-
const msgArgs = [
|
|
1215
|
+
const msgArgs = ['invalidPasswordConfirmMessage'] as const;
|
|
1216
1216
|
|
|
1217
1217
|
errors.push({
|
|
1218
1218
|
errorMessage: this.sanitizer.bypassSecurityTrustHtml(
|
|
@@ -1221,8 +1221,8 @@ export class UserProfileFormService {
|
|
|
1221
1221
|
errorMessageStr: msgStr(...msgArgs),
|
|
1222
1222
|
fieldIndex: undefined,
|
|
1223
1223
|
source: {
|
|
1224
|
-
type:
|
|
1225
|
-
rule:
|
|
1224
|
+
type: 'other',
|
|
1225
|
+
rule: 'passwordConfirmMatchesPassword'
|
|
1226
1226
|
}
|
|
1227
1227
|
});
|
|
1228
1228
|
}
|
|
@@ -1234,11 +1234,11 @@ export class UserProfileFormService {
|
|
|
1234
1234
|
break required_field;
|
|
1235
1235
|
}
|
|
1236
1236
|
|
|
1237
|
-
if (value !==
|
|
1237
|
+
if (value !== '') {
|
|
1238
1238
|
break required_field;
|
|
1239
1239
|
}
|
|
1240
1240
|
|
|
1241
|
-
const msgArgs = [
|
|
1241
|
+
const msgArgs = ['error-user-attribute-required'] as const;
|
|
1242
1242
|
|
|
1243
1243
|
errors.push({
|
|
1244
1244
|
errorMessage: this.sanitizer.bypassSecurityTrustHtml(
|
|
@@ -1247,14 +1247,14 @@ export class UserProfileFormService {
|
|
|
1247
1247
|
errorMessageStr: msgStr(...msgArgs),
|
|
1248
1248
|
fieldIndex: undefined,
|
|
1249
1249
|
source: {
|
|
1250
|
-
type:
|
|
1251
|
-
rule:
|
|
1250
|
+
type: 'other',
|
|
1251
|
+
rule: 'requiredField'
|
|
1252
1252
|
}
|
|
1253
1253
|
});
|
|
1254
1254
|
}
|
|
1255
1255
|
|
|
1256
1256
|
validator_x: {
|
|
1257
|
-
const validatorName =
|
|
1257
|
+
const validatorName = 'length';
|
|
1258
1258
|
|
|
1259
1259
|
const validator = validators[validatorName];
|
|
1260
1260
|
|
|
@@ -1263,22 +1263,22 @@ export class UserProfileFormService {
|
|
|
1263
1263
|
}
|
|
1264
1264
|
|
|
1265
1265
|
const {
|
|
1266
|
-
|
|
1266
|
+
'ignore.empty.value': ignoreEmptyValue = false,
|
|
1267
1267
|
max,
|
|
1268
1268
|
min
|
|
1269
1269
|
} = validator;
|
|
1270
1270
|
|
|
1271
|
-
if (ignoreEmptyValue && value ===
|
|
1271
|
+
if (ignoreEmptyValue && value === '') {
|
|
1272
1272
|
break validator_x;
|
|
1273
1273
|
}
|
|
1274
1274
|
|
|
1275
1275
|
const source: FormFieldError.Source = {
|
|
1276
|
-
type:
|
|
1276
|
+
type: 'validator',
|
|
1277
1277
|
name: validatorName
|
|
1278
1278
|
};
|
|
1279
1279
|
|
|
1280
1280
|
if (max && value.length > parseInt(`${max}`)) {
|
|
1281
|
-
const msgArgs = [
|
|
1281
|
+
const msgArgs = ['error-invalid-length-too-long', `${max}`] as const;
|
|
1282
1282
|
|
|
1283
1283
|
errors.push({
|
|
1284
1284
|
errorMessage: this.sanitizer.bypassSecurityTrustHtml(
|
|
@@ -1291,7 +1291,7 @@ export class UserProfileFormService {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
|
|
1293
1293
|
if (min && value.length < parseInt(`${min}`)) {
|
|
1294
|
-
const msgArgs = [
|
|
1294
|
+
const msgArgs = ['error-invalid-length-too-short', `${min}`] as const;
|
|
1295
1295
|
|
|
1296
1296
|
errors.push({
|
|
1297
1297
|
errorMessage: this.sanitizer.bypassSecurityTrustHtml(
|
|
@@ -1305,7 +1305,7 @@ export class UserProfileFormService {
|
|
|
1305
1305
|
}
|
|
1306
1306
|
|
|
1307
1307
|
validator_x: {
|
|
1308
|
-
const validatorName =
|
|
1308
|
+
const validatorName = 'pattern';
|
|
1309
1309
|
|
|
1310
1310
|
const validator = validators[validatorName];
|
|
1311
1311
|
|
|
@@ -1314,12 +1314,12 @@ export class UserProfileFormService {
|
|
|
1314
1314
|
}
|
|
1315
1315
|
|
|
1316
1316
|
const {
|
|
1317
|
-
|
|
1317
|
+
'ignore.empty.value': ignoreEmptyValue = false,
|
|
1318
1318
|
pattern,
|
|
1319
|
-
|
|
1319
|
+
'error-message': errorMessageKey
|
|
1320
1320
|
} = validator;
|
|
1321
1321
|
|
|
1322
|
-
if (ignoreEmptyValue && value ===
|
|
1322
|
+
if (ignoreEmptyValue && value === '') {
|
|
1323
1323
|
break validator_x;
|
|
1324
1324
|
}
|
|
1325
1325
|
|
|
@@ -1328,7 +1328,7 @@ export class UserProfileFormService {
|
|
|
1328
1328
|
}
|
|
1329
1329
|
|
|
1330
1330
|
const msgArgs = [
|
|
1331
|
-
errorMessageKey ?? id<MessageKey_defaultSet>(
|
|
1331
|
+
errorMessageKey ?? id<MessageKey_defaultSet>('shouldMatchPattern'),
|
|
1332
1332
|
pattern
|
|
1333
1333
|
] as const;
|
|
1334
1334
|
|
|
@@ -1339,7 +1339,7 @@ export class UserProfileFormService {
|
|
|
1339
1339
|
errorMessageStr: advancedMsgStr(...msgArgs),
|
|
1340
1340
|
fieldIndex: undefined,
|
|
1341
1341
|
source: {
|
|
1342
|
-
type:
|
|
1342
|
+
type: 'validator',
|
|
1343
1343
|
name: validatorName
|
|
1344
1344
|
}
|
|
1345
1345
|
});
|
|
@@ -1350,14 +1350,14 @@ export class UserProfileFormService {
|
|
|
1350
1350
|
const lastError = errors[errors.length - 1];
|
|
1351
1351
|
if (
|
|
1352
1352
|
lastError !== undefined &&
|
|
1353
|
-
lastError.source.type ===
|
|
1354
|
-
lastError.source.name ===
|
|
1353
|
+
lastError.source.type === 'validator' &&
|
|
1354
|
+
lastError.source.name === 'pattern'
|
|
1355
1355
|
) {
|
|
1356
1356
|
break validator_x;
|
|
1357
1357
|
}
|
|
1358
1358
|
}
|
|
1359
1359
|
|
|
1360
|
-
const validatorName =
|
|
1360
|
+
const validatorName = 'email';
|
|
1361
1361
|
|
|
1362
1362
|
const validator = validators[validatorName];
|
|
1363
1363
|
|
|
@@ -1365,9 +1365,9 @@ export class UserProfileFormService {
|
|
|
1365
1365
|
break validator_x;
|
|
1366
1366
|
}
|
|
1367
1367
|
|
|
1368
|
-
const {
|
|
1368
|
+
const { 'ignore.empty.value': ignoreEmptyValue = false } = validator;
|
|
1369
1369
|
|
|
1370
|
-
if (ignoreEmptyValue && value ===
|
|
1370
|
+
if (ignoreEmptyValue && value === '') {
|
|
1371
1371
|
break validator_x;
|
|
1372
1372
|
}
|
|
1373
1373
|
|
|
@@ -1375,7 +1375,7 @@ export class UserProfileFormService {
|
|
|
1375
1375
|
break validator_x;
|
|
1376
1376
|
}
|
|
1377
1377
|
|
|
1378
|
-
const msgArgs = [id<MessageKey_defaultSet>(
|
|
1378
|
+
const msgArgs = [id<MessageKey_defaultSet>('invalidEmailMessage')] as const;
|
|
1379
1379
|
|
|
1380
1380
|
errors.push({
|
|
1381
1381
|
errorMessage: this.sanitizer.bypassSecurityTrustHtml(
|
|
@@ -1384,14 +1384,14 @@ export class UserProfileFormService {
|
|
|
1384
1384
|
errorMessageStr: msgStr(...msgArgs),
|
|
1385
1385
|
fieldIndex: undefined,
|
|
1386
1386
|
source: {
|
|
1387
|
-
type:
|
|
1387
|
+
type: 'validator',
|
|
1388
1388
|
name: validatorName
|
|
1389
1389
|
}
|
|
1390
1390
|
});
|
|
1391
1391
|
}
|
|
1392
1392
|
|
|
1393
1393
|
validator_x: {
|
|
1394
|
-
const validatorName =
|
|
1394
|
+
const validatorName = 'integer';
|
|
1395
1395
|
|
|
1396
1396
|
const validator = validators[validatorName];
|
|
1397
1397
|
|
|
@@ -1400,24 +1400,24 @@ export class UserProfileFormService {
|
|
|
1400
1400
|
}
|
|
1401
1401
|
|
|
1402
1402
|
const {
|
|
1403
|
-
|
|
1403
|
+
'ignore.empty.value': ignoreEmptyValue = false,
|
|
1404
1404
|
max,
|
|
1405
1405
|
min
|
|
1406
1406
|
} = validator;
|
|
1407
1407
|
|
|
1408
|
-
if (ignoreEmptyValue && value ===
|
|
1408
|
+
if (ignoreEmptyValue && value === '') {
|
|
1409
1409
|
break validator_x;
|
|
1410
1410
|
}
|
|
1411
1411
|
|
|
1412
1412
|
const intValue = parseInt(value);
|
|
1413
1413
|
|
|
1414
1414
|
const source: FormFieldError.Source = {
|
|
1415
|
-
type:
|
|
1415
|
+
type: 'validator',
|
|
1416
1416
|
name: validatorName
|
|
1417
1417
|
};
|
|
1418
1418
|
|
|
1419
1419
|
if (isNaN(intValue)) {
|
|
1420
|
-
const msgArgs = [
|
|
1420
|
+
const msgArgs = ['mustBeAnInteger'] as const;
|
|
1421
1421
|
|
|
1422
1422
|
errors.push({
|
|
1423
1423
|
errorMessage: this.sanitizer.bypassSecurityTrustHtml(
|
|
@@ -1432,7 +1432,7 @@ export class UserProfileFormService {
|
|
|
1432
1432
|
}
|
|
1433
1433
|
|
|
1434
1434
|
if (max && intValue > parseInt(`${max}`)) {
|
|
1435
|
-
const msgArgs = [
|
|
1435
|
+
const msgArgs = ['error-number-out-of-range-too-big', `${max}`] as const;
|
|
1436
1436
|
|
|
1437
1437
|
errors.push({
|
|
1438
1438
|
errorMessage: this.sanitizer.bypassSecurityTrustHtml(
|
|
@@ -1448,7 +1448,7 @@ export class UserProfileFormService {
|
|
|
1448
1448
|
|
|
1449
1449
|
if (min && intValue < parseInt(`${min}`)) {
|
|
1450
1450
|
const msgArgs = [
|
|
1451
|
-
|
|
1451
|
+
'error-number-out-of-range-too-small',
|
|
1452
1452
|
`${min}`
|
|
1453
1453
|
] as const;
|
|
1454
1454
|
|
|
@@ -1466,7 +1466,7 @@ export class UserProfileFormService {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
|
|
1468
1468
|
validator_x: {
|
|
1469
|
-
const validatorName =
|
|
1469
|
+
const validatorName = 'options';
|
|
1470
1470
|
|
|
1471
1471
|
const validator = validators[validatorName];
|
|
1472
1472
|
|
|
@@ -1474,7 +1474,7 @@ export class UserProfileFormService {
|
|
|
1474
1474
|
break validator_x;
|
|
1475
1475
|
}
|
|
1476
1476
|
|
|
1477
|
-
if (value ===
|
|
1477
|
+
if (value === '') {
|
|
1478
1478
|
break validator_x;
|
|
1479
1479
|
}
|
|
1480
1480
|
|
|
@@ -1482,7 +1482,7 @@ export class UserProfileFormService {
|
|
|
1482
1482
|
break validator_x;
|
|
1483
1483
|
}
|
|
1484
1484
|
|
|
1485
|
-
const msgArgs = [id<MessageKey_defaultSet>(
|
|
1485
|
+
const msgArgs = [id<MessageKey_defaultSet>('notAValidOption')] as const;
|
|
1486
1486
|
|
|
1487
1487
|
errors.push({
|
|
1488
1488
|
errorMessage: this.sanitizer.bypassSecurityTrustHtml(
|
|
@@ -1491,7 +1491,7 @@ export class UserProfileFormService {
|
|
|
1491
1491
|
errorMessageStr: msgStr(...msgArgs),
|
|
1492
1492
|
fieldIndex: undefined,
|
|
1493
1493
|
source: {
|
|
1494
|
-
type:
|
|
1494
|
+
type: 'validator',
|
|
1495
1495
|
name: validatorName
|
|
1496
1496
|
}
|
|
1497
1497
|
});
|