@keycloakify/angular 0.0.1-rc.20 → 0.0.1-rc.22
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/account/account.d.ts +12 -0
- package/account/defaultPage.d.ts +3 -0
- package/{login/getDefaultPageComponent → account}/index.d.ts +1 -1
- package/account/providers/keycloakify-angular/keycloakify-angular.providers.d.ts +1 -1
- package/account/public-api.d.ts +1 -0
- package/bin/338.index.js +298 -0
- package/bin/755.index.js +4928 -0
- package/bin/758.index.js +130 -0
- package/bin/925.index.js +1712 -0
- package/bin/main.js +334 -105
- package/esm2022/account/account.mjs +3 -0
- package/esm2022/account/defaultPage.mjs +26 -0
- package/esm2022/account/keycloakify-angular-account.mjs +5 -0
- package/esm2022/account/pages/account/account.component.mjs +2 -3
- package/esm2022/account/pages/applications/applications.component.mjs +2 -3
- package/esm2022/account/pages/federatedIdentity/federatedIdentity.component.mjs +2 -3
- package/esm2022/account/pages/log/log.component.mjs +2 -3
- package/esm2022/account/pages/password/password.component.mjs +2 -3
- package/esm2022/account/pages/sessions/sessions.component.mjs +2 -3
- package/esm2022/account/pages/totp/totp.component.mjs +2 -3
- package/esm2022/account/providers/keycloakify-angular/keycloakify-angular.providers.mjs +2 -2
- package/esm2022/account/public-api.mjs +2 -0
- package/esm2022/login/containers/template/template.component.mjs +4 -10
- package/esm2022/login/defaultPage.mjs +77 -0
- package/esm2022/login/keycloakify-angular-login.mjs +5 -0
- package/esm2022/login/login.mjs +3 -0
- package/esm2022/login/pages/code/code.component.mjs +2 -3
- package/esm2022/login/pages/delete-account-confirm/delete-account-confirm.component.mjs +1 -1
- package/esm2022/login/pages/delete-credential/delete-credential.component.mjs +2 -3
- package/esm2022/login/pages/error/error.component.mjs +2 -3
- package/esm2022/login/pages/frontchannel-logout/frontchannel-logout.component.mjs +2 -3
- package/esm2022/login/pages/idp-review-user-profile/idp-review-user-profile.component.mjs +7 -8
- package/esm2022/login/pages/info/info.component.mjs +2 -3
- package/esm2022/login/pages/login/login.component.mjs +2 -3
- package/esm2022/login/pages/login-config-totp/login-config-totp.component.mjs +2 -3
- package/esm2022/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.mjs +2 -3
- package/esm2022/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.mjs +2 -3
- package/esm2022/login/pages/login-idp-link-email/login-idp-link-email.component.mjs +2 -3
- package/esm2022/login/pages/login-oauth-grant/login-oauth-grant.component.mjs +2 -3
- package/esm2022/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.mjs +2 -3
- package/esm2022/login/pages/login-otp/login-otp.component.mjs +2 -3
- package/esm2022/login/pages/login-page-expired/login-page-expired.component.mjs +2 -3
- package/esm2022/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.mjs +2 -3
- package/esm2022/login/pages/login-password/login-password.component.mjs +2 -3
- package/esm2022/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.mjs +2 -3
- package/esm2022/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.mjs +2 -3
- package/esm2022/login/pages/login-reset-otp/login-reset-otp.component.mjs +2 -3
- package/esm2022/login/pages/login-reset-password/login-reset-password.component.mjs +2 -3
- package/esm2022/login/pages/login-update-password/login-update-password.component.mjs +2 -3
- package/esm2022/login/pages/login-update-profile/login-update-profile.component.mjs +7 -8
- package/esm2022/login/pages/login-username/login-username.component.mjs +2 -3
- package/esm2022/login/pages/login-verify-email/login-verify-email.component.mjs +2 -3
- package/esm2022/login/pages/login-x509-info/login-x509-info.component.mjs +2 -3
- package/esm2022/login/pages/logout-confirm/logout-confirm.component.mjs +2 -3
- package/esm2022/login/pages/register/register.component.mjs +7 -8
- package/esm2022/login/pages/saml-post-form/saml-post-form.component.mjs +2 -3
- package/esm2022/login/pages/select-authenticator/select-authenticator.component.mjs +2 -3
- package/esm2022/login/pages/terms/terms.component.mjs +2 -3
- package/esm2022/login/pages/update-email/update-email.component.mjs +7 -8
- package/esm2022/login/pages/webauthn-authenticate/webauthn-authenticate.component.mjs +2 -3
- package/esm2022/login/pages/webauthn-error/webauthn-error.component.mjs +2 -3
- package/esm2022/login/pages/webauthn-register/webauthn-register.component.mjs +2 -3
- package/esm2022/login/providers/keycloakify-angular/keycloakify-angular.providers.mjs +2 -2
- package/esm2022/login/public-api.mjs +2 -0
- package/fesm2022/keycloakify-angular-account-pages-account.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-account.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-pages-applications.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-applications.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-pages-federatedIdentity.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-federatedIdentity.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-pages-log.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-log.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-pages-password.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-pages-sessions.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-sessions.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-pages-totp.mjs +1 -2
- package/fesm2022/keycloakify-angular-account-pages-totp.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-providers-keycloakify-angular.mjs +2 -2
- package/fesm2022/keycloakify-angular-account-providers-keycloakify-angular.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account.mjs +34 -0
- package/fesm2022/keycloakify-angular-account.mjs.map +1 -0
- package/fesm2022/keycloakify-angular-login-containers-template.mjs +3 -9
- package/fesm2022/keycloakify-angular-login-containers-template.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-code.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-code.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-delete-account-confirm.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-error.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-error.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-frontchannel-logout.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-frontchannel-logout.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs +6 -7
- package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-info.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-info.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-config-totp.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-config-totp.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm-override.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm-override.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-oauth2-device-verify-user-code.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-oauth2-device-verify-user-code.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-otp.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-otp.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-password.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-config.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-config.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-update-password.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-update-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs +6 -7
- package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-username.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-username.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-x509-info.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login-x509-info.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-login.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-logout-confirm.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-logout-confirm.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-register.mjs +7 -8
- package/fesm2022/keycloakify-angular-login-pages-register.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-terms.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-terms.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-update-email.mjs +6 -7
- package/fesm2022/keycloakify-angular-login-pages-update-email.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-webauthn-error.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-webauthn-error.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs +1 -2
- package/fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-providers-keycloakify-angular.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-providers-keycloakify-angular.mjs.map +1 -1
- package/fesm2022/{keycloakify-angular-login-getDefaultPageComponent.mjs → keycloakify-angular-login.mjs} +3 -1
- package/fesm2022/keycloakify-angular-login.mjs.map +1 -0
- package/login/containers/template/template.component.d.ts +2 -4
- package/login/index.d.ts +5 -0
- package/login/login.d.ts +13 -0
- package/login/pages/code/code.component.d.ts +1 -1
- package/login/pages/delete-account-confirm/delete-account-confirm.component.d.ts +1 -1
- package/login/pages/delete-credential/delete-credential.component.d.ts +1 -1
- package/login/pages/error/error.component.d.ts +1 -1
- package/login/pages/frontchannel-logout/frontchannel-logout.component.d.ts +1 -1
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.d.ts +2 -4
- package/login/pages/info/info.component.d.ts +1 -1
- package/login/pages/login/login.component.d.ts +1 -1
- package/login/pages/login-config-totp/login-config-totp.component.d.ts +1 -1
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.d.ts +1 -1
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.d.ts +1 -1
- package/login/pages/login-idp-link-email/login-idp-link-email.component.d.ts +1 -1
- package/login/pages/login-oauth-grant/login-oauth-grant.component.d.ts +1 -1
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.d.ts +1 -1
- package/login/pages/login-otp/login-otp.component.d.ts +1 -1
- package/login/pages/login-page-expired/login-page-expired.component.d.ts +1 -1
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.d.ts +1 -1
- package/login/pages/login-password/login-password.component.d.ts +1 -1
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.d.ts +1 -1
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.d.ts +1 -1
- package/login/pages/login-reset-otp/login-reset-otp.component.d.ts +1 -1
- package/login/pages/login-reset-password/login-reset-password.component.d.ts +1 -1
- package/login/pages/login-update-password/login-update-password.component.d.ts +1 -1
- package/login/pages/login-update-profile/login-update-profile.component.d.ts +2 -4
- package/login/pages/login-username/login-username.component.d.ts +1 -1
- package/login/pages/login-verify-email/login-verify-email.component.d.ts +1 -1
- package/login/pages/login-x509-info/login-x509-info.component.d.ts +1 -1
- package/login/pages/logout-confirm/logout-confirm.component.d.ts +1 -1
- package/login/pages/register/register.component.d.ts +2 -4
- package/login/pages/saml-post-form/saml-post-form.component.d.ts +1 -1
- package/login/pages/select-authenticator/select-authenticator.component.d.ts +1 -1
- package/login/pages/terms/terms.component.d.ts +1 -1
- package/login/pages/update-email/update-email.component.d.ts +2 -4
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.d.ts +1 -1
- package/login/pages/webauthn-error/webauthn-error.component.d.ts +1 -1
- package/login/pages/webauthn-register/webauthn-register.component.d.ts +1 -1
- package/login/providers/keycloakify-angular/keycloakify-angular.providers.d.ts +1 -1
- package/login/public-api.d.ts +1 -0
- package/package.json +21 -15
- package/src/account/DefaultPage.ts +1 -1
- package/src/account/account.ts +13 -0
- package/src/account/classes/component-reference/index.ts +1 -0
- package/src/account/containers/template/index.ts +1 -0
- package/src/account/containers/template/template.component.ts +2 -2
- package/src/account/defaultPage.ts +44 -0
- package/src/account/directives/kc-class/index.ts +1 -0
- package/src/account/index.ts +1 -0
- package/src/account/pages/account/account.component.ts +3 -4
- package/src/account/pages/account/index.ts +1 -0
- package/src/account/pages/applications/applications.component.ts +3 -4
- package/src/account/pages/applications/index.ts +1 -0
- package/src/account/pages/federatedIdentity/federatedIdentity.component.ts +3 -4
- package/src/account/pages/federatedIdentity/index.ts +1 -0
- package/src/account/pages/log/index.ts +1 -0
- package/src/account/pages/log/log.component.ts +3 -4
- package/src/account/pages/password/index.ts +1 -0
- package/src/account/pages/password/password.component.ts +3 -4
- package/src/account/pages/sessions/index.ts +1 -0
- package/src/account/pages/sessions/sessions.component.ts +3 -4
- package/src/account/pages/totp/index.ts +1 -0
- package/src/account/pages/totp/totp.component.ts +3 -4
- package/src/account/providers/keycloakify-angular/index.ts +1 -0
- package/src/account/providers/keycloakify-angular/keycloakify-angular.providers.ts +2 -4
- package/src/account/services/account-resource-injector/account-resource-injector.service.ts +1 -1
- package/src/account/services/account-resource-injector/index.ts +1 -0
- package/src/account/services/i18n/index.ts +1 -0
- package/src/account/tokens/classes/index.ts +1 -0
- package/src/account/tokens/i18n/index.ts +1 -0
- package/src/account/tokens/kc-context/index.ts +1 -0
- package/src/account/tokens/kc-context/kc-context.token.ts +1 -1
- package/src/bin/core.ts +10 -0
- package/src/bin/eject-page.ts +310 -0
- package/src/bin/initialize-account-theme/boilerplate/KcContext.ts +11 -0
- package/src/bin/initialize-account-theme/boilerplate/KcContextMock.ts +18 -0
- package/src/bin/initialize-account-theme/boilerplate/KcPage.ts +19 -0
- package/src/bin/initialize-account-theme/boilerplate/i18n.ts +11 -0
- package/src/bin/initialize-account-theme/initialize-account-theme.ts +98 -0
- package/src/bin/initialize-account-theme/updateAccountThemeImplementationInConfig.ts +99 -0
- package/src/bin/main.ts +38 -0
- package/src/bin/tools/SemVer.ts +114 -0
- package/src/bin/tools/String.prototype.replaceAll.ts +37 -0
- package/src/bin/tools/crawl.ts +35 -0
- package/src/bin/tools/fs.rmSync.ts +34 -0
- package/src/bin/tools/getThisCodebaseRootDirPath.ts +19 -0
- package/src/bin/tools/kebabCaseToSnakeCase.ts +7 -0
- package/src/bin/tools/transformCodebase.ts +88 -0
- package/src/bin/tsconfig.json +20 -0
- package/src/bin/update-kc-gen.ts +135 -0
- package/src/index.ts +1 -0
- package/src/lib/directives/attributes/index.ts +1 -0
- package/src/lib/index.ts +1 -0
- package/src/lib/models/script/index.ts +1 -0
- package/src/lib/pipes/input-type/index.ts +1 -0
- package/src/lib/pipes/is-array-with-empty-object/index.ts +1 -0
- package/src/lib/pipes/kc-sanitize/index.ts +1 -0
- package/src/lib/pipes/to-array/index.ts +1 -0
- package/src/lib/pipes/to-number/index.ts +1 -0
- package/src/lib/services/resource-injector/index.ts +1 -0
- package/src/lib/tokens/use-default-css/index.ts +1 -0
- package/src/login/classes/component-reference/index.ts +1 -0
- package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.ts +1 -1
- package/src/login/components/add-remove-buttons-multi-valued-attribute/index.ts +1 -0
- package/src/login/components/field-errors/index.ts +1 -0
- package/src/login/components/group-label/group-label.component.ts +1 -1
- package/src/login/components/group-label/index.ts +1 -0
- package/src/login/components/input-field-by-type/index.ts +1 -0
- package/src/login/components/input-tag/index.ts +1 -0
- package/src/login/components/input-tag/input-tag.component.ts +1 -1
- package/src/login/components/input-tag-selects/index.ts +1 -0
- package/src/login/components/input-tag-selects/input-tag-selects.component.ts +1 -1
- package/src/login/components/logout-other-sessions/index.ts +1 -0
- package/src/login/components/logout-other-sessions/logout-other-sessions.component.ts +1 -1
- package/src/login/components/password-wrapper/index.ts +1 -0
- package/src/login/components/password-wrapper/password-wrapper.component.ts +1 -1
- package/src/login/components/select-tag/index.ts +1 -0
- package/src/login/components/select-tag/select-tag.component.ts +1 -1
- package/src/login/components/textarea-tag/index.ts +1 -0
- package/src/login/components/user-profile-form-fields/index.ts +1 -0
- package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.ts +2 -2
- package/src/login/containers/template/index.ts +1 -0
- package/src/login/containers/template/template.component.ts +2 -8
- package/src/login/{getDefaultPageComponent.ts → defaultPage.ts} +1 -1
- package/src/login/directives/kc-class/index.ts +1 -0
- package/src/login/index.ts +1 -0
- package/src/login/login.ts +14 -0
- package/src/login/pages/code/code.component.ts +4 -5
- package/src/login/pages/code/index.ts +1 -0
- package/src/login/pages/delete-account-confirm/delete-account-confirm.component.ts +3 -3
- package/src/login/pages/delete-account-confirm/index.ts +1 -0
- package/src/login/pages/delete-credential/delete-credential.component.ts +4 -5
- package/src/login/pages/delete-credential/index.ts +1 -0
- package/src/login/pages/error/error.component.ts +4 -5
- package/src/login/pages/error/index.ts +1 -0
- package/src/login/pages/frontchannel-logout/frontchannel-logout.component.ts +4 -5
- package/src/login/pages/frontchannel-logout/index.ts +1 -0
- package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.html +1 -1
- package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.ts +4 -6
- package/src/login/pages/idp-review-user-profile/index.ts +1 -0
- package/src/login/pages/info/index.ts +1 -0
- package/src/login/pages/info/info.component.ts +4 -5
- package/src/login/pages/login/index.ts +1 -0
- package/src/login/pages/login/login.component.ts +4 -5
- package/src/login/pages/login-config-totp/index.ts +1 -0
- package/src/login/pages/login-config-totp/login-config-totp.component.ts +4 -5
- package/src/login/pages/login-idp-link-confirm/index.ts +1 -0
- package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.ts +4 -5
- package/src/login/pages/login-idp-link-confirm-override/index.ts +1 -0
- package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.ts +4 -5
- package/src/login/pages/login-idp-link-email/index.ts +1 -0
- package/src/login/pages/login-idp-link-email/login-idp-link-email.component.ts +4 -5
- package/src/login/pages/login-oauth-grant/index.ts +1 -0
- package/src/login/pages/login-oauth-grant/login-oauth-grant.component.ts +4 -5
- package/src/login/pages/login-oauth2-device-verify-user-code/index.ts +1 -0
- package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.ts +4 -5
- package/src/login/pages/login-otp/index.ts +1 -0
- package/src/login/pages/login-otp/login-otp.component.ts +4 -5
- package/src/login/pages/login-page-expired/index.ts +1 -0
- package/src/login/pages/login-page-expired/login-page-expired.component.ts +4 -5
- package/src/login/pages/login-passkeys-conditional-authenticate/index.ts +1 -0
- package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.ts +4 -5
- package/src/login/pages/login-password/index.ts +1 -0
- package/src/login/pages/login-password/login-password.component.ts +4 -5
- package/src/login/pages/login-recovery-authn-code-config/index.ts +1 -0
- package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.ts +4 -5
- package/src/login/pages/login-recovery-authn-code-input/index.ts +1 -0
- package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.ts +4 -5
- package/src/login/pages/login-reset-otp/index.ts +1 -0
- package/src/login/pages/login-reset-otp/login-reset-otp.component.ts +4 -5
- package/src/login/pages/login-reset-password/index.ts +1 -0
- package/src/login/pages/login-reset-password/login-reset-password.component.ts +4 -5
- package/src/login/pages/login-update-password/index.ts +1 -0
- package/src/login/pages/login-update-password/login-update-password.component.ts +4 -5
- package/src/login/pages/login-update-profile/index.ts +1 -0
- package/src/login/pages/login-update-profile/login-update-profile.component.html +1 -1
- package/src/login/pages/login-update-profile/login-update-profile.component.ts +4 -6
- package/src/login/pages/login-username/index.ts +1 -0
- package/src/login/pages/login-username/login-username.component.ts +4 -5
- package/src/login/pages/login-verify-email/index.ts +1 -0
- package/src/login/pages/login-verify-email/login-verify-email.component.ts +4 -5
- package/src/login/pages/login-x509-info/index.ts +1 -0
- package/src/login/pages/login-x509-info/login-x509-info.component.ts +4 -5
- package/src/login/pages/logout-confirm/index.ts +1 -0
- package/src/login/pages/logout-confirm/logout-confirm.component.ts +4 -5
- package/src/login/pages/register/index.ts +1 -0
- package/src/login/pages/register/register.component.html +1 -1
- package/src/login/pages/register/register.component.ts +4 -6
- package/src/login/pages/saml-post-form/index.ts +1 -0
- package/src/login/pages/saml-post-form/saml-post-form.component.ts +4 -5
- package/src/login/pages/select-authenticator/index.ts +1 -0
- package/src/login/pages/select-authenticator/select-authenticator.component.ts +4 -5
- package/src/login/pages/terms/index.ts +1 -0
- package/src/login/pages/terms/terms.component.ts +4 -5
- package/src/login/pages/update-email/index.ts +1 -0
- package/src/login/pages/update-email/update-email.component.html +1 -1
- package/src/login/pages/update-email/update-email.component.ts +4 -6
- package/src/login/pages/webauthn-authenticate/index.ts +1 -0
- package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.ts +4 -5
- package/src/login/pages/webauthn-error/index.ts +1 -0
- package/src/login/pages/webauthn-error/webauthn-error.component.ts +4 -5
- package/src/login/pages/webauthn-register/index.ts +1 -0
- package/src/login/pages/webauthn-register/webauthn-register.component.ts +4 -5
- package/src/login/providers/keycloakify-angular/index.ts +1 -0
- package/src/login/providers/keycloakify-angular/keycloakify-angular.providers.ts +2 -2
- package/src/login/services/i18n/index.ts +1 -0
- package/src/login/services/login-resource-injector/index.ts +1 -0
- package/src/login/services/login-resource-injector/login-resource-injector.service.ts +1 -1
- package/src/login/services/submit/index.ts +1 -0
- package/src/login/services/user-profile-form/index.ts +1 -0
- package/src/login/services/user-profile-form/user-profile-form.service.ts +2 -2
- package/src/login/tokens/classes/index.ts +1 -0
- package/src/login/tokens/i18n/index.ts +1 -0
- package/src/login/tokens/kc-context/index.ts +1 -0
- package/src/login/tokens/kc-context/kc-context.token.ts +1 -1
- package/src/login/tokens/make-user-confirm-password/index.ts +1 -0
- package/esm2022/login/getDefaultPageComponent/getDefaultPageComponent.mjs +0 -77
- package/esm2022/login/getDefaultPageComponent/keycloakify-angular-login-getDefaultPageComponent.mjs +0 -5
- package/esm2022/login/getDefaultPageComponent/public-api.mjs +0 -2
- package/fesm2022/keycloakify-angular-login-getDefaultPageComponent.mjs.map +0 -1
- package/login/getDefaultPageComponent/public-api.d.ts +0 -1
- /package/login/{getDefaultPageComponent/getDefaultPageComponent.d.ts → defaultPage.d.ts} +0 -0
- /package/{stories → src/stories}/login/pages/login/login.stories.ts +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export type SemVer = {
|
|
2
|
+
major: number;
|
|
3
|
+
minor: number;
|
|
4
|
+
patch: number;
|
|
5
|
+
rc?: number;
|
|
6
|
+
parsedFrom: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export namespace SemVer {
|
|
10
|
+
const bumpTypes = ['major', 'minor', 'patch', 'rc', 'no bump'] as const;
|
|
11
|
+
|
|
12
|
+
export type BumpType = (typeof bumpTypes)[number];
|
|
13
|
+
|
|
14
|
+
export function parse(versionStr: string): SemVer {
|
|
15
|
+
const match = versionStr.match(
|
|
16
|
+
/^v?([0-9]+)\.([0-9]+)(?:\.([0-9]+))?(?:-rc.([0-9]+))?$/
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
if (!match) {
|
|
20
|
+
throw new Error(`${versionStr} is not a valid semantic version`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const semVer: Omit<SemVer, 'parsedFrom'> = {
|
|
24
|
+
major: parseInt(match[1]),
|
|
25
|
+
minor: parseInt(match[2]),
|
|
26
|
+
patch: (() => {
|
|
27
|
+
const str = match[3];
|
|
28
|
+
|
|
29
|
+
return str === undefined ? 0 : parseInt(str);
|
|
30
|
+
})(),
|
|
31
|
+
...(() => {
|
|
32
|
+
const str = match[4];
|
|
33
|
+
return str === undefined ? {} : { rc: parseInt(str) };
|
|
34
|
+
})()
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const initialStr = stringify(semVer);
|
|
38
|
+
|
|
39
|
+
Object.defineProperty(semVer, 'parsedFrom', {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () {
|
|
42
|
+
const currentStr = stringify(this);
|
|
43
|
+
|
|
44
|
+
if (currentStr !== initialStr) {
|
|
45
|
+
throw new Error(
|
|
46
|
+
`SemVer.parsedFrom can't be read anymore, the version have been modified from ${initialStr} to ${currentStr}`
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return versionStr;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
return semVer as any;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function stringify(v: Omit<SemVer, 'parsedFrom'>): string {
|
|
58
|
+
return `${v.major}.${v.minor}.${v.patch}${v.rc === undefined ? '' : `-rc.${v.rc}`}`;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* v1 < v2 => -1
|
|
64
|
+
* v1 === v2 => 0
|
|
65
|
+
* v1 > v2 => 1
|
|
66
|
+
*
|
|
67
|
+
*/
|
|
68
|
+
export function compare(v1: SemVer, v2: SemVer): -1 | 0 | 1 {
|
|
69
|
+
const sign = (diff: number): -1 | 0 | 1 => (diff === 0 ? 0 : diff < 0 ? -1 : 1);
|
|
70
|
+
const noUndefined = (n: number | undefined) => n ?? Infinity;
|
|
71
|
+
|
|
72
|
+
for (const level of ['major', 'minor', 'patch', 'rc'] as const) {
|
|
73
|
+
if (noUndefined(v1[level]) !== noUndefined(v2[level])) {
|
|
74
|
+
return sign(noUndefined(v1[level]) - noUndefined(v2[level]));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/*
|
|
82
|
+
console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0")) === -1 )
|
|
83
|
+
console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0-rc.4")) === -1 )
|
|
84
|
+
console.log(compare(parse("3.0.0-rc.3"), parse("4.0.0")) === -1 )
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
export function bumpType(params: {
|
|
88
|
+
versionBehind: string | SemVer;
|
|
89
|
+
versionAhead: string | SemVer;
|
|
90
|
+
}): BumpType | 'no bump' {
|
|
91
|
+
const versionAhead =
|
|
92
|
+
typeof params.versionAhead === 'string'
|
|
93
|
+
? parse(params.versionAhead)
|
|
94
|
+
: params.versionAhead;
|
|
95
|
+
const versionBehind =
|
|
96
|
+
typeof params.versionBehind === 'string'
|
|
97
|
+
? parse(params.versionBehind)
|
|
98
|
+
: params.versionBehind;
|
|
99
|
+
|
|
100
|
+
if (compare(versionBehind, versionAhead) === 1) {
|
|
101
|
+
throw new Error(
|
|
102
|
+
`Version regression ${stringify(versionBehind)} -> ${stringify(versionAhead)}`
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
for (const level of ['major', 'minor', 'patch', 'rc'] as const) {
|
|
107
|
+
if (versionBehind[level] !== versionAhead[level]) {
|
|
108
|
+
return level;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return 'no bump';
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export function replaceAll(
|
|
2
|
+
string: string,
|
|
3
|
+
searchValue: string | RegExp,
|
|
4
|
+
replaceValue: string
|
|
5
|
+
): string {
|
|
6
|
+
if ((string as any).replaceAll !== undefined) {
|
|
7
|
+
return (string as any).replaceAll(searchValue, replaceValue);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// If the searchValue is a string
|
|
11
|
+
if (typeof searchValue === 'string') {
|
|
12
|
+
// Escape special characters in the string to be used in a regex
|
|
13
|
+
var escapedSearchValue = searchValue.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
14
|
+
var regex = new RegExp(escapedSearchValue, 'g');
|
|
15
|
+
|
|
16
|
+
return string.replace(regex, replaceValue);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// If the searchValue is a global RegExp, use it directly
|
|
20
|
+
if (searchValue instanceof RegExp && searchValue.global) {
|
|
21
|
+
return string.replace(searchValue, replaceValue);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// If the searchValue is a non-global RegExp, throw an error
|
|
25
|
+
if (searchValue instanceof RegExp) {
|
|
26
|
+
throw new TypeError('replaceAll must be called with a global RegExp');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Convert searchValue to string if it's not a string or RegExp
|
|
30
|
+
var searchString = String(searchValue);
|
|
31
|
+
var regexFromString = new RegExp(
|
|
32
|
+
searchString.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'),
|
|
33
|
+
'g'
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
return string.replace(regexFromString, replaceValue);
|
|
37
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import { join as pathJoin, relative as pathRelative } from 'path';
|
|
3
|
+
|
|
4
|
+
const crawlRec = (dirPath: string, filePaths: string[]) => {
|
|
5
|
+
for (const basename of fs.readdirSync(dirPath)) {
|
|
6
|
+
const fileOrDirPath = pathJoin(dirPath, basename);
|
|
7
|
+
|
|
8
|
+
if (fs.lstatSync(fileOrDirPath).isDirectory()) {
|
|
9
|
+
crawlRec(fileOrDirPath, filePaths);
|
|
10
|
+
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
filePaths.push(fileOrDirPath);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** List all files in a given directory return paths relative to the dir_path */
|
|
19
|
+
export function crawl(params: {
|
|
20
|
+
dirPath: string;
|
|
21
|
+
returnedPathsType: 'absolute' | 'relative to dirPath';
|
|
22
|
+
}): string[] {
|
|
23
|
+
const { dirPath, returnedPathsType } = params;
|
|
24
|
+
|
|
25
|
+
const filePaths: string[] = [];
|
|
26
|
+
|
|
27
|
+
crawlRec(dirPath, filePaths);
|
|
28
|
+
|
|
29
|
+
switch (returnedPathsType) {
|
|
30
|
+
case 'absolute':
|
|
31
|
+
return filePaths;
|
|
32
|
+
case 'relative to dirPath':
|
|
33
|
+
return filePaths.map(filePath => pathRelative(dirPath, filePath));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import { join as pathJoin } from 'path';
|
|
3
|
+
import { SemVer } from './SemVer';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Polyfill of fs.rmSync(dirPath, { "recursive": true })
|
|
7
|
+
* For older version of Node
|
|
8
|
+
*/
|
|
9
|
+
export function rmSync(dirPath: string, options: { recursive: true; force?: true }) {
|
|
10
|
+
if (SemVer.compare(SemVer.parse(process.version), SemVer.parse('14.14.0')) > 0) {
|
|
11
|
+
fs.rmSync(dirPath, options);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { force = true } = options;
|
|
16
|
+
|
|
17
|
+
if (force && !fs.existsSync(dirPath)) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const removeDir_rec = (dirPath: string) =>
|
|
22
|
+
fs.readdirSync(dirPath).forEach(basename => {
|
|
23
|
+
const fileOrDirPath = pathJoin(dirPath, basename);
|
|
24
|
+
|
|
25
|
+
if (fs.lstatSync(fileOrDirPath).isDirectory()) {
|
|
26
|
+
removeDir_rec(fileOrDirPath);
|
|
27
|
+
return;
|
|
28
|
+
} else {
|
|
29
|
+
fs.unlinkSync(fileOrDirPath);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
removeDir_rec(dirPath);
|
|
34
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
|
|
4
|
+
function getThisCodebaseRootDirPath_rec(dirPath: string): string {
|
|
5
|
+
if (fs.existsSync(path.join(dirPath, 'package.json'))) {
|
|
6
|
+
return dirPath;
|
|
7
|
+
}
|
|
8
|
+
return getThisCodebaseRootDirPath_rec(path.join(dirPath, '..'));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let result: string | undefined = undefined;
|
|
12
|
+
|
|
13
|
+
export function getThisCodebaseRootDirPath(): string {
|
|
14
|
+
if (result !== undefined) {
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return (result = getThisCodebaseRootDirPath_rec(__dirname));
|
|
19
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import { crawl } from './crawl';
|
|
4
|
+
import { rmSync } from '../tools/fs.rmSync';
|
|
5
|
+
|
|
6
|
+
type TransformSourceCode = (params: {
|
|
7
|
+
sourceCode: Buffer;
|
|
8
|
+
filePath: string;
|
|
9
|
+
fileRelativePath: string;
|
|
10
|
+
}) =>
|
|
11
|
+
| {
|
|
12
|
+
modifiedSourceCode: Buffer;
|
|
13
|
+
newFileName?: string;
|
|
14
|
+
}
|
|
15
|
+
| undefined;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Apply a transformation function to every file of directory
|
|
19
|
+
* If source and destination are the same this function can be used to apply the transformation in place
|
|
20
|
+
* like filtering out some files or modifying them.
|
|
21
|
+
* */
|
|
22
|
+
export function transformCodebase(params: {
|
|
23
|
+
srcDirPath: string;
|
|
24
|
+
destDirPath: string;
|
|
25
|
+
transformSourceCode?: TransformSourceCode;
|
|
26
|
+
}) {
|
|
27
|
+
const { srcDirPath, transformSourceCode } = params;
|
|
28
|
+
|
|
29
|
+
const isTargetSameAsSource = path.relative(srcDirPath, params.destDirPath) === '';
|
|
30
|
+
|
|
31
|
+
const destDirPath = isTargetSameAsSource
|
|
32
|
+
? path.join(srcDirPath, '..', 'tmp_xOsPdkPsTdzPs34sOkHs')
|
|
33
|
+
: params.destDirPath;
|
|
34
|
+
|
|
35
|
+
fs.mkdirSync(destDirPath, {
|
|
36
|
+
recursive: true
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
for (const fileRelativePath of crawl({
|
|
40
|
+
dirPath: srcDirPath,
|
|
41
|
+
returnedPathsType: 'relative to dirPath'
|
|
42
|
+
})) {
|
|
43
|
+
const filePath = path.join(srcDirPath, fileRelativePath);
|
|
44
|
+
const destFilePath = path.join(destDirPath, fileRelativePath);
|
|
45
|
+
|
|
46
|
+
// NOTE: Optimization, if we don't need to transform the file, just copy
|
|
47
|
+
// it using the lower level implementation.
|
|
48
|
+
if (transformSourceCode === undefined) {
|
|
49
|
+
fs.mkdirSync(path.dirname(destFilePath), {
|
|
50
|
+
recursive: true
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
fs.copyFileSync(filePath, destFilePath);
|
|
54
|
+
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const transformSourceCodeResult = transformSourceCode({
|
|
59
|
+
sourceCode: fs.readFileSync(filePath),
|
|
60
|
+
filePath,
|
|
61
|
+
fileRelativePath
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
if (transformSourceCodeResult === undefined) {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
fs.mkdirSync(path.dirname(destFilePath), {
|
|
69
|
+
recursive: true
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const { newFileName, modifiedSourceCode } = transformSourceCodeResult;
|
|
73
|
+
|
|
74
|
+
fs.writeFileSync(
|
|
75
|
+
path.join(
|
|
76
|
+
path.dirname(destFilePath),
|
|
77
|
+
newFileName ?? path.basename(destFilePath)
|
|
78
|
+
),
|
|
79
|
+
modifiedSourceCode
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (isTargetSameAsSource) {
|
|
84
|
+
rmSync(srcDirPath, { recursive: true });
|
|
85
|
+
|
|
86
|
+
fs.renameSync(destDirPath, srcDirPath);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"sourceMap": false,
|
|
4
|
+
"newLine": "LF",
|
|
5
|
+
"noUnusedLocals": true,
|
|
6
|
+
"noUnusedParameters": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"downlevelIteration": true,
|
|
9
|
+
"noFallthroughCasesInSwitch": true,
|
|
10
|
+
"composite": true,
|
|
11
|
+
"rootDir": ".",
|
|
12
|
+
"module": "ES2020",
|
|
13
|
+
"target": "ES2017",
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"lib": ["es2015", "ES2019.Object"],
|
|
16
|
+
"moduleResolution": "node"
|
|
17
|
+
},
|
|
18
|
+
"include": ["**/*.ts"],
|
|
19
|
+
"exclude": ["initialize-account-theme/boilerplate"]
|
|
20
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { BuildContext } from './core';
|
|
2
|
+
import * as fs from 'fs';
|
|
3
|
+
import { join as pathJoin } from 'path';
|
|
4
|
+
|
|
5
|
+
export function command(params: { buildContext: BuildContext }) {
|
|
6
|
+
const { buildContext } = params;
|
|
7
|
+
|
|
8
|
+
const filePath = pathJoin(buildContext.themeSrcDirPath, 'kc.gen.ts');
|
|
9
|
+
|
|
10
|
+
const currentContent = fs.existsSync(filePath)
|
|
11
|
+
? fs.readFileSync(filePath)
|
|
12
|
+
: undefined;
|
|
13
|
+
|
|
14
|
+
const implementedThemeTypes = (['login', 'account'] as const).filter(
|
|
15
|
+
themeType => buildContext.implementedThemeTypes[themeType].isImplemented
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const newContent = Buffer.from(
|
|
19
|
+
[
|
|
20
|
+
`/* prettier-ignore-start */`,
|
|
21
|
+
``,
|
|
22
|
+
`/* eslint-disable */`,
|
|
23
|
+
``,
|
|
24
|
+
`// noinspection JSUnusedGlobalSymbols`,
|
|
25
|
+
``,
|
|
26
|
+
`// This file is auto-generated by Keycloakify`,
|
|
27
|
+
``,
|
|
28
|
+
`import type { ComponentRef, EnvironmentProviders, Type } from "@angular/core";`,
|
|
29
|
+
``,
|
|
30
|
+
`export type ThemeName = ${buildContext.themeNames.map(themeName => `"${themeName}"`).join(' | ')};`,
|
|
31
|
+
``,
|
|
32
|
+
`export const themeNames: ThemeName[] = [${buildContext.themeNames.map(themeName => `"${themeName}"`).join(', ')}];`,
|
|
33
|
+
``,
|
|
34
|
+
`export type KcEnvName = ${buildContext.environmentVariables.length === 0 ? 'never' : buildContext.environmentVariables.map(({ name }) => `"${name}"`).join(' | ')};`,
|
|
35
|
+
``,
|
|
36
|
+
`export const kcEnvNames: KcEnvName[] = [${buildContext.environmentVariables.map(({ name }) => `"${name}"`).join(', ')}];`,
|
|
37
|
+
``,
|
|
38
|
+
`export const kcEnvDefaults: Record<KcEnvName, string> = ${JSON.stringify(
|
|
39
|
+
Object.fromEntries(
|
|
40
|
+
buildContext.environmentVariables.map(
|
|
41
|
+
({ name, default: defaultValue }) => [name, defaultValue]
|
|
42
|
+
)
|
|
43
|
+
),
|
|
44
|
+
null,
|
|
45
|
+
2
|
|
46
|
+
)};`,
|
|
47
|
+
``,
|
|
48
|
+
`export type KcContext =`,
|
|
49
|
+
...implementedThemeTypes.map(
|
|
50
|
+
themeType => ` | import("./${themeType}/KcContext").KcContext`
|
|
51
|
+
),
|
|
52
|
+
` ;`,
|
|
53
|
+
``,
|
|
54
|
+
`declare global {`,
|
|
55
|
+
` interface Window {`,
|
|
56
|
+
` kcContext?: KcContext;`,
|
|
57
|
+
` }`,
|
|
58
|
+
`}`,
|
|
59
|
+
``,
|
|
60
|
+
`type ApplicationRefLike = {`,
|
|
61
|
+
` components: ComponentRef<any>[];`,
|
|
62
|
+
`};`,
|
|
63
|
+
``,
|
|
64
|
+
`export async function bootstrapKcApplication(params: {`,
|
|
65
|
+
` kcContext: KcContext;`,
|
|
66
|
+
` bootstrapApplication: (params: {`,
|
|
67
|
+
` KcRootComponent: Type<unknown>;`,
|
|
68
|
+
` kcProvider: EnvironmentProviders;`,
|
|
69
|
+
` }) => Promise<ApplicationRefLike>;`,
|
|
70
|
+
`}) {`,
|
|
71
|
+
` const { kcContext, bootstrapApplication } = params;`,
|
|
72
|
+
``,
|
|
73
|
+
` switch (kcContext.themeType) {`,
|
|
74
|
+
...(['login', 'account'] as const)
|
|
75
|
+
.filter(
|
|
76
|
+
themeType =>
|
|
77
|
+
buildContext.implementedThemeTypes[themeType].isImplemented
|
|
78
|
+
)
|
|
79
|
+
.map(themeType => [
|
|
80
|
+
` case "${themeType}":`,
|
|
81
|
+
` {`,
|
|
82
|
+
` const [`,
|
|
83
|
+
` { provideKeycloakifyAngular },`,
|
|
84
|
+
` { getI18n },`,
|
|
85
|
+
` {`,
|
|
86
|
+
` PageComponent,`,
|
|
87
|
+
` TemplateComponent,`,
|
|
88
|
+
` doUseDefaultCss,`,
|
|
89
|
+
` classes,`,
|
|
90
|
+
...(themeType === 'login'
|
|
91
|
+
? [` doMakeUserConfirmPassword,`]
|
|
92
|
+
: []),
|
|
93
|
+
` },`,
|
|
94
|
+
` ] = await Promise.all([`,
|
|
95
|
+
` import('@keycloakify/angular/login/providers/keycloakify-angular'),`,
|
|
96
|
+
` import('./${themeType}/i18n'),`,
|
|
97
|
+
` import('./${themeType}/KcPage').then(({ getKcPage }) => getKcPage(kcContext.pageId)),`,
|
|
98
|
+
` ] as const);`,
|
|
99
|
+
``,
|
|
100
|
+
` const appRef = await bootstrapApplication({`,
|
|
101
|
+
` KcRootComponent: TemplateComponent,`,
|
|
102
|
+
` kcProvider: provideKeycloakifyAngular({`,
|
|
103
|
+
` classes,`,
|
|
104
|
+
` getI18n,`,
|
|
105
|
+
` doUseDefaultCss,`,
|
|
106
|
+
...(themeType === 'login'
|
|
107
|
+
? [` doMakeUserConfirmPassword,`]
|
|
108
|
+
: []),
|
|
109
|
+
` })`,
|
|
110
|
+
` });`,
|
|
111
|
+
``,
|
|
112
|
+
` appRef.components.forEach(componentRef => {`,
|
|
113
|
+
` if ("page" in componentRef.instance) {`,
|
|
114
|
+
` componentRef.setInput("page", PageComponent);`,
|
|
115
|
+
` }`,
|
|
116
|
+
` });`,
|
|
117
|
+
` }`,
|
|
118
|
+
` break;`
|
|
119
|
+
])
|
|
120
|
+
.flat(),
|
|
121
|
+
` }`,
|
|
122
|
+
`}`,
|
|
123
|
+
``,
|
|
124
|
+
`/* prettier-ignore-end */`,
|
|
125
|
+
``
|
|
126
|
+
].join('\n'),
|
|
127
|
+
'utf8'
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
if (currentContent !== undefined && currentContent.equals(newContent)) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
fs.writeFileSync(filePath, newContent);
|
|
135
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const KEYCLOAKIFY_ANGULAR = '@keycloakify/angular';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './attributes.directive';
|
package/src/lib/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const KEYCLOAKIFY_ANGULAR_LIB = '@keycloakify/angular/lib';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './script.model';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-type.pipe';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './is-array-with-empty-object.pipe';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './kc-sanitize.pipe';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './to-array.pipe';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './to-number.pipe';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './resource-injector.service';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-default-css.token';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './component-reference.class';
|
|
@@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, computed, inject, input, output } f
|
|
|
2
2
|
import { type FormAction } from '@keycloakify/angular/login/services/user-profile-form';
|
|
3
3
|
import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
|
|
4
4
|
import { type Attribute } from 'keycloakify/login/KcContext';
|
|
5
|
-
import type { I18n } from '
|
|
5
|
+
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
6
6
|
|
|
7
7
|
@Component({
|
|
8
8
|
standalone: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './add-remove-buttons-multi-valued-attribute.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './field-errors.component';
|
|
@@ -7,7 +7,7 @@ import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';
|
|
|
7
7
|
import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
|
|
8
8
|
import { type Attribute } from 'keycloakify/login/KcContext';
|
|
9
9
|
import type { ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
10
|
-
import type { I18n } from '
|
|
10
|
+
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
11
11
|
|
|
12
12
|
@Component({
|
|
13
13
|
standalone: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './group-label.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-field-by-type.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-tag.component';
|
|
@@ -8,7 +8,7 @@ import { ComponentReference } from '@keycloakify/angular/login/classes/component
|
|
|
8
8
|
import { AddRemoveButtonsMultiValuedAttributeComponent } from '@keycloakify/angular/login/components/add-remove-buttons-multi-valued-attribute';
|
|
9
9
|
import { FieldErrorsComponent } from '@keycloakify/angular/login/components/field-errors';
|
|
10
10
|
import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
|
|
11
|
-
import type { I18n } from '
|
|
11
|
+
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
12
12
|
import { FormAction, FormFieldError } from '@keycloakify/angular/login/services/user-profile-form';
|
|
13
13
|
import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';
|
|
14
14
|
import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-tag-selects.component';
|
|
@@ -7,7 +7,7 @@ import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';
|
|
|
7
7
|
import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
|
|
8
8
|
import { type Attribute } from 'keycloakify/login/KcContext';
|
|
9
9
|
import type { ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
10
|
-
import type { I18n } from '
|
|
10
|
+
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
11
11
|
|
|
12
12
|
@Component({
|
|
13
13
|
standalone: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './logout-other-sessions.component';
|
|
@@ -5,7 +5,7 @@ import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class
|
|
|
5
5
|
import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';
|
|
6
6
|
import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
|
|
7
7
|
import type { ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
8
|
-
import type { I18n } from '
|
|
8
|
+
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
9
9
|
|
|
10
10
|
@Component({
|
|
11
11
|
selector: 'kc-logout-other-sessions',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './password-wrapper.component';
|
|
@@ -6,7 +6,7 @@ import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class
|
|
|
6
6
|
import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';
|
|
7
7
|
import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
|
|
8
8
|
import type { ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
9
|
-
import type { I18n } from '
|
|
9
|
+
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
10
10
|
|
|
11
11
|
@Component({
|
|
12
12
|
selector: 'kc-password-wrapper',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './select-tag.component';
|
|
@@ -8,7 +8,7 @@ import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';
|
|
|
8
8
|
import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
|
|
9
9
|
import { type Attribute } from 'keycloakify/login/KcContext';
|
|
10
10
|
import type { ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
11
|
-
import type { I18n } from '
|
|
11
|
+
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
12
12
|
|
|
13
13
|
@Component({
|
|
14
14
|
standalone: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './textarea-tag.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './user-profile-form-fields.component';
|
|
@@ -6,8 +6,8 @@ import { FieldErrorsComponent } from '@keycloakify/angular/login/components/fiel
|
|
|
6
6
|
import { GroupLabelComponent } from '@keycloakify/angular/login/components/group-label';
|
|
7
7
|
import { InputFieldByTypeComponent } from '@keycloakify/angular/login/components/input-field-by-type';
|
|
8
8
|
import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
|
|
9
|
-
import type { I18n } from '
|
|
10
|
-
import type { KcContext } from '
|
|
9
|
+
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
10
|
+
import type { KcContext } from '@keycloakify/angular/login/KcContext';
|
|
11
11
|
import { SubmitService } from '@keycloakify/angular/login/services/submit';
|
|
12
12
|
import { type FormAction, UserProfileFormService } from '@keycloakify/angular/login/services/user-profile-form';
|
|
13
13
|
import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';
|