@keycloakify/login-ui 250004.0.33
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/KcContext/getKcContextMock.d.ts +1 -0
- package/KcContext/getKcContextMock.js +1 -0
- package/KcContext/index.d.ts +2 -0
- package/KcContext/index.js +2 -0
- package/KcContext/useKcContext.d.ts +10 -0
- package/KcContext/useKcContext.js +17 -0
- package/README.md +12 -0
- package/core/KcContext/KcContext.d.ts +605 -0
- package/core/KcContext/KcContext.js +43 -0
- package/core/KcContext/getKcContextMock.d.ts +23 -0
- package/core/KcContext/getKcContextMock.js +27 -0
- package/core/KcContext/kcContextMocks.d.ts +4 -0
- package/core/KcContext/kcContextMocks.js +345 -0
- package/core/getKcClsx.d.ts +11 -0
- package/core/getKcClsx.js +54 -0
- package/core/i18n/GenericI18n.d.ts +63 -0
- package/core/i18n/GenericI18n.js +1 -0
- package/core/i18n/getI18n.d.ts +45 -0
- package/core/i18n/getI18n.js +246 -0
- package/core/i18n/i18nBuilder.d.ts +18 -0
- package/core/i18n/i18nBuilder.js +26 -0
- package/core/i18n/messages_defaultSet/ar.d.ts +447 -0
- package/core/i18n/messages_defaultSet/ar.js +451 -0
- package/core/i18n/messages_defaultSet/ca.d.ts +443 -0
- package/core/i18n/messages_defaultSet/ca.js +447 -0
- package/core/i18n/messages_defaultSet/cs.d.ts +445 -0
- package/core/i18n/messages_defaultSet/cs.js +449 -0
- package/core/i18n/messages_defaultSet/da.d.ts +317 -0
- package/core/i18n/messages_defaultSet/da.js +321 -0
- package/core/i18n/messages_defaultSet/de.d.ts +459 -0
- package/core/i18n/messages_defaultSet/de.js +463 -0
- package/core/i18n/messages_defaultSet/el.d.ts +438 -0
- package/core/i18n/messages_defaultSet/el.js +442 -0
- package/core/i18n/messages_defaultSet/en.d.ts +470 -0
- package/core/i18n/messages_defaultSet/en.js +474 -0
- package/core/i18n/messages_defaultSet/es.d.ts +452 -0
- package/core/i18n/messages_defaultSet/es.js +456 -0
- package/core/i18n/messages_defaultSet/fa.d.ts +438 -0
- package/core/i18n/messages_defaultSet/fa.js +442 -0
- package/core/i18n/messages_defaultSet/fi.d.ts +377 -0
- package/core/i18n/messages_defaultSet/fi.js +381 -0
- package/core/i18n/messages_defaultSet/fr.d.ts +393 -0
- package/core/i18n/messages_defaultSet/fr.js +397 -0
- package/core/i18n/messages_defaultSet/hu.d.ts +443 -0
- package/core/i18n/messages_defaultSet/hu.js +447 -0
- package/core/i18n/messages_defaultSet/index.d.ts +3086 -0
- package/core/i18n/messages_defaultSet/index.js +72 -0
- package/core/i18n/messages_defaultSet/it.d.ts +318 -0
- package/core/i18n/messages_defaultSet/it.js +322 -0
- package/core/i18n/messages_defaultSet/ja.d.ts +323 -0
- package/core/i18n/messages_defaultSet/ja.js +327 -0
- package/core/i18n/messages_defaultSet/ka.d.ts +468 -0
- package/core/i18n/messages_defaultSet/ka.js +472 -0
- package/core/i18n/messages_defaultSet/lt.d.ts +203 -0
- package/core/i18n/messages_defaultSet/lt.js +207 -0
- package/core/i18n/messages_defaultSet/lv.d.ts +214 -0
- package/core/i18n/messages_defaultSet/lv.js +218 -0
- package/core/i18n/messages_defaultSet/nl.d.ts +285 -0
- package/core/i18n/messages_defaultSet/nl.js +289 -0
- package/core/i18n/messages_defaultSet/no.d.ts +202 -0
- package/core/i18n/messages_defaultSet/no.js +206 -0
- package/core/i18n/messages_defaultSet/pl.d.ts +292 -0
- package/core/i18n/messages_defaultSet/pl.js +296 -0
- package/core/i18n/messages_defaultSet/pt-BR.d.ts +347 -0
- package/core/i18n/messages_defaultSet/pt-BR.js +351 -0
- package/core/i18n/messages_defaultSet/pt.d.ts +448 -0
- package/core/i18n/messages_defaultSet/pt.js +452 -0
- package/core/i18n/messages_defaultSet/ru.d.ts +220 -0
- package/core/i18n/messages_defaultSet/ru.js +224 -0
- package/core/i18n/messages_defaultSet/sk.d.ts +448 -0
- package/core/i18n/messages_defaultSet/sk.js +452 -0
- package/core/i18n/messages_defaultSet/sv.d.ts +201 -0
- package/core/i18n/messages_defaultSet/sv.js +205 -0
- package/core/i18n/messages_defaultSet/th.d.ts +443 -0
- package/core/i18n/messages_defaultSet/th.js +447 -0
- package/core/i18n/messages_defaultSet/tr.d.ts +270 -0
- package/core/i18n/messages_defaultSet/tr.js +274 -0
- package/core/i18n/messages_defaultSet/types.d.ts +3 -0
- package/core/i18n/messages_defaultSet/types.js +32 -0
- package/core/i18n/messages_defaultSet/uk.d.ts +442 -0
- package/core/i18n/messages_defaultSet/uk.js +446 -0
- package/core/i18n/messages_defaultSet/zh-CN.d.ts +447 -0
- package/core/i18n/messages_defaultSet/zh-CN.js +451 -0
- package/core/i18n/messages_defaultSet/zh-TW.d.ts +453 -0
- package/core/i18n/messages_defaultSet/zh-TW.js +457 -0
- package/core/kcClsx.d.ts +8 -0
- package/core/kcClsx.js +128 -0
- package/core/kcSanitize/HtmlPolicyBuilder.d.ts +27 -0
- package/core/kcSanitize/HtmlPolicyBuilder.js +207 -0
- package/core/kcSanitize/KcSanitizer.d.ts +11 -0
- package/core/kcSanitize/KcSanitizer.js +45 -0
- package/core/kcSanitize/KcSanitizerPolicy.d.ts +23 -0
- package/core/kcSanitize/KcSanitizerPolicy.js +148 -0
- package/core/kcSanitize/index.d.ts +1 -0
- package/core/kcSanitize/index.js +4 -0
- package/core/userProfileApi/index.d.ts +1 -0
- package/core/userProfileApi/index.js +1 -0
- package/core/userProfileApi/kcNumberUnFormat.d.ts +2 -0
- package/core/userProfileApi/kcNumberUnFormat.js +83 -0
- package/core/userProfileApi/userProfileApi.d.ts +83 -0
- package/core/userProfileApi/userProfileApi.js +1119 -0
- package/i18n/GenericI18n.d.ts +72 -0
- package/i18n/GenericI18n.js +4 -0
- package/i18n/i18nBuilder.d.ts +18 -0
- package/i18n/i18nBuilder.js +26 -0
- package/i18n/index.d.ts +3 -0
- package/i18n/index.js +1 -0
- package/i18n/useI18n.d.ts +28 -0
- package/i18n/useI18n.js +86 -0
- package/import.meta.env.BASE_URL.d.ts +5 -0
- package/import.meta.env.BASE_URL.js +41 -0
- package/kcSanitize.d.ts +1 -0
- package/kcSanitize.js +1 -0
- package/keycloak-theme/login/KcContext.ts +15 -0
- package/keycloak-theme/login/KcPage.tsx +47 -0
- package/keycloak-theme/login/components/LogoutOtherSessions.tsx +27 -0
- package/keycloak-theme/login/components/PasswordWrapper.tsx +38 -0
- package/keycloak-theme/login/components/Template/Template.tsx +235 -0
- package/keycloak-theme/login/components/Template/index.ts +1 -0
- package/keycloak-theme/login/components/Template/useInitializeTemplate.ts +60 -0
- package/keycloak-theme/login/components/UserProfileFormFields/AddRemoveButtonsMultiValuedAttribute.tsx +65 -0
- package/keycloak-theme/login/components/UserProfileFormFields/DO_MAKE_USER_CONFIRM_PASSWORD.ts +2 -0
- package/keycloak-theme/login/components/UserProfileFormFields/FieldErrors.tsx +37 -0
- package/keycloak-theme/login/components/UserProfileFormFields/GroupLabel.tsx +78 -0
- package/keycloak-theme/login/components/UserProfileFormFields/InputFieldByType.tsx +52 -0
- package/keycloak-theme/login/components/UserProfileFormFields/InputLabel.tsx +19 -0
- package/keycloak-theme/login/components/UserProfileFormFields/InputTag.tsx +130 -0
- package/keycloak-theme/login/components/UserProfileFormFields/InputTagSelects.tsx +118 -0
- package/keycloak-theme/login/components/UserProfileFormFields/SelectTag.tsx +86 -0
- package/keycloak-theme/login/components/UserProfileFormFields/TextareaTag.tsx +53 -0
- package/keycloak-theme/login/components/UserProfileFormFields/UserProfileFormFields.tsx +132 -0
- package/keycloak-theme/login/components/UserProfileFormFields/index.ts +1 -0
- package/keycloak-theme/login/i18n.ts +7 -0
- package/keycloak-theme/login/mocks/getKcContextMock.ts +18 -0
- package/keycloak-theme/login/pages/PageIndex.tsx +133 -0
- package/keycloak-theme/login/pages/code/Page.tsx +47 -0
- package/keycloak-theme/login/pages/code/index.ts +3 -0
- package/keycloak-theme/login/pages/delete-account-confirm/Page.tsx +59 -0
- package/keycloak-theme/login/pages/delete-account-confirm/index.ts +3 -0
- package/keycloak-theme/login/pages/delete-credential/Page.tsx +40 -0
- package/keycloak-theme/login/pages/delete-credential/index.ts +3 -0
- package/keycloak-theme/login/pages/error/Page.tsx +32 -0
- package/keycloak-theme/login/pages/error/index.ts +3 -0
- package/keycloak-theme/login/pages/frontchannel-logout/Page.tsx +40 -0
- package/keycloak-theme/login/pages/frontchannel-logout/index.ts +3 -0
- package/keycloak-theme/login/pages/idp-review-user-profile/Page.tsx +53 -0
- package/keycloak-theme/login/pages/idp-review-user-profile/index.ts +3 -0
- package/keycloak-theme/login/pages/info/Page.tsx +80 -0
- package/keycloak-theme/login/pages/info/index.ts +3 -0
- package/keycloak-theme/login/pages/login/Form.tsx +164 -0
- package/keycloak-theme/login/pages/login/Info.tsx +25 -0
- package/keycloak-theme/login/pages/login/Page.tsx +32 -0
- package/keycloak-theme/login/pages/login/SocialProviders.tsx +64 -0
- package/keycloak-theme/login/pages/login/index.ts +3 -0
- package/keycloak-theme/login/pages/login-config-totp/Page.tsx +219 -0
- package/keycloak-theme/login/pages/login-config-totp/index.ts +3 -0
- package/keycloak-theme/login/pages/login-idp-link-confirm/Page.tsx +51 -0
- package/keycloak-theme/login/pages/login-idp-link-confirm/index.ts +3 -0
- package/keycloak-theme/login/pages/login-idp-link-confirm-override/Page.tsx +41 -0
- package/keycloak-theme/login/pages/login-idp-link-confirm-override/index.ts +3 -0
- package/keycloak-theme/login/pages/login-idp-link-email/Page.tsx +32 -0
- package/keycloak-theme/login/pages/login-idp-link-email/index.ts +3 -0
- package/keycloak-theme/login/pages/login-oauth-grant/Page.tsx +120 -0
- package/keycloak-theme/login/pages/login-oauth-grant/index.ts +3 -0
- package/keycloak-theme/login/pages/login-oauth2-device-verify-user-code/Page.tsx +64 -0
- package/keycloak-theme/login/pages/login-oauth2-device-verify-user-code/index.ts +3 -0
- package/keycloak-theme/login/pages/login-otp/Page.tsx +125 -0
- package/keycloak-theme/login/pages/login-otp/index.ts +3 -0
- package/keycloak-theme/login/pages/login-page-expired/Page.tsx +28 -0
- package/keycloak-theme/login/pages/login-page-expired/index.ts +3 -0
- package/keycloak-theme/login/pages/login-passkeys-conditional-authenticate/Page.tsx +233 -0
- package/keycloak-theme/login/pages/login-passkeys-conditional-authenticate/index.ts +3 -0
- package/keycloak-theme/login/pages/login-passkeys-conditional-authenticate/useScript.tsx +64 -0
- package/keycloak-theme/login/pages/login-password/Page.tsx +103 -0
- package/keycloak-theme/login/pages/login-password/index.ts +3 -0
- package/keycloak-theme/login/pages/login-recovery-authn-code-config/Page.tsx +167 -0
- package/keycloak-theme/login/pages/login-recovery-authn-code-config/index.ts +3 -0
- package/keycloak-theme/login/pages/login-recovery-authn-code-config/useScript.tsx +145 -0
- package/keycloak-theme/login/pages/login-recovery-authn-code-input/Page.tsx +84 -0
- package/keycloak-theme/login/pages/login-recovery-authn-code-input/index.ts +3 -0
- package/keycloak-theme/login/pages/login-reset-otp/Page.tsx +82 -0
- package/keycloak-theme/login/pages/login-reset-otp/index.ts +3 -0
- package/keycloak-theme/login/pages/login-reset-password/Form.tsx +78 -0
- package/keycloak-theme/login/pages/login-reset-password/Page.tsx +27 -0
- package/keycloak-theme/login/pages/login-reset-password/index.ts +3 -0
- package/keycloak-theme/login/pages/login-update-password/Page.tsx +132 -0
- package/keycloak-theme/login/pages/login-update-password/index.ts +3 -0
- package/keycloak-theme/login/pages/login-update-profile/Page.tsx +70 -0
- package/keycloak-theme/login/pages/login-update-profile/index.ts +3 -0
- package/keycloak-theme/login/pages/login-username/Page.tsx +176 -0
- package/keycloak-theme/login/pages/login-username/index.ts +3 -0
- package/keycloak-theme/login/pages/login-verify-email/Page.tsx +31 -0
- package/keycloak-theme/login/pages/login-verify-email/index.ts +3 -0
- package/keycloak-theme/login/pages/login-x509-info/Page.tsx +97 -0
- package/keycloak-theme/login/pages/login-x509-info/index.ts +3 -0
- package/keycloak-theme/login/pages/logout-confirm/Page.tsx +54 -0
- package/keycloak-theme/login/pages/logout-confirm/index.ts +3 -0
- package/keycloak-theme/login/pages/register/Form.tsx +102 -0
- package/keycloak-theme/login/pages/register/Page.tsx +26 -0
- package/keycloak-theme/login/pages/register/TermsAcceptance.tsx +54 -0
- package/keycloak-theme/login/pages/register/index.ts +3 -0
- package/keycloak-theme/login/pages/saml-post-form/Page.tsx +50 -0
- package/keycloak-theme/login/pages/saml-post-form/index.ts +3 -0
- package/keycloak-theme/login/pages/select-authenticator/Page.tsx +59 -0
- package/keycloak-theme/login/pages/select-authenticator/index.ts +3 -0
- package/keycloak-theme/login/pages/terms/Page.tsx +45 -0
- package/keycloak-theme/login/pages/terms/index.ts +3 -0
- package/keycloak-theme/login/pages/update-email/Page.tsx +74 -0
- package/keycloak-theme/login/pages/update-email/index.ts +3 -0
- package/keycloak-theme/login/pages/webauthn-authenticate/Page.tsx +190 -0
- package/keycloak-theme/login/pages/webauthn-authenticate/index.ts +3 -0
- package/keycloak-theme/login/pages/webauthn-authenticate/useScript.tsx +56 -0
- package/keycloak-theme/login/pages/webauthn-error/Page.tsx +74 -0
- package/keycloak-theme/login/pages/webauthn-error/index.ts +3 -0
- package/keycloak-theme/login/pages/webauthn-register/Page.tsx +83 -0
- package/keycloak-theme/login/pages/webauthn-register/index.ts +3 -0
- package/keycloak-theme/login/pages/webauthn-register/useScript.tsx +64 -0
- package/keycloak-theme/login/styleLevelCustomization.tsx +17 -0
- package/keycloak-theme/public/login/css/login.css +629 -0
- package/keycloak-theme/public/login/img/feedback-error-arrow-down.png +0 -0
- package/keycloak-theme/public/login/img/feedback-error-sign.png +0 -0
- package/keycloak-theme/public/login/img/feedback-success-arrow-down.png +0 -0
- package/keycloak-theme/public/login/img/feedback-success-sign.png +0 -0
- package/keycloak-theme/public/login/img/feedback-warning-arrow-down.png +0 -0
- package/keycloak-theme/public/login/img/feedback-warning-sign.png +0 -0
- package/keycloak-theme/public/login/img/keycloak-bg.png +0 -0
- package/keycloak-theme/public/login/img/keycloak-logo-text.png +0 -0
- package/keycloak-theme/public/login/img/keycloak-logo.png +0 -0
- package/keycloak-theme/public/login/js/authChecker.js +49 -0
- package/keycloak-theme/public/login/js/common.js +48 -0
- package/keycloak-theme/public/login/js/kcMultivalued.js +106 -0
- package/keycloak-theme/public/login/js/kcNumberFormat.js +21 -0
- package/keycloak-theme/public/login/js/kcNumberUnFormat.js +19 -0
- package/keycloak-theme/public/login/js/menu-button-links.js +315 -0
- package/keycloak-theme/public/login/js/passkeysConditionalAuth.js +79 -0
- package/keycloak-theme/public/login/js/passwordVisibility.js +15 -0
- package/keycloak-theme/public/login/js/userProfile.js +71 -0
- package/keycloak-theme/public/login/js/webauthnAuthenticate.js +82 -0
- package/keycloak-theme/public/login/js/webauthnRegister.js +140 -0
- package/keycloak-theme/public/login/resources-common/img/favicon.ico +0 -0
- package/keycloak-theme/public/login/resources-common/lib/pficon/pficon.css +22 -0
- package/keycloak-theme/public/login/resources-common/lib/pficon/pficon.woff2 +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/@patternfly/patternfly/assets/fonts/RedHatDisplay/RedHatDisplay-Bold.woff +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/@patternfly/patternfly/assets/fonts/RedHatDisplay/RedHatDisplay-Bold.woff2 +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/@patternfly/patternfly/assets/fonts/overpass-webfont/overpass-bold.woff +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/@patternfly/patternfly/assets/fonts/overpass-webfont/overpass-bold.woff2 +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/@patternfly/patternfly/patternfly.min.css +2 -0
- package/keycloak-theme/public/login/resources-common/node_modules/jquery/dist/jquery.min.js +2 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/css/patternfly-additions.min.css +5 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/css/patternfly.min.css +8 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Bold-webfont.ttf +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Bold-webfont.woff2 +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Light-webfont.woff2 +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Regular-webfont.woff2 +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-Semibold-webfont.woff2 +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/fonts/OpenSans-SemiboldItalic-webfont.woff2 +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/fonts/PatternFlyIcons-webfont.ttf +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/fonts/PatternFlyIcons-webfont.woff +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/fonts/fontawesome-webfont.woff2 +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/patternfly/dist/img/bg-login.jpg +0 -0
- package/keycloak-theme/public/login/resources-common/node_modules/rfc4648/lib/rfc4648.js +178 -0
- package/package.json +19 -0
- package/src/KcContext/getKcContextMock.ts +1 -0
- package/src/KcContext/index.ts +10 -0
- package/src/KcContext/useKcContext.tsx +23 -0
- package/src/core/KcContext/KcContext.ts +819 -0
- package/src/core/KcContext/getKcContextMock.ts +63 -0
- package/src/core/KcContext/kcContextMocks.ts +623 -0
- package/src/core/getKcClsx.ts +87 -0
- package/src/core/i18n/GenericI18n.ts +64 -0
- package/src/core/i18n/getI18n.tsx +427 -0
- package/src/core/i18n/i18nBuilder.ts +101 -0
- package/src/core/i18n/messages_defaultSet/ar.ts +485 -0
- package/src/core/i18n/messages_defaultSet/ca.ts +517 -0
- package/src/core/i18n/messages_defaultSet/cs.ts +494 -0
- package/src/core/i18n/messages_defaultSet/da.ts +356 -0
- package/src/core/i18n/messages_defaultSet/de.ts +543 -0
- package/src/core/i18n/messages_defaultSet/el.ts +512 -0
- package/src/core/i18n/messages_defaultSet/en.ts +528 -0
- package/src/core/i18n/messages_defaultSet/es.ts +525 -0
- package/src/core/i18n/messages_defaultSet/fa.ts +480 -0
- package/src/core/i18n/messages_defaultSet/fi.ts +426 -0
- package/src/core/i18n/messages_defaultSet/fr.ts +458 -0
- package/src/core/i18n/messages_defaultSet/hu.ts +512 -0
- package/src/core/i18n/messages_defaultSet/index.ts +73 -0
- package/src/core/i18n/messages_defaultSet/it.ts +366 -0
- package/src/core/i18n/messages_defaultSet/ja.ts +369 -0
- package/src/core/i18n/messages_defaultSet/ka.ts +537 -0
- package/src/core/i18n/messages_defaultSet/lt.ts +233 -0
- package/src/core/i18n/messages_defaultSet/lv.ts +229 -0
- package/src/core/i18n/messages_defaultSet/nl.ts +324 -0
- package/src/core/i18n/messages_defaultSet/no.ts +228 -0
- package/src/core/i18n/messages_defaultSet/pl.ts +328 -0
- package/src/core/i18n/messages_defaultSet/pt-BR.ts +398 -0
- package/src/core/i18n/messages_defaultSet/pt.ts +519 -0
- package/src/core/i18n/messages_defaultSet/ru.ts +259 -0
- package/src/core/i18n/messages_defaultSet/sk.ts +503 -0
- package/src/core/i18n/messages_defaultSet/sv.ts +229 -0
- package/src/core/i18n/messages_defaultSet/th.ts +491 -0
- package/src/core/i18n/messages_defaultSet/tr.ts +306 -0
- package/src/core/i18n/messages_defaultSet/types.ts +36 -0
- package/src/core/i18n/messages_defaultSet/uk.ts +517 -0
- package/src/core/i18n/messages_defaultSet/zh-CN.ts +462 -0
- package/src/core/i18n/messages_defaultSet/zh-TW.ts +471 -0
- package/src/core/kcClsx.ts +258 -0
- package/src/core/kcSanitize/HtmlPolicyBuilder.ts +242 -0
- package/src/core/kcSanitize/KcSanitizer.ts +60 -0
- package/src/core/kcSanitize/KcSanitizerPolicy.ts +274 -0
- package/src/core/kcSanitize/index.ts +5 -0
- package/src/core/userProfileApi/index.ts +1 -0
- package/src/core/userProfileApi/kcNumberUnFormat.ts +109 -0
- package/src/core/userProfileApi/userProfileApi.ts +1564 -0
- package/src/i18n/GenericI18n.tsx +82 -0
- package/src/i18n/i18nBuilder.ts +101 -0
- package/src/i18n/index.ts +3 -0
- package/src/i18n/useI18n.tsx +179 -0
- package/src/import.meta.env.BASE_URL.ts +52 -0
- package/src/kcSanitize.ts +1 -0
- package/src/tools/Array.prototype.every.ts +68 -0
- package/src/tools/DeepPartial.ts +3 -0
- package/src/tools/JSX.ts +5 -0
- package/src/tools/Object.fromEntries.ts +21 -0
- package/src/tools/ValueOf.ts +2 -0
- package/src/tools/clsx.ts +8 -0
- package/src/tools/clsx_withTransform.ts +55 -0
- package/src/tools/deepAssign.ts +74 -0
- package/src/tools/emailRegExp.ts +2 -0
- package/src/tools/extractLastParenthesisContent.ts +43 -0
- package/src/tools/structuredCloneButFunctions.ts +24 -0
- package/src/tools/useConst.ts +10 -0
- package/src/tools/useExclusiveAppInstanceEffect.ts +50 -0
- package/src/tools/useInsertLinkTags.ts +55 -0
- package/src/tools/useInsertScriptTags.ts +89 -0
- package/src/tools/useIsPasswordRevealed.ts +45 -0
- package/src/tools/useOnFirstMount.ts +26 -0
- package/src/tools/useSetClassname.ts +24 -0
- package/src/tools/vendor/dompurify.ts +3 -0
- package/src/tools/waitForElementMountedOnDom.ts +28 -0
- package/src/useKcClsx.tsx +33 -0
- package/src/useUserProfileForm.tsx +171 -0
- package/tools/Array.prototype.every.d.ts +0 -0
- package/tools/Array.prototype.every.js +59 -0
- package/tools/DeepPartial.d.ts +3 -0
- package/tools/DeepPartial.js +1 -0
- package/tools/JSX.d.ts +5 -0
- package/tools/JSX.js +1 -0
- package/tools/Object.fromEntries.d.ts +1 -0
- package/tools/Object.fromEntries.js +16 -0
- package/tools/ValueOf.d.ts +2 -0
- package/tools/ValueOf.js +1 -0
- package/tools/clsx.d.ts +3 -0
- package/tools/clsx.js +5 -0
- package/tools/clsx_withTransform.d.ts +5 -0
- package/tools/clsx_withTransform.js +42 -0
- package/tools/deepAssign.d.ts +5 -0
- package/tools/deepAssign.js +56 -0
- package/tools/emailRegExp.d.ts +1 -0
- package/tools/emailRegExp.js +1 -0
- package/tools/extractLastParenthesisContent.d.ts +6 -0
- package/tools/extractLastParenthesisContent.js +35 -0
- package/tools/structuredCloneButFunctions.d.ts +7 -0
- package/tools/structuredCloneButFunctions.js +18 -0
- package/tools/useConst.d.ts +5 -0
- package/tools/useConst.js +9 -0
- package/tools/useExclusiveAppInstanceEffect.d.ts +14 -0
- package/tools/useExclusiveAppInstanceEffect.js +29 -0
- package/tools/useInsertLinkTags.d.ts +12 -0
- package/tools/useInsertLinkTags.js +37 -0
- package/tools/useInsertScriptTags.d.ts +19 -0
- package/tools/useInsertScriptTags.js +60 -0
- package/tools/useIsPasswordRevealed.d.ts +10 -0
- package/tools/useIsPasswordRevealed.js +32 -0
- package/tools/useOnFirstMount.d.ts +5 -0
- package/tools/useOnFirstMount.js +19 -0
- package/tools/useSetClassname.d.ts +4 -0
- package/tools/useSetClassname.js +15 -0
- package/tools/vendor/dompurify.d.ts +2 -0
- package/tools/vendor/dompurify.js +2 -0
- package/tools/waitForElementMountedOnDom.d.ts +3 -0
- package/tools/waitForElementMountedOnDom.js +20 -0
- package/useKcClsx.d.ts +12 -0
- package/useKcClsx.js +20 -0
- package/useUserProfileForm.d.ts +65 -0
- package/useUserProfileForm.js +55 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { assert } from "tsafe/assert";
|
|
2
|
+
import { useKcClsx } from "@keycloakify/login-ui/useKcClsx";
|
|
3
|
+
import { useKcContext } from "../../KcContext";
|
|
4
|
+
import { useI18n } from "../../i18n";
|
|
5
|
+
import { Template } from "../../components/Template";
|
|
6
|
+
|
|
7
|
+
export function Page() {
|
|
8
|
+
const { kcContext } = useKcContext();
|
|
9
|
+
assert(kcContext.pageId === "logout-confirm.ftl");
|
|
10
|
+
|
|
11
|
+
const { kcClsx } = useKcClsx();
|
|
12
|
+
|
|
13
|
+
const { url, client, logoutConfirm } = kcContext;
|
|
14
|
+
|
|
15
|
+
const { msg, msgStr } = useI18n();
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Template headerNode={msg("logoutConfirmTitle")}>
|
|
19
|
+
<div id="kc-logout-confirm" className="content-area">
|
|
20
|
+
<p className="instruction">{msg("logoutConfirmHeader")}</p>
|
|
21
|
+
<form className="form-actions" action={url.logoutConfirmAction} method="POST">
|
|
22
|
+
<input type="hidden" name="session_code" value={logoutConfirm.code} />
|
|
23
|
+
<div className={kcClsx("kcFormGroupClass")}>
|
|
24
|
+
<div id="kc-form-options">
|
|
25
|
+
<div className={kcClsx("kcFormOptionsWrapperClass")}></div>
|
|
26
|
+
</div>
|
|
27
|
+
<div id="kc-form-buttons" className={kcClsx("kcFormGroupClass")}>
|
|
28
|
+
<input
|
|
29
|
+
tabIndex={4}
|
|
30
|
+
className={kcClsx(
|
|
31
|
+
"kcButtonClass",
|
|
32
|
+
"kcButtonPrimaryClass",
|
|
33
|
+
"kcButtonBlockClass",
|
|
34
|
+
"kcButtonLargeClass"
|
|
35
|
+
)}
|
|
36
|
+
name="confirmLogout"
|
|
37
|
+
id="kc-logout"
|
|
38
|
+
type="submit"
|
|
39
|
+
value={msgStr("doLogout")}
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</form>
|
|
44
|
+
<div id="kc-info-message">
|
|
45
|
+
{!logoutConfirm.skipLink && client.baseUrl && (
|
|
46
|
+
<p>
|
|
47
|
+
<a href={client.baseUrl}>{msg("backToApplication")}</a>
|
|
48
|
+
</p>
|
|
49
|
+
)}
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</Template>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { assert } from "tsafe/assert";
|
|
3
|
+
import { clsx } from "@keycloakify/login-ui/tools/clsx";
|
|
4
|
+
import { useKcContext } from "../../KcContext";
|
|
5
|
+
import { useI18n } from "../../i18n";
|
|
6
|
+
import { useKcClsx } from "@keycloakify/login-ui/useKcClsx";
|
|
7
|
+
import { UserProfileFormFields } from "../../components/UserProfileFormFields";
|
|
8
|
+
import { TermsAcceptance } from "./TermsAcceptance";
|
|
9
|
+
|
|
10
|
+
export function Form() {
|
|
11
|
+
const { kcContext } = useKcContext();
|
|
12
|
+
assert(kcContext.pageId === "register.ftl");
|
|
13
|
+
const { kcClsx } = useKcClsx();
|
|
14
|
+
const { msg, msgStr } = useI18n();
|
|
15
|
+
|
|
16
|
+
const [isFormSubmittable, setIsFormSubmittable] = useState(false);
|
|
17
|
+
const [areTermsAccepted, setAreTermsAccepted] = useState(false);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<form
|
|
21
|
+
id="kc-register-form"
|
|
22
|
+
className={kcClsx("kcFormClass")}
|
|
23
|
+
action={kcContext.url.registrationAction}
|
|
24
|
+
method="post"
|
|
25
|
+
>
|
|
26
|
+
<UserProfileFormFields onIsFormSubmittableValueChange={setIsFormSubmittable} />
|
|
27
|
+
{kcContext.termsAcceptanceRequired && (
|
|
28
|
+
<TermsAcceptance
|
|
29
|
+
areTermsAccepted={areTermsAccepted}
|
|
30
|
+
onAreTermsAcceptedValueChange={setAreTermsAccepted}
|
|
31
|
+
/>
|
|
32
|
+
)}
|
|
33
|
+
{kcContext.recaptchaRequired &&
|
|
34
|
+
(kcContext.recaptchaVisible || kcContext.recaptchaAction === undefined) && (
|
|
35
|
+
<div className="form-group">
|
|
36
|
+
<div className={kcClsx("kcInputWrapperClass")}>
|
|
37
|
+
<div
|
|
38
|
+
className="g-recaptcha"
|
|
39
|
+
data-size="compact"
|
|
40
|
+
data-sitekey={kcContext.recaptchaSiteKey}
|
|
41
|
+
data-action={kcContext.recaptchaAction}
|
|
42
|
+
></div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
)}
|
|
46
|
+
<div className={kcClsx("kcFormGroupClass")}>
|
|
47
|
+
<div id="kc-form-options" className={kcClsx("kcFormOptionsClass")}>
|
|
48
|
+
<div className={kcClsx("kcFormOptionsWrapperClass")}>
|
|
49
|
+
<span>
|
|
50
|
+
<a href={kcContext.url.loginUrl}>{msg("backToLogin")}</a>
|
|
51
|
+
</span>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
{kcContext.recaptchaRequired &&
|
|
56
|
+
!kcContext.recaptchaVisible &&
|
|
57
|
+
kcContext.recaptchaAction !== undefined ? (
|
|
58
|
+
<div id="kc-form-buttons" className={kcClsx("kcFormButtonsClass")}>
|
|
59
|
+
<button
|
|
60
|
+
className={clsx(
|
|
61
|
+
kcClsx(
|
|
62
|
+
"kcButtonClass",
|
|
63
|
+
"kcButtonPrimaryClass",
|
|
64
|
+
"kcButtonBlockClass",
|
|
65
|
+
"kcButtonLargeClass"
|
|
66
|
+
),
|
|
67
|
+
"g-recaptcha"
|
|
68
|
+
)}
|
|
69
|
+
data-sitekey={kcContext.recaptchaSiteKey}
|
|
70
|
+
data-callback={() => {
|
|
71
|
+
(
|
|
72
|
+
document.getElementById("kc-register-form") as HTMLFormElement
|
|
73
|
+
).submit();
|
|
74
|
+
}}
|
|
75
|
+
data-action={kcContext.recaptchaAction}
|
|
76
|
+
type="submit"
|
|
77
|
+
>
|
|
78
|
+
{msg("doRegister")}
|
|
79
|
+
</button>
|
|
80
|
+
</div>
|
|
81
|
+
) : (
|
|
82
|
+
<div id="kc-form-buttons" className={kcClsx("kcFormButtonsClass")}>
|
|
83
|
+
<input
|
|
84
|
+
disabled={
|
|
85
|
+
!isFormSubmittable ||
|
|
86
|
+
(kcContext.termsAcceptanceRequired && !areTermsAccepted)
|
|
87
|
+
}
|
|
88
|
+
className={kcClsx(
|
|
89
|
+
"kcButtonClass",
|
|
90
|
+
"kcButtonPrimaryClass",
|
|
91
|
+
"kcButtonBlockClass",
|
|
92
|
+
"kcButtonLargeClass"
|
|
93
|
+
)}
|
|
94
|
+
type="submit"
|
|
95
|
+
value={msgStr("doRegister")}
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
)}
|
|
99
|
+
</div>
|
|
100
|
+
</form>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { assert } from "tsafe/assert";
|
|
2
|
+
import { useKcContext } from "../../KcContext";
|
|
3
|
+
import { Template } from "../../components/Template";
|
|
4
|
+
import { useI18n } from "../../i18n";
|
|
5
|
+
import { Form } from "./Form";
|
|
6
|
+
|
|
7
|
+
export function Page() {
|
|
8
|
+
const { kcContext } = useKcContext();
|
|
9
|
+
assert(kcContext.pageId === "register.ftl");
|
|
10
|
+
|
|
11
|
+
const { msg, advancedMsg } = useI18n();
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<Template
|
|
15
|
+
headerNode={
|
|
16
|
+
kcContext.messageHeader !== undefined
|
|
17
|
+
? advancedMsg(kcContext.messageHeader)
|
|
18
|
+
: msg("registerTitle")
|
|
19
|
+
}
|
|
20
|
+
displayMessage={kcContext.messagesPerField.exists("global")}
|
|
21
|
+
displayRequiredFields
|
|
22
|
+
>
|
|
23
|
+
<Form />
|
|
24
|
+
</Template>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { kcSanitize } from "@keycloakify/login-ui/kcSanitize";
|
|
2
|
+
import { useKcContext } from "../../KcContext";
|
|
3
|
+
import { useI18n } from "../../i18n";
|
|
4
|
+
import { useKcClsx } from "@keycloakify/login-ui/useKcClsx";
|
|
5
|
+
|
|
6
|
+
export function TermsAcceptance(props: {
|
|
7
|
+
areTermsAccepted: boolean;
|
|
8
|
+
onAreTermsAcceptedValueChange: (areTermsAccepted: boolean) => void;
|
|
9
|
+
}) {
|
|
10
|
+
const { areTermsAccepted, onAreTermsAcceptedValueChange } = props;
|
|
11
|
+
|
|
12
|
+
const { kcContext } = useKcContext();
|
|
13
|
+
const { msg } = useI18n();
|
|
14
|
+
const { kcClsx } = useKcClsx();
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<>
|
|
18
|
+
<div className="form-group">
|
|
19
|
+
<div className={kcClsx("kcInputWrapperClass")}>
|
|
20
|
+
{msg("termsTitle")}
|
|
21
|
+
<div id="kc-registration-terms-text">{msg("termsText")}</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div className="form-group">
|
|
25
|
+
<div className={kcClsx("kcLabelWrapperClass")}>
|
|
26
|
+
<input
|
|
27
|
+
type="checkbox"
|
|
28
|
+
id="termsAccepted"
|
|
29
|
+
name="termsAccepted"
|
|
30
|
+
className={kcClsx("kcCheckboxInputClass")}
|
|
31
|
+
checked={areTermsAccepted}
|
|
32
|
+
onChange={e => onAreTermsAcceptedValueChange(e.target.checked)}
|
|
33
|
+
aria-invalid={kcContext.messagesPerField.existsError("termsAccepted")}
|
|
34
|
+
/>
|
|
35
|
+
<label htmlFor="termsAccepted" className={kcClsx("kcLabelClass")}>
|
|
36
|
+
{msg("acceptTerms")}
|
|
37
|
+
</label>
|
|
38
|
+
</div>
|
|
39
|
+
{kcContext.messagesPerField.existsError("termsAccepted") && (
|
|
40
|
+
<div className={kcClsx("kcLabelWrapperClass")}>
|
|
41
|
+
<span
|
|
42
|
+
id="input-error-terms-accepted"
|
|
43
|
+
className={kcClsx("kcInputErrorMessageClass")}
|
|
44
|
+
aria-live="polite"
|
|
45
|
+
dangerouslySetInnerHTML={{
|
|
46
|
+
__html: kcSanitize(kcContext.messagesPerField.get("termsAccepted"))
|
|
47
|
+
}}
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
50
|
+
)}
|
|
51
|
+
</div>
|
|
52
|
+
</>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { assert } from "tsafe/assert";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { useKcContext } from "../../KcContext";
|
|
4
|
+
import { useI18n } from "../../i18n";
|
|
5
|
+
import { Template } from "../../components/Template";
|
|
6
|
+
|
|
7
|
+
export function Page() {
|
|
8
|
+
const { kcContext } = useKcContext();
|
|
9
|
+
assert(kcContext.pageId === "saml-post-form.ftl");
|
|
10
|
+
|
|
11
|
+
const { msgStr, msg } = useI18n();
|
|
12
|
+
|
|
13
|
+
const { samlPost } = kcContext;
|
|
14
|
+
|
|
15
|
+
const [htmlFormElement, setHtmlFormElement] = useState<HTMLFormElement | null>(null);
|
|
16
|
+
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (htmlFormElement === null) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Storybook
|
|
23
|
+
if (samlPost.url === "#") {
|
|
24
|
+
alert("In a real Keycloak the user would be redirected immediately");
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
htmlFormElement.submit();
|
|
29
|
+
}, [htmlFormElement]);
|
|
30
|
+
return (
|
|
31
|
+
<Template headerNode={msg("saml.post-form.title")}>
|
|
32
|
+
<p>{msg("saml.post-form.message")}</p>
|
|
33
|
+
<form name="saml-post-binding" method="post" action={samlPost.url} ref={setHtmlFormElement}>
|
|
34
|
+
{samlPost.SAMLRequest && (
|
|
35
|
+
<input type="hidden" name="SAMLRequest" value={samlPost.SAMLRequest} />
|
|
36
|
+
)}
|
|
37
|
+
{samlPost.SAMLResponse && (
|
|
38
|
+
<input type="hidden" name="SAMLResponse" value={samlPost.SAMLResponse} />
|
|
39
|
+
)}
|
|
40
|
+
{samlPost.relayState && (
|
|
41
|
+
<input type="hidden" name="RelayState" value={samlPost.relayState} />
|
|
42
|
+
)}
|
|
43
|
+
<noscript>
|
|
44
|
+
<p>{msg("saml.post-form.js-disabled")}</p>
|
|
45
|
+
<input type="submit" value={msgStr("doContinue")} />
|
|
46
|
+
</noscript>
|
|
47
|
+
</form>
|
|
48
|
+
</Template>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { assert } from "tsafe/assert";
|
|
2
|
+
import { useKcContext } from "../../KcContext";
|
|
3
|
+
import { useI18n } from "../../i18n";
|
|
4
|
+
import { Template } from "../../components/Template";
|
|
5
|
+
import { useKcClsx } from "@keycloakify/login-ui/useKcClsx";
|
|
6
|
+
|
|
7
|
+
export function Page() {
|
|
8
|
+
const { kcContext } = useKcContext();
|
|
9
|
+
assert(kcContext.pageId === "select-authenticator.ftl");
|
|
10
|
+
|
|
11
|
+
const { url, auth } = kcContext;
|
|
12
|
+
|
|
13
|
+
const { kcClsx } = useKcClsx();
|
|
14
|
+
const { msg, advancedMsg } = useI18n();
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<Template displayInfo={false} headerNode={msg("loginChooseAuthenticator")}>
|
|
18
|
+
<form
|
|
19
|
+
id="kc-select-credential-form"
|
|
20
|
+
className={kcClsx("kcFormClass")}
|
|
21
|
+
action={url.loginAction}
|
|
22
|
+
method="post"
|
|
23
|
+
>
|
|
24
|
+
<div className={kcClsx("kcSelectAuthListClass")}>
|
|
25
|
+
{auth.authenticationSelections.map((authenticationSelection, i) => (
|
|
26
|
+
<button
|
|
27
|
+
key={i}
|
|
28
|
+
className={kcClsx("kcSelectAuthListItemClass")}
|
|
29
|
+
type="submit"
|
|
30
|
+
name="authenticationExecution"
|
|
31
|
+
value={authenticationSelection.authExecId}
|
|
32
|
+
>
|
|
33
|
+
<div className={kcClsx("kcSelectAuthListItemIconClass")}>
|
|
34
|
+
<i
|
|
35
|
+
className={kcClsx(
|
|
36
|
+
"kcSelectAuthListItemIconPropertyClass",
|
|
37
|
+
authenticationSelection.iconCssClass
|
|
38
|
+
)}
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
<div className={kcClsx("kcSelectAuthListItemBodyClass")}>
|
|
42
|
+
<div className={kcClsx("kcSelectAuthListItemHeadingClass")}>
|
|
43
|
+
{advancedMsg(authenticationSelection.displayName)}
|
|
44
|
+
</div>
|
|
45
|
+
<div className={kcClsx("kcSelectAuthListItemDescriptionClass")}>
|
|
46
|
+
{advancedMsg(authenticationSelection.helpText)}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div className={kcClsx("kcSelectAuthListItemFillClass")} />
|
|
50
|
+
<div className={kcClsx("kcSelectAuthListItemArrowClass")}>
|
|
51
|
+
<i className={kcClsx("kcSelectAuthListItemArrowIconClass")} />
|
|
52
|
+
</div>
|
|
53
|
+
</button>
|
|
54
|
+
))}
|
|
55
|
+
</div>
|
|
56
|
+
</form>
|
|
57
|
+
</Template>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { assert } from "tsafe/assert";
|
|
2
|
+
import { useKcClsx } from "@keycloakify/login-ui/useKcClsx";
|
|
3
|
+
import { useKcContext } from "../../KcContext";
|
|
4
|
+
import { useI18n } from "../../i18n";
|
|
5
|
+
import { Template } from "../../components/Template";
|
|
6
|
+
|
|
7
|
+
export function Page() {
|
|
8
|
+
const { kcContext } = useKcContext();
|
|
9
|
+
assert(kcContext.pageId === "select-authenticator.ftl");
|
|
10
|
+
|
|
11
|
+
const { kcClsx } = useKcClsx();
|
|
12
|
+
|
|
13
|
+
const { msg, msgStr } = useI18n();
|
|
14
|
+
|
|
15
|
+
const { url } = kcContext;
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Template displayMessage={false} headerNode={msg("termsTitle")}>
|
|
19
|
+
<div id="kc-terms-text">{msg("termsText")}</div>
|
|
20
|
+
<form className="form-actions" action={url.loginAction} method="POST">
|
|
21
|
+
<input
|
|
22
|
+
className={kcClsx(
|
|
23
|
+
"kcButtonClass",
|
|
24
|
+
"kcButtonClass",
|
|
25
|
+
"kcButtonClass",
|
|
26
|
+
"kcButtonPrimaryClass",
|
|
27
|
+
"kcButtonLargeClass"
|
|
28
|
+
)}
|
|
29
|
+
name="accept"
|
|
30
|
+
id="kc-accept"
|
|
31
|
+
type="submit"
|
|
32
|
+
value={msgStr("doAccept")}
|
|
33
|
+
/>
|
|
34
|
+
<input
|
|
35
|
+
className={kcClsx("kcButtonClass", "kcButtonDefaultClass", "kcButtonLargeClass")}
|
|
36
|
+
name="cancel"
|
|
37
|
+
id="kc-decline"
|
|
38
|
+
type="submit"
|
|
39
|
+
value={msgStr("doDecline")}
|
|
40
|
+
/>
|
|
41
|
+
</form>
|
|
42
|
+
<div className="clearfix" />
|
|
43
|
+
</Template>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { assert } from "tsafe/assert";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { useKcClsx } from "@keycloakify/login-ui/useKcClsx";
|
|
4
|
+
import { useKcContext } from "../../KcContext";
|
|
5
|
+
import { useI18n } from "../../i18n";
|
|
6
|
+
import { Template } from "../../components/Template";
|
|
7
|
+
import { UserProfileFormFields } from "../../components/UserProfileFormFields";
|
|
8
|
+
import { LogoutOtherSessions } from "../../components/LogoutOtherSessions";
|
|
9
|
+
|
|
10
|
+
export function Page() {
|
|
11
|
+
const { kcContext } = useKcContext();
|
|
12
|
+
assert(kcContext.pageId === "update-email.ftl");
|
|
13
|
+
|
|
14
|
+
const { kcClsx } = useKcClsx();
|
|
15
|
+
|
|
16
|
+
const { msg, msgStr } = useI18n();
|
|
17
|
+
|
|
18
|
+
const [isFormSubmittable, setIsFormSubmittable] = useState(false);
|
|
19
|
+
|
|
20
|
+
const { url, messagesPerField, isAppInitiatedAction } = kcContext;
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Template
|
|
24
|
+
displayMessage={messagesPerField.exists("global")}
|
|
25
|
+
displayRequiredFields
|
|
26
|
+
headerNode={msg("updateEmailTitle")}
|
|
27
|
+
>
|
|
28
|
+
<form
|
|
29
|
+
id="kc-update-email-form"
|
|
30
|
+
className={kcClsx("kcFormClass")}
|
|
31
|
+
action={url.loginAction}
|
|
32
|
+
method="post"
|
|
33
|
+
>
|
|
34
|
+
<UserProfileFormFields onIsFormSubmittableValueChange={setIsFormSubmittable} />
|
|
35
|
+
|
|
36
|
+
<div className={kcClsx("kcFormGroupClass")}>
|
|
37
|
+
<div id="kc-form-options" className={kcClsx("kcFormOptionsClass")}>
|
|
38
|
+
<div className={kcClsx("kcFormOptionsWrapperClass")} />
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<LogoutOtherSessions />
|
|
42
|
+
|
|
43
|
+
<div id="kc-form-buttons" className={kcClsx("kcFormButtonsClass")}>
|
|
44
|
+
<input
|
|
45
|
+
disabled={!isFormSubmittable}
|
|
46
|
+
className={kcClsx(
|
|
47
|
+
"kcButtonClass",
|
|
48
|
+
"kcButtonPrimaryClass",
|
|
49
|
+
isAppInitiatedAction && "kcButtonBlockClass",
|
|
50
|
+
"kcButtonLargeClass"
|
|
51
|
+
)}
|
|
52
|
+
type="submit"
|
|
53
|
+
value={msgStr("doSubmit")}
|
|
54
|
+
/>
|
|
55
|
+
{isAppInitiatedAction && (
|
|
56
|
+
<button
|
|
57
|
+
className={kcClsx(
|
|
58
|
+
"kcButtonClass",
|
|
59
|
+
"kcButtonDefaultClass",
|
|
60
|
+
"kcButtonLargeClass"
|
|
61
|
+
)}
|
|
62
|
+
type="submit"
|
|
63
|
+
name="cancel-aia"
|
|
64
|
+
value="true"
|
|
65
|
+
>
|
|
66
|
+
{msg("doCancel")}
|
|
67
|
+
</button>
|
|
68
|
+
)}
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</form>
|
|
72
|
+
</Template>
|
|
73
|
+
);
|
|
74
|
+
}
|