@andreyyolkin/keycloakify-vue 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/keycloakify-vue/account/DefaultPage.vue +55 -0
- package/keycloakify-vue/account/DefaultPage.vue.d.ts +14 -0
- package/keycloakify-vue/account/KcContext/index.d.ts +1 -0
- package/keycloakify-vue/account/KcContext/index.js +0 -0
- package/keycloakify-vue/account/Template.useInitialize.d.ts +13 -0
- package/keycloakify-vue/account/Template.useInitialize.js +20 -0
- package/keycloakify-vue/account/Template.vue +178 -0
- package/keycloakify-vue/account/Template.vue.d.ts +17 -0
- package/keycloakify-vue/account/TemplateProps.d.ts +9 -0
- package/keycloakify-vue/account/TemplateProps.js +0 -0
- package/keycloakify-vue/account/i18n/i18n.d.ts +11 -0
- package/keycloakify-vue/account/i18n/i18n.js +0 -0
- package/keycloakify-vue/account/i18n/i18nBuilder.d.ts +18 -0
- package/keycloakify-vue/account/i18n/i18nBuilder.js +29 -0
- package/keycloakify-vue/account/i18n/index.d.ts +1 -0
- package/keycloakify-vue/account/i18n/index.js +1 -0
- package/keycloakify-vue/account/i18n/useI18n.d.ts +28 -0
- package/keycloakify-vue/account/i18n/useI18n.js +67 -0
- package/keycloakify-vue/account/index.d.ts +4 -0
- package/keycloakify-vue/account/index.js +8 -0
- package/keycloakify-vue/account/pages/Account.vue +182 -0
- package/keycloakify-vue/account/pages/Account.vue.d.ts +9 -0
- package/keycloakify-vue/account/pages/Applications.vue +192 -0
- package/keycloakify-vue/account/pages/Applications.vue.d.ts +9 -0
- package/keycloakify-vue/account/pages/FederatedIdentity.vue +123 -0
- package/keycloakify-vue/account/pages/FederatedIdentity.vue.d.ts +9 -0
- package/keycloakify-vue/account/pages/Log.vue +64 -0
- package/keycloakify-vue/account/pages/Log.vue.d.ts +9 -0
- package/keycloakify-vue/account/pages/NotImplemented.vue +24 -0
- package/keycloakify-vue/account/pages/NotImplemented.vue.d.ts +6 -0
- package/keycloakify-vue/account/pages/PageProps.d.ts +9 -0
- package/keycloakify-vue/account/pages/PageProps.js +0 -0
- package/keycloakify-vue/account/pages/Password.vue +247 -0
- package/keycloakify-vue/account/pages/Password.vue.d.ts +9 -0
- package/keycloakify-vue/account/pages/Sessions.vue +84 -0
- package/keycloakify-vue/account/pages/Sessions.vue.d.ts +9 -0
- package/keycloakify-vue/account/pages/Totp.vue +308 -0
- package/keycloakify-vue/account/pages/Totp.vue.d.ts +9 -0
- package/keycloakify-vue/bin/index.js +14 -0
- package/keycloakify-vue/bin/initialize-account-theme/boilerplate/KcContext.js +0 -0
- package/keycloakify-vue/bin/initialize-account-theme/boilerplate/KcPage.vue +23 -0
- package/keycloakify-vue/bin/initialize-account-theme/boilerplate/KcPageStory.js +18 -0
- package/keycloakify-vue/bin/initialize-account-theme/boilerplate/KcPageStory.vue +13 -0
- package/keycloakify-vue/bin/initialize-account-theme/boilerplate/i18n.js +5 -0
- package/keycloakify-vue/login/DefaultPage.vue +167 -0
- package/keycloakify-vue/login/DefaultPage.vue.d.ts +20 -0
- package/keycloakify-vue/login/Template.useInitialize.d.ts +18 -0
- package/keycloakify-vue/login/Template.useInitialize.js +49 -0
- package/keycloakify-vue/login/Template.vue +239 -0
- package/keycloakify-vue/login/Template.vue.d.ts +26 -0
- package/keycloakify-vue/login/TemplateProps.d.ts +14 -0
- package/keycloakify-vue/login/TemplateProps.js +0 -0
- package/keycloakify-vue/login/components/AddRemoveButtonsMultiValuedAttribute.vue +59 -0
- package/keycloakify-vue/login/components/AddRemoveButtonsMultiValuedAttribute.vue.d.ts +15 -0
- package/keycloakify-vue/login/components/FieldErrors.vue +35 -0
- package/keycloakify-vue/login/components/FieldErrors.vue.d.ts +14 -0
- package/keycloakify-vue/login/components/GroupLabel.vue +68 -0
- package/keycloakify-vue/login/components/GroupLabel.vue.d.ts +14 -0
- package/keycloakify-vue/login/components/InputFieldByType.vue +94 -0
- package/keycloakify-vue/login/components/InputFieldByType.vue.d.ts +4 -0
- package/keycloakify-vue/login/components/InputFieldByTypeProps.d.ts +12 -0
- package/keycloakify-vue/login/components/InputFieldByTypeProps.js +0 -0
- package/keycloakify-vue/login/components/InputTag.vue +105 -0
- package/keycloakify-vue/login/components/InputTag.vue.d.ts +7 -0
- package/keycloakify-vue/login/components/InputTagSelects.vue +108 -0
- package/keycloakify-vue/login/components/InputTagSelects.vue.d.ts +4 -0
- package/keycloakify-vue/login/components/LogoutOtherSessions.vue +27 -0
- package/keycloakify-vue/login/components/LogoutOtherSessions.vue.d.ts +9 -0
- package/keycloakify-vue/login/components/PasswordWrapper.vue +42 -0
- package/keycloakify-vue/login/components/PasswordWrapper.vue.d.ts +20 -0
- package/keycloakify-vue/login/components/SelectTag.vue +74 -0
- package/keycloakify-vue/login/components/SelectTag.vue.d.ts +4 -0
- package/keycloakify-vue/login/components/TermsAcceptance.vue +59 -0
- package/keycloakify-vue/login/components/TermsAcceptance.vue.d.ts +13 -0
- package/keycloakify-vue/login/components/TextareaTag.vue +47 -0
- package/keycloakify-vue/login/components/TextareaTag.vue.d.ts +4 -0
- package/keycloakify-vue/login/components/UserProfileFormFields.vue +119 -0
- package/keycloakify-vue/login/components/UserProfileFormFields.vue.d.ts +33 -0
- package/keycloakify-vue/login/components/UserProfileFormFieldsProps.d.ts +22 -0
- package/keycloakify-vue/login/components/UserProfileFormFieldsProps.js +0 -0
- package/keycloakify-vue/login/components/inputLabel.d.ts +4 -0
- package/keycloakify-vue/login/components/inputLabel.js +15 -0
- package/keycloakify-vue/login/i18n/i18n.d.ts +11 -0
- package/keycloakify-vue/login/i18n/i18n.js +0 -0
- package/keycloakify-vue/login/i18n/i18nBuilder.d.ts +18 -0
- package/keycloakify-vue/login/i18n/i18nBuilder.js +29 -0
- package/keycloakify-vue/login/i18n/index.d.ts +1 -0
- package/keycloakify-vue/login/i18n/index.js +1 -0
- package/keycloakify-vue/login/i18n/useI18n.d.ts +28 -0
- package/keycloakify-vue/login/i18n/useI18n.js +67 -0
- package/keycloakify-vue/login/index.d.ts +5 -0
- package/keycloakify-vue/login/index.js +10 -0
- package/keycloakify-vue/login/lib/useUserProfileForm.d.ts +53 -0
- package/keycloakify-vue/login/lib/useUserProfileForm.js +50 -0
- package/keycloakify-vue/login/pages/Code.vue +54 -0
- package/keycloakify-vue/login/pages/Code.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/DeleteAccountConfirm.vue +69 -0
- package/keycloakify-vue/login/pages/DeleteAccountConfirm.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/DeleteCredential.vue +56 -0
- package/keycloakify-vue/login/pages/DeleteCredential.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/Error.vue +41 -0
- package/keycloakify-vue/login/pages/Error.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/FrontchannelLogout.vue +67 -0
- package/keycloakify-vue/login/pages/FrontchannelLogout.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/IdpReviewUserProfile.vue +77 -0
- package/keycloakify-vue/login/pages/IdpReviewUserProfile.vue.d.ts +14 -0
- package/keycloakify-vue/login/pages/Info.vue +61 -0
- package/keycloakify-vue/login/pages/Info.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LinkIdpAction.vue +66 -0
- package/keycloakify-vue/login/pages/LinkIdpAction.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/Login.vue +230 -0
- package/keycloakify-vue/login/pages/Login.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginConfigTotp.vue +233 -0
- package/keycloakify-vue/login/pages/LoginConfigTotp.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginIdpLinkConfirm.vue +57 -0
- package/keycloakify-vue/login/pages/LoginIdpLinkConfirm.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginIdpLinkConfirmOverride.vue +56 -0
- package/keycloakify-vue/login/pages/LoginIdpLinkConfirmOverride.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginIdpLinkEmail.vue +52 -0
- package/keycloakify-vue/login/pages/LoginIdpLinkEmail.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginOauth2DeviceVerifyUserCode.vue +82 -0
- package/keycloakify-vue/login/pages/LoginOauth2DeviceVerifyUserCode.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginOauthGrant.vue +131 -0
- package/keycloakify-vue/login/pages/LoginOauthGrant.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginOtp.vue +135 -0
- package/keycloakify-vue/login/pages/LoginOtp.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginPageExpired.vue +44 -0
- package/keycloakify-vue/login/pages/LoginPageExpired.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginPasskeysConditionalAuthenticate.useScript.d.ts +21 -0
- package/keycloakify-vue/login/pages/LoginPasskeysConditionalAuthenticate.useScript.js +74 -0
- package/keycloakify-vue/login/pages/LoginPasskeysConditionalAuthenticate.vue +255 -0
- package/keycloakify-vue/login/pages/LoginPasskeysConditionalAuthenticate.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginPassword.useScript.d.ts +23 -0
- package/keycloakify-vue/login/pages/LoginPassword.useScript.js +64 -0
- package/keycloakify-vue/login/pages/LoginPassword.vue +191 -0
- package/keycloakify-vue/login/pages/LoginPassword.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginRecoveryAuthnCodeConfig.useScript.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginRecoveryAuthnCodeConfig.useScript.js +139 -0
- package/keycloakify-vue/login/pages/LoginRecoveryAuthnCodeConfig.vue +183 -0
- package/keycloakify-vue/login/pages/LoginRecoveryAuthnCodeConfig.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginRecoveryAuthnCodeInput.vue +90 -0
- package/keycloakify-vue/login/pages/LoginRecoveryAuthnCodeInput.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginResetOtp.vue +88 -0
- package/keycloakify-vue/login/pages/LoginResetOtp.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginResetPassword.vue +114 -0
- package/keycloakify-vue/login/pages/LoginResetPassword.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginUpdatePassword.vue +145 -0
- package/keycloakify-vue/login/pages/LoginUpdatePassword.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginUpdateProfile.vue +94 -0
- package/keycloakify-vue/login/pages/LoginUpdateProfile.vue.d.ts +14 -0
- package/keycloakify-vue/login/pages/LoginUsername.useScript.d.ts +23 -0
- package/keycloakify-vue/login/pages/LoginUsername.useScript.js +64 -0
- package/keycloakify-vue/login/pages/LoginUsername.vue +263 -0
- package/keycloakify-vue/login/pages/LoginUsername.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginVerifyEmail.vue +39 -0
- package/keycloakify-vue/login/pages/LoginVerifyEmail.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginX509Info.vue +120 -0
- package/keycloakify-vue/login/pages/LoginX509Info.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LogoutConfirm.vue +73 -0
- package/keycloakify-vue/login/pages/LogoutConfirm.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/NotImplemented.vue +12 -0
- package/keycloakify-vue/login/pages/NotImplemented.vue.d.ts +6 -0
- package/keycloakify-vue/login/pages/PageProps.d.ts +9 -0
- package/keycloakify-vue/login/pages/PageProps.js +0 -0
- package/keycloakify-vue/login/pages/Register.vue +158 -0
- package/keycloakify-vue/login/pages/Register.vue.d.ts +14 -0
- package/keycloakify-vue/login/pages/SamlPostForm.vue +75 -0
- package/keycloakify-vue/login/pages/SamlPostForm.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/SelectAuthenticator.vue +65 -0
- package/keycloakify-vue/login/pages/SelectAuthenticator.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/SelectOrganization.vue +89 -0
- package/keycloakify-vue/login/pages/SelectOrganization.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/Terms.vue +56 -0
- package/keycloakify-vue/login/pages/Terms.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/UpdateEmail.vue +100 -0
- package/keycloakify-vue/login/pages/UpdateEmail.vue.d.ts +14 -0
- package/keycloakify-vue/login/pages/WebauthnAuthenticate.useScript.d.ts +22 -0
- package/keycloakify-vue/login/pages/WebauthnAuthenticate.useScript.js +53 -0
- package/keycloakify-vue/login/pages/WebauthnAuthenticate.vue +186 -0
- package/keycloakify-vue/login/pages/WebauthnAuthenticate.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/WebauthnError.vue +84 -0
- package/keycloakify-vue/login/pages/WebauthnError.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/WebauthnRegister.useScript.d.ts +28 -0
- package/keycloakify-vue/login/pages/WebauthnRegister.useScript.js +75 -0
- package/keycloakify-vue/login/pages/WebauthnRegister.vue +105 -0
- package/keycloakify-vue/login/pages/WebauthnRegister.vue.d.ts +9 -0
- package/keycloakify-vue/tools/useInsertLinkTags.d.ts +12 -0
- package/keycloakify-vue/tools/useInsertLinkTags.js +47 -0
- package/keycloakify-vue/tools/useInsertScriptTags.d.ts +19 -0
- package/keycloakify-vue/tools/useInsertScriptTags.js +56 -0
- package/keycloakify-vue/tools/useSetClassName.d.ts +4 -0
- package/keycloakify-vue/tools/useSetClassName.js +16 -0
- package/package.json +553 -0
- package/src/account/DefaultPage.vue +55 -0
- package/src/account/KcContext/index.ts +1 -0
- package/src/account/Template.useInitialize.ts +34 -0
- package/src/account/Template.vue +178 -0
- package/src/account/TemplateProps.ts +11 -0
- package/src/account/i18n/i18n.ts +16 -0
- package/src/account/i18n/i18nBuilder.ts +100 -0
- package/src/account/i18n/index.ts +1 -0
- package/src/account/i18n/useI18n.ts +128 -0
- package/src/account/index.ts +4 -0
- package/src/account/pages/Account.vue +182 -0
- package/src/account/pages/Applications.vue +192 -0
- package/src/account/pages/FederatedIdentity.vue +123 -0
- package/src/account/pages/Log.vue +64 -0
- package/src/account/pages/NotImplemented.vue +24 -0
- package/src/account/pages/PageProps.ts +10 -0
- package/src/account/pages/Password.vue +247 -0
- package/src/account/pages/Sessions.vue +84 -0
- package/src/account/pages/Totp.vue +308 -0
- package/src/bin/initialize-account-theme/boilerplate/KcContext.ts +11 -0
- package/src/bin/initialize-account-theme/boilerplate/KcPage.vue +23 -0
- package/src/bin/initialize-account-theme/boilerplate/KcPageStory.ts +22 -0
- package/src/bin/initialize-account-theme/boilerplate/KcPageStory.vue +13 -0
- package/src/bin/initialize-account-theme/boilerplate/i18n.ts +8 -0
- package/src/login/DefaultPage.vue +167 -0
- package/src/login/Template.useInitialize.ts +71 -0
- package/src/login/Template.vue +239 -0
- package/src/login/TemplateProps.ts +17 -0
- package/src/login/components/AddRemoveButtonsMultiValuedAttribute.vue +59 -0
- package/src/login/components/FieldErrors.vue +35 -0
- package/src/login/components/GroupLabel.vue +68 -0
- package/src/login/components/InputFieldByType.vue +94 -0
- package/src/login/components/InputFieldByTypeProps.ts +13 -0
- package/src/login/components/InputTag.vue +105 -0
- package/src/login/components/InputTagSelects.vue +108 -0
- package/src/login/components/LogoutOtherSessions.vue +27 -0
- package/src/login/components/PasswordWrapper.vue +42 -0
- package/src/login/components/SelectTag.vue +74 -0
- package/src/login/components/TermsAcceptance.vue +59 -0
- package/src/login/components/TextareaTag.vue +47 -0
- package/src/login/components/UserProfileFormFields.vue +119 -0
- package/src/login/components/UserProfileFormFieldsProps.ts +22 -0
- package/src/login/components/inputLabel.ts +18 -0
- package/src/login/i18n/i18n.ts +16 -0
- package/src/login/i18n/i18nBuilder.ts +100 -0
- package/src/login/i18n/index.ts +1 -0
- package/src/login/i18n/useI18n.ts +128 -0
- package/src/login/index.ts +5 -0
- package/src/login/lib/useUserProfileForm.ts +121 -0
- package/src/login/pages/Code.vue +54 -0
- package/src/login/pages/DeleteAccountConfirm.vue +69 -0
- package/src/login/pages/DeleteCredential.vue +56 -0
- package/src/login/pages/Error.vue +41 -0
- package/src/login/pages/FrontchannelLogout.vue +67 -0
- package/src/login/pages/IdpReviewUserProfile.vue +77 -0
- package/src/login/pages/Info.vue +61 -0
- package/src/login/pages/LinkIdpAction.vue +66 -0
- package/src/login/pages/Login.vue +230 -0
- package/src/login/pages/LoginConfigTotp.vue +233 -0
- package/src/login/pages/LoginIdpLinkConfirm.vue +57 -0
- package/src/login/pages/LoginIdpLinkConfirmOverride.vue +56 -0
- package/src/login/pages/LoginIdpLinkEmail.vue +52 -0
- package/src/login/pages/LoginOauth2DeviceVerifyUserCode.vue +82 -0
- package/src/login/pages/LoginOauthGrant.vue +131 -0
- package/src/login/pages/LoginOtp.vue +135 -0
- package/src/login/pages/LoginPageExpired.vue +44 -0
- package/src/login/pages/LoginPasskeysConditionalAuthenticate.useScript.ts +96 -0
- package/src/login/pages/LoginPasskeysConditionalAuthenticate.vue +255 -0
- package/src/login/pages/LoginPassword.useScript.ts +88 -0
- package/src/login/pages/LoginPassword.vue +191 -0
- package/src/login/pages/LoginRecoveryAuthnCodeConfig.useScript.ts +152 -0
- package/src/login/pages/LoginRecoveryAuthnCodeConfig.vue +183 -0
- package/src/login/pages/LoginRecoveryAuthnCodeInput.vue +90 -0
- package/src/login/pages/LoginResetOtp.vue +88 -0
- package/src/login/pages/LoginResetPassword.vue +114 -0
- package/src/login/pages/LoginUpdatePassword.vue +145 -0
- package/src/login/pages/LoginUpdateProfile.vue +94 -0
- package/src/login/pages/LoginUsername.useScript.ts +88 -0
- package/src/login/pages/LoginUsername.vue +263 -0
- package/src/login/pages/LoginVerifyEmail.vue +39 -0
- package/src/login/pages/LoginX509Info.vue +120 -0
- package/src/login/pages/LogoutConfirm.vue +73 -0
- package/src/login/pages/NotImplemented.vue +12 -0
- package/src/login/pages/PageProps.ts +10 -0
- package/src/login/pages/Register.vue +158 -0
- package/src/login/pages/SamlPostForm.vue +75 -0
- package/src/login/pages/SelectAuthenticator.vue +65 -0
- package/src/login/pages/SelectOrganization.vue +89 -0
- package/src/login/pages/Terms.vue +56 -0
- package/src/login/pages/UpdateEmail.vue +100 -0
- package/src/login/pages/WebauthnAuthenticate.useScript.ts +75 -0
- package/src/login/pages/WebauthnAuthenticate.vue +186 -0
- package/src/login/pages/WebauthnError.vue +84 -0
- package/src/login/pages/WebauthnRegister.useScript.ts +109 -0
- package/src/login/pages/WebauthnRegister.vue +105 -0
- package/src/tools/useInsertLinkTags.ts +62 -0
- package/src/tools/useInsertScriptTags.ts +75 -0
- package/src/tools/useSetClassName.ts +15 -0
- package/stories/account/KcContext.ts +13 -0
- package/stories/account/KcContextMock.ts +26 -0
- package/stories/account/KcPage.vue +26 -0
- package/stories/account/KcPageStory.vue +13 -0
- package/stories/account/i18n.ts +7 -0
- package/stories/account/pages/Account.stories.ts +22 -0
- package/stories/account/pages/Applications.stories.ts +70 -0
- package/stories/account/pages/FederatedIdentity.stories.ts +64 -0
- package/stories/account/pages/Log.stories.ts +42 -0
- package/stories/account/pages/Password.stories.ts +22 -0
- package/stories/account/pages/Sessions.stories.ts +41 -0
- package/stories/account/pages/Totp.stories.ts +33 -0
- package/stories/kc.gen.ts +17 -0
- package/stories/login/KcContext.ts +13 -0
- package/stories/login/KcContextMock.ts +26 -0
- package/stories/login/KcPage.vue +28 -0
- package/stories/login/KcPageStory.vue +13 -0
- package/stories/login/i18n.ts +7 -0
- package/stories/login/pages/Code.stories.ts +50 -0
- package/stories/login/pages/DeleteAccountConfirm.stories.ts +32 -0
- package/stories/login/pages/DeleteCredential.stories.ts +23 -0
- package/stories/login/pages/Error.stories.ts +53 -0
- package/stories/login/pages/FrontchannelLogout.stories.ts +24 -0
- package/stories/login/pages/IdpReviewUserProfile.stories.ts +56 -0
- package/stories/login/pages/Info.stories.ts +52 -0
- package/stories/login/pages/LinkIdpAction.stories.ts +30 -0
- package/stories/login/pages/Login.stories.ts +76 -0
- package/stories/login/pages/LoginConfigTotp.stories.ts +53 -0
- package/stories/login/pages/LoginIdpLinkConfirm.stories.ts +34 -0
- package/stories/login/pages/LoginIdpLinkConfirmOverride.stories.ts +14 -0
- package/stories/login/pages/LoginIdpLinkEmail.stories.ts +60 -0
- package/stories/login/pages/LoginOauth2DeviceVerifyUserCode.stories.ts +42 -0
- package/stories/login/pages/LoginOauthGrant.stories.ts +95 -0
- package/stories/login/pages/LoginOtp.stories.ts +92 -0
- package/stories/login/pages/LoginPageExpired.stories.ts +29 -0
- package/stories/login/pages/LoginPasskeysConditionalAuthenticate.stories.ts +14 -0
- package/stories/login/pages/LoginPassword.stories.ts +49 -0
- package/stories/login/pages/LoginRecoveryAuthnCodeConfig.stories.ts +28 -0
- package/stories/login/pages/LoginRecoveryAuthnCodeInput.stories.ts +14 -0
- package/stories/login/pages/LoginResetOtp.stories.ts +69 -0
- package/stories/login/pages/LoginResetPassword.stories.ts +48 -0
- package/stories/login/pages/LoginUpdatePassword.stories.ts +52 -0
- package/stories/login/pages/LoginUpdateProfile.stories.ts +29 -0
- package/stories/login/pages/LoginUsername.stories.ts +25 -0
- package/stories/login/pages/LoginVerifyEmail.stories.ts +63 -0
- package/stories/login/pages/LoginX509Info.stories.ts +29 -0
- package/stories/login/pages/LogoutConfirm.stories.ts +35 -0
- package/stories/login/pages/Register.stories.ts +76 -0
- package/stories/login/pages/SamlPostForm.stories.ts +14 -0
- package/stories/login/pages/SelectAuthenticator.stories.ts +89 -0
- package/stories/login/pages/SelectOrganization.stories.ts +63 -0
- package/stories/login/pages/Terms.stories.ts +78 -0
- package/stories/login/pages/UpdateEmail.stories.ts +28 -0
- package/stories/login/pages/WebauthnAuthenticate.stories.ts +147 -0
- package/stories/login/pages/WebauthnError.stories.ts +77 -0
- package/stories/login/pages/WebauthnRegister.stories.ts +54 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { KcClsx } from 'keycloakify/login/lib/kcClsx';
|
|
3
|
+
import { assert } from 'keycloakify/tools/assert';
|
|
4
|
+
import { ref, watch } from 'vue';
|
|
5
|
+
import type { I18n } from '../i18n/i18n';
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
kcClsx: KcClsx;
|
|
9
|
+
i18n: I18n;
|
|
10
|
+
passwordInputId: string;
|
|
11
|
+
}>();
|
|
12
|
+
|
|
13
|
+
const isPasswordRevealed = ref(false);
|
|
14
|
+
|
|
15
|
+
watch(
|
|
16
|
+
isPasswordRevealed,
|
|
17
|
+
(revealed) => {
|
|
18
|
+
const el = document.getElementById(props.passwordInputId);
|
|
19
|
+
assert(el instanceof HTMLInputElement);
|
|
20
|
+
el.type = revealed ? 'text' : 'password';
|
|
21
|
+
},
|
|
22
|
+
{ immediate: false },
|
|
23
|
+
);
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div :class="kcClsx('kcInputGroup')">
|
|
28
|
+
<slot />
|
|
29
|
+
<button
|
|
30
|
+
type="button"
|
|
31
|
+
:class="kcClsx('kcFormPasswordVisibilityButtonClass')"
|
|
32
|
+
:aria-label="i18n.msgStr(isPasswordRevealed ? 'hidePassword' : 'showPassword')"
|
|
33
|
+
:aria-controls="passwordInputId"
|
|
34
|
+
@click="isPasswordRevealed = !isPasswordRevealed"
|
|
35
|
+
>
|
|
36
|
+
<i
|
|
37
|
+
:class="kcClsx(isPasswordRevealed ? 'kcFormPasswordVisibilityIconHide' : 'kcFormPasswordVisibilityIconShow')"
|
|
38
|
+
aria-hidden="true"
|
|
39
|
+
></i>
|
|
40
|
+
</button>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { KcClsx } from 'keycloakify/login/lib/kcClsx';
|
|
2
|
+
import type { I18n } from '../i18n/i18n';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
kcClsx: KcClsx;
|
|
5
|
+
i18n: I18n;
|
|
6
|
+
passwordInputId: string;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_1: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_1) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { assert } from 'keycloakify/tools/assert';
|
|
3
|
+
import { computed } from 'vue';
|
|
4
|
+
import { inputLabel } from './inputLabel';
|
|
5
|
+
import type { InputFieldByTypeProps } from './InputFieldByTypeProps';
|
|
6
|
+
|
|
7
|
+
const props = defineProps<InputFieldByTypeProps>();
|
|
8
|
+
|
|
9
|
+
const isMultiple = computed(() => props.attribute.annotations.inputType === 'multiselect');
|
|
10
|
+
|
|
11
|
+
const options = computed<string[]>(() => {
|
|
12
|
+
const { inputOptionsFromValidation } = props.attribute.annotations;
|
|
13
|
+
if (inputOptionsFromValidation !== undefined) {
|
|
14
|
+
assert(typeof inputOptionsFromValidation === 'string');
|
|
15
|
+
const validator = (props.attribute.validators as Record<string, { options?: string[] }>)[
|
|
16
|
+
inputOptionsFromValidation
|
|
17
|
+
];
|
|
18
|
+
if (validator?.options !== undefined) {
|
|
19
|
+
return validator.options;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return props.attribute.validators.options?.options ?? [];
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
function onChange(event: Event) {
|
|
26
|
+
const target = event.target as HTMLSelectElement;
|
|
27
|
+
props.dispatchFormAction({
|
|
28
|
+
action: 'update',
|
|
29
|
+
name: props.attribute.name,
|
|
30
|
+
valueOrValues: isMultiple.value ? Array.from(target.selectedOptions).map((option) => option.value) : target.value,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function onBlur() {
|
|
35
|
+
props.dispatchFormAction({
|
|
36
|
+
action: 'focus lost',
|
|
37
|
+
name: props.attribute.name,
|
|
38
|
+
fieldIndex: undefined,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const sizeAnno = computed(() =>
|
|
43
|
+
props.attribute.annotations.inputTypeSize === undefined
|
|
44
|
+
? undefined
|
|
45
|
+
: parseInt(`${props.attribute.annotations.inputTypeSize}`),
|
|
46
|
+
);
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<select
|
|
51
|
+
:id="attribute.name"
|
|
52
|
+
:name="attribute.name"
|
|
53
|
+
:class="kcClsx('kcInputClass')"
|
|
54
|
+
:aria-invalid="displayableErrors.length !== 0"
|
|
55
|
+
:disabled="attribute.readOnly"
|
|
56
|
+
:multiple="isMultiple"
|
|
57
|
+
:size="sizeAnno"
|
|
58
|
+
:value="valueOrValues"
|
|
59
|
+
@change="onChange"
|
|
60
|
+
@blur="onBlur"
|
|
61
|
+
>
|
|
62
|
+
<option
|
|
63
|
+
v-if="!isMultiple"
|
|
64
|
+
value=""
|
|
65
|
+
></option>
|
|
66
|
+
<option
|
|
67
|
+
v-for="option in options"
|
|
68
|
+
:key="option"
|
|
69
|
+
:value="option"
|
|
70
|
+
>
|
|
71
|
+
<component :is="inputLabel(i18n, attribute, option)" />
|
|
72
|
+
</option>
|
|
73
|
+
</select>
|
|
74
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { InputFieldByTypeProps } from './InputFieldByTypeProps';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<InputFieldByTypeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputFieldByTypeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { kcSanitize } from 'keycloakify/lib/kcSanitize';
|
|
3
|
+
import type { KcContext } from 'keycloakify/login/KcContext';
|
|
4
|
+
import type { KcClsx } from 'keycloakify/login/lib/kcClsx';
|
|
5
|
+
import type { I18n } from '../i18n/i18n';
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
i18n: I18n;
|
|
9
|
+
kcClsx: KcClsx;
|
|
10
|
+
messagesPerField: Pick<KcContext['messagesPerField'], 'existsError' | 'get'>;
|
|
11
|
+
areTermsAccepted: boolean;
|
|
12
|
+
onAreTermsAcceptedValueChange: (areTermsAccepted: boolean) => void;
|
|
13
|
+
}>();
|
|
14
|
+
|
|
15
|
+
function onChange(event: Event) {
|
|
16
|
+
props.onAreTermsAcceptedValueChange((event.target as HTMLInputElement).checked);
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div class="form-group">
|
|
22
|
+
<div :class="kcClsx('kcInputWrapperClass')">
|
|
23
|
+
<component :is="i18n.msg('termsTitle')" />
|
|
24
|
+
<div id="kc-registration-terms-text">
|
|
25
|
+
<component :is="i18n.msg('termsText')" />
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="form-group">
|
|
30
|
+
<div :class="kcClsx('kcLabelWrapperClass')">
|
|
31
|
+
<input
|
|
32
|
+
type="checkbox"
|
|
33
|
+
id="termsAccepted"
|
|
34
|
+
name="termsAccepted"
|
|
35
|
+
:class="kcClsx('kcCheckboxInputClass')"
|
|
36
|
+
:checked="areTermsAccepted"
|
|
37
|
+
:aria-invalid="messagesPerField.existsError('termsAccepted')"
|
|
38
|
+
@change="onChange"
|
|
39
|
+
/>
|
|
40
|
+
<label
|
|
41
|
+
for="termsAccepted"
|
|
42
|
+
:class="kcClsx('kcLabelClass')"
|
|
43
|
+
>
|
|
44
|
+
<component :is="i18n.msg('acceptTerms')" />
|
|
45
|
+
</label>
|
|
46
|
+
</div>
|
|
47
|
+
<div
|
|
48
|
+
v-if="messagesPerField.existsError('termsAccepted')"
|
|
49
|
+
:class="kcClsx('kcLabelWrapperClass')"
|
|
50
|
+
>
|
|
51
|
+
<span
|
|
52
|
+
id="input-error-terms-accepted"
|
|
53
|
+
:class="kcClsx('kcInputErrorMessageClass')"
|
|
54
|
+
aria-live="polite"
|
|
55
|
+
v-html="kcSanitize(messagesPerField.get('termsAccepted'))"
|
|
56
|
+
></span>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { KcContext } from 'keycloakify/login/KcContext';
|
|
2
|
+
import type { KcClsx } from 'keycloakify/login/lib/kcClsx';
|
|
3
|
+
import type { I18n } from '../i18n/i18n';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
i18n: I18n;
|
|
6
|
+
kcClsx: KcClsx;
|
|
7
|
+
messagesPerField: Pick<KcContext['messagesPerField'], 'existsError' | 'get'>;
|
|
8
|
+
areTermsAccepted: boolean;
|
|
9
|
+
onAreTermsAcceptedValueChange: (areTermsAccepted: boolean) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { assert } from 'keycloakify/tools/assert';
|
|
3
|
+
import { computed } from 'vue';
|
|
4
|
+
import type { InputFieldByTypeProps } from './InputFieldByTypeProps';
|
|
5
|
+
|
|
6
|
+
const props = defineProps<InputFieldByTypeProps>();
|
|
7
|
+
|
|
8
|
+
const value = computed(() => {
|
|
9
|
+
assert(typeof props.valueOrValues === 'string');
|
|
10
|
+
return props.valueOrValues;
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const numAnno = (v: string | number | undefined) => (v === undefined ? undefined : parseInt(`${v}`));
|
|
14
|
+
|
|
15
|
+
function onChange(event: Event) {
|
|
16
|
+
const target = event.target as HTMLTextAreaElement;
|
|
17
|
+
props.dispatchFormAction({
|
|
18
|
+
action: 'update',
|
|
19
|
+
name: props.attribute.name,
|
|
20
|
+
valueOrValues: target.value,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function onBlur() {
|
|
25
|
+
props.dispatchFormAction({
|
|
26
|
+
action: 'focus lost',
|
|
27
|
+
name: props.attribute.name,
|
|
28
|
+
fieldIndex: undefined,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<textarea
|
|
35
|
+
:id="attribute.name"
|
|
36
|
+
:name="attribute.name"
|
|
37
|
+
:class="kcClsx('kcInputClass')"
|
|
38
|
+
:aria-invalid="displayableErrors.length !== 0"
|
|
39
|
+
:disabled="attribute.readOnly"
|
|
40
|
+
:cols="numAnno(attribute.annotations.inputTypeCols)"
|
|
41
|
+
:rows="numAnno(attribute.annotations.inputTypeRows)"
|
|
42
|
+
:maxlength="numAnno(attribute.annotations.inputTypeMaxlength)"
|
|
43
|
+
:value="value"
|
|
44
|
+
@input="onChange"
|
|
45
|
+
@blur="onBlur"
|
|
46
|
+
></textarea>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { InputFieldByTypeProps } from './InputFieldByTypeProps';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<InputFieldByTypeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputFieldByTypeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { KcContext } from 'keycloakify/login/KcContext';
|
|
3
|
+
import { computed, watch } from 'vue';
|
|
4
|
+
import FieldErrors from './FieldErrors.vue';
|
|
5
|
+
import GroupLabel from './GroupLabel.vue';
|
|
6
|
+
import InputFieldByType from './InputFieldByType.vue';
|
|
7
|
+
import type { UserProfileFormFieldsProps } from './UserProfileFormFieldsProps';
|
|
8
|
+
import { useUserProfileForm } from '../lib/useUserProfileForm';
|
|
9
|
+
import type { I18n } from '../i18n/i18n';
|
|
10
|
+
|
|
11
|
+
const props = defineProps<UserProfileFormFieldsProps<KcContext, I18n>>();
|
|
12
|
+
|
|
13
|
+
const { formState, dispatchFormAction } = useUserProfileForm({
|
|
14
|
+
kcContext: props.kcContext,
|
|
15
|
+
i18n: props.i18n,
|
|
16
|
+
doMakeUserConfirmPassword: props.doMakeUserConfirmPassword,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
watch(
|
|
20
|
+
() => formState.value.isFormSubmittable,
|
|
21
|
+
(isFormSubmittable) => props.onIsFormSubmittableValueChange(isFormSubmittable),
|
|
22
|
+
{ immediate: true },
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const groupNameRef = { current: '' };
|
|
26
|
+
|
|
27
|
+
const fieldRows = computed(() =>
|
|
28
|
+
formState.value.formFieldStates.map((formFieldState) => {
|
|
29
|
+
const { attribute, valueOrValues, displayableErrors } = formFieldState;
|
|
30
|
+
const isHidden =
|
|
31
|
+
attribute.annotations.inputType === 'hidden' ||
|
|
32
|
+
(attribute.name === 'password-confirm' && !props.doMakeUserConfirmPassword);
|
|
33
|
+
return { attribute, valueOrValues, displayableErrors, isHidden };
|
|
34
|
+
}),
|
|
35
|
+
);
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<template
|
|
40
|
+
v-for="(row, i) in fieldRows"
|
|
41
|
+
:key="i"
|
|
42
|
+
>
|
|
43
|
+
<GroupLabel
|
|
44
|
+
:attribute="row.attribute"
|
|
45
|
+
:groupNameRef="groupNameRef"
|
|
46
|
+
:i18n="i18n"
|
|
47
|
+
:kcClsx="kcClsx"
|
|
48
|
+
/>
|
|
49
|
+
|
|
50
|
+
<slot
|
|
51
|
+
name="beforeField"
|
|
52
|
+
:attribute="row.attribute"
|
|
53
|
+
:dispatchFormAction="dispatchFormAction"
|
|
54
|
+
:displayableErrors="row.displayableErrors"
|
|
55
|
+
:valueOrValues="row.valueOrValues"
|
|
56
|
+
:kcClsx="kcClsx"
|
|
57
|
+
:i18n="i18n"
|
|
58
|
+
/>
|
|
59
|
+
|
|
60
|
+
<div
|
|
61
|
+
:class="kcClsx('kcFormGroupClass')"
|
|
62
|
+
:style="{ display: row.isHidden ? 'none' : undefined }"
|
|
63
|
+
>
|
|
64
|
+
<div :class="kcClsx('kcLabelWrapperClass')">
|
|
65
|
+
<label
|
|
66
|
+
:for="row.attribute.name"
|
|
67
|
+
:class="kcClsx('kcLabelClass')"
|
|
68
|
+
>
|
|
69
|
+
<component :is="i18n.advancedMsg(row.attribute.displayName ?? '')" />
|
|
70
|
+
</label>
|
|
71
|
+
<template v-if="row.attribute.required"> *</template>
|
|
72
|
+
</div>
|
|
73
|
+
<div :class="kcClsx('kcInputWrapperClass')">
|
|
74
|
+
<div
|
|
75
|
+
v-if="row.attribute.annotations.inputHelperTextBefore !== undefined"
|
|
76
|
+
:class="kcClsx('kcInputHelperTextBeforeClass')"
|
|
77
|
+
:id="`form-help-text-before-${row.attribute.name}`"
|
|
78
|
+
aria-live="polite"
|
|
79
|
+
>
|
|
80
|
+
<component :is="i18n.advancedMsg(row.attribute.annotations.inputHelperTextBefore)" />
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<InputFieldByType
|
|
84
|
+
:attribute="row.attribute"
|
|
85
|
+
:valueOrValues="row.valueOrValues"
|
|
86
|
+
:displayableErrors="row.displayableErrors"
|
|
87
|
+
:dispatchFormAction="dispatchFormAction"
|
|
88
|
+
:kcClsx="kcClsx"
|
|
89
|
+
:i18n="i18n"
|
|
90
|
+
/>
|
|
91
|
+
|
|
92
|
+
<FieldErrors
|
|
93
|
+
:attribute="row.attribute"
|
|
94
|
+
:displayableErrors="row.displayableErrors"
|
|
95
|
+
:kcClsx="kcClsx"
|
|
96
|
+
/>
|
|
97
|
+
|
|
98
|
+
<div
|
|
99
|
+
v-if="row.attribute.annotations.inputHelperTextAfter !== undefined"
|
|
100
|
+
:class="kcClsx('kcInputHelperTextAfterClass')"
|
|
101
|
+
:id="`form-help-text-after-${row.attribute.name}`"
|
|
102
|
+
aria-live="polite"
|
|
103
|
+
>
|
|
104
|
+
<component :is="i18n.advancedMsg(row.attribute.annotations.inputHelperTextAfter)" />
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<slot
|
|
108
|
+
name="afterField"
|
|
109
|
+
:attribute="row.attribute"
|
|
110
|
+
:dispatchFormAction="dispatchFormAction"
|
|
111
|
+
:displayableErrors="row.displayableErrors"
|
|
112
|
+
:valueOrValues="row.valueOrValues"
|
|
113
|
+
:kcClsx="kcClsx"
|
|
114
|
+
:i18n="i18n"
|
|
115
|
+
/>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</template>
|
|
119
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { KcContext } from 'keycloakify/login/KcContext';
|
|
2
|
+
import type { UserProfileFormFieldsProps } from './UserProfileFormFieldsProps';
|
|
3
|
+
import type { I18n } from '../i18n/i18n';
|
|
4
|
+
type __VLS_Props = UserProfileFormFieldsProps<KcContext, I18n>;
|
|
5
|
+
declare var __VLS_6: {
|
|
6
|
+
attribute: import("keycloakify/login/KcContext").Attribute;
|
|
7
|
+
dispatchFormAction: (action: import("../lib/useUserProfileForm").FormAction) => void;
|
|
8
|
+
displayableErrors: import("../lib/useUserProfileForm").FormFieldError[];
|
|
9
|
+
valueOrValues: string | string[];
|
|
10
|
+
kcClsx: (...args: import("keycloakify/tools/clsx_withTransform.js").CxArg<import("keycloakify/login/lib/kcClsx.js").ClassKey>[]) => string;
|
|
11
|
+
i18n: I18n;
|
|
12
|
+
}, __VLS_33: {
|
|
13
|
+
attribute: import("keycloakify/login/KcContext").Attribute;
|
|
14
|
+
dispatchFormAction: (action: import("../lib/useUserProfileForm").FormAction) => void;
|
|
15
|
+
displayableErrors: import("../lib/useUserProfileForm").FormFieldError[];
|
|
16
|
+
valueOrValues: string | string[];
|
|
17
|
+
kcClsx: (...args: import("keycloakify/tools/clsx_withTransform.js").CxArg<import("keycloakify/login/lib/kcClsx.js").ClassKey>[]) => string;
|
|
18
|
+
i18n: I18n;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
beforeField?: (props: typeof __VLS_6) => any;
|
|
22
|
+
} & {
|
|
23
|
+
afterField?: (props: typeof __VLS_33) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Attribute } from 'keycloakify/login/KcContext';
|
|
2
|
+
import type { KcClsx } from 'keycloakify/login/lib/kcClsx';
|
|
3
|
+
import type { FormAction, FormFieldError } from '../lib/useUserProfileForm';
|
|
4
|
+
import type { I18n } from '../i18n/i18n';
|
|
5
|
+
export type UserProfileFormFieldsProps<KcContext = any, I18nType = I18n> = {
|
|
6
|
+
kcContext: Extract<KcContext, {
|
|
7
|
+
profile: unknown;
|
|
8
|
+
}>;
|
|
9
|
+
i18n: I18nType;
|
|
10
|
+
kcClsx: KcClsx;
|
|
11
|
+
onIsFormSubmittableValueChange: (isFormSubmittable: boolean) => void;
|
|
12
|
+
doMakeUserConfirmPassword: boolean;
|
|
13
|
+
};
|
|
14
|
+
/** Scoped-slot payload for the optional `beforeField` / `afterField` slots. */
|
|
15
|
+
export type BeforeAfterFieldSlotProps = {
|
|
16
|
+
attribute: Attribute;
|
|
17
|
+
dispatchFormAction: (action: FormAction) => void;
|
|
18
|
+
displayableErrors: FormFieldError[];
|
|
19
|
+
valueOrValues: string | string[];
|
|
20
|
+
kcClsx: KcClsx;
|
|
21
|
+
i18n: I18n;
|
|
22
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createTextVNode } from "vue";
|
|
2
|
+
const inputLabel = (i18n, attribute, option) => {
|
|
3
|
+
const { advancedMsg } = i18n;
|
|
4
|
+
if (attribute.annotations.inputOptionLabels !== void 0) {
|
|
5
|
+
const { inputOptionLabels } = attribute.annotations;
|
|
6
|
+
return advancedMsg(inputOptionLabels[option] ?? option);
|
|
7
|
+
}
|
|
8
|
+
if (attribute.annotations.inputOptionLabelsI18nPrefix !== void 0) {
|
|
9
|
+
return advancedMsg(`${attribute.annotations.inputOptionLabelsI18nPrefix}.${option}`);
|
|
10
|
+
}
|
|
11
|
+
return createTextVNode(option);
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
inputLabel
|
|
15
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GenericI18n_noJsx } from 'keycloakify/login/i18n/noJsx/GenericI18n_noJsx';
|
|
2
|
+
import { type MessageKey as MessageKey_defaultSet } from 'keycloakify/login/i18n/messages_defaultSet/types';
|
|
3
|
+
import type { VNode } from 'vue';
|
|
4
|
+
/** INTERNAL: DO NOT IMPORT THIS */
|
|
5
|
+
export type GenericI18n_vue<MessageKey extends string, LanguageTag extends string> = GenericI18n_noJsx<MessageKey, LanguageTag> & {
|
|
6
|
+
/** Same as msgStr but returns a VNode with the html string rendered as html. */
|
|
7
|
+
msg: (key: MessageKey_defaultSet, ...args: (string | undefined)[]) => VNode;
|
|
8
|
+
/** Same as advancedMsgStr but returns a VNode with the html string rendered as html. */
|
|
9
|
+
advancedMsg: (key: string, ...args: (string | undefined)[]) => VNode;
|
|
10
|
+
};
|
|
11
|
+
export type I18n = GenericI18n_vue<MessageKey_defaultSet, string>;
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { LanguageTag as LanguageTag_defaultSet, MessageKey as MessageKey_defaultSet } from 'keycloakify/login/i18n/messages_defaultSet/types';
|
|
2
|
+
import { type ReturnTypeOfCreateUseI18n } from './useI18n';
|
|
3
|
+
export type I18nBuilder<ThemeName extends string = never, MessageKey_themeDefined extends string = never, LanguageTag_notInDefaultSet extends string = never, ExcludedMethod extends 'withThemeName' | 'withExtraLanguages' | 'withCustomTranslations' = never> = Omit<{
|
|
4
|
+
withThemeName: <ThemeName extends string>() => I18nBuilder<ThemeName, MessageKey_themeDefined, LanguageTag_notInDefaultSet, ExcludedMethod | 'withThemeName'>;
|
|
5
|
+
withExtraLanguages: <LanguageTag_notInDefaultSet extends string>(extraLanguageTranslations: {
|
|
6
|
+
[LanguageTag in LanguageTag_notInDefaultSet]: {
|
|
7
|
+
label: string;
|
|
8
|
+
getMessages: () => Promise<{
|
|
9
|
+
default: Record<MessageKey_defaultSet, string>;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
}) => I18nBuilder<ThemeName, MessageKey_themeDefined, LanguageTag_notInDefaultSet, ExcludedMethod | 'withExtraLanguages'>;
|
|
13
|
+
withCustomTranslations: <MessageKey_themeDefined extends string>(messagesByLanguageTag_themeDefined: Partial<{
|
|
14
|
+
[LanguageTag in LanguageTag_defaultSet | LanguageTag_notInDefaultSet]: Record<MessageKey_themeDefined, string | Record<ThemeName, string>>;
|
|
15
|
+
}>) => I18nBuilder<ThemeName, MessageKey_themeDefined, LanguageTag_notInDefaultSet, ExcludedMethod | 'withCustomTranslations'>;
|
|
16
|
+
build: () => ReturnTypeOfCreateUseI18n<MessageKey_themeDefined, LanguageTag_notInDefaultSet>;
|
|
17
|
+
}, ExcludedMethod>;
|
|
18
|
+
export declare const i18nBuilder: I18nBuilder<never, never, never, never>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createUseI18n } from "./useI18n";
|
|
2
|
+
function createI18nBuilder(params) {
|
|
3
|
+
const i18nBuilder2 = {
|
|
4
|
+
withThemeName: () => createI18nBuilder({
|
|
5
|
+
extraLanguageTranslations: params.extraLanguageTranslations,
|
|
6
|
+
messagesByLanguageTag_themeDefined: params.messagesByLanguageTag_themeDefined
|
|
7
|
+
}),
|
|
8
|
+
withExtraLanguages: (extraLanguageTranslations) => createI18nBuilder({
|
|
9
|
+
extraLanguageTranslations,
|
|
10
|
+
messagesByLanguageTag_themeDefined: params.messagesByLanguageTag_themeDefined
|
|
11
|
+
}),
|
|
12
|
+
withCustomTranslations: (messagesByLanguageTag_themeDefined) => createI18nBuilder({
|
|
13
|
+
extraLanguageTranslations: params.extraLanguageTranslations,
|
|
14
|
+
messagesByLanguageTag_themeDefined
|
|
15
|
+
}),
|
|
16
|
+
build: () => createUseI18n({
|
|
17
|
+
extraLanguageTranslations: params.extraLanguageTranslations,
|
|
18
|
+
messagesByLanguageTag_themeDefined: params.messagesByLanguageTag_themeDefined
|
|
19
|
+
})
|
|
20
|
+
};
|
|
21
|
+
return i18nBuilder2;
|
|
22
|
+
}
|
|
23
|
+
const i18nBuilder = createI18nBuilder({
|
|
24
|
+
extraLanguageTranslations: {},
|
|
25
|
+
messagesByLanguageTag_themeDefined: {}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
i18nBuilder
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './i18n';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./i18n";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type LanguageTag as LanguageTag_defaultSet, type MessageKey as MessageKey_defaultSet } from 'keycloakify/login/i18n/messages_defaultSet/types';
|
|
2
|
+
import { type KcContextLike } from 'keycloakify/login/i18n/noJsx/getI18n';
|
|
3
|
+
import { type Ref } from 'vue';
|
|
4
|
+
import type { GenericI18n_vue } from './i18n';
|
|
5
|
+
export type ReturnTypeOfCreateUseI18n<MessageKey_themeDefined extends string, LanguageTag_notInDefaultSet extends string> = {
|
|
6
|
+
useI18n: (params: {
|
|
7
|
+
kcContext: KcContextLike;
|
|
8
|
+
}) => {
|
|
9
|
+
i18n: Ref<GenericI18n_vue<MessageKey_defaultSet | MessageKey_themeDefined, LanguageTag_defaultSet | LanguageTag_notInDefaultSet>>;
|
|
10
|
+
};
|
|
11
|
+
ofTypeI18n: GenericI18n_vue<MessageKey_defaultSet | MessageKey_themeDefined, LanguageTag_defaultSet | LanguageTag_notInDefaultSet>;
|
|
12
|
+
};
|
|
13
|
+
export type { KcContextLike };
|
|
14
|
+
export declare function createUseI18n<ThemeName extends string = string, MessageKey_themeDefined extends string = never, LanguageTag_notInDefaultSet extends string = never>(params: {
|
|
15
|
+
extraLanguageTranslations: {
|
|
16
|
+
[languageTag in LanguageTag_notInDefaultSet]: {
|
|
17
|
+
label: string;
|
|
18
|
+
getMessages: () => Promise<{
|
|
19
|
+
default: Record<MessageKey_defaultSet, string>;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
messagesByLanguageTag_themeDefined: Partial<{
|
|
24
|
+
[languageTag in LanguageTag_defaultSet | LanguageTag_notInDefaultSet]: {
|
|
25
|
+
[key in MessageKey_themeDefined]: string | Record<ThemeName, string>;
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
}): ReturnTypeOfCreateUseI18n<MessageKey_themeDefined, LanguageTag_notInDefaultSet>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { createGetI18n } from "keycloakify/login/i18n/noJsx/getI18n";
|
|
2
|
+
import { kcSanitize } from "keycloakify/lib/kcSanitize";
|
|
3
|
+
import { Reflect } from "tsafe/Reflect";
|
|
4
|
+
import { getCurrentInstance, h, onMounted, onUnmounted, ref } from "vue";
|
|
5
|
+
function createUseI18n(params) {
|
|
6
|
+
const { extraLanguageTranslations, messagesByLanguageTag_themeDefined } = params;
|
|
7
|
+
const cache = /* @__PURE__ */ new WeakMap();
|
|
8
|
+
function renderHtmlString(htmlString, msgKey) {
|
|
9
|
+
const hasBlockLevelTag = htmlString.includes("<") && htmlString.includes(">") && ["div", "section", "article", "ul", "ol"].some((tagName) => htmlString.includes(`<${tagName}`));
|
|
10
|
+
const elementName = hasBlockLevelTag ? "div" : "span";
|
|
11
|
+
return h(elementName, {
|
|
12
|
+
"data-kc-msg": msgKey,
|
|
13
|
+
innerHTML: kcSanitize(htmlString)
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function withVue(i18n_noJsx) {
|
|
17
|
+
const cached = cache.get(i18n_noJsx);
|
|
18
|
+
if (cached !== void 0) {
|
|
19
|
+
return cached;
|
|
20
|
+
}
|
|
21
|
+
const i18n = {
|
|
22
|
+
...i18n_noJsx,
|
|
23
|
+
msg: (msgKey, ...args) => renderHtmlString(i18n_noJsx.msgStr(msgKey, ...args), msgKey),
|
|
24
|
+
advancedMsg: (msgKey, ...args) => renderHtmlString(i18n_noJsx.advancedMsgStr(msgKey, ...args), msgKey)
|
|
25
|
+
};
|
|
26
|
+
cache.set(i18n_noJsx, i18n);
|
|
27
|
+
return i18n;
|
|
28
|
+
}
|
|
29
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-kc-i18n]") === null) {
|
|
30
|
+
const styleElement = document.createElement("style");
|
|
31
|
+
styleElement.setAttribute("data-kc-i18n", "");
|
|
32
|
+
styleElement.textContent = `div[data-kc-msg] { display: inline-block; }`;
|
|
33
|
+
document.head.prepend(styleElement);
|
|
34
|
+
}
|
|
35
|
+
const { getI18n } = createGetI18n({
|
|
36
|
+
extraLanguageTranslations,
|
|
37
|
+
messagesByLanguageTag_themeDefined
|
|
38
|
+
});
|
|
39
|
+
function useI18n(params2) {
|
|
40
|
+
const { kcContext } = params2;
|
|
41
|
+
const { i18n, prI18n_currentLanguage } = getI18n({ kcContext });
|
|
42
|
+
const i18nRef = ref(withVue(i18n));
|
|
43
|
+
if (getCurrentInstance() !== null) {
|
|
44
|
+
onMounted(() => {
|
|
45
|
+
let isActive = true;
|
|
46
|
+
onUnmounted(() => {
|
|
47
|
+
isActive = false;
|
|
48
|
+
});
|
|
49
|
+
prI18n_currentLanguage?.then((i18n_currentLanguage) => {
|
|
50
|
+
if (!isActive) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
i18nRef.value = withVue(i18n_currentLanguage);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
} else {
|
|
57
|
+
prI18n_currentLanguage?.then((i18n_currentLanguage) => {
|
|
58
|
+
i18nRef.value = withVue(i18n_currentLanguage);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return { i18n: i18nRef };
|
|
62
|
+
}
|
|
63
|
+
return { useI18n, ofTypeI18n: Reflect() };
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
createUseI18n
|
|
67
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { ExtendKcContext } from 'keycloakify/login/KcContext';
|
|
2
|
+
export { i18nBuilder } from './i18n/i18nBuilder';
|
|
3
|
+
export { default as DefaultPage } from './DefaultPage.vue';
|
|
4
|
+
export { default as Template } from './Template.vue';
|
|
5
|
+
export { default as UserProfileFormFields } from './components/UserProfileFormFields.vue';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { i18nBuilder } from "./i18n/i18nBuilder";
|
|
2
|
+
import { default as default2 } from "./DefaultPage.vue";
|
|
3
|
+
import { default as default3 } from "./Template.vue";
|
|
4
|
+
import { default as default4 } from "./components/UserProfileFormFields.vue";
|
|
5
|
+
export {
|
|
6
|
+
default2 as DefaultPage,
|
|
7
|
+
default3 as Template,
|
|
8
|
+
default4 as UserProfileFormFields,
|
|
9
|
+
i18nBuilder
|
|
10
|
+
};
|