@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Keycloakify contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# @andreyyolkin/keycloakify-vue
|
|
2
|
+
|
|
3
|
+
Vue 3 components for building Keycloak login themes with [Keycloakify](https://github.com/keycloakify/keycloakify).
|
|
4
|
+
|
|
5
|
+
`@andreyyolkin/keycloakify-vue` is a community Vue 3 port of Keycloakify's UI layer, mirroring the architecture of
|
|
6
|
+
[`@keycloakify/svelte`](https://github.com/keycloakify/keycloakify-svelte). It reuses Keycloakify's
|
|
7
|
+
framework-agnostic build tooling and core logic via a peer dependency — only the Vue UI layer (layer 3)
|
|
8
|
+
is reimplemented here. You write your Keycloak theme in Vue; `keycloakify` handles the build + jar
|
|
9
|
+
packaging unchanged.
|
|
10
|
+
|
|
11
|
+
## Status
|
|
12
|
+
|
|
13
|
+
| Theme | Status |
|
|
14
|
+
| ----------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| **Login** | **Complete** — all 38 login pages ported, including `register.ftl` / `UserProfileFormFields` |
|
|
16
|
+
| **Account** | **Complete** — all 7 classic account pages ported (account, password, sessions, totp, applications, log, federatedIdentity) |
|
|
17
|
+
| Admin/Email | Out of scope |
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install --save-dev @andreyyolkin/keycloakify-vue
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Peer dependencies:** `keycloakify ^11.15.1` and `vue ^3.5.0` must be installed in your project.
|
|
26
|
+
|
|
27
|
+
The easiest way to get started is the official starter template:
|
|
28
|
+
|
|
29
|
+
- **[keycloakify-starter-vue](https://github.com/AndreyYolkin/keycloakify-starter-vue)** — a ready-to-use
|
|
30
|
+
Vite + Vue project wired to `@andreyyolkin/keycloakify-vue`, analogous to
|
|
31
|
+
[`keycloakify-starter-svelte`](https://github.com/keycloakify/keycloakify-starter-svelte).
|
|
32
|
+
|
|
33
|
+
## What's Included
|
|
34
|
+
|
|
35
|
+
- **`DefaultPage`** — top-level dispatcher component that routes all 38 login `pageId` values to the
|
|
36
|
+
correct page component.
|
|
37
|
+
- **`Template`** — the outer page shell (header, info/error alerts, social providers, language switcher).
|
|
38
|
+
- **Per-page components** — importable individually from `@andreyyolkin/keycloakify-vue/login/pages/*.vue`
|
|
39
|
+
(e.g. `Login.vue`, `Register.vue`, `LoginOtp.vue`, …).
|
|
40
|
+
- **`UserProfileFormFields`** — full dynamic user-profile form suite used by `Register`, `LoginUpdateProfile`,
|
|
41
|
+
and `IdpReviewUserProfile`.
|
|
42
|
+
- **`i18nBuilder`** — factory for wiring Keycloakify's `noJsx` i18n engine into Vue (returns `msg()` /
|
|
43
|
+
`advancedMsg()` that produce sanitized `VNode`s).
|
|
44
|
+
- **Account theme** — importable from `@andreyyolkin/keycloakify-vue/account`: its own `DefaultPage` + `Template`,
|
|
45
|
+
the 7 account pages at `@andreyyolkin/keycloakify-vue/account/pages/*.vue`, and an account `i18nBuilder`.
|
|
46
|
+
- **`bin` handlers** — `_keycloakify-custom-handler` delegates `update-kc-gen`, `eject-page`,
|
|
47
|
+
`add-story`, and `initialize-account-theme` so the `keycloakify` CLI treats your project as a Vue theme.
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
|
|
51
|
+
Clone or scaffold from the [starter](https://github.com/AndreyYolkin/keycloakify-starter-vue) for the
|
|
52
|
+
full wiring. At its core a consumer project has a `KcPage.vue` that looks like:
|
|
53
|
+
|
|
54
|
+
```vue
|
|
55
|
+
<script setup lang="ts">
|
|
56
|
+
import { DefaultPage } from '@andreyyolkin/keycloakify-vue';
|
|
57
|
+
import type { KcContext } from './KcContext';
|
|
58
|
+
import { useI18n } from './i18n';
|
|
59
|
+
import Template from '@andreyyolkin/keycloakify-vue/login/Template.vue';
|
|
60
|
+
|
|
61
|
+
const props = defineProps<{ kcContext: KcContext }>();
|
|
62
|
+
const { i18n } = useI18n({ kcContext: props.kcContext });
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<template>
|
|
66
|
+
<DefaultPage
|
|
67
|
+
:kcContext
|
|
68
|
+
:i18n
|
|
69
|
+
:Template
|
|
70
|
+
/>
|
|
71
|
+
</template>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## How It Works / Relationship to Keycloakify
|
|
75
|
+
|
|
76
|
+
Keycloakify is built in three layers:
|
|
77
|
+
|
|
78
|
+
1. **Build tooling / CLI** (`keycloakify/bin`, `keycloakify/vite-plugin`) — framework-agnostic. Reads a
|
|
79
|
+
built SPA, rewrites asset paths to FreeMarker variables, generates `.ftl` templates, packages the
|
|
80
|
+
theme `.jar`.
|
|
81
|
+
2. **Core logic** (`KcContext` types, `i18n/noJsx`, `getUserProfileApi`, `kcClsx`, `kcSanitize`) —
|
|
82
|
+
deliberately framework-agnostic.
|
|
83
|
+
3. **UI components** — the only framework-coupled layer.
|
|
84
|
+
|
|
85
|
+
`@andreyyolkin/keycloakify-vue` reuses layers 1 and 2 unchanged (via the `keycloakify` peer dependency) and
|
|
86
|
+
reimplements layer 3 in Vue 3.
|
|
87
|
+
|
|
88
|
+
**Distribution:** the package ships raw `.vue` single-file components plus `.d.ts` types. Your project's
|
|
89
|
+
Vite + `@vitejs/plugin-vue` compiles them — no pre-bundled JS is shipped.
|
|
90
|
+
|
|
91
|
+
## Contributing
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
git clone https://github.com/AndreyYolkin/keycloakify-vue
|
|
95
|
+
git clone https://github.com/AndreyYolkin/keycloakify-starter-vue
|
|
96
|
+
|
|
97
|
+
cd keycloakify-vue
|
|
98
|
+
yarn install
|
|
99
|
+
yarn link-in-starter # links the built package into the starter
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Changes to the library are reflected in the starter after `yarn build` (or `yarn watch`).
|
|
103
|
+
|
|
104
|
+
Issues and pull requests are welcome at
|
|
105
|
+
[github.com/AndreyYolkin/keycloakify-vue](https://github.com/AndreyYolkin/keycloakify-vue).
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
MIT
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { KcContext } from 'keycloakify/account/KcContext';
|
|
3
|
+
import type { ClassKey } from 'keycloakify/account/lib/kcClsx';
|
|
4
|
+
import { computed, defineAsyncComponent, type Component } from 'vue';
|
|
5
|
+
import type { I18n } from './i18n/i18n';
|
|
6
|
+
import NotImplemented from './pages/NotImplemented.vue';
|
|
7
|
+
|
|
8
|
+
const Account = defineAsyncComponent(() => import('./pages/Account.vue'));
|
|
9
|
+
const Applications = defineAsyncComponent(() => import('./pages/Applications.vue'));
|
|
10
|
+
const FederatedIdentity = defineAsyncComponent(() => import('./pages/FederatedIdentity.vue'));
|
|
11
|
+
const Log = defineAsyncComponent(() => import('./pages/Log.vue'));
|
|
12
|
+
const Password = defineAsyncComponent(() => import('./pages/Password.vue'));
|
|
13
|
+
const Sessions = defineAsyncComponent(() => import('./pages/Sessions.vue'));
|
|
14
|
+
const Totp = defineAsyncComponent(() => import('./pages/Totp.vue'));
|
|
15
|
+
|
|
16
|
+
const props = defineProps<{
|
|
17
|
+
kcContext: KcContext;
|
|
18
|
+
i18n: I18n;
|
|
19
|
+
classes?: Partial<Record<ClassKey, string>>;
|
|
20
|
+
Template: Component;
|
|
21
|
+
doUseDefaultCss: boolean;
|
|
22
|
+
}>();
|
|
23
|
+
|
|
24
|
+
const pageComponent = computed<Component>(() => {
|
|
25
|
+
switch (props.kcContext.pageId) {
|
|
26
|
+
case 'account.ftl':
|
|
27
|
+
return Account;
|
|
28
|
+
case 'applications.ftl':
|
|
29
|
+
return Applications;
|
|
30
|
+
case 'federatedIdentity.ftl':
|
|
31
|
+
return FederatedIdentity;
|
|
32
|
+
case 'log.ftl':
|
|
33
|
+
return Log;
|
|
34
|
+
case 'password.ftl':
|
|
35
|
+
return Password;
|
|
36
|
+
case 'sessions.ftl':
|
|
37
|
+
return Sessions;
|
|
38
|
+
case 'totp.ftl':
|
|
39
|
+
return Totp;
|
|
40
|
+
default:
|
|
41
|
+
return NotImplemented;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<component
|
|
48
|
+
:is="pageComponent"
|
|
49
|
+
:kcContext="kcContext"
|
|
50
|
+
:i18n="i18n"
|
|
51
|
+
:classes="classes"
|
|
52
|
+
:Template="Template"
|
|
53
|
+
:doUseDefaultCss="doUseDefaultCss"
|
|
54
|
+
/>
|
|
55
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { KcContext } from 'keycloakify/account/KcContext';
|
|
2
|
+
import type { ClassKey } from 'keycloakify/account/lib/kcClsx';
|
|
3
|
+
import { type Component } from 'vue';
|
|
4
|
+
import type { I18n } from './i18n/i18n';
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
kcContext: KcContext;
|
|
7
|
+
i18n: I18n;
|
|
8
|
+
classes?: Partial<Record<ClassKey, string>>;
|
|
9
|
+
Template: Component;
|
|
10
|
+
doUseDefaultCss: boolean;
|
|
11
|
+
};
|
|
12
|
+
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>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ExtendKcContext } from 'keycloakify/account/KcContext';
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
export type KcContextLike = {
|
|
3
|
+
url: {
|
|
4
|
+
resourcesCommonPath: string;
|
|
5
|
+
resourcesPath: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare function useInitialize(params: {
|
|
9
|
+
kcContext: KcContextLike;
|
|
10
|
+
doUseDefaultCss: boolean;
|
|
11
|
+
}): {
|
|
12
|
+
isReadyToRender: Ref<boolean>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { assert } from "keycloakify/tools/assert";
|
|
2
|
+
import { useInsertLinkTags } from "../tools/useInsertLinkTags";
|
|
3
|
+
assert();
|
|
4
|
+
assert();
|
|
5
|
+
function useInitialize(params) {
|
|
6
|
+
const { kcContext, doUseDefaultCss } = params;
|
|
7
|
+
const { url } = kcContext;
|
|
8
|
+
const { areAllStyleSheetsLoaded } = useInsertLinkTags({
|
|
9
|
+
componentOrHookName: "Template",
|
|
10
|
+
hrefs: !doUseDefaultCss ? [] : [
|
|
11
|
+
`${url.resourcesCommonPath}/node_modules/patternfly/dist/css/patternfly.min.css`,
|
|
12
|
+
`${url.resourcesCommonPath}/node_modules/patternfly/dist/css/patternfly-additions.min.css`,
|
|
13
|
+
`${url.resourcesPath}/css/account.css`
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
return { isReadyToRender: areAllStyleSheetsLoaded };
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
useInitialize
|
|
20
|
+
};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onMounted } from 'vue';
|
|
3
|
+
import { kcSanitize } from 'keycloakify/lib/kcSanitize';
|
|
4
|
+
import { getKcClsx } from 'keycloakify/account/lib/kcClsx';
|
|
5
|
+
import { clsx } from 'keycloakify/tools/clsx';
|
|
6
|
+
import type { KcContext } from 'keycloakify/account/KcContext';
|
|
7
|
+
import type { I18n } from './i18n/i18n';
|
|
8
|
+
import type { TemplateProps } from './TemplateProps';
|
|
9
|
+
import { useInitialize } from './Template.useInitialize';
|
|
10
|
+
import { useSetClassName } from '../tools/useSetClassName';
|
|
11
|
+
|
|
12
|
+
const props = defineProps<TemplateProps<KcContext, I18n>>();
|
|
13
|
+
|
|
14
|
+
const { kcClsx } = getKcClsx({
|
|
15
|
+
doUseDefaultCss: props.doUseDefaultCss,
|
|
16
|
+
classes: props.classes,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const { url, features, realm, message, referrer } = props.kcContext;
|
|
20
|
+
|
|
21
|
+
onMounted(() => {
|
|
22
|
+
document.title = props.i18n.msgStr('accountManagementTitle');
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
useSetClassName({
|
|
26
|
+
qualifiedName: 'html',
|
|
27
|
+
className: kcClsx('kcHtmlClass'),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
useSetClassName({
|
|
31
|
+
qualifiedName: 'body',
|
|
32
|
+
className: clsx('admin-console', 'user', kcClsx('kcBodyClass')),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const { isReadyToRender } = useInitialize({
|
|
36
|
+
kcContext: props.kcContext,
|
|
37
|
+
doUseDefaultCss: props.doUseDefaultCss,
|
|
38
|
+
});
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<template v-if="isReadyToRender">
|
|
43
|
+
<header class="navbar navbar-default navbar-pf navbar-main header">
|
|
44
|
+
<nav
|
|
45
|
+
class="navbar"
|
|
46
|
+
role="navigation"
|
|
47
|
+
>
|
|
48
|
+
<div class="navbar-header">
|
|
49
|
+
<div class="container">
|
|
50
|
+
<h1 class="navbar-title">Keycloak</h1>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="navbar-collapse navbar-collapse-1">
|
|
54
|
+
<div class="container">
|
|
55
|
+
<ul class="nav navbar-nav navbar-utility">
|
|
56
|
+
<li v-if="i18n.enabledLanguages.length > 1">
|
|
57
|
+
<div
|
|
58
|
+
class="kc-dropdown"
|
|
59
|
+
id="kc-locale-dropdown"
|
|
60
|
+
>
|
|
61
|
+
<a
|
|
62
|
+
href="#"
|
|
63
|
+
id="kc-current-locale-link"
|
|
64
|
+
>
|
|
65
|
+
{{ i18n.currentLanguage.label }}
|
|
66
|
+
</a>
|
|
67
|
+
<ul>
|
|
68
|
+
<li
|
|
69
|
+
v-for="enabledLanguage in i18n.enabledLanguages"
|
|
70
|
+
:key="enabledLanguage.languageTag"
|
|
71
|
+
class="kc-dropdown-item"
|
|
72
|
+
>
|
|
73
|
+
<a :href="enabledLanguage.href">{{ enabledLanguage.label }}</a>
|
|
74
|
+
</li>
|
|
75
|
+
</ul>
|
|
76
|
+
</div>
|
|
77
|
+
</li>
|
|
78
|
+
<li v-if="referrer?.url">
|
|
79
|
+
<a
|
|
80
|
+
:href="referrer.url"
|
|
81
|
+
id="referrer"
|
|
82
|
+
>
|
|
83
|
+
<component :is="i18n.msg('backTo', referrer.name)" />
|
|
84
|
+
</a>
|
|
85
|
+
</li>
|
|
86
|
+
<li>
|
|
87
|
+
<a :href="url.getLogoutUrl()">
|
|
88
|
+
<component :is="i18n.msg('doSignOut')" />
|
|
89
|
+
</a>
|
|
90
|
+
</li>
|
|
91
|
+
</ul>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</nav>
|
|
95
|
+
</header>
|
|
96
|
+
|
|
97
|
+
<div class="container">
|
|
98
|
+
<div class="bs-sidebar col-sm-3">
|
|
99
|
+
<ul>
|
|
100
|
+
<li :class="clsx(active === 'account' && 'active')">
|
|
101
|
+
<a :href="url.accountUrl">
|
|
102
|
+
<component :is="i18n.msg('account')" />
|
|
103
|
+
</a>
|
|
104
|
+
</li>
|
|
105
|
+
<li
|
|
106
|
+
v-if="features.passwordUpdateSupported"
|
|
107
|
+
:class="clsx(active === 'password' && 'active')"
|
|
108
|
+
>
|
|
109
|
+
<a :href="url.passwordUrl">
|
|
110
|
+
<component :is="i18n.msg('password')" />
|
|
111
|
+
</a>
|
|
112
|
+
</li>
|
|
113
|
+
<li :class="clsx(active === 'totp' && 'active')">
|
|
114
|
+
<a :href="url.totpUrl">
|
|
115
|
+
<component :is="i18n.msg('authenticator')" />
|
|
116
|
+
</a>
|
|
117
|
+
</li>
|
|
118
|
+
<li
|
|
119
|
+
v-if="features.identityFederation"
|
|
120
|
+
:class="clsx(active === 'social' && 'active')"
|
|
121
|
+
>
|
|
122
|
+
<a :href="url.socialUrl">
|
|
123
|
+
<component :is="i18n.msg('federatedIdentity')" />
|
|
124
|
+
</a>
|
|
125
|
+
</li>
|
|
126
|
+
<li :class="clsx(active === 'sessions' && 'active')">
|
|
127
|
+
<a :href="url.sessionsUrl">
|
|
128
|
+
<component :is="i18n.msg('sessions')" />
|
|
129
|
+
</a>
|
|
130
|
+
</li>
|
|
131
|
+
<li :class="clsx(active === 'applications' && 'active')">
|
|
132
|
+
<a :href="url.applicationsUrl">
|
|
133
|
+
<component :is="i18n.msg('applications')" />
|
|
134
|
+
</a>
|
|
135
|
+
</li>
|
|
136
|
+
<li
|
|
137
|
+
v-if="features.log"
|
|
138
|
+
:class="clsx(active === 'log' && 'active')"
|
|
139
|
+
>
|
|
140
|
+
<a :href="url.logUrl">
|
|
141
|
+
<component :is="i18n.msg('log')" />
|
|
142
|
+
</a>
|
|
143
|
+
</li>
|
|
144
|
+
<li
|
|
145
|
+
v-if="realm.userManagedAccessAllowed && features.authorization"
|
|
146
|
+
:class="clsx(active === 'authorization' && 'active')"
|
|
147
|
+
>
|
|
148
|
+
<a :href="url.resourceUrl">
|
|
149
|
+
<component :is="i18n.msg('myResources')" />
|
|
150
|
+
</a>
|
|
151
|
+
</li>
|
|
152
|
+
</ul>
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
<div class="col-sm-9 content-area">
|
|
156
|
+
<div
|
|
157
|
+
v-if="message !== undefined"
|
|
158
|
+
:class="clsx('alert', `alert-${message.type}`)"
|
|
159
|
+
>
|
|
160
|
+
<span
|
|
161
|
+
v-if="message.type === 'success'"
|
|
162
|
+
class="pficon pficon-ok"
|
|
163
|
+
></span>
|
|
164
|
+
<span
|
|
165
|
+
v-else-if="message.type === 'error'"
|
|
166
|
+
class="pficon pficon-error-circle-o"
|
|
167
|
+
></span>
|
|
168
|
+
<span
|
|
169
|
+
class="kc-feedback-text"
|
|
170
|
+
v-html="kcSanitize(message.summary)"
|
|
171
|
+
></span>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
<slot />
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</template>
|
|
178
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { KcContext } from 'keycloakify/account/KcContext';
|
|
2
|
+
import type { I18n } from './i18n/i18n';
|
|
3
|
+
import type { TemplateProps } from './TemplateProps';
|
|
4
|
+
type __VLS_Props = TemplateProps<KcContext, I18n>;
|
|
5
|
+
declare var __VLS_51: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_51) => any;
|
|
8
|
+
};
|
|
9
|
+
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>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ClassKey } from 'keycloakify/account/lib/kcClsx';
|
|
2
|
+
export type TemplateProps<KcContext, I18n> = {
|
|
3
|
+
kcContext: KcContext;
|
|
4
|
+
i18n: I18n;
|
|
5
|
+
doUseDefaultCss: boolean;
|
|
6
|
+
active: string;
|
|
7
|
+
classes?: Partial<Record<ClassKey, string>>;
|
|
8
|
+
};
|
|
9
|
+
export type { ClassKey };
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GenericI18n_noJsx } from 'keycloakify/account/i18n/noJsx/GenericI18n_noJsx';
|
|
2
|
+
import { type MessageKey as MessageKey_defaultSet } from 'keycloakify/account/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/account/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/account/i18n/messages_defaultSet/types';
|
|
2
|
+
import { type KcContextLike } from 'keycloakify/account/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/account/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
|
+
};
|