@keycloakify/angular 0.0.3 → 0.0.5
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/README.md +2 -5
- package/account/DefaultPage/DefaultPage.d.ts +2 -30
- package/esm2022/account/containers/template/template.component.mjs +6 -6
- package/esm2022/account/directives/kc-class/kc-class.directive.mjs +3 -3
- package/esm2022/account/pages/account/account.component.mjs +3 -3
- package/esm2022/account/pages/applications/applications.component.mjs +3 -3
- package/esm2022/account/pages/federatedIdentity/federatedIdentity.component.mjs +3 -3
- package/esm2022/account/pages/log/log.component.mjs +3 -3
- package/esm2022/account/pages/password/password.component.mjs +3 -3
- package/esm2022/account/pages/sessions/sessions.component.mjs +3 -3
- package/esm2022/account/pages/totp/totp.component.mjs +3 -3
- package/esm2022/account/services/account-resource-injector/account-resource-injector.service.mjs +3 -3
- package/esm2022/account/services/i18n/i18n.service.mjs +3 -3
- package/esm2022/lib/directives/attributes/attributes.directive.mjs +3 -3
- package/esm2022/lib/pipes/input-type/input-type.pipe.mjs +3 -3
- package/esm2022/lib/pipes/is-array-with-empty-object/is-array-with-empty-object.pipe.mjs +3 -3
- package/esm2022/lib/pipes/kc-sanitize/kc-sanitize.pipe.mjs +3 -3
- package/esm2022/lib/pipes/to-array/to-array.pipe.mjs +3 -3
- package/esm2022/lib/pipes/to-number/to-number.pipe.mjs +3 -3
- package/esm2022/lib/services/resource-injector/resource-injector.service.mjs +6 -5
- package/esm2022/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.mjs +7 -53
- package/esm2022/login/components/field-errors/field-errors.component.mjs +3 -3
- package/esm2022/login/components/group-label/group-label.component.mjs +3 -3
- package/esm2022/login/components/input-field-by-type/input-field-by-type.component.mjs +3 -3
- package/esm2022/login/components/input-tag/input-tag.component.mjs +3 -3
- package/esm2022/login/components/input-tag-selects/input-tag-selects.component.mjs +3 -3
- package/esm2022/login/components/logout-other-sessions/logout-other-sessions.component.mjs +3 -3
- package/esm2022/login/components/password-wrapper/password-wrapper.component.mjs +3 -3
- package/esm2022/login/components/select-tag/select-tag.component.mjs +3 -3
- package/esm2022/login/components/textarea-tag/textarea-tag.component.mjs +3 -3
- package/esm2022/login/components/user-profile-form-fields/user-profile-form-fields.component.mjs +15 -22
- package/esm2022/login/containers/template/template.component.mjs +6 -6
- package/esm2022/login/directives/kc-class/kc-class.directive.mjs +3 -3
- package/esm2022/login/pages/code/code.component.mjs +3 -3
- package/esm2022/login/pages/delete-account-confirm/delete-account-confirm.component.mjs +3 -3
- package/esm2022/login/pages/delete-credential/delete-credential.component.mjs +3 -3
- package/esm2022/login/pages/error/error.component.mjs +3 -3
- package/esm2022/login/pages/frontchannel-logout/frontchannel-logout.component.mjs +3 -3
- package/esm2022/login/pages/idp-review-user-profile/idp-review-user-profile.component.mjs +13 -15
- package/esm2022/login/pages/info/info.component.mjs +3 -3
- package/esm2022/login/pages/login/login.component.mjs +3 -3
- package/esm2022/login/pages/login-config-totp/login-config-totp.component.mjs +3 -3
- package/esm2022/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.mjs +3 -3
- package/esm2022/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.mjs +3 -3
- package/esm2022/login/pages/login-idp-link-email/login-idp-link-email.component.mjs +3 -3
- package/esm2022/login/pages/login-oauth-grant/login-oauth-grant.component.mjs +3 -3
- package/esm2022/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.mjs +3 -3
- package/esm2022/login/pages/login-otp/login-otp.component.mjs +3 -3
- package/esm2022/login/pages/login-page-expired/login-page-expired.component.mjs +3 -3
- package/esm2022/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.mjs +3 -3
- package/esm2022/login/pages/login-password/login-password.component.mjs +3 -3
- package/esm2022/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.mjs +3 -3
- package/esm2022/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.mjs +3 -3
- package/esm2022/login/pages/login-reset-otp/login-reset-otp.component.mjs +3 -3
- package/esm2022/login/pages/login-reset-password/login-reset-password.component.mjs +3 -3
- package/esm2022/login/pages/login-update-password/login-update-password.component.mjs +3 -3
- package/esm2022/login/pages/login-update-profile/login-update-profile.component.mjs +13 -15
- package/esm2022/login/pages/login-username/login-username.component.mjs +6 -6
- package/esm2022/login/pages/login-verify-email/login-verify-email.component.mjs +3 -3
- package/esm2022/login/pages/login-x509-info/login-x509-info.component.mjs +3 -3
- package/esm2022/login/pages/logout-confirm/logout-confirm.component.mjs +3 -3
- package/esm2022/login/pages/register/register.component.mjs +14 -16
- package/esm2022/login/pages/saml-post-form/saml-post-form.component.mjs +3 -3
- package/esm2022/login/pages/select-authenticator/select-authenticator.component.mjs +3 -3
- package/esm2022/login/pages/terms/terms.component.mjs +3 -3
- package/esm2022/login/pages/update-email/update-email.component.mjs +13 -15
- package/esm2022/login/pages/webauthn-authenticate/webauthn-authenticate.component.mjs +3 -3
- package/esm2022/login/pages/webauthn-error/webauthn-error.component.mjs +3 -3
- package/esm2022/login/pages/webauthn-register/webauthn-register.component.mjs +3 -3
- package/esm2022/login/services/i18n/i18n.service.mjs +3 -3
- package/esm2022/login/services/login-resource-injector/login-resource-injector.service.mjs +9 -8
- package/esm2022/login/services/user-profile-form/user-profile-form.service.mjs +56 -1004
- package/fesm2022/keycloakify-angular-account-containers-template.mjs +6 -6
- package/fesm2022/keycloakify-angular-account-directives-kc-class.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-account.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-applications.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-federatedIdentity.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-log.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-password.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-sessions.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-totp.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-services-account-resource-injector.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-services-i18n.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-directives-attributes.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-input-type.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-is-array-with-empty-object.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-kc-sanitize.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-to-array.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-to-number.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-services-resource-injector.mjs +5 -4
- package/fesm2022/keycloakify-angular-lib-services-resource-injector.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.mjs +6 -52
- package/fesm2022/keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-components-field-errors.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-group-label.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-input-field-by-type.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-input-tag-selects.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-input-tag.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-logout-other-sessions.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-password-wrapper.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-select-tag.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-textarea-tag.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-user-profile-form-fields.mjs +14 -21
- package/fesm2022/keycloakify-angular-login-components-user-profile-form-fields.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-containers-template.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-directives-kc-class.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-code.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-delete-account-confirm.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-error.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-frontchannel-logout.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs +12 -14
- package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-info.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-config-totp.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm-override.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-oauth2-device-verify-user-code.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-otp.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-password.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-config.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-update-password.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs +12 -14
- package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-username.mjs +5 -5
- package/fesm2022/keycloakify-angular-login-pages-login-username.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-x509-info.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-logout-confirm.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-register.mjs +13 -15
- package/fesm2022/keycloakify-angular-login-pages-register.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-terms.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-update-email.mjs +12 -14
- package/fesm2022/keycloakify-angular-login-pages-update-email.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-webauthn-error.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-services-i18n.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-services-login-resource-injector.mjs +8 -7
- package/fesm2022/keycloakify-angular-login-services-login-resource-injector.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-services-user-profile-form.mjs +55 -1003
- package/fesm2022/keycloakify-angular-login-services-user-profile-form.mjs.map +1 -1
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.d.ts +0 -1
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.d.ts +3 -13
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.d.ts +1 -2
- package/login/pages/login-update-profile/login-update-profile.component.d.ts +1 -2
- package/login/pages/register/register.component.d.ts +1 -2
- package/login/pages/update-email/update-email.component.d.ts +1 -2
- package/login/services/user-profile-form/user-profile-form.service.d.ts +20 -41
- package/package.json +2 -8
- package/src/lib/services/resource-injector/resource-injector.service.ts +2 -1
- package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.ts +3 -69
- package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.html +71 -68
- package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.ts +6 -21
- package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.ts +6 -13
- package/src/login/pages/login-update-profile/login-update-profile.component.ts +6 -12
- package/src/login/pages/login-username/login-username.component.html +0 -1
- package/src/login/pages/register/register.component.html +1 -4
- package/src/login/pages/register/register.component.ts +5 -10
- package/src/login/pages/update-email/update-email.component.ts +6 -12
- package/src/login/services/login-resource-injector/login-resource-injector.service.ts +5 -4
- package/src/login/services/user-profile-form/user-profile-form.service.ts +103 -1433
- package/esm2022/login/services/submit/keycloakify-angular-login-services-submit.mjs +0 -5
- package/esm2022/login/services/submit/public-api.mjs +0 -2
- package/esm2022/login/services/submit/submit.service.mjs +0 -20
- package/fesm2022/keycloakify-angular-login-services-submit.mjs +0 -27
- package/fesm2022/keycloakify-angular-login-services-submit.mjs.map +0 -1
- package/login/services/submit/index.d.ts +0 -5
- package/login/services/submit/public-api.d.ts +0 -1
- package/login/services/submit/submit.service.d.ts +0 -9
- package/src/login/services/submit/index.ts +0 -1
- package/src/login/services/submit/submit.service.ts +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keycloakify-angular-login-services-user-profile-form.mjs","sources":["../../src/login/services/user-profile-form/user-profile-form.service.ts","../../src/login/services/user-profile-form/keycloakify-angular-login-services-user-profile-form.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-ts-comment */\n\nimport {\n computed,\n inject,\n Injectable,\n signal,\n Signal,\n WritableSignal\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport type { KcContext } from '@keycloakify/angular/login/KcContext';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\nimport { LoginResourceInjectorService } from '@keycloakify/angular/login/services/login-resource-injector';\nimport { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';\nimport { KC_LOGIN_CONTEXT } from '@keycloakify/angular/login/tokens/kc-context';\nimport { DO_MAKE_USER_CONFIRM_PASSWORD } from '@keycloakify/angular/login/tokens/make-user-confirm-password';\nimport {\n type Attribute,\n type PasswordPolicies,\n type Validators\n} from 'keycloakify/login/KcContext';\nimport type {\n KcContextLike as KcContextLike_i18n,\n MessageKey_defaultSet\n} from 'keycloakify/login/i18n/noJsx';\nimport { emailRegexp } from 'keycloakify/tools/emailRegExp';\nimport { formatNumber } from 'keycloakify/tools/formatNumber';\nimport { structuredCloneButFunctions } from 'keycloakify/tools/structuredCloneButFunctions';\nimport { assert, id } from 'tsafe';\n\ntype KcContextLike_useGetErrors = KcContextLike_i18n & {\n messagesPerField: Pick<KcContext['messagesPerField'], 'existsError' | 'get'>;\n passwordPolicies?: PasswordPolicies;\n};\nexport namespace FormFieldError {\n export type Source =\n | Source.Validator\n | Source.PasswordPolicy\n | Source.Server\n | Source.Other;\n\n export namespace Source {\n export type Validator = {\n type: 'validator';\n name: keyof Validators;\n };\n export type PasswordPolicy = {\n type: 'passwordPolicy';\n name: keyof PasswordPolicies;\n };\n export type Server = {\n type: 'server';\n };\n\n export type Other = {\n type: 'other';\n rule: 'passwordConfirmMatchesPassword' | 'requiredField';\n };\n }\n}\n\nexport type KcContextLike = KcContextLike_i18n &\n KcContextLike_useGetErrors & {\n profile: {\n attributesByName: Record<string, Attribute>;\n html5DataAnnotations?: Record<string, string>;\n };\n passwordRequired?: boolean;\n realm: { registrationEmailAsUsername: boolean };\n url: {\n resourcesPath: string;\n };\n };\nexport type FormFieldError = {\n errorMessage: SafeHtml; // this was jsx, be carefull\n errorMessageStr: string;\n source: FormFieldError.Source;\n fieldIndex: number | undefined;\n};\nnamespace internal {\n export type FormFieldState = {\n attribute: Attribute;\n errors: FormFieldError[];\n hasLostFocusAtLeastOnce: boolean | boolean[];\n valueOrValues: string | string[];\n };\n\n export type State = {\n formFieldStates: FormFieldState[];\n };\n}\ntype FormFieldState = {\n attribute: Attribute;\n displayableErrors: FormFieldError[];\n valueOrValues: string | string[];\n};\ntype FormState = {\n isFormSubmittable: boolean;\n formFieldStates: FormFieldState[];\n};\nexport type FormAction =\n | {\n action: 'update';\n name: string;\n valueOrValues: string | string[];\n /** Default false */\n displayErrorsImmediately?: boolean;\n }\n | {\n action: 'focus lost';\n name: string;\n fieldIndex: number | undefined;\n };\n\n@Injectable({ providedIn: 'root' })\nexport class UserProfileFormService {\n private kcContext: KcContextLike =\n inject<Extract<KcContext, { pageId: 'register.ftl' }>>(KC_LOGIN_CONTEXT);\n private i18n = inject<I18n>(LOGIN_I18N);\n private doMakeUserConfirmPassword = inject(DO_MAKE_USER_CONFIRM_PASSWORD);\n private loginResourceInjectorService = inject(LoginResourceInjectorService);\n private sanitizer: DomSanitizer = inject(DomSanitizer);\n private initialState: internal.State = (() => {\n const attributes: Attribute[] = (() => {\n mock_user_profile_attributes_for_older_keycloak_versions: {\n if (\n 'profile' in this.kcContext &&\n 'attributesByName' in this.kcContext.profile &&\n Object.keys(this.kcContext.profile.attributesByName).length !== 0\n ) {\n break mock_user_profile_attributes_for_older_keycloak_versions;\n }\n\n if (\n 'register' in this.kcContext &&\n this.kcContext.register instanceof Object &&\n 'formData' in this.kcContext.register\n ) {\n //NOTE: Handle legacy register.ftl page\n return (['firstName', 'lastName', 'email', 'username'] as const)\n .filter(name =>\n name !== 'username'\n ? true\n : !this.kcContext.realm.registrationEmailAsUsername\n )\n .map(name =>\n id<Attribute>({\n name: name,\n displayName: id<`\\${${MessageKey_defaultSet}}`>(\n `\\${${name}}`\n ),\n required: true,\n value:\n (this.kcContext as any).register.formData[name] ?? '',\n html5DataAnnotations: {},\n readOnly: false,\n validators: {},\n annotations: {},\n autocomplete: (() => {\n switch (name) {\n case 'email':\n return 'email';\n case 'username':\n return 'username';\n default:\n return undefined;\n }\n })()\n })\n );\n }\n\n if ('user' in this.kcContext && this.kcContext.user instanceof Object) {\n //NOTE: Handle legacy login-update-profile.ftl\n return (['username', 'email', 'firstName', 'lastName'] as const)\n .filter(name =>\n name !== 'username'\n ? true\n : (this.kcContext as any).user.editUsernameAllowed\n )\n .map(name =>\n id<Attribute>({\n name: name,\n displayName: id<`\\${${MessageKey_defaultSet}}`>(\n `\\${${name}}`\n ),\n required: true,\n value: (this.kcContext as any).user[name] ?? '',\n html5DataAnnotations: {},\n readOnly: false,\n validators: {},\n annotations: {},\n autocomplete: (() => {\n switch (name) {\n case 'email':\n return 'email';\n case 'username':\n return 'username';\n default:\n return undefined;\n }\n })()\n })\n );\n }\n\n if ('email' in this.kcContext && this.kcContext.email instanceof Object) {\n //NOTE: Handle legacy update-email.ftl\n return [\n id<Attribute>({\n name: 'email',\n displayName: id<`\\${${MessageKey_defaultSet}}`>(`\\${email}`),\n required: true,\n value: (this.kcContext.email as any).value ?? '',\n html5DataAnnotations: {},\n readOnly: false,\n validators: {},\n annotations: {},\n autocomplete: 'email'\n })\n ];\n }\n\n assert(false, 'Unable to mock user profile from the current kcContext');\n }\n\n return Object.values(this.kcContext.profile.attributesByName).map(\n structuredCloneButFunctions\n );\n })();\n // Retro-compatibility and consistency patches\n attributes.forEach(attribute => {\n patch_legacy_group: {\n if (typeof attribute.group !== 'string') {\n break patch_legacy_group;\n }\n\n const {\n group,\n groupDisplayHeader,\n groupDisplayDescription,\n groupAnnotations\n } = attribute as Attribute & {\n group: string;\n groupDisplayHeader?: string;\n groupDisplayDescription?: string;\n groupAnnotations: Record<string, string>;\n };\n\n delete attribute.group;\n // @ts-expect-error\n delete attribute.groupDisplayHeader;\n // @ts-expect-error\n delete attribute.groupDisplayDescription;\n // @ts-expect-error\n delete attribute.groupAnnotations;\n\n if (group === '') {\n break patch_legacy_group;\n }\n\n attribute.group = {\n name: group,\n displayHeader: groupDisplayHeader,\n displayDescription: groupDisplayDescription,\n annotations: groupAnnotations,\n html5DataAnnotations: {}\n };\n }\n\n // Attributes with options rendered by default as select inputs\n if (\n attribute.validators.options !== undefined &&\n attribute.annotations.inputType === undefined\n ) {\n attribute.annotations.inputType = 'select';\n }\n\n // Consistency patch on values/value property\n {\n if (this.getIsMultivaluedSingleField({ attribute })) {\n attribute.multivalued = true;\n }\n\n if (attribute.multivalued) {\n attribute.values ??=\n attribute.value !== undefined ? [attribute.value] : [];\n delete attribute.value;\n } else {\n attribute.value ??= attribute.values?.[0];\n delete attribute.values;\n }\n }\n });\n add_password_and_password_confirm: {\n if (!this.kcContext.passwordRequired) {\n break add_password_and_password_confirm;\n }\n\n attributes.forEach((attribute, i) => {\n if (\n attribute.name !==\n (this.kcContext.realm.registrationEmailAsUsername\n ? 'email'\n : 'username')\n ) {\n // NOTE: We want to add password and password-confirm after the field that identifies the user.\n // It's either email or username.\n return;\n }\n\n attributes.splice(\n i + 1,\n 0,\n {\n name: 'password',\n displayName: id<`\\${${MessageKey_defaultSet}}`>('${password}'),\n required: true,\n readOnly: false,\n validators: {},\n annotations: {},\n autocomplete: 'new-password',\n html5DataAnnotations: {}\n },\n {\n name: 'password-confirm',\n displayName:\n id<`\\${${MessageKey_defaultSet}}`>('${passwordConfirm}'),\n required: true,\n readOnly: false,\n validators: {},\n annotations: {},\n html5DataAnnotations: {},\n autocomplete: 'new-password'\n }\n );\n });\n }\n const initialFormFieldState: {\n attribute: Attribute;\n valueOrValues: string | string[];\n }[] = [];\n\n for (const attribute of attributes) {\n handle_multi_valued_attribute: {\n if (!attribute.multivalued) {\n break handle_multi_valued_attribute;\n }\n\n const values = attribute.values?.length ? attribute.values : [''];\n\n apply_validator_min_range: {\n if (this.getIsMultivaluedSingleField({ attribute })) {\n break apply_validator_min_range;\n }\n\n const validator = attribute.validators.multivalued;\n\n if (validator === undefined) {\n break apply_validator_min_range;\n }\n\n const { min: minStr } = validator;\n\n if (!minStr) {\n break apply_validator_min_range;\n }\n\n const min = parseInt(`${minStr}`);\n\n for (let index = values.length; index < min; index++) {\n values.push('');\n }\n }\n\n initialFormFieldState.push({\n attribute,\n valueOrValues: values\n });\n\n continue;\n }\n\n initialFormFieldState.push({\n attribute,\n valueOrValues: attribute.value ?? ''\n });\n }\n\n const initialState: internal.State = {\n formFieldStates: initialFormFieldState.map(\n ({ attribute, valueOrValues }) => ({\n attribute,\n errors: this.getErrors({\n attributeName: attribute.name,\n formFieldStates: initialFormFieldState\n }),\n hasLostFocusAtLeastOnce:\n valueOrValues instanceof Array &&\n !this.getIsMultivaluedSingleField({ attribute })\n ? valueOrValues.map(() => false)\n : false,\n valueOrValues: valueOrValues\n })\n )\n };\n return initialState;\n })();\n\n private state: WritableSignal<internal.State> = signal(this.initialState);\n\n formState: Signal<FormState> = computed(() => {\n const state: internal.State = this.state();\n return {\n formFieldStates: state.formFieldStates.map(\n ({\n errors,\n hasLostFocusAtLeastOnce: hasLostFocusAtLeastOnceOrArr,\n attribute,\n ...valueOrValuesWrap\n }) => ({\n displayableErrors: errors.filter(error => {\n const hasLostFocusAtLeastOnce =\n typeof hasLostFocusAtLeastOnceOrArr === 'boolean'\n ? hasLostFocusAtLeastOnceOrArr\n : error.fieldIndex !== undefined\n ? hasLostFocusAtLeastOnceOrArr[error.fieldIndex]\n : hasLostFocusAtLeastOnceOrArr[\n hasLostFocusAtLeastOnceOrArr.length - 1\n ];\n let value = false;\n switch (error.source.type) {\n case 'server':\n value = true;\n break;\n case 'other':\n switch (error.source.rule) {\n case 'requiredField':\n value = hasLostFocusAtLeastOnce;\n break;\n case 'passwordConfirmMatchesPassword':\n value = hasLostFocusAtLeastOnce;\n break;\n }\n // assert<Equals<typeof error.source.rule, never>>(false);\n break;\n case 'passwordPolicy':\n switch (error.source.name) {\n case 'length':\n value = hasLostFocusAtLeastOnce;\n break;\n case 'digits':\n value = hasLostFocusAtLeastOnce;\n break;\n case 'lowerCase':\n value = hasLostFocusAtLeastOnce;\n break;\n case 'upperCase':\n value = hasLostFocusAtLeastOnce;\n break;\n case 'specialChars':\n value = hasLostFocusAtLeastOnce;\n break;\n case 'notUsername':\n value = true;\n break;\n case 'notEmail':\n value = true;\n break;\n }\n // assert<Equals<typeof error.source, never>>(false);\n break;\n case 'validator':\n switch (error.source.name) {\n case 'length':\n value = hasLostFocusAtLeastOnce;\n break;\n case 'pattern':\n value = hasLostFocusAtLeastOnce;\n break;\n case 'email':\n value = hasLostFocusAtLeastOnce;\n break;\n case 'integer':\n value = hasLostFocusAtLeastOnce;\n break;\n case 'multivalued':\n value = hasLostFocusAtLeastOnce;\n break;\n case 'options':\n value = hasLostFocusAtLeastOnce;\n break;\n }\n // assert<Equals<typeof error.source, never>>(false);\n break;\n }\n return value;\n }),\n attribute,\n ...valueOrValuesWrap\n })\n ),\n isFormSubmittable: state.formFieldStates.every(\n ({ errors }) => errors.length === 0\n )\n };\n });\n\n constructor() {\n this.loginResourceInjectorService.insertAdditionalScripts(\n Object.keys(this.kcContext.profile?.html5DataAnnotations ?? {})\n .filter(key => key !== 'kcMultivalued' && key !== 'kcNumberFormat') // NOTE: Keycloakify handles it.\n .map(key => ({\n type: 'module',\n src: `${this.kcContext.url.resourcesPath}/js/${key}.js`,\n id: `${this.kcContext.url.resourcesPath}/js/${key}.js`\n }))\n );\n }\n\n public dispatchFormAction(formAction: FormAction) {\n if (!formAction) return;\n const state = this.state();\n const formFieldState = state.formFieldStates.find(\n ({ attribute }) => attribute.name === formAction.name\n );\n assert(formFieldState !== undefined);\n switch (formAction.action) {\n case 'update':\n formFieldState.valueOrValues = formAction.valueOrValues;\n\n apply_formatters: {\n const { attribute } = formFieldState;\n\n const { kcNumberFormat } = attribute.html5DataAnnotations ?? {};\n\n if (!kcNumberFormat) {\n break apply_formatters;\n }\n\n if (formFieldState.valueOrValues instanceof Array) {\n formFieldState.valueOrValues = formFieldState.valueOrValues.map(\n value => formatNumber(value, kcNumberFormat)\n );\n } else {\n formFieldState.valueOrValues = formatNumber(\n formFieldState.valueOrValues,\n kcNumberFormat\n );\n }\n }\n\n formFieldState.errors = this.getErrors({\n attributeName: formAction.name,\n formFieldStates: state.formFieldStates\n });\n\n simulate_focus_lost: {\n const { displayErrorsImmediately = false } = formAction;\n\n if (!displayErrorsImmediately) {\n break simulate_focus_lost;\n }\n\n for (const fieldIndex of formAction.valueOrValues instanceof Array\n ? formAction.valueOrValues.map((...[, index]) => index)\n : [undefined]) {\n this.dispatchFormAction({\n action: 'focus lost',\n name: formAction.name,\n fieldIndex\n });\n }\n }\n\n update_password_confirm: {\n if (this.doMakeUserConfirmPassword) {\n break update_password_confirm;\n }\n\n if (formAction.name !== 'password') {\n break update_password_confirm;\n }\n\n this.dispatchFormAction({\n action: 'update',\n name: 'password-confirm',\n valueOrValues: formAction.valueOrValues,\n displayErrorsImmediately: formAction.displayErrorsImmediately\n });\n }\n\n trigger_password_confirm_validation_on_password_change: {\n if (!this.doMakeUserConfirmPassword) {\n break trigger_password_confirm_validation_on_password_change;\n }\n\n if (formAction.name !== 'password') {\n break trigger_password_confirm_validation_on_password_change;\n }\n\n this.dispatchFormAction({\n action: 'update',\n name: 'password-confirm',\n valueOrValues: (() => {\n const formFieldState = state.formFieldStates.find(\n ({ attribute }) => attribute.name === 'password-confirm'\n );\n\n assert(formFieldState !== undefined);\n\n return formFieldState.valueOrValues;\n })(),\n displayErrorsImmediately: formAction.displayErrorsImmediately\n });\n }\n\n break;\n case 'focus lost':\n if (formFieldState.hasLostFocusAtLeastOnce instanceof Array) {\n const { fieldIndex } = formAction;\n assert(fieldIndex !== undefined);\n formFieldState.hasLostFocusAtLeastOnce[fieldIndex] = true;\n break;\n }\n\n formFieldState.hasLostFocusAtLeastOnce = true;\n break;\n }\n this.state.update(state => ({\n ...state,\n formFieldStates: state.formFieldStates.map(f => {\n if (f.attribute === formFieldState.attribute) return formFieldState;\n return f;\n })\n }));\n }\n\n private getIsMultivaluedSingleField(params: { attribute: Attribute }) {\n const { attribute } = params;\n\n return attribute.annotations.inputType?.startsWith('multiselect') ?? false;\n }\n\n private getErrors(params: {\n attributeName: string;\n formFieldStates: {\n attribute: Attribute;\n valueOrValues: string | string[];\n }[];\n }): FormFieldError[] {\n const { messagesPerField, passwordPolicies } = this.kcContext;\n\n const { msgStr, advancedMsgStr } = this.i18n;\n const { attributeName, formFieldStates } = params;\n\n const formFieldState = formFieldStates.find(\n ({ attribute }) => attribute.name === attributeName\n );\n\n assert(formFieldState !== undefined);\n\n const { attribute } = formFieldState;\n\n const valueOrValues = (() => {\n let { valueOrValues } = formFieldState;\n\n unFormat_number: {\n const { kcNumberUnFormat } = attribute.html5DataAnnotations ?? {};\n\n if (!kcNumberUnFormat) {\n break unFormat_number;\n }\n\n if (valueOrValues instanceof Array) {\n valueOrValues = valueOrValues.map(value =>\n formatNumber(value, kcNumberUnFormat)\n );\n } else {\n valueOrValues = formatNumber(valueOrValues, kcNumberUnFormat);\n }\n }\n\n return valueOrValues;\n })();\n\n assert(attribute !== undefined);\n\n server_side_error: {\n if (attribute.multivalued) {\n const defaultValues = attribute.values?.length ? attribute.values : [''];\n\n assert(valueOrValues instanceof Array);\n\n const values = valueOrValues;\n\n if (\n JSON.stringify(defaultValues) !==\n JSON.stringify(values.slice(0, defaultValues.length))\n ) {\n break server_side_error;\n }\n } else {\n const defaultValue = attribute.value ?? '';\n\n assert(typeof valueOrValues === 'string');\n\n const value = valueOrValues;\n\n if (defaultValue !== value) {\n break server_side_error;\n }\n }\n\n let doesErrorExist: boolean;\n\n try {\n doesErrorExist = messagesPerField.existsError(attributeName);\n } catch {\n break server_side_error;\n }\n\n if (!doesErrorExist) {\n break server_side_error;\n }\n\n const errorMessageStr = messagesPerField.get(attributeName);\n\n return [\n {\n errorMessageStr,\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span>${errorMessageStr}</span>`\n ),\n fieldIndex: undefined,\n source: {\n type: 'server'\n }\n }\n ];\n }\n\n handle_multi_valued_multi_fields: {\n if (!attribute.multivalued) {\n break handle_multi_valued_multi_fields;\n }\n\n if (this.getIsMultivaluedSingleField({ attribute })) {\n break handle_multi_valued_multi_fields;\n }\n\n assert(valueOrValues instanceof Array);\n\n const values = valueOrValues;\n\n const errors = values\n .map((...[, index]) => {\n const specificValueErrors = this.getErrors({\n attributeName,\n formFieldStates: formFieldStates.map(formFieldState => {\n if (formFieldState.attribute.name === attributeName) {\n assert(formFieldState.valueOrValues instanceof Array);\n return {\n attribute: {\n ...attribute,\n annotations: {\n ...attribute.annotations,\n inputType: undefined\n },\n multivalued: false\n },\n valueOrValues: formFieldState.valueOrValues[index]\n };\n }\n\n return formFieldState;\n })\n });\n\n return specificValueErrors\n .filter(error => {\n if (\n error.source.type === 'other' &&\n error.source.rule === 'requiredField'\n ) {\n return false;\n }\n\n return true;\n })\n .map(\n (error): FormFieldError => ({\n ...error,\n fieldIndex: index\n })\n );\n })\n .reduce((acc, errors) => [...acc, ...errors], []);\n\n required_field: {\n if (!attribute.required) {\n break required_field;\n }\n\n if (values.every(value => value !== '')) {\n break required_field;\n }\n\n const msgArgs = ['error-user-attribute-required'] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'other',\n rule: 'requiredField'\n }\n });\n }\n\n return errors;\n }\n\n handle_multi_valued_single_field: {\n if (!attribute.multivalued) {\n break handle_multi_valued_single_field;\n }\n\n if (!this.getIsMultivaluedSingleField({ attribute })) {\n break handle_multi_valued_single_field;\n }\n\n const validatorName = 'multivalued';\n\n const validator = attribute.validators[validatorName];\n\n if (validator === undefined) {\n return [];\n }\n\n const { min: minStr } = validator;\n\n const min = minStr ? parseInt(`${minStr}`) : attribute.required ? 1 : 0;\n\n assert(!isNaN(min));\n\n const { max: maxStr } = validator;\n\n const max = !maxStr ? Infinity : parseInt(`${maxStr}`);\n\n assert(!isNaN(max));\n\n assert(valueOrValues instanceof Array);\n\n const values = valueOrValues;\n\n if (min <= values.length && values.length <= max) {\n return [];\n }\n\n const msgArgs = [\n 'error-invalid-multivalued-size',\n `${min}`,\n `${max}`\n ] as const;\n\n return [\n {\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"0\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'validator',\n name: validatorName\n }\n }\n ];\n }\n\n assert(typeof valueOrValues === 'string');\n\n const value = valueOrValues;\n\n const errors: FormFieldError[] = [];\n\n check_password_policies: {\n if (attributeName !== 'password') {\n break check_password_policies;\n }\n\n if (passwordPolicies === undefined) {\n break check_password_policies;\n }\n\n check_password_policy_x: {\n const policyName = 'length';\n\n const policy = passwordPolicies[policyName];\n\n if (!policy) {\n break check_password_policy_x;\n }\n\n const minLength = policy;\n\n if (value.length >= minLength) {\n break check_password_policy_x;\n }\n\n const msgArgs = [\n 'invalidPasswordMinLengthMessage',\n `${minLength}`\n ] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'passwordPolicy',\n name: policyName\n }\n });\n }\n\n check_password_policy_x: {\n const policyName = 'digits';\n\n const policy = passwordPolicies[policyName];\n\n if (!policy) {\n break check_password_policy_x;\n }\n\n const minNumberOfDigits = policy;\n\n if (\n value.split('').filter(char => !isNaN(parseInt(char))).length >=\n minNumberOfDigits\n ) {\n break check_password_policy_x;\n }\n\n const msgArgs = [\n 'invalidPasswordMinDigitsMessage',\n `${minNumberOfDigits}`\n ] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'passwordPolicy',\n name: policyName\n }\n });\n }\n\n check_password_policy_x: {\n const policyName = 'lowerCase';\n\n const policy = passwordPolicies[policyName];\n\n if (!policy) {\n break check_password_policy_x;\n }\n\n const minNumberOfLowerCaseChar = policy;\n\n if (\n value\n .split('')\n .filter(\n char =>\n char === char.toLowerCase() && char !== char.toUpperCase()\n ).length >= minNumberOfLowerCaseChar\n ) {\n break check_password_policy_x;\n }\n\n const msgArgs = [\n 'invalidPasswordMinLowerCaseCharsMessage',\n `${minNumberOfLowerCaseChar}`\n ] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'passwordPolicy',\n name: policyName\n }\n });\n }\n\n check_password_policy_x: {\n const policyName = 'upperCase';\n\n const policy = passwordPolicies[policyName];\n\n if (!policy) {\n break check_password_policy_x;\n }\n\n const minNumberOfUpperCaseChar = policy;\n\n if (\n value\n .split('')\n .filter(\n char =>\n char === char.toUpperCase() && char !== char.toLowerCase()\n ).length >= minNumberOfUpperCaseChar\n ) {\n break check_password_policy_x;\n }\n\n const msgArgs = [\n 'invalidPasswordMinUpperCaseCharsMessage',\n `${minNumberOfUpperCaseChar}`\n ] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'passwordPolicy',\n name: policyName\n }\n });\n }\n\n check_password_policy_x: {\n const policyName = 'specialChars';\n\n const policy = passwordPolicies[policyName];\n\n if (!policy) {\n break check_password_policy_x;\n }\n\n const minNumberOfSpecialChar = policy;\n\n if (\n value.split('').filter(char => !char.match(/[a-zA-Z0-9]/)).length >=\n minNumberOfSpecialChar\n ) {\n break check_password_policy_x;\n }\n\n const msgArgs = [\n 'invalidPasswordMinSpecialCharsMessage',\n `${minNumberOfSpecialChar}`\n ] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'passwordPolicy',\n name: policyName\n }\n });\n }\n\n check_password_policy_x: {\n const policyName = 'notUsername';\n\n const notUsername = passwordPolicies[policyName];\n\n if (!notUsername) {\n break check_password_policy_x;\n }\n\n const usernameFormFieldState = formFieldStates.find(\n formFieldState => formFieldState.attribute.name === 'username'\n );\n\n if (!usernameFormFieldState) {\n break check_password_policy_x;\n }\n\n const usernameValue = (() => {\n let { valueOrValues } = usernameFormFieldState;\n\n assert(typeof valueOrValues === 'string');\n\n unFormat_number: {\n const { kcNumberUnFormat } = attribute.html5DataAnnotations ?? {};\n\n if (!kcNumberUnFormat) {\n break unFormat_number;\n }\n\n valueOrValues = formatNumber(valueOrValues, kcNumberUnFormat);\n }\n\n return valueOrValues;\n })();\n\n if (usernameValue === '') {\n break check_password_policy_x;\n }\n\n if (value !== usernameValue) {\n break check_password_policy_x;\n }\n\n const msgArgs = ['invalidPasswordNotUsernameMessage'] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'passwordPolicy',\n name: policyName\n }\n });\n }\n\n check_password_policy_x: {\n const policyName = 'notEmail';\n\n const notEmail = passwordPolicies[policyName];\n\n if (!notEmail) {\n break check_password_policy_x;\n }\n\n const emailFormFieldState = formFieldStates.find(\n formFieldState => formFieldState.attribute.name === 'email'\n );\n\n if (!emailFormFieldState) {\n break check_password_policy_x;\n }\n\n assert(typeof emailFormFieldState.valueOrValues === 'string');\n\n {\n const emailValue = emailFormFieldState.valueOrValues;\n\n if (emailValue === '') {\n break check_password_policy_x;\n }\n\n if (value !== emailValue) {\n break check_password_policy_x;\n }\n }\n\n const msgArgs = ['invalidPasswordNotEmailMessage'] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'passwordPolicy',\n name: policyName\n }\n });\n }\n }\n\n password_confirm_matches_password: {\n if (attributeName !== 'password-confirm') {\n break password_confirm_matches_password;\n }\n\n const passwordFormFieldState = formFieldStates.find(\n formFieldState => formFieldState.attribute.name === 'password'\n );\n\n assert(passwordFormFieldState !== undefined);\n\n assert(typeof passwordFormFieldState.valueOrValues === 'string');\n\n {\n const passwordValue = passwordFormFieldState.valueOrValues;\n\n if (value === passwordValue) {\n break password_confirm_matches_password;\n }\n }\n\n const msgArgs = ['invalidPasswordConfirmMessage'] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'other',\n rule: 'passwordConfirmMatchesPassword'\n }\n });\n }\n\n const { validators } = attribute;\n\n required_field: {\n if (!attribute.required) {\n break required_field;\n }\n\n if (value !== '') {\n break required_field;\n }\n\n const msgArgs = ['error-user-attribute-required'] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'other',\n rule: 'requiredField'\n }\n });\n }\n\n validator_x: {\n const validatorName = 'length';\n\n const validator = validators[validatorName];\n\n if (!validator) {\n break validator_x;\n }\n\n const {\n 'ignore.empty.value': ignoreEmptyValue = false,\n max,\n min\n } = validator;\n\n if (ignoreEmptyValue && value === '') {\n break validator_x;\n }\n\n const source: FormFieldError.Source = {\n type: 'validator',\n name: validatorName\n };\n\n if (max && value.length > parseInt(`${max}`)) {\n const msgArgs = ['error-invalid-length-too-long', `${max}`] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source\n });\n }\n\n if (min && value.length < parseInt(`${min}`)) {\n const msgArgs = ['error-invalid-length-too-short', `${min}`] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source\n });\n }\n }\n\n validator_x: {\n const validatorName = 'pattern';\n\n const validator = validators[validatorName];\n\n if (validator === undefined) {\n break validator_x;\n }\n\n const {\n 'ignore.empty.value': ignoreEmptyValue = false,\n pattern,\n 'error-message': errorMessageKey\n } = validator;\n\n if (ignoreEmptyValue && value === '') {\n break validator_x;\n }\n\n if (new RegExp(pattern).test(value)) {\n break validator_x;\n }\n\n const msgArgs = [\n errorMessageKey ?? id<MessageKey_defaultSet>('shouldMatchPattern'),\n pattern\n ] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${advancedMsgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: advancedMsgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'validator',\n name: validatorName\n }\n });\n }\n\n validator_x: {\n {\n const lastError = errors[errors.length - 1];\n if (\n lastError !== undefined &&\n lastError.source.type === 'validator' &&\n lastError.source.name === 'pattern'\n ) {\n break validator_x;\n }\n }\n\n const validatorName = 'email';\n\n const validator = validators[validatorName];\n\n if (validator === undefined) {\n break validator_x;\n }\n\n const { 'ignore.empty.value': ignoreEmptyValue = false } = validator;\n\n if (ignoreEmptyValue && value === '') {\n break validator_x;\n }\n\n if (emailRegexp.test(value)) {\n break validator_x;\n }\n\n const msgArgs = [id<MessageKey_defaultSet>('invalidEmailMessage')] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'validator',\n name: validatorName\n }\n });\n }\n\n validator_x: {\n const validatorName = 'integer';\n\n const validator = validators[validatorName];\n\n if (validator === undefined) {\n break validator_x;\n }\n\n const {\n 'ignore.empty.value': ignoreEmptyValue = false,\n max,\n min\n } = validator;\n\n if (ignoreEmptyValue && value === '') {\n break validator_x;\n }\n\n const intValue = parseInt(value);\n\n const source: FormFieldError.Source = {\n type: 'validator',\n name: validatorName\n };\n\n if (isNaN(intValue)) {\n const msgArgs = ['mustBeAnInteger'] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source\n });\n\n break validator_x;\n }\n\n if (max && intValue > parseInt(`${max}`)) {\n const msgArgs = ['error-number-out-of-range-too-big', `${max}`] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source\n });\n\n break validator_x;\n }\n\n if (min && intValue < parseInt(`${min}`)) {\n const msgArgs = [\n 'error-number-out-of-range-too-small',\n `${min}`\n ] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source\n });\n\n break validator_x;\n }\n }\n\n validator_x: {\n const validatorName = 'options';\n\n const validator = validators[validatorName];\n\n if (validator === undefined) {\n break validator_x;\n }\n\n if (value === '') {\n break validator_x;\n }\n\n if (validator.options.indexOf(value) >= 0) {\n break validator_x;\n }\n\n const msgArgs = [id<MessageKey_defaultSet>('notAValidOption')] as const;\n\n errors.push({\n errorMessage: this.sanitizer.bypassSecurityTrustHtml(\n `<span data-key=\"${attributeName}-${errors.length}\">${msgStr(...msgArgs)}</span>`\n ),\n errorMessageStr: msgStr(...msgArgs),\n fieldIndex: undefined,\n source: {\n type: 'validator',\n name: validatorName\n }\n });\n }\n\n //TODO: Implement missing validators. See Validators type definition.\n\n return errors;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AACA;MAoHa,sBAAsB,CAAA;AAyY/B,IAAA,WAAA,GAAA;AAxYQ,QAAA,IAAA,CAAA,SAAS,GACb,MAAM,CAAiD,gBAAgB,CAAC,CAAC;AACrE,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAO,UAAU,CAAC,CAAC;AAChC,QAAA,IAAA,CAAA,yBAAyB,GAAG,MAAM,CAAC,6BAA6B,CAAC,CAAC;AAClE,QAAA,IAAA,CAAA,4BAA4B,GAAG,MAAM,CAAC,4BAA4B,CAAC,CAAC;AACpE,QAAA,IAAA,CAAA,SAAS,GAAiB,MAAM,CAAC,YAAY,CAAC,CAAC;QAC/C,IAAY,CAAA,YAAA,GAAmB,CAAC,MAAK;AACzC,YAAA,MAAM,UAAU,GAAgB,CAAC,MAAK;AAClC,gBAAA,wDAAwD,EAAE;AACtD,oBAAA,IACI,SAAS,IAAI,IAAI,CAAC,SAAS;AAC3B,wBAAA,kBAAkB,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO;AAC5C,wBAAA,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAA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AAO,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;AACvC,gBAAA,MAAM,WAAW,CAAC;aACrB;YAED,MAAM,OAAO,GAAG,CAAC,EAAE,CAAwB,iBAAiB,CAAC,CAAU,CAAC;YAExE,MAAM,CAAC,IAAI,CAAC;gBACR,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAChD,mBAAmB,aAAa,CAAA,CAAA,EAAI,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,GAAG,OAAO,CAAC,SAAS,CACpF;AACD,gBAAA,eAAe,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;AACnC,gBAAA,UAAU,EAAE,SAAS;AACrB,gBAAA,MAAM,EAAE;AACJ,oBAAA,IAAI,EAAE,WAAW;AACjB,oBAAA,IAAI,EAAE,aAAa;AACtB,iBAAA;AACJ,aAAA,CAAC,CAAC;SACN;;AAID,QAAA,OAAO,MAAM,CAAC;KACjB;8GAv2CQ,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cADT,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACpHlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"keycloakify-angular-login-services-user-profile-form.mjs","sources":["../../src/login/services/user-profile-form/user-profile-form.service.ts","../../src/login/services/user-profile-form/keycloakify-angular-login-services-user-profile-form.ts"],"sourcesContent":["import { inject, Injectable, OnDestroy } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\nimport { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';\nimport { KC_LOGIN_CONTEXT } from '@keycloakify/angular/login/tokens/kc-context';\nimport { DO_MAKE_USER_CONFIRM_PASSWORD } from '@keycloakify/angular/login/tokens/make-user-confirm-password';\nimport type {\n Attribute,\n PasswordPolicies,\n Validators\n} from 'keycloakify/login/KcContext';\nimport * as reactlessApi from 'keycloakify/login/lib/getUserProfileApi';\nimport { BehaviorSubject, map, Observable } from 'rxjs';\nimport { assert, type Equals } from 'tsafe/assert';\n\nexport { getButtonToDisplayForMultivaluedAttributeField } from 'keycloakify/login/lib/getUserProfileApi';\n\nexport type FormFieldError = {\n errorMessage: SafeHtml;\n errorMessageStr: string;\n source: FormFieldError.Source;\n fieldIndex: number | undefined;\n};\n\n{\n type A = Omit<FormFieldError, 'errorMessage' | 'errorMessageStr'>;\n type B = Omit<reactlessApi.FormFieldError, 'advancedMsgArgs'>;\n\n assert<Equals<A, B>>();\n}\n\nexport namespace FormFieldError {\n export type Source =\n | Source.Validator\n | Source.PasswordPolicy\n | Source.Server\n | Source.Other;\n\n export namespace Source {\n export type Validator = {\n type: 'validator';\n name: keyof Validators;\n };\n export type PasswordPolicy = {\n type: 'passwordPolicy';\n name: keyof PasswordPolicies;\n };\n export type Server = {\n type: 'server';\n };\n\n export type Other = {\n type: 'other';\n rule: 'passwordConfirmMatchesPassword' | 'requiredField';\n };\n }\n}\n\n{\n type A = FormFieldError.Source;\n type B = reactlessApi.FormFieldError.Source;\n\n assert<Equals<A, B>>();\n}\n\nexport type FormFieldState = {\n attribute: Attribute;\n displayableErrors: FormFieldError[];\n valueOrValues: string | string[];\n};\n\n{\n type A = Omit<FormFieldState, 'displayableErrors'>;\n type B = Omit<reactlessApi.FormFieldState, 'displayableErrors'>;\n\n assert<Equals<A, B>>();\n}\n\nexport type FormState = {\n isFormSubmittable: boolean;\n formFieldStates: FormFieldState[];\n};\n\n{\n type A = Omit<FormState, 'formFieldStates'>;\n type B = Omit<FormState, 'formFieldStates'>;\n\n assert<Equals<A, B>>();\n}\n\nexport type FormAction =\n | {\n action: 'update';\n name: string;\n valueOrValues: string | string[];\n /** Default false */\n displayErrorsImmediately?: boolean;\n }\n | {\n action: 'focus lost';\n name: string;\n fieldIndex: number | undefined;\n };\n\n{\n type A = FormAction;\n type B = reactlessApi.FormAction;\n\n assert<Equals<A, B>>();\n}\n\nexport type KcContextLike = reactlessApi.KcContextLike;\n\nexport type I18nLike = Pick<I18n, 'advancedMsgStr'>;\n\n@Injectable({ providedIn: 'root' })\nexport class UserProfileFormService implements OnDestroy {\n #kcContext = inject<KcContextLike>(KC_LOGIN_CONTEXT);\n #i18n = inject<I18nLike>(LOGIN_I18N);\n #doMakeUserConfirmPassword = inject(DO_MAKE_USER_CONFIRM_PASSWORD);\n #domSanitizer = inject(DomSanitizer);\n #internal_formState$: BehaviorSubject<reactlessApi.FormState>;\n #unsubscribe: (() => void) | undefined;\n public formState$: Observable<FormState>;\n public dispatchFormAction: (action: FormAction) => void;\n constructor() {\n const api = reactlessApi.getUserProfileApi({\n kcContext: this.#kcContext,\n doMakeUserConfirmPassword: this.#doMakeUserConfirmPassword\n });\n this.#internal_formState$ = new BehaviorSubject<reactlessApi.FormState>(\n api.getFormState()\n );\n this.#unsubscribe = api.subscribeToFormState(() => {\n this.#internal_formState$.next(api.getFormState());\n }).unsubscribe;\n this.formState$ = this.#internal_formState$.asObservable().pipe(\n takeUntilDestroyed(),\n map(formState_reactless => ({\n isFormSubmittable: formState_reactless.isFormSubmittable,\n formFieldStates: formState_reactless.formFieldStates.map(\n formFieldState_reactless => ({\n attribute: formFieldState_reactless.attribute,\n valueOrValues: formFieldState_reactless.valueOrValues,\n displayableErrors: formFieldState_reactless.displayableErrors.map(\n (formFieldError_reactless, i) => ({\n errorMessage: this.#domSanitizer.bypassSecurityTrustHtml(\n this.#i18n.advancedMsgStr(\n ...formFieldError_reactless.advancedMsgArgs\n )\n ),\n errorMessageStr: this.#i18n.advancedMsgStr(\n ...formFieldError_reactless.advancedMsgArgs\n ),\n source: formFieldError_reactless.source,\n fieldIndex: formFieldError_reactless.fieldIndex\n })\n )\n })\n )\n }))\n );\n this.dispatchFormAction = api.dispatchFormAction;\n }\n\n ngOnDestroy(): void {\n this.#internal_formState$.complete();\n this.#internal_formState$.unsubscribe();\n if (this.#unsubscribe) this.#unsubscribe();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAyBA;AAII,IAAA,MAAM,EAAgB,CAAC;AAC3B,CAAC;AA6BD;AAII,IAAA,MAAM,EAAgB,CAAC;AAC3B,CAAC;AAQD;AAII,IAAA,MAAM,EAAgB,CAAC;AAC3B,CAAC;AAOD;AAII,IAAA,MAAM,EAAgB,CAAC;AAC3B,CAAC;AAgBD;AAII,IAAA,MAAM,EAAgB,CAAC;AAC3B,CAAC;MAOY,sBAAsB,CAAA;AAC/B,IAAA,UAAU,GAAG,MAAM,CAAgB,gBAAgB,CAAC,CAAC;AACrD,IAAA,KAAK,GAAG,MAAM,CAAW,UAAU,CAAC,CAAC;AACrC,IAAA,0BAA0B,GAAG,MAAM,CAAC,6BAA6B,CAAC,CAAC;AACnE,IAAA,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AACrC,IAAA,oBAAoB,CAA0C;AAC9D,IAAA,YAAY,CAA2B;AAGvC,IAAA,WAAA,GAAA;AACI,QAAA,MAAM,GAAG,GAAG,YAAY,CAAC,iBAAiB,CAAC;YACvC,SAAS,EAAE,IAAI,CAAC,UAAU;YAC1B,yBAAyB,EAAE,IAAI,CAAC,0BAA0B;AAC7D,SAAA,CAAC,CAAC;QACH,IAAI,CAAC,oBAAoB,GAAG,IAAI,eAAe,CAC3C,GAAG,CAAC,YAAY,EAAE,CACrB,CAAC;QACF,IAAI,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AE,CAAC;KAC9C;8GArDQ,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cADT,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACpHlC;;AAEG;;;;"}
|
|
@@ -12,7 +12,6 @@ export declare class AddRemoveButtonsMultiValuedAttributeComponent {
|
|
|
12
12
|
hasAdd: import("@angular/core").Signal<boolean>;
|
|
13
13
|
onAdd(): void;
|
|
14
14
|
onRemove(): void;
|
|
15
|
-
private getButtonToDisplayForMultivaluedAttributeField;
|
|
16
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<AddRemoveButtonsMultiValuedAttributeComponent, never>;
|
|
17
16
|
static ɵcmp: i0.ɵɵComponentDeclaration<AddRemoveButtonsMultiValuedAttributeComponent, "kc-add-remove-buttons-multi-valued-attribute", never, { "attribute": { "alias": "attribute"; "required": false; "isSignal": true; }; "values": { "alias": "values"; "required": false; "isSignal": true; }; "fieldIndex": { "alias": "fieldIndex"; "required": false; "isSignal": true; }; }, { "dispatchFormAction": "dispatchFormAction"; }, never, never, true, never>;
|
|
18
17
|
}
|
|
@@ -2,30 +2,20 @@ import { TemplateRef } from '@angular/core';
|
|
|
2
2
|
import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
|
|
3
3
|
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
4
4
|
import type { KcContext } from '@keycloakify/angular/login/KcContext';
|
|
5
|
-
import { type FormAction
|
|
5
|
+
import { type FormAction } from '@keycloakify/angular/login/services/user-profile-form';
|
|
6
6
|
import type { ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class UserProfileFormFieldsComponent extends ComponentReference {
|
|
9
9
|
#private;
|
|
10
10
|
i18n: I18n;
|
|
11
11
|
kcContext: KcContext;
|
|
12
|
-
userProfileFormService: UserProfileFormService;
|
|
13
12
|
doMakeUserConfirmPassword: boolean;
|
|
14
13
|
doUseDefaultCss: boolean;
|
|
15
14
|
classes: Partial<Record<ClassKey, string>>;
|
|
16
|
-
|
|
17
|
-
formState: import("@angular/core").Signal<{
|
|
18
|
-
isFormSubmittable: boolean;
|
|
19
|
-
formFieldStates: {
|
|
20
|
-
attribute: import("keycloakify/login/KcContext").Attribute;
|
|
21
|
-
displayableErrors: import("@keycloakify/angular/login/services/user-profile-form").FormFieldError[];
|
|
22
|
-
valueOrValues: string | string[];
|
|
23
|
-
}[];
|
|
24
|
-
}>;
|
|
15
|
+
formState$: import("rxjs").Observable<import("@keycloakify/angular/login/services/user-profile-form").FormState>;
|
|
25
16
|
beforeField: TemplateRef<unknown> | undefined;
|
|
26
17
|
afterField: TemplateRef<unknown> | undefined;
|
|
27
|
-
constructor();
|
|
28
18
|
onDispatch(formAction: FormAction): void;
|
|
29
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserProfileFormFieldsComponent, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UserProfileFormFieldsComponent, "kc-user-profile-form-fields", never, {}, {
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserProfileFormFieldsComponent, "kc-user-profile-form-fields", never, {}, {}, ["beforeField", "afterField"], never, true, never>;
|
|
31
21
|
}
|
|
@@ -20,8 +20,7 @@ export declare class IdpReviewUserProfileComponent extends ComponentReference {
|
|
|
20
20
|
infoNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
|
|
21
21
|
socialProvidersNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
|
|
22
22
|
userProfileFormFields: import("@angular/core").InputSignal<Type<UserProfileFormFieldsComponent> | undefined>;
|
|
23
|
-
isFormSubmittable: import("@angular/core").
|
|
24
|
-
constructor();
|
|
23
|
+
isFormSubmittable: import("@angular/core").Signal<boolean>;
|
|
25
24
|
onCallback(): void;
|
|
26
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<IdpReviewUserProfileComponent, never>;
|
|
27
26
|
static ɵcmp: i0.ɵɵComponentDeclaration<IdpReviewUserProfileComponent, "kc-idp-review-user-profile", never, { "userProfileFormFields": { "alias": "userProfileFormFields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -19,9 +19,8 @@ export declare class LoginUpdateProfileComponent extends ComponentReference {
|
|
|
19
19
|
headerNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
|
|
20
20
|
infoNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
|
|
21
21
|
socialProvidersNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
|
|
22
|
-
isFormSubmittable: import("@angular/core").
|
|
22
|
+
isFormSubmittable: import("@angular/core").Signal<boolean>;
|
|
23
23
|
userProfileFormFields: import("@angular/core").InputSignal<Type<UserProfileFormFieldsComponent> | undefined>;
|
|
24
|
-
constructor();
|
|
25
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoginUpdateProfileComponent, never>;
|
|
26
25
|
static ɵcmp: i0.ɵɵComponentDeclaration<LoginUpdateProfileComponent, "kc-login-update-profile", never, { "userProfileFormFields": { "alias": "userProfileFormFields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
27
26
|
}
|
|
@@ -19,10 +19,9 @@ export declare class RegisterComponent extends ComponentReference {
|
|
|
19
19
|
headerNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
|
|
20
20
|
infoNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
|
|
21
21
|
socialProvidersNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
|
|
22
|
-
isFormSubmittable: import("@angular/core").
|
|
22
|
+
isFormSubmittable: import("@angular/core").Signal<boolean>;
|
|
23
23
|
areTermsAccepted: import("@angular/core").WritableSignal<boolean>;
|
|
24
24
|
userProfileFormFields: import("@angular/core").InputSignal<Type<UserProfileFormFieldsComponent> | undefined>;
|
|
25
|
-
constructor();
|
|
26
25
|
onCallback(): void;
|
|
27
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<RegisterComponent, never>;
|
|
28
27
|
static ɵcmp: i0.ɵɵComponentDeclaration<RegisterComponent, "kc-register", never, { "userProfileFormFields": { "alias": "userProfileFormFields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -17,8 +17,7 @@ export declare class UpdateEmailComponent extends ComponentReference {
|
|
|
17
17
|
infoNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
|
|
18
18
|
socialProvidersNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
|
|
19
19
|
userProfileFormFields: import("@angular/core").InputSignal<Type<UserProfileFormFieldsComponent> | undefined>;
|
|
20
|
-
isFormSubmittable: import("@angular/core").
|
|
21
|
-
constructor();
|
|
20
|
+
isFormSubmittable: import("@angular/core").Signal<boolean>;
|
|
22
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<UpdateEmailComponent, never>;
|
|
23
22
|
static ɵcmp: i0.ɵɵComponentDeclaration<UpdateEmailComponent, "kc-update-email", never, { "userProfileFormFields": { "alias": "userProfileFormFields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
24
23
|
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { SafeHtml } from '@angular/platform-browser';
|
|
3
|
-
import type {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
3
|
+
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
4
|
+
import type { Attribute, PasswordPolicies, Validators } from 'keycloakify/login/KcContext';
|
|
5
|
+
import * as reactlessApi from 'keycloakify/login/lib/getUserProfileApi';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
export { getButtonToDisplayForMultivaluedAttributeField } from 'keycloakify/login/lib/getUserProfileApi';
|
|
9
|
+
export type FormFieldError = {
|
|
10
|
+
errorMessage: SafeHtml;
|
|
11
|
+
errorMessageStr: string;
|
|
12
|
+
source: FormFieldError.Source;
|
|
13
|
+
fieldIndex: number | undefined;
|
|
10
14
|
};
|
|
11
15
|
export declare namespace FormFieldError {
|
|
12
16
|
type Source = Source.Validator | Source.PasswordPolicy | Source.Server | Source.Other;
|
|
@@ -28,31 +32,12 @@ export declare namespace FormFieldError {
|
|
|
28
32
|
};
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
|
-
export type
|
|
32
|
-
profile: {
|
|
33
|
-
attributesByName: Record<string, Attribute>;
|
|
34
|
-
html5DataAnnotations?: Record<string, string>;
|
|
35
|
-
};
|
|
36
|
-
passwordRequired?: boolean;
|
|
37
|
-
realm: {
|
|
38
|
-
registrationEmailAsUsername: boolean;
|
|
39
|
-
};
|
|
40
|
-
url: {
|
|
41
|
-
resourcesPath: string;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
export type FormFieldError = {
|
|
45
|
-
errorMessage: SafeHtml;
|
|
46
|
-
errorMessageStr: string;
|
|
47
|
-
source: FormFieldError.Source;
|
|
48
|
-
fieldIndex: number | undefined;
|
|
49
|
-
};
|
|
50
|
-
type FormFieldState = {
|
|
35
|
+
export type FormFieldState = {
|
|
51
36
|
attribute: Attribute;
|
|
52
37
|
displayableErrors: FormFieldError[];
|
|
53
38
|
valueOrValues: string | string[];
|
|
54
39
|
};
|
|
55
|
-
type FormState = {
|
|
40
|
+
export type FormState = {
|
|
56
41
|
isFormSubmittable: boolean;
|
|
57
42
|
formFieldStates: FormFieldState[];
|
|
58
43
|
};
|
|
@@ -67,20 +52,14 @@ export type FormAction = {
|
|
|
67
52
|
name: string;
|
|
68
53
|
fieldIndex: number | undefined;
|
|
69
54
|
};
|
|
70
|
-
export
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
private
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
private initialState;
|
|
77
|
-
private state;
|
|
78
|
-
formState: Signal<FormState>;
|
|
55
|
+
export type KcContextLike = reactlessApi.KcContextLike;
|
|
56
|
+
export type I18nLike = Pick<I18n, 'advancedMsgStr'>;
|
|
57
|
+
export declare class UserProfileFormService implements OnDestroy {
|
|
58
|
+
#private;
|
|
59
|
+
formState$: Observable<FormState>;
|
|
60
|
+
dispatchFormAction: (action: FormAction) => void;
|
|
79
61
|
constructor();
|
|
80
|
-
|
|
81
|
-
private getIsMultivaluedSingleField;
|
|
82
|
-
private getErrors;
|
|
62
|
+
ngOnDestroy(): void;
|
|
83
63
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserProfileFormService, never>;
|
|
84
64
|
static ɵprov: i0.ɵɵInjectableDeclaration<UserProfileFormService>;
|
|
85
65
|
}
|
|
86
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keycloakify/angular",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"keycloakify": "^11.3.
|
|
5
|
+
"keycloakify": "^11.3.9",
|
|
6
6
|
"@angular/core": "^18.0.0",
|
|
7
7
|
"@angular/common": "^18.0.0",
|
|
8
8
|
"@angular/platform-browser": "^18.0.0"
|
|
@@ -543,12 +543,6 @@
|
|
|
543
543
|
"esm": "./esm2022/login/services/login-resource-injector/keycloakify-angular-login-services-login-resource-injector.mjs",
|
|
544
544
|
"default": "./fesm2022/keycloakify-angular-login-services-login-resource-injector.mjs"
|
|
545
545
|
},
|
|
546
|
-
"./login/services/submit": {
|
|
547
|
-
"types": "./login/services/submit/index.d.ts",
|
|
548
|
-
"esm2022": "./esm2022/login/services/submit/keycloakify-angular-login-services-submit.mjs",
|
|
549
|
-
"esm": "./esm2022/login/services/submit/keycloakify-angular-login-services-submit.mjs",
|
|
550
|
-
"default": "./fesm2022/keycloakify-angular-login-services-submit.mjs"
|
|
551
|
-
},
|
|
552
546
|
"./login/services/user-profile-form": {
|
|
553
547
|
"types": "./login/services/user-profile-form/index.d.ts",
|
|
554
548
|
"esm2022": "./esm2022/login/services/user-profile-form/keycloakify-angular-login-services-user-profile-form.mjs",
|
|
@@ -30,7 +30,8 @@ export class ResourceInjectorService {
|
|
|
30
30
|
observer.error(new Error(`Failed to load stylesheet: ${url}`));
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
const head = document.head;
|
|
34
|
+
head.insertBefore(link, head.firstChild);
|
|
34
35
|
});
|
|
35
36
|
}
|
|
36
37
|
createScript({ type, id, src, textContent }: Script): void {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';
|
|
2
|
-
import { type FormAction } from '@keycloakify/angular/login/services/user-profile-form';
|
|
2
|
+
import { getButtonToDisplayForMultivaluedAttributeField, type FormAction } from '@keycloakify/angular/login/services/user-profile-form';
|
|
3
3
|
import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
|
|
4
4
|
import { type Attribute } from 'keycloakify/login/KcContext';
|
|
5
5
|
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
@@ -30,7 +30,7 @@ export class AddRemoveButtonsMultiValuedAttributeComponent {
|
|
|
30
30
|
const values = this.values();
|
|
31
31
|
const fieldIndex = this.fieldIndex();
|
|
32
32
|
if (attribute && values && fieldIndex) {
|
|
33
|
-
return
|
|
33
|
+
return getButtonToDisplayForMultivaluedAttributeField({
|
|
34
34
|
attribute,
|
|
35
35
|
values,
|
|
36
36
|
fieldIndex
|
|
@@ -43,7 +43,7 @@ export class AddRemoveButtonsMultiValuedAttributeComponent {
|
|
|
43
43
|
const values = this.values();
|
|
44
44
|
const fieldIndex = this.fieldIndex();
|
|
45
45
|
if (attribute && values && fieldIndex) {
|
|
46
|
-
return
|
|
46
|
+
return getButtonToDisplayForMultivaluedAttributeField({
|
|
47
47
|
attribute,
|
|
48
48
|
values,
|
|
49
49
|
fieldIndex
|
|
@@ -67,70 +67,4 @@ export class AddRemoveButtonsMultiValuedAttributeComponent {
|
|
|
67
67
|
valueOrValues: (this.values() ?? []).filter((_, i) => i !== this.fieldIndex())
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
private getButtonToDisplayForMultivaluedAttributeField(params: { attribute: Attribute; values: string[]; fieldIndex: number }) {
|
|
72
|
-
const { attribute, values, fieldIndex } = params;
|
|
73
|
-
|
|
74
|
-
const hasRemove = (() => {
|
|
75
|
-
if (values.length === 1) {
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const minCount = (() => {
|
|
80
|
-
const { multivalued } = attribute.validators;
|
|
81
|
-
|
|
82
|
-
if (multivalued === undefined) {
|
|
83
|
-
return undefined;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const minStr = multivalued.min;
|
|
87
|
-
|
|
88
|
-
if (minStr === undefined) {
|
|
89
|
-
return undefined;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return parseInt(`${minStr}`);
|
|
93
|
-
})();
|
|
94
|
-
|
|
95
|
-
if (minCount === undefined) {
|
|
96
|
-
return true;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (values.length === minCount) {
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return true;
|
|
104
|
-
})();
|
|
105
|
-
|
|
106
|
-
const hasAdd = (() => {
|
|
107
|
-
if (fieldIndex + 1 !== values.length) {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
const maxCount = (() => {
|
|
112
|
-
const { multivalued } = attribute.validators;
|
|
113
|
-
|
|
114
|
-
if (multivalued === undefined) {
|
|
115
|
-
return undefined;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const maxStr = multivalued.max;
|
|
119
|
-
|
|
120
|
-
if (maxStr === undefined) {
|
|
121
|
-
return undefined;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
return parseInt(`${maxStr}`);
|
|
125
|
-
})();
|
|
126
|
-
|
|
127
|
-
if (maxCount === undefined) {
|
|
128
|
-
return true;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return values.length !== maxCount;
|
|
132
|
-
})();
|
|
133
|
-
|
|
134
|
-
return { hasRemove, hasAdd };
|
|
135
|
-
}
|
|
136
70
|
}
|