@keycloakify/angular 0.0.1-rc.22 → 0.0.1-rc.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/bin/338.index.js +14 -1
- package/bin/758.index.js +14 -1
- package/bin/925.index.js +15 -3
- package/esm2022/login/containers/template/template.component.mjs +11 -5
- package/esm2022/login/login.mjs +1 -1
- package/esm2022/login/pages/code/code.component.mjs +3 -3
- package/esm2022/login/pages/delete-credential/delete-credential.component.mjs +3 -3
- package/esm2022/login/pages/error/error.component.mjs +3 -3
- package/esm2022/login/pages/idp-review-user-profile/idp-review-user-profile.component.mjs +7 -7
- package/esm2022/login/pages/info/info.component.mjs +3 -3
- package/esm2022/login/pages/login/login.component.mjs +3 -3
- package/esm2022/login/pages/login-idp-link-email/login-idp-link-email.component.mjs +3 -3
- package/esm2022/login/pages/login-oauth-grant/login-oauth-grant.component.mjs +3 -3
- package/esm2022/login/pages/login-page-expired/login-page-expired.component.mjs +3 -3
- package/esm2022/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.mjs +3 -3
- package/esm2022/login/pages/login-password/login-password.component.mjs +3 -3
- package/esm2022/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.mjs +3 -3
- package/esm2022/login/pages/login-reset-otp/login-reset-otp.component.mjs +3 -3
- package/esm2022/login/pages/login-reset-password/login-reset-password.component.mjs +3 -3
- package/esm2022/login/pages/login-update-profile/login-update-profile.component.mjs +7 -7
- package/esm2022/login/pages/login-username/login-username.component.mjs +3 -3
- package/esm2022/login/pages/login-verify-email/login-verify-email.component.mjs +3 -3
- package/esm2022/login/pages/register/register.component.mjs +7 -7
- package/esm2022/login/pages/select-authenticator/select-authenticator.component.mjs +3 -3
- package/esm2022/login/pages/update-email/update-email.component.mjs +7 -7
- package/esm2022/login/pages/webauthn-authenticate/webauthn-authenticate.component.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-containers-template.mjs +10 -4
- package/fesm2022/keycloakify-angular-login-containers-template.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-code.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-pages-code.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-error.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-pages-error.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-info.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-pages-info.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs +2 -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 +2 -2
- package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs +2 -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 +2 -2
- package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-password.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-pages-login-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs +2 -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 +2 -2
- package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-username.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-pages-login-username.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-pages-login.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-register.mjs +7 -7
- package/fesm2022/keycloakify-angular-login-pages-register.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-update-email.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-update-email.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs +2 -2
- package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs.map +1 -1
- package/login/containers/template/template.component.d.ts +4 -2
- package/login/login.d.ts +1 -0
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.d.ts +4 -2
- package/login/pages/login-update-profile/login-update-profile.component.d.ts +4 -2
- package/login/pages/register/register.component.d.ts +4 -2
- package/login/pages/update-email/update-email.component.d.ts +4 -2
- package/package.json +7 -7
- package/src/bin/eject-page.ts +23 -4
- package/src/bin/update-kc-gen.ts +14 -1
- package/src/login/containers/template/template.component.html +1 -0
- package/src/login/containers/template/template.component.ts +6 -0
- package/src/login/login.ts +1 -0
- package/src/login/pages/code/code.component.html +1 -0
- package/src/login/pages/delete-credential/delete-credential.component.html +26 -26
- package/src/login/pages/error/error.component.html +16 -17
- 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 -3
- package/src/login/pages/info/info.component.html +2 -2
- package/src/login/pages/login/login.component.html +3 -1
- package/src/login/pages/login-idp-link-email/login-idp-link-email.component.html +2 -0
- package/src/login/pages/login-oauth-grant/login-oauth-grant.component.html +1 -0
- package/src/login/pages/login-page-expired/login-page-expired.component.html +23 -24
- package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.html +166 -165
- package/src/login/pages/login-password/login-password.component.html +68 -69
- package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.html +55 -57
- package/src/login/pages/login-reset-otp/login-reset-otp.component.html +48 -49
- package/src/login/pages/login-reset-password/login-reset-password.component.html +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 +3 -2
- package/src/login/pages/login-username/login-username.component.html +5 -3
- package/src/login/pages/login-verify-email/login-verify-email.component.html +1 -1
- package/src/login/pages/register/register.component.html +2 -2
- package/src/login/pages/register/register.component.ts +3 -2
- package/src/login/pages/select-authenticator/select-authenticator.component.html +32 -32
- package/src/login/pages/update-email/update-email.component.html +1 -1
- package/src/login/pages/update-email/update-email.component.ts +3 -2
- package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.html +1 -0
|
@@ -67,7 +67,7 @@ class WebauthnAuthenticateComponent extends ComponentReference {
|
|
|
67
67
|
provide: ComponentReference,
|
|
68
68
|
useExisting: forwardRef(() => WebauthnAuthenticateComponent)
|
|
69
69
|
}
|
|
70
|
-
], viewQueries: [{ propertyName: "headerNode", first: true, predicate: ["headerNode"], descendants: true, isSignal: true }, { propertyName: "infoNode", first: true, predicate: ["infoNode"], descendants: true, isSignal: true }, { propertyName: "socialProvidersNode", first: true, predicate: ["socialProvidersNode"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@let url = kcContext.url;\n@let authenticators = kcContext.authenticators;\n@let shouldDisplayAuthenticators = kcContext.shouldDisplayAuthenticators;\n\n<ng-template #headerNode>\n {{ i18n.msgStr('webauthn-login-title') }}\n</ng-template>\n<ng-template #infoNode>\n <div id=\"kc-registration\">\n <span>\n {{ i18n.msgStr('noAccount') }}\n <a\n tabIndex=\"6\"\n [href]=\"url.registrationUrl\"\n >\n {{ i18n.msgStr('doRegister') }}\n </a>\n </span>\n </div>\n</ng-template>\n<div\n id=\"kc-form-webauthn\"\n [kcClass]=\"'kcFormClass'\"\n>\n <form\n id=\"webauth\"\n method=\"post\"\n [action]=\"url.loginAction\"\n >\n <input\n type=\"hidden\"\n id=\"clientDataJSON\"\n name=\"clientDataJSON\"\n />\n <input\n type=\"hidden\"\n id=\"authenticatorData\"\n name=\"authenticatorData\"\n />\n <input\n type=\"hidden\"\n id=\"signature\"\n name=\"signature\"\n />\n <input\n type=\"hidden\"\n id=\"credentialId\"\n name=\"credentialId\"\n />\n <input\n type=\"hidden\"\n id=\"userHandle\"\n name=\"userHandle\"\n />\n <input\n type=\"hidden\"\n id=\"error\"\n name=\"error\"\n />\n </form>\n\n <div\n class=\"no-bottom-margin\"\n [kcClass]=\"'kcFormGroupClass'\"\n >\n @if (authenticators) {\n <form\n id=\"authn_select\"\n [kcClass]=\"'kcFormClass'\"\n >\n @for (authenticator of authenticators.authenticators; track authenticator.credentialId) {\n <input\n type=\"hidden\"\n name=\"authn_use_chk\"\n [value]=\"authenticator.credentialId\"\n />\n }\n @if (shouldDisplayAuthenticators) {\n @if (authenticators.authenticators.length > 1) {\n <p [kcClass]=\"'kcSelectAuthListItemTitle'\">\n {{ i18n.msgStr('webauthn-available-authenticators') }}\n </p>\n }\n <div [kcClass]=\"'kcFormOptionsClass'\">\n @for (authenticator of authenticators.authenticators; track authenticator.credentialId; let i = $index) {\n <div\n [id]=\"'kc-webauthn-authenticator-item-' + i\"\n [kcClass]=\"'kcSelectAuthListItemClass'\"\n >\n <div [kcClass]=\"'kcSelectAuthListItemIconClass'\">\n <i\n [ngClass]=\"selectAuthListItemIconClass(authenticator.transports.iconClass)\"\n [kcClass]=\"'kcSelectAuthListItemIconPropertyClass'\"\n ></i>\n <div [kcClass]=\"'kcSelectAuthListItemArrowIconClass'\">\n <div\n [id]=\"'kc-webauthn-authenticator-label-' + i\"\n [kcClass]=\"'kcSelectAuthListItemHeadingClass'\"\n >\n {{ i18n.advancedMsgStr(authenticator.label) }}\n </div>\n @if (authenticator.transports.displayNameProperties?.length) {\n <div\n [id]=\"'kc-webauthn-authenticator-transport-' + i\"\n [kcClass]=\"'kcSelectAuthListItemDescriptionClass'\"\n >\n @for (\n displayNameProperty of authenticator.transports.displayNameProperties;\n track displayNameProperty;\n let last = $last\n ) {\n {{ i18n.advancedMsgStr(displayNameProperty) }}\n @if (!last) {\n <span>, </span>\n }\n }\n </div>\n <div [kcClass]=\"'kcSelectAuthListItemDescriptionClass'\">\n <span [id]=\"'kc-webauthn-authenticator-createdlabel-' + i\">\n {{ i18n.msgStr('webauthn-createdAt-label') }}\n </span>\n <span [id]=\"'kc-webauthn-authenticator-created-' + i\">{{ authenticator.createdAt }}</span>\n </div>\n <div [kcClass]=\"'kcSelectAuthListItemFillClass'\"></div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n </form>\n }\n\n <div\n id=\"kc-form-buttons\"\n [kcClass]=\"'kcFormButtonsClass'\"\n >\n <input\n type=\"button\"\n autofocus\n name=\"cancel-aia\"\n [id]=\"authButtonId\"\n [kcClass]=\"['kcButtonClass', 'kcButtonDefaultClass', 'kcButtonBlockClass', 'kcButtonLargeClass']\"\n [value]=\"i18n.msgStr('webauthn-doAuthenticate')\"\n />\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
70
|
+
], viewQueries: [{ propertyName: "headerNode", first: true, predicate: ["headerNode"], descendants: true, isSignal: true }, { propertyName: "infoNode", first: true, predicate: ["infoNode"], descendants: true, isSignal: true }, { propertyName: "socialProvidersNode", first: true, predicate: ["socialProvidersNode"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@let url = kcContext.url;\n@let authenticators = kcContext.authenticators;\n@let shouldDisplayAuthenticators = kcContext.shouldDisplayAuthenticators;\n\n<ng-template #headerNode>\n {{ i18n.msgStr('webauthn-login-title') }}\n</ng-template>\n<ng-template #infoNode>\n @let url = kcContext.url;\n <div id=\"kc-registration\">\n <span>\n {{ i18n.msgStr('noAccount') }}\n <a\n tabIndex=\"6\"\n [href]=\"url.registrationUrl\"\n >\n {{ i18n.msgStr('doRegister') }}\n </a>\n </span>\n </div>\n</ng-template>\n<div\n id=\"kc-form-webauthn\"\n [kcClass]=\"'kcFormClass'\"\n>\n <form\n id=\"webauth\"\n method=\"post\"\n [action]=\"url.loginAction\"\n >\n <input\n type=\"hidden\"\n id=\"clientDataJSON\"\n name=\"clientDataJSON\"\n />\n <input\n type=\"hidden\"\n id=\"authenticatorData\"\n name=\"authenticatorData\"\n />\n <input\n type=\"hidden\"\n id=\"signature\"\n name=\"signature\"\n />\n <input\n type=\"hidden\"\n id=\"credentialId\"\n name=\"credentialId\"\n />\n <input\n type=\"hidden\"\n id=\"userHandle\"\n name=\"userHandle\"\n />\n <input\n type=\"hidden\"\n id=\"error\"\n name=\"error\"\n />\n </form>\n\n <div\n class=\"no-bottom-margin\"\n [kcClass]=\"'kcFormGroupClass'\"\n >\n @if (authenticators) {\n <form\n id=\"authn_select\"\n [kcClass]=\"'kcFormClass'\"\n >\n @for (authenticator of authenticators.authenticators; track authenticator.credentialId) {\n <input\n type=\"hidden\"\n name=\"authn_use_chk\"\n [value]=\"authenticator.credentialId\"\n />\n }\n @if (shouldDisplayAuthenticators) {\n @if (authenticators.authenticators.length > 1) {\n <p [kcClass]=\"'kcSelectAuthListItemTitle'\">\n {{ i18n.msgStr('webauthn-available-authenticators') }}\n </p>\n }\n <div [kcClass]=\"'kcFormOptionsClass'\">\n @for (authenticator of authenticators.authenticators; track authenticator.credentialId; let i = $index) {\n <div\n [id]=\"'kc-webauthn-authenticator-item-' + i\"\n [kcClass]=\"'kcSelectAuthListItemClass'\"\n >\n <div [kcClass]=\"'kcSelectAuthListItemIconClass'\">\n <i\n [ngClass]=\"selectAuthListItemIconClass(authenticator.transports.iconClass)\"\n [kcClass]=\"'kcSelectAuthListItemIconPropertyClass'\"\n ></i>\n <div [kcClass]=\"'kcSelectAuthListItemArrowIconClass'\">\n <div\n [id]=\"'kc-webauthn-authenticator-label-' + i\"\n [kcClass]=\"'kcSelectAuthListItemHeadingClass'\"\n >\n {{ i18n.advancedMsgStr(authenticator.label) }}\n </div>\n @if (authenticator.transports.displayNameProperties?.length) {\n <div\n [id]=\"'kc-webauthn-authenticator-transport-' + i\"\n [kcClass]=\"'kcSelectAuthListItemDescriptionClass'\"\n >\n @for (\n displayNameProperty of authenticator.transports.displayNameProperties;\n track displayNameProperty;\n let last = $last\n ) {\n {{ i18n.advancedMsgStr(displayNameProperty) }}\n @if (!last) {\n <span>, </span>\n }\n }\n </div>\n <div [kcClass]=\"'kcSelectAuthListItemDescriptionClass'\">\n <span [id]=\"'kc-webauthn-authenticator-createdlabel-' + i\">\n {{ i18n.msgStr('webauthn-createdAt-label') }}\n </span>\n <span [id]=\"'kc-webauthn-authenticator-created-' + i\">{{ authenticator.createdAt }}</span>\n </div>\n <div [kcClass]=\"'kcSelectAuthListItemFillClass'\"></div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n </form>\n }\n\n <div\n id=\"kc-form-buttons\"\n [kcClass]=\"'kcFormButtonsClass'\"\n >\n <input\n type=\"button\"\n autofocus\n name=\"cancel-aia\"\n [id]=\"authButtonId\"\n [kcClass]=\"['kcButtonClass', 'kcButtonDefaultClass', 'kcButtonBlockClass', 'kcButtonLargeClass']\"\n [value]=\"i18n.msgStr('webauthn-doAuthenticate')\"\n />\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
71
71
|
}
|
|
72
72
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: WebauthnAuthenticateComponent, decorators: [{
|
|
73
73
|
type: Component,
|
|
@@ -76,7 +76,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
76
76
|
provide: ComponentReference,
|
|
77
77
|
useExisting: forwardRef(() => WebauthnAuthenticateComponent)
|
|
78
78
|
}
|
|
79
|
-
], template: "@let url = kcContext.url;\n@let authenticators = kcContext.authenticators;\n@let shouldDisplayAuthenticators = kcContext.shouldDisplayAuthenticators;\n\n<ng-template #headerNode>\n {{ i18n.msgStr('webauthn-login-title') }}\n</ng-template>\n<ng-template #infoNode>\n <div id=\"kc-registration\">\n <span>\n {{ i18n.msgStr('noAccount') }}\n <a\n tabIndex=\"6\"\n [href]=\"url.registrationUrl\"\n >\n {{ i18n.msgStr('doRegister') }}\n </a>\n </span>\n </div>\n</ng-template>\n<div\n id=\"kc-form-webauthn\"\n [kcClass]=\"'kcFormClass'\"\n>\n <form\n id=\"webauth\"\n method=\"post\"\n [action]=\"url.loginAction\"\n >\n <input\n type=\"hidden\"\n id=\"clientDataJSON\"\n name=\"clientDataJSON\"\n />\n <input\n type=\"hidden\"\n id=\"authenticatorData\"\n name=\"authenticatorData\"\n />\n <input\n type=\"hidden\"\n id=\"signature\"\n name=\"signature\"\n />\n <input\n type=\"hidden\"\n id=\"credentialId\"\n name=\"credentialId\"\n />\n <input\n type=\"hidden\"\n id=\"userHandle\"\n name=\"userHandle\"\n />\n <input\n type=\"hidden\"\n id=\"error\"\n name=\"error\"\n />\n </form>\n\n <div\n class=\"no-bottom-margin\"\n [kcClass]=\"'kcFormGroupClass'\"\n >\n @if (authenticators) {\n <form\n id=\"authn_select\"\n [kcClass]=\"'kcFormClass'\"\n >\n @for (authenticator of authenticators.authenticators; track authenticator.credentialId) {\n <input\n type=\"hidden\"\n name=\"authn_use_chk\"\n [value]=\"authenticator.credentialId\"\n />\n }\n @if (shouldDisplayAuthenticators) {\n @if (authenticators.authenticators.length > 1) {\n <p [kcClass]=\"'kcSelectAuthListItemTitle'\">\n {{ i18n.msgStr('webauthn-available-authenticators') }}\n </p>\n }\n <div [kcClass]=\"'kcFormOptionsClass'\">\n @for (authenticator of authenticators.authenticators; track authenticator.credentialId; let i = $index) {\n <div\n [id]=\"'kc-webauthn-authenticator-item-' + i\"\n [kcClass]=\"'kcSelectAuthListItemClass'\"\n >\n <div [kcClass]=\"'kcSelectAuthListItemIconClass'\">\n <i\n [ngClass]=\"selectAuthListItemIconClass(authenticator.transports.iconClass)\"\n [kcClass]=\"'kcSelectAuthListItemIconPropertyClass'\"\n ></i>\n <div [kcClass]=\"'kcSelectAuthListItemArrowIconClass'\">\n <div\n [id]=\"'kc-webauthn-authenticator-label-' + i\"\n [kcClass]=\"'kcSelectAuthListItemHeadingClass'\"\n >\n {{ i18n.advancedMsgStr(authenticator.label) }}\n </div>\n @if (authenticator.transports.displayNameProperties?.length) {\n <div\n [id]=\"'kc-webauthn-authenticator-transport-' + i\"\n [kcClass]=\"'kcSelectAuthListItemDescriptionClass'\"\n >\n @for (\n displayNameProperty of authenticator.transports.displayNameProperties;\n track displayNameProperty;\n let last = $last\n ) {\n {{ i18n.advancedMsgStr(displayNameProperty) }}\n @if (!last) {\n <span>, </span>\n }\n }\n </div>\n <div [kcClass]=\"'kcSelectAuthListItemDescriptionClass'\">\n <span [id]=\"'kc-webauthn-authenticator-createdlabel-' + i\">\n {{ i18n.msgStr('webauthn-createdAt-label') }}\n </span>\n <span [id]=\"'kc-webauthn-authenticator-created-' + i\">{{ authenticator.createdAt }}</span>\n </div>\n <div [kcClass]=\"'kcSelectAuthListItemFillClass'\"></div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n </form>\n }\n\n <div\n id=\"kc-form-buttons\"\n [kcClass]=\"'kcFormButtonsClass'\"\n >\n <input\n type=\"button\"\n autofocus\n name=\"cancel-aia\"\n [id]=\"authButtonId\"\n [kcClass]=\"['kcButtonClass', 'kcButtonDefaultClass', 'kcButtonBlockClass', 'kcButtonLargeClass']\"\n [value]=\"i18n.msgStr('webauthn-doAuthenticate')\"\n />\n </div>\n </div>\n</div>\n" }]
|
|
79
|
+
], template: "@let url = kcContext.url;\n@let authenticators = kcContext.authenticators;\n@let shouldDisplayAuthenticators = kcContext.shouldDisplayAuthenticators;\n\n<ng-template #headerNode>\n {{ i18n.msgStr('webauthn-login-title') }}\n</ng-template>\n<ng-template #infoNode>\n @let url = kcContext.url;\n <div id=\"kc-registration\">\n <span>\n {{ i18n.msgStr('noAccount') }}\n <a\n tabIndex=\"6\"\n [href]=\"url.registrationUrl\"\n >\n {{ i18n.msgStr('doRegister') }}\n </a>\n </span>\n </div>\n</ng-template>\n<div\n id=\"kc-form-webauthn\"\n [kcClass]=\"'kcFormClass'\"\n>\n <form\n id=\"webauth\"\n method=\"post\"\n [action]=\"url.loginAction\"\n >\n <input\n type=\"hidden\"\n id=\"clientDataJSON\"\n name=\"clientDataJSON\"\n />\n <input\n type=\"hidden\"\n id=\"authenticatorData\"\n name=\"authenticatorData\"\n />\n <input\n type=\"hidden\"\n id=\"signature\"\n name=\"signature\"\n />\n <input\n type=\"hidden\"\n id=\"credentialId\"\n name=\"credentialId\"\n />\n <input\n type=\"hidden\"\n id=\"userHandle\"\n name=\"userHandle\"\n />\n <input\n type=\"hidden\"\n id=\"error\"\n name=\"error\"\n />\n </form>\n\n <div\n class=\"no-bottom-margin\"\n [kcClass]=\"'kcFormGroupClass'\"\n >\n @if (authenticators) {\n <form\n id=\"authn_select\"\n [kcClass]=\"'kcFormClass'\"\n >\n @for (authenticator of authenticators.authenticators; track authenticator.credentialId) {\n <input\n type=\"hidden\"\n name=\"authn_use_chk\"\n [value]=\"authenticator.credentialId\"\n />\n }\n @if (shouldDisplayAuthenticators) {\n @if (authenticators.authenticators.length > 1) {\n <p [kcClass]=\"'kcSelectAuthListItemTitle'\">\n {{ i18n.msgStr('webauthn-available-authenticators') }}\n </p>\n }\n <div [kcClass]=\"'kcFormOptionsClass'\">\n @for (authenticator of authenticators.authenticators; track authenticator.credentialId; let i = $index) {\n <div\n [id]=\"'kc-webauthn-authenticator-item-' + i\"\n [kcClass]=\"'kcSelectAuthListItemClass'\"\n >\n <div [kcClass]=\"'kcSelectAuthListItemIconClass'\">\n <i\n [ngClass]=\"selectAuthListItemIconClass(authenticator.transports.iconClass)\"\n [kcClass]=\"'kcSelectAuthListItemIconPropertyClass'\"\n ></i>\n <div [kcClass]=\"'kcSelectAuthListItemArrowIconClass'\">\n <div\n [id]=\"'kc-webauthn-authenticator-label-' + i\"\n [kcClass]=\"'kcSelectAuthListItemHeadingClass'\"\n >\n {{ i18n.advancedMsgStr(authenticator.label) }}\n </div>\n @if (authenticator.transports.displayNameProperties?.length) {\n <div\n [id]=\"'kc-webauthn-authenticator-transport-' + i\"\n [kcClass]=\"'kcSelectAuthListItemDescriptionClass'\"\n >\n @for (\n displayNameProperty of authenticator.transports.displayNameProperties;\n track displayNameProperty;\n let last = $last\n ) {\n {{ i18n.advancedMsgStr(displayNameProperty) }}\n @if (!last) {\n <span>, </span>\n }\n }\n </div>\n <div [kcClass]=\"'kcSelectAuthListItemDescriptionClass'\">\n <span [id]=\"'kc-webauthn-authenticator-createdlabel-' + i\">\n {{ i18n.msgStr('webauthn-createdAt-label') }}\n </span>\n <span [id]=\"'kc-webauthn-authenticator-created-' + i\">{{ authenticator.createdAt }}</span>\n </div>\n <div [kcClass]=\"'kcSelectAuthListItemFillClass'\"></div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n </form>\n }\n\n <div\n id=\"kc-form-buttons\"\n [kcClass]=\"'kcFormButtonsClass'\"\n >\n <input\n type=\"button\"\n autofocus\n name=\"cancel-aia\"\n [id]=\"authButtonId\"\n [kcClass]=\"['kcButtonClass', 'kcButtonDefaultClass', 'kcButtonBlockClass', 'kcButtonLargeClass']\"\n [value]=\"i18n.msgStr('webauthn-doAuthenticate')\"\n />\n </div>\n </div>\n</div>\n" }]
|
|
80
80
|
}], ctorParameters: () => [] });
|
|
81
81
|
|
|
82
82
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keycloakify-angular-login-pages-webauthn-authenticate.mjs","sources":["../../src/login/pages/webauthn-authenticate/webauthn-authenticate.component.ts","../../src/login/pages/webauthn-authenticate/webauthn-authenticate.component.html","../../src/login/pages/webauthn-authenticate/keycloakify-angular-login-pages-webauthn-authenticate.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, forwardRef, inject, type TemplateRef, viewChild } from '@angular/core';\nimport { type Script } from '@keycloakify/angular/lib/models/script';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport { LogoutOtherSessionsComponent } from '@keycloakify/angular/login/components/logout-other-sessions';\nimport { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\nimport type { KcContext } from '@keycloakify/angular/login/KcContext';\nimport { LoginResourceInjectorService } from '@keycloakify/angular/login/services/login-resource-injector';\nimport { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';\nimport { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';\nimport { KC_LOGIN_CONTEXT } from '@keycloakify/angular/login/tokens/kc-context';\nimport { type ClassKey, getKcClsx } from 'keycloakify/login/lib/kcClsx';\n\n@Component({\n standalone: true,\n imports: [KcClassDirective, LogoutOtherSessionsComponent],\n selector: 'kc-webauthn-authenticate',\n templateUrl: 'webauthn-authenticate.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => WebauthnAuthenticateComponent)\n }\n ]\n})\nexport class WebauthnAuthenticateComponent extends ComponentReference {\n kcContext = inject<Extract<KcContext, { pageId: 'webauthn-authenticate.ftl' }>>(KC_LOGIN_CONTEXT);\n loginResourceInjectorService = inject(LoginResourceInjectorService);\n i18n = inject<I18n>(LOGIN_I18N);\n\n override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);\n override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);\n\n documentTitle: string | undefined;\n bodyClassName: string | undefined;\n\n displayRequiredFields = false;\n displayInfo = false;\n displayMessage = true;\n\n headerNode? = viewChild<TemplateRef<HTMLElement>>('headerNode');\n infoNode? = viewChild<TemplateRef<HTMLElement>>('infoNode');\n socialProvidersNode? = viewChild<TemplateRef<HTMLElement>>('socialProvidersNode');\n\n authButtonId = 'authenticateWebAuthnButton';\n\n constructor() {\n super();\n const { url, isUserIdentified, challenge, userVerification, rpId, createTimeout } = this.kcContext;\n const scripts: Script[] = [\n {\n type: 'module',\n id: 'WebAuthnAuthenticateScript',\n textContent: `\n import { authenticateByWebAuthn } from \"${url.resourcesPath}/js/webauthnAuthenticate.js\";\n const authButton = document.getElementById('${this.authButtonId}');\n authButton.addEventListener(\"click\", function() {\n const input = {\n isUserIdentified : ${isUserIdentified},\n challenge : '${challenge}',\n userVerification : '${userVerification}',\n rpId : '${rpId}',\n createTimeout : ${createTimeout},\n errmsg : ${JSON.stringify(this.i18n.msgStr('webauthn-unsupported-browser-text'))}\n };\n authenticateByWebAuthn(input);\n });\n `\n }\n ];\n this.loginResourceInjectorService.insertAdditionalScripts(scripts);\n }\n\n selectAuthListItemIconClass(iconClass: string) {\n const kcClsx = getKcClsx({\n doUseDefaultCss: this.doUseDefaultCss ?? true,\n classes: this.classes\n }).kcClsx;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const className = kcClsx(iconClass as any);\n if (className === iconClass) {\n return kcClsx('kcWebAuthnDefaultIcon');\n }\n return className;\n }\n}\n","@let url = kcContext.url;\n@let authenticators = kcContext.authenticators;\n@let shouldDisplayAuthenticators = kcContext.shouldDisplayAuthenticators;\n\n<ng-template #headerNode>\n {{ i18n.msgStr('webauthn-login-title') }}\n</ng-template>\n<ng-template #infoNode>\n <div id=\"kc-registration\">\n <span>\n {{ i18n.msgStr('noAccount') }}\n <a\n tabIndex=\"6\"\n [href]=\"url.registrationUrl\"\n >\n {{ i18n.msgStr('doRegister') }}\n </a>\n </span>\n </div>\n</ng-template>\n<div\n id=\"kc-form-webauthn\"\n [kcClass]=\"'kcFormClass'\"\n>\n <form\n id=\"webauth\"\n method=\"post\"\n [action]=\"url.loginAction\"\n >\n <input\n type=\"hidden\"\n id=\"clientDataJSON\"\n name=\"clientDataJSON\"\n />\n <input\n type=\"hidden\"\n id=\"authenticatorData\"\n name=\"authenticatorData\"\n />\n <input\n type=\"hidden\"\n id=\"signature\"\n name=\"signature\"\n />\n <input\n type=\"hidden\"\n id=\"credentialId\"\n name=\"credentialId\"\n />\n <input\n type=\"hidden\"\n id=\"userHandle\"\n name=\"userHandle\"\n />\n <input\n type=\"hidden\"\n id=\"error\"\n name=\"error\"\n />\n </form>\n\n <div\n class=\"no-bottom-margin\"\n [kcClass]=\"'kcFormGroupClass'\"\n >\n @if (authenticators) {\n <form\n id=\"authn_select\"\n [kcClass]=\"'kcFormClass'\"\n >\n @for (authenticator of authenticators.authenticators; track authenticator.credentialId) {\n <input\n type=\"hidden\"\n name=\"authn_use_chk\"\n [value]=\"authenticator.credentialId\"\n />\n }\n @if (shouldDisplayAuthenticators) {\n @if (authenticators.authenticators.length > 1) {\n <p [kcClass]=\"'kcSelectAuthListItemTitle'\">\n {{ i18n.msgStr('webauthn-available-authenticators') }}\n </p>\n }\n <div [kcClass]=\"'kcFormOptionsClass'\">\n @for (authenticator of authenticators.authenticators; track authenticator.credentialId; let i = $index) {\n <div\n [id]=\"'kc-webauthn-authenticator-item-' + i\"\n [kcClass]=\"'kcSelectAuthListItemClass'\"\n >\n <div [kcClass]=\"'kcSelectAuthListItemIconClass'\">\n <i\n [ngClass]=\"selectAuthListItemIconClass(authenticator.transports.iconClass)\"\n [kcClass]=\"'kcSelectAuthListItemIconPropertyClass'\"\n ></i>\n <div [kcClass]=\"'kcSelectAuthListItemArrowIconClass'\">\n <div\n [id]=\"'kc-webauthn-authenticator-label-' + i\"\n [kcClass]=\"'kcSelectAuthListItemHeadingClass'\"\n >\n {{ i18n.advancedMsgStr(authenticator.label) }}\n </div>\n @if (authenticator.transports.displayNameProperties?.length) {\n <div\n [id]=\"'kc-webauthn-authenticator-transport-' + i\"\n [kcClass]=\"'kcSelectAuthListItemDescriptionClass'\"\n >\n @for (\n displayNameProperty of authenticator.transports.displayNameProperties;\n track displayNameProperty;\n let last = $last\n ) {\n {{ i18n.advancedMsgStr(displayNameProperty) }}\n @if (!last) {\n <span>, </span>\n }\n }\n </div>\n <div [kcClass]=\"'kcSelectAuthListItemDescriptionClass'\">\n <span [id]=\"'kc-webauthn-authenticator-createdlabel-' + i\">\n {{ i18n.msgStr('webauthn-createdAt-label') }}\n </span>\n <span [id]=\"'kc-webauthn-authenticator-created-' + i\">{{ authenticator.createdAt }}</span>\n </div>\n <div [kcClass]=\"'kcSelectAuthListItemFillClass'\"></div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n </form>\n }\n\n <div\n id=\"kc-form-buttons\"\n [kcClass]=\"'kcFormButtonsClass'\"\n >\n <input\n type=\"button\"\n autofocus\n name=\"cancel-aia\"\n [id]=\"authButtonId\"\n [kcClass]=\"['kcButtonClass', 'kcButtonDefaultClass', 'kcButtonBlockClass', 'kcButtonLargeClass']\"\n [value]=\"i18n.msgStr('webauthn-doAuthenticate')\"\n />\n </div>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AA2BM,MAAO,6BAA8B,SAAQ,kBAAkB,CAAA;AAqBjE,IAAA,WAAA,GAAA;AACI,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EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,EAAA,EAAA,YAAA,EAAA,qBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,ktMAqJA,4CDrIc,gBAAgB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAWjB,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAbzC,SAAS;AACM,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,gBAAgB,EAAE,4BAA4B,CAAC,EAC/C,QAAA,EAAA,0BAA0B,EAEnB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACpC,SAAA,EAAA;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,kBAAkB;AAC3B,4BAAA,WAAW,EAAE,UAAU,CAAC,mCAAmC,CAAC;AAC/D,yBAAA;AACJ,qBAAA,EAAA,QAAA,EAAA,ktMAAA,EAAA,CAAA;;;AEzBL;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"keycloakify-angular-login-pages-webauthn-authenticate.mjs","sources":["../../src/login/pages/webauthn-authenticate/webauthn-authenticate.component.ts","../../src/login/pages/webauthn-authenticate/webauthn-authenticate.component.html","../../src/login/pages/webauthn-authenticate/keycloakify-angular-login-pages-webauthn-authenticate.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, forwardRef, inject, type TemplateRef, viewChild } from '@angular/core';\nimport { type Script } from '@keycloakify/angular/lib/models/script';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport { LogoutOtherSessionsComponent } from '@keycloakify/angular/login/components/logout-other-sessions';\nimport { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\nimport type { KcContext } from '@keycloakify/angular/login/KcContext';\nimport { LoginResourceInjectorService } from '@keycloakify/angular/login/services/login-resource-injector';\nimport { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';\nimport { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';\nimport { KC_LOGIN_CONTEXT } from '@keycloakify/angular/login/tokens/kc-context';\nimport { type ClassKey, getKcClsx } from 'keycloakify/login/lib/kcClsx';\n\n@Component({\n standalone: true,\n imports: [KcClassDirective, LogoutOtherSessionsComponent],\n selector: 'kc-webauthn-authenticate',\n templateUrl: 'webauthn-authenticate.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => WebauthnAuthenticateComponent)\n }\n ]\n})\nexport class WebauthnAuthenticateComponent extends ComponentReference {\n kcContext = inject<Extract<KcContext, { pageId: 'webauthn-authenticate.ftl' }>>(KC_LOGIN_CONTEXT);\n loginResourceInjectorService = inject(LoginResourceInjectorService);\n i18n = inject<I18n>(LOGIN_I18N);\n\n override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);\n override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);\n\n documentTitle: string | undefined;\n bodyClassName: string | undefined;\n\n displayRequiredFields = false;\n displayInfo = false;\n displayMessage = true;\n\n headerNode? = viewChild<TemplateRef<HTMLElement>>('headerNode');\n infoNode? = viewChild<TemplateRef<HTMLElement>>('infoNode');\n socialProvidersNode? = viewChild<TemplateRef<HTMLElement>>('socialProvidersNode');\n\n authButtonId = 'authenticateWebAuthnButton';\n\n constructor() {\n super();\n const { url, isUserIdentified, challenge, userVerification, rpId, createTimeout } = this.kcContext;\n const scripts: Script[] = [\n {\n type: 'module',\n id: 'WebAuthnAuthenticateScript',\n textContent: `\n import { authenticateByWebAuthn } from \"${url.resourcesPath}/js/webauthnAuthenticate.js\";\n const authButton = document.getElementById('${this.authButtonId}');\n authButton.addEventListener(\"click\", function() {\n const input = {\n isUserIdentified : ${isUserIdentified},\n challenge : '${challenge}',\n userVerification : '${userVerification}',\n rpId : '${rpId}',\n createTimeout : ${createTimeout},\n errmsg : ${JSON.stringify(this.i18n.msgStr('webauthn-unsupported-browser-text'))}\n };\n authenticateByWebAuthn(input);\n });\n `\n }\n ];\n this.loginResourceInjectorService.insertAdditionalScripts(scripts);\n }\n\n selectAuthListItemIconClass(iconClass: string) {\n const kcClsx = getKcClsx({\n doUseDefaultCss: this.doUseDefaultCss ?? true,\n classes: this.classes\n }).kcClsx;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const className = kcClsx(iconClass as any);\n if (className === iconClass) {\n return kcClsx('kcWebAuthnDefaultIcon');\n }\n return className;\n }\n}\n","@let url = kcContext.url;\n@let authenticators = kcContext.authenticators;\n@let shouldDisplayAuthenticators = kcContext.shouldDisplayAuthenticators;\n\n<ng-template #headerNode>\n {{ i18n.msgStr('webauthn-login-title') }}\n</ng-template>\n<ng-template #infoNode>\n @let url = kcContext.url;\n <div id=\"kc-registration\">\n <span>\n {{ i18n.msgStr('noAccount') }}\n <a\n tabIndex=\"6\"\n [href]=\"url.registrationUrl\"\n >\n {{ i18n.msgStr('doRegister') }}\n </a>\n </span>\n </div>\n</ng-template>\n<div\n id=\"kc-form-webauthn\"\n [kcClass]=\"'kcFormClass'\"\n>\n <form\n id=\"webauth\"\n method=\"post\"\n [action]=\"url.loginAction\"\n >\n <input\n type=\"hidden\"\n id=\"clientDataJSON\"\n name=\"clientDataJSON\"\n />\n <input\n type=\"hidden\"\n id=\"authenticatorData\"\n name=\"authenticatorData\"\n />\n <input\n type=\"hidden\"\n id=\"signature\"\n name=\"signature\"\n />\n <input\n type=\"hidden\"\n id=\"credentialId\"\n name=\"credentialId\"\n />\n <input\n type=\"hidden\"\n id=\"userHandle\"\n name=\"userHandle\"\n />\n <input\n type=\"hidden\"\n id=\"error\"\n name=\"error\"\n />\n </form>\n\n <div\n class=\"no-bottom-margin\"\n [kcClass]=\"'kcFormGroupClass'\"\n >\n @if (authenticators) {\n <form\n id=\"authn_select\"\n [kcClass]=\"'kcFormClass'\"\n >\n @for (authenticator of authenticators.authenticators; track authenticator.credentialId) {\n <input\n type=\"hidden\"\n name=\"authn_use_chk\"\n [value]=\"authenticator.credentialId\"\n />\n }\n @if (shouldDisplayAuthenticators) {\n @if (authenticators.authenticators.length > 1) {\n <p [kcClass]=\"'kcSelectAuthListItemTitle'\">\n {{ i18n.msgStr('webauthn-available-authenticators') }}\n </p>\n }\n <div [kcClass]=\"'kcFormOptionsClass'\">\n @for (authenticator of authenticators.authenticators; track authenticator.credentialId; let i = $index) {\n <div\n [id]=\"'kc-webauthn-authenticator-item-' + i\"\n [kcClass]=\"'kcSelectAuthListItemClass'\"\n >\n <div [kcClass]=\"'kcSelectAuthListItemIconClass'\">\n <i\n [ngClass]=\"selectAuthListItemIconClass(authenticator.transports.iconClass)\"\n [kcClass]=\"'kcSelectAuthListItemIconPropertyClass'\"\n ></i>\n <div [kcClass]=\"'kcSelectAuthListItemArrowIconClass'\">\n <div\n [id]=\"'kc-webauthn-authenticator-label-' + i\"\n [kcClass]=\"'kcSelectAuthListItemHeadingClass'\"\n >\n {{ i18n.advancedMsgStr(authenticator.label) }}\n </div>\n @if (authenticator.transports.displayNameProperties?.length) {\n <div\n [id]=\"'kc-webauthn-authenticator-transport-' + i\"\n [kcClass]=\"'kcSelectAuthListItemDescriptionClass'\"\n >\n @for (\n displayNameProperty of authenticator.transports.displayNameProperties;\n track displayNameProperty;\n let last = $last\n ) {\n {{ i18n.advancedMsgStr(displayNameProperty) }}\n @if (!last) {\n <span>, </span>\n }\n }\n </div>\n <div [kcClass]=\"'kcSelectAuthListItemDescriptionClass'\">\n <span [id]=\"'kc-webauthn-authenticator-createdlabel-' + i\">\n {{ i18n.msgStr('webauthn-createdAt-label') }}\n </span>\n <span [id]=\"'kc-webauthn-authenticator-created-' + i\">{{ authenticator.createdAt }}</span>\n </div>\n <div [kcClass]=\"'kcSelectAuthListItemFillClass'\"></div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n </form>\n }\n\n <div\n id=\"kc-form-buttons\"\n [kcClass]=\"'kcFormButtonsClass'\"\n >\n <input\n type=\"button\"\n autofocus\n name=\"cancel-aia\"\n [id]=\"authButtonId\"\n [kcClass]=\"['kcButtonClass', 'kcButtonDefaultClass', 'kcButtonBlockClass', 'kcButtonLargeClass']\"\n [value]=\"i18n.msgStr('webauthn-doAuthenticate')\"\n />\n </div>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AA2BM,MAAO,6BAA8B,SAAQ,kBAAkB,CAAA;AAqBjE,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE,CAAC;AArBZ,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAA8D,gBAAgB,CAAC,CAAC;AAClG,QAAA,IAAA,CAAA,4BAA4B,GAAG,MAAM,CAAC,4BAA4B,CAAC,CAAC;AACpE,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAO,UAAU,CAAC,CAAC;AAEvB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAU,eAAe,CAAC,CAAC;AACnD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAoC,aAAa,CAAC,CAAC;QAK5E,IAAqB,CAAA,qBAAA,GAAG,KAAK,CAAC;QAC9B,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;QACpB,IAAc,CAAA,cAAA,GAAG,IAAI,CAAC;AAEtB,QAAA,IA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AA,CAAA,EAAA;;2FAWjB,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAbzC,SAAS;AACM,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,gBAAgB,EAAE,4BAA4B,CAAC,EAC/C,QAAA,EAAA,0BAA0B,EAEnB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACpC,SAAA,EAAA;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,kBAAkB;AAC3B,4BAAA,WAAW,EAAE,UAAU,CAAC,mCAAmC,CAAC;AAC/D,yBAAA;AACJ,qBAAA,EAAA,QAAA,EAAA,ivMAAA,EAAA,CAAA;;;AEzBL;;AAEG;;;;"}
|
|
@@ -10,10 +10,11 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
export declare class DynamicPageInjectorComponent {
|
|
11
11
|
#private;
|
|
12
12
|
page: import("@angular/core").InputSignal<Type<unknown> | undefined>;
|
|
13
|
+
userProfileFormFields: import("@angular/core").InputSignal<Type<unknown> | undefined>;
|
|
13
14
|
componentCreated: import("@angular/core").OutputEmitterRef<object>;
|
|
14
15
|
constructor();
|
|
15
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicPageInjectorComponent, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicPageInjectorComponent, "kc-dynamic-page-injector", never, { "page": { "alias": "page"; "required": false; "isSignal": true; }; }, { "componentCreated": "componentCreated"; }, never, never, true, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicPageInjectorComponent, "kc-dynamic-page-injector", never, { "page": { "alias": "page"; "required": false; "isSignal": true; }; "userProfileFormFields": { "alias": "userProfileFormFields"; "required": false; "isSignal": true; }; }, { "componentCreated": "componentCreated"; }, never, never, true, never>;
|
|
17
18
|
}
|
|
18
19
|
export declare class TemplateComponent extends ComponentReference implements OnInit {
|
|
19
20
|
#private;
|
|
@@ -32,6 +33,7 @@ export declare class TemplateComponent extends ComponentReference implements OnI
|
|
|
32
33
|
bodyClassName: string | undefined;
|
|
33
34
|
isReadyToRender$: Observable<boolean>;
|
|
34
35
|
page: import("@angular/core").InputSignal<Type<unknown> | undefined>;
|
|
36
|
+
userProfileFormFields: import("@angular/core").InputSignal<Type<unknown> | undefined>;
|
|
35
37
|
headerNode: Signal<TemplateRef<HTMLElement>> | undefined;
|
|
36
38
|
infoNode: Signal<TemplateRef<HTMLElement>> | undefined;
|
|
37
39
|
socialProvidersNode: Signal<TemplateRef<HTMLElement>> | undefined;
|
|
@@ -41,5 +43,5 @@ export declare class TemplateComponent extends ComponentReference implements OnI
|
|
|
41
43
|
tryAnotherWay(): void;
|
|
42
44
|
onComponentCreated(compRef: object): void;
|
|
43
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<TemplateComponent, never>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TemplateComponent, "kc-root", never, { "page": { "alias": "page"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TemplateComponent, "kc-root", never, { "page": { "alias": "page"; "required": false; "isSignal": true; }; "userProfileFormFields": { "alias": "userProfileFormFields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
45
47
|
}
|
package/login/login.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type TemplateRef } from '@angular/core';
|
|
1
|
+
import { type TemplateRef, Type } from '@angular/core';
|
|
2
2
|
import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
|
|
3
|
+
import type { UserProfileFormFieldsComponent } from '@keycloakify/angular/login/components/user-profile-form-fields';
|
|
3
4
|
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
4
5
|
import type { KcContext } from '@keycloakify/angular/login/KcContext';
|
|
5
6
|
import type { ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
@@ -18,9 +19,10 @@ export declare class IdpReviewUserProfileComponent extends ComponentReference {
|
|
|
18
19
|
headerNode?: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined> | undefined;
|
|
19
20
|
infoNode?: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined> | undefined;
|
|
20
21
|
socialProvidersNode?: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined> | undefined;
|
|
22
|
+
userProfileFormFields: import("@angular/core").InputSignal<Type<UserProfileFormFieldsComponent> | undefined>;
|
|
21
23
|
isFormSubmittable: import("@angular/core").WritableSignal<boolean>;
|
|
22
24
|
constructor();
|
|
23
25
|
onCallback(): void;
|
|
24
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<IdpReviewUserProfileComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<IdpReviewUserProfileComponent, "kc-idp-review-user-profile", never, {}, {}, never, never, true, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IdpReviewUserProfileComponent, "kc-idp-review-user-profile", never, { "userProfileFormFields": { "alias": "userProfileFormFields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
26
28
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type TemplateRef } from '@angular/core';
|
|
1
|
+
import { type TemplateRef, Type } from '@angular/core';
|
|
2
2
|
import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
|
|
3
|
+
import { UserProfileFormFieldsComponent } from '@keycloakify/angular/login/components/user-profile-form-fields';
|
|
3
4
|
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
4
5
|
import type { KcContext } from '@keycloakify/angular/login/KcContext';
|
|
5
6
|
import type { ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
@@ -19,7 +20,8 @@ export declare class LoginUpdateProfileComponent extends ComponentReference {
|
|
|
19
20
|
infoNode?: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined> | undefined;
|
|
20
21
|
socialProvidersNode?: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined> | undefined;
|
|
21
22
|
isFormSubmittable: import("@angular/core").WritableSignal<boolean>;
|
|
23
|
+
userProfileFormFields: import("@angular/core").InputSignal<Type<UserProfileFormFieldsComponent> | undefined>;
|
|
22
24
|
constructor();
|
|
23
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoginUpdateProfileComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LoginUpdateProfileComponent, "kc-login-update-profile", never, {}, {}, never, never, true, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoginUpdateProfileComponent, "kc-login-update-profile", never, { "userProfileFormFields": { "alias": "userProfileFormFields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
25
27
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type TemplateRef } from '@angular/core';
|
|
1
|
+
import { type TemplateRef, Type } from '@angular/core';
|
|
2
2
|
import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
|
|
3
|
+
import { UserProfileFormFieldsComponent } from '@keycloakify/angular/login/components/user-profile-form-fields';
|
|
3
4
|
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
4
5
|
import type { KcContext } from '@keycloakify/angular/login/KcContext';
|
|
5
6
|
import type { ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
@@ -20,8 +21,9 @@ export declare class RegisterComponent extends ComponentReference {
|
|
|
20
21
|
socialProvidersNode?: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined> | undefined;
|
|
21
22
|
isFormSubmittable: import("@angular/core").WritableSignal<boolean>;
|
|
22
23
|
areTermsAccepted: import("@angular/core").WritableSignal<boolean>;
|
|
24
|
+
userProfileFormFields: import("@angular/core").InputSignal<Type<UserProfileFormFieldsComponent> | undefined>;
|
|
23
25
|
constructor();
|
|
24
26
|
onCallback(): void;
|
|
25
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<RegisterComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RegisterComponent, "kc-register", never, {}, {}, never, never, true, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RegisterComponent, "kc-register", never, { "userProfileFormFields": { "alias": "userProfileFormFields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
27
29
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type TemplateRef } from '@angular/core';
|
|
1
|
+
import { type TemplateRef, Type } from '@angular/core';
|
|
2
2
|
import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
|
|
3
|
+
import { UserProfileFormFieldsComponent } from '@keycloakify/angular/login/components/user-profile-form-fields';
|
|
3
4
|
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
4
5
|
import type { KcContext } from '@keycloakify/angular/login/KcContext';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
@@ -15,8 +16,9 @@ export declare class UpdateEmailComponent extends ComponentReference {
|
|
|
15
16
|
headerNode?: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined> | undefined;
|
|
16
17
|
infoNode?: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined> | undefined;
|
|
17
18
|
socialProvidersNode?: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined> | undefined;
|
|
19
|
+
userProfileFormFields: import("@angular/core").InputSignal<Type<UserProfileFormFieldsComponent> | undefined>;
|
|
18
20
|
isFormSubmittable: import("@angular/core").WritableSignal<boolean>;
|
|
19
21
|
constructor();
|
|
20
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<UpdateEmailComponent, never>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UpdateEmailComponent, "kc-update-email", never, {}, {}, never, never, true, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UpdateEmailComponent, "kc-update-email", never, { "userProfileFormFields": { "alias": "userProfileFormFields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
22
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keycloakify/angular",
|
|
3
|
-
"version": "0.0.1-rc.
|
|
3
|
+
"version": "0.0.1-rc.24",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"keycloakify": "^11.3.2",
|
|
6
6
|
"@angular/core": "^18.0.0",
|
|
@@ -309,12 +309,6 @@
|
|
|
309
309
|
"esm": "./esm2022/login/directives/kc-class/keycloakify-angular-login-directives-kc-class.mjs",
|
|
310
310
|
"default": "./fesm2022/keycloakify-angular-login-directives-kc-class.mjs"
|
|
311
311
|
},
|
|
312
|
-
"./login/providers/keycloakify-angular": {
|
|
313
|
-
"types": "./login/providers/keycloakify-angular/index.d.ts",
|
|
314
|
-
"esm2022": "./esm2022/login/providers/keycloakify-angular/keycloakify-angular-login-providers-keycloakify-angular.mjs",
|
|
315
|
-
"esm": "./esm2022/login/providers/keycloakify-angular/keycloakify-angular-login-providers-keycloakify-angular.mjs",
|
|
316
|
-
"default": "./fesm2022/keycloakify-angular-login-providers-keycloakify-angular.mjs"
|
|
317
|
-
},
|
|
318
312
|
"./login/pages/code": {
|
|
319
313
|
"types": "./login/pages/code/index.d.ts",
|
|
320
314
|
"esm2022": "./esm2022/login/pages/code/keycloakify-angular-login-pages-code.mjs",
|
|
@@ -531,6 +525,12 @@
|
|
|
531
525
|
"esm": "./esm2022/login/pages/webauthn-register/keycloakify-angular-login-pages-webauthn-register.mjs",
|
|
532
526
|
"default": "./fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs"
|
|
533
527
|
},
|
|
528
|
+
"./login/providers/keycloakify-angular": {
|
|
529
|
+
"types": "./login/providers/keycloakify-angular/index.d.ts",
|
|
530
|
+
"esm2022": "./esm2022/login/providers/keycloakify-angular/keycloakify-angular-login-providers-keycloakify-angular.mjs",
|
|
531
|
+
"esm": "./esm2022/login/providers/keycloakify-angular/keycloakify-angular-login-providers-keycloakify-angular.mjs",
|
|
532
|
+
"default": "./fesm2022/keycloakify-angular-login-providers-keycloakify-angular.mjs"
|
|
533
|
+
},
|
|
534
534
|
"./login/services/i18n": {
|
|
535
535
|
"types": "./login/services/i18n/index.d.ts",
|
|
536
536
|
"esm2022": "./esm2022/login/services/i18n/keycloakify-angular-login-services-i18n.mjs",
|
package/src/bin/eject-page.ts
CHANGED
|
@@ -23,6 +23,7 @@ import chalk from 'chalk';
|
|
|
23
23
|
import { transformCodebase } from './tools/transformCodebase';
|
|
24
24
|
import { kebabCaseToCamelCase } from './tools/kebabCaseToSnakeCase';
|
|
25
25
|
import { replaceAll } from './tools/String.prototype.replaceAll';
|
|
26
|
+
import { capitalize } from 'tsafe/capitalize';
|
|
26
27
|
|
|
27
28
|
export async function command(params: { buildContext: BuildContext }) {
|
|
28
29
|
const { buildContext } = params;
|
|
@@ -60,14 +61,23 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
60
61
|
console.log(chalk.cyan('Select the page you want to customize:'));
|
|
61
62
|
|
|
62
63
|
const templateValue = 'template.ftl (Layout common to every page)';
|
|
64
|
+
const userProfileFormFieldsValue =
|
|
65
|
+
'user-profile-commons.ftl (Renders the form of the register.ftl, login-update-profile.ftl, update-email.ftl and idp-review-user-profile.ftl)';
|
|
63
66
|
|
|
64
67
|
const { value: pageIdOrComponent } = await cliSelect<
|
|
65
|
-
|
|
68
|
+
| LoginThemePageId
|
|
69
|
+
| AccountThemePageId
|
|
70
|
+
| typeof templateValue
|
|
71
|
+
| typeof userProfileFormFieldsValue
|
|
66
72
|
>({
|
|
67
73
|
values: (() => {
|
|
68
74
|
switch (themeType) {
|
|
69
75
|
case 'login':
|
|
70
|
-
return [
|
|
76
|
+
return [
|
|
77
|
+
templateValue,
|
|
78
|
+
userProfileFormFieldsValue,
|
|
79
|
+
...LOGIN_THEME_PAGE_IDS
|
|
80
|
+
];
|
|
71
81
|
case 'account':
|
|
72
82
|
return [templateValue, ...ACCOUNT_THEME_PAGE_IDS];
|
|
73
83
|
}
|
|
@@ -84,6 +94,10 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
84
94
|
return pathJoin('containers', 'template');
|
|
85
95
|
}
|
|
86
96
|
|
|
97
|
+
if (pageIdOrComponent === userProfileFormFieldsValue) {
|
|
98
|
+
return pathJoin('components', 'user-profile-form-fields');
|
|
99
|
+
}
|
|
100
|
+
|
|
87
101
|
return pathJoin('pages', pageIdOrComponent.replace(/\.ftl$/, ''));
|
|
88
102
|
})();
|
|
89
103
|
|
|
@@ -212,7 +226,10 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
212
226
|
}
|
|
213
227
|
|
|
214
228
|
edit_KcPage: {
|
|
215
|
-
if (
|
|
229
|
+
if (
|
|
230
|
+
pageIdOrComponent !== templateValue &&
|
|
231
|
+
pageIdOrComponent !== userProfileFormFieldsValue
|
|
232
|
+
) {
|
|
216
233
|
break edit_KcPage;
|
|
217
234
|
}
|
|
218
235
|
|
|
@@ -278,8 +295,9 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
278
295
|
` switch (pageId) {`,
|
|
279
296
|
`+ case '${pageId}':`,
|
|
280
297
|
`+ return {`,
|
|
281
|
-
`+ PageComponent: (await import('./${componentDirRelativeToThemeTypePath.split(pathSep).join('/')}')).${kebabCaseToCamelCase(pageId.replace(/\.ftl$/, ''))}Component,`,
|
|
298
|
+
`+ PageComponent: (await import('./${componentDirRelativeToThemeTypePath.split(pathSep).join('/')}')).${kebabCaseToCamelCase(capitalize(pageId).replace(/\.ftl$/, ''))}Component,`,
|
|
282
299
|
`+ TemplateComponent,`,
|
|
300
|
+
...(themeType === 'login' ? [`+ UserProfileFormFieldsComponent,`] : []),
|
|
283
301
|
...(themeType === 'login' ? [`+ doMakeUserConfirmPassword,`] : []),
|
|
284
302
|
`+ doUseDefaultCss,`,
|
|
285
303
|
`+ classes,`,
|
|
@@ -289,6 +307,7 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
289
307
|
` return {`,
|
|
290
308
|
` PageComponent: await getDefaultPageComponent(pageId),`,
|
|
291
309
|
` TemplateComponent,`,
|
|
310
|
+
...(themeType === 'login' ? [`+ UserProfileFormFieldsComponent,`] : []),
|
|
292
311
|
...(themeType === 'login' ? [` doMakeUserConfirmPassword,`] : []),
|
|
293
312
|
` doUseDefaultCss,`,
|
|
294
313
|
` classes,`,
|
package/src/bin/update-kc-gen.ts
CHANGED
|
@@ -88,7 +88,10 @@ export function command(params: { buildContext: BuildContext }) {
|
|
|
88
88
|
` doUseDefaultCss,`,
|
|
89
89
|
` classes,`,
|
|
90
90
|
...(themeType === 'login'
|
|
91
|
-
? [
|
|
91
|
+
? [
|
|
92
|
+
` UserProfileFormFieldsComponent,`,
|
|
93
|
+
` doMakeUserConfirmPassword,`
|
|
94
|
+
]
|
|
92
95
|
: []),
|
|
93
96
|
` },`,
|
|
94
97
|
` ] = await Promise.all([`,
|
|
@@ -113,6 +116,16 @@ export function command(params: { buildContext: BuildContext }) {
|
|
|
113
116
|
` if ("page" in componentRef.instance) {`,
|
|
114
117
|
` componentRef.setInput("page", PageComponent);`,
|
|
115
118
|
` }`,
|
|
119
|
+
...(themeType === 'login'
|
|
120
|
+
? [
|
|
121
|
+
` if ("userProfileFormFields" in componentRef.instance) {`,
|
|
122
|
+
` componentRef.setInput(`,
|
|
123
|
+
` "userProfileFormFields",`,
|
|
124
|
+
` UserProfileFormFieldsComponent`,
|
|
125
|
+
` );`,
|
|
126
|
+
` }`
|
|
127
|
+
]
|
|
128
|
+
: []),
|
|
116
129
|
` });`,
|
|
117
130
|
` }`,
|
|
118
131
|
` break;`
|
|
@@ -37,14 +37,19 @@ import { Observable } from 'rxjs';
|
|
|
37
37
|
})
|
|
38
38
|
export class DynamicPageInjectorComponent {
|
|
39
39
|
page = input<Type<unknown>>();
|
|
40
|
+
userProfileFormFields = input<Type<unknown>>();
|
|
40
41
|
componentCreated = output<object>();
|
|
41
42
|
#vcr = inject<ViewContainerRef>(ViewContainerRef);
|
|
42
43
|
constructor() {
|
|
43
44
|
effect(
|
|
44
45
|
() => {
|
|
45
46
|
const page = this.page();
|
|
47
|
+
const userProfileFormFields = this.userProfileFormFields();
|
|
46
48
|
if (!page) return;
|
|
47
49
|
const compRef = this.#vcr.createComponent(page);
|
|
50
|
+
if ('userProfileFormFields' in (compRef.instance as object) && userProfileFormFields) {
|
|
51
|
+
compRef.setInput('userProfileFormFields', userProfileFormFields);
|
|
52
|
+
}
|
|
48
53
|
this.componentCreated.emit(compRef.instance as object);
|
|
49
54
|
},
|
|
50
55
|
{ allowSignalWrites: true }
|
|
@@ -85,6 +90,7 @@ export class TemplateComponent extends ComponentReference implements OnInit {
|
|
|
85
90
|
isReadyToRender$: Observable<boolean>;
|
|
86
91
|
|
|
87
92
|
page = input<Type<unknown>>();
|
|
93
|
+
userProfileFormFields = input<Type<unknown>>();
|
|
88
94
|
headerNode: Signal<TemplateRef<HTMLElement>> | undefined;
|
|
89
95
|
infoNode: Signal<TemplateRef<HTMLElement>> | undefined;
|
|
90
96
|
socialProvidersNode: Signal<TemplateRef<HTMLElement>> | undefined;
|
package/src/login/login.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
@let url = kcContext.url;
|
|
2
2
|
@let credentialLabel = kcContext.credentialLabel;
|
|
3
3
|
<ng-template #headerNode>
|
|
4
|
+
@let credentialLabel = kcContext.credentialLabel;
|
|
4
5
|
{{ i18n.msgStr('deleteCredentialTitle', credentialLabel) }}
|
|
5
6
|
</ng-template>
|
|
6
|
-
<ng-container content>
|
|
7
|
-
<div id="kc-delete-text">
|
|
8
|
-
{{ i18n.msgStr('deleteCredentialMessage', credentialLabel) }}
|
|
9
|
-
</div>
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
[action]="url.loginAction"
|
|
15
|
-
>
|
|
16
|
-
<input
|
|
17
|
-
name="accept"
|
|
18
|
-
id="kc-accept"
|
|
19
|
-
type="submit"
|
|
20
|
-
[kcClass]="['kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonLargeClass']"
|
|
21
|
-
[value]="i18n.msgStr('doConfirmDelete')"
|
|
22
|
-
/>
|
|
8
|
+
<div id="kc-delete-text">
|
|
9
|
+
{{ i18n.msgStr('deleteCredentialMessage', credentialLabel) }}
|
|
10
|
+
</div>
|
|
23
11
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
12
|
+
<form
|
|
13
|
+
class="form-actions"
|
|
14
|
+
method="post"
|
|
15
|
+
[action]="url.loginAction"
|
|
16
|
+
>
|
|
17
|
+
<input
|
|
18
|
+
name="accept"
|
|
19
|
+
id="kc-accept"
|
|
20
|
+
type="submit"
|
|
21
|
+
[kcClass]="['kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonLargeClass']"
|
|
22
|
+
[value]="i18n.msgStr('doConfirmDelete')"
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
<input
|
|
26
|
+
name="cancel-aia"
|
|
27
|
+
id="kc-decline"
|
|
28
|
+
type="submit"
|
|
29
|
+
[kcClass]="['kcButtonClass', 'kcButtonDefaultClass', 'kcButtonLargeClass']"
|
|
30
|
+
[value]="i18n.msgStr('doCancel')"
|
|
31
|
+
/>
|
|
32
|
+
</form>
|
|
33
|
+
<div class="clearfix"></div>
|
|
@@ -4,20 +4,19 @@
|
|
|
4
4
|
<ng-template #headerNode>
|
|
5
5
|
{{ i18n.msgStr('errorTitle') }}
|
|
6
6
|
</ng-template>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</ng-container>
|
|
7
|
+
|
|
8
|
+
<div id="kc-error-message">
|
|
9
|
+
<p
|
|
10
|
+
class="instruction"
|
|
11
|
+
[innerHTML]="message.summary | kcSanitize: 'html'"
|
|
12
|
+
></p>
|
|
13
|
+
@if (!skipLink && !!client?.baseUrl) {
|
|
14
|
+
<p>
|
|
15
|
+
<a
|
|
16
|
+
id="backToApplication"
|
|
17
|
+
[href]="client.baseUrl"
|
|
18
|
+
[innerHTML]="i18n.msgStr('backToApplication') | kcSanitize: 'html'"
|
|
19
|
+
></a>
|
|
20
|
+
</p>
|
|
21
|
+
}
|
|
22
|
+
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { NgComponentOutlet } from '@angular/common';
|
|
2
|
-
import { ChangeDetectionStrategy, Component, forwardRef, inject, signal, type TemplateRef, viewChild } from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, forwardRef, inject, input, signal, type TemplateRef, Type, viewChild } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
|
|
5
5
|
import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
|
|
6
|
-
import { UserProfileFormFieldsComponent } from '@keycloakify/angular/login/components/user-profile-form-fields';
|
|
6
|
+
import type { UserProfileFormFieldsComponent } from '@keycloakify/angular/login/components/user-profile-form-fields';
|
|
7
7
|
import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
|
|
8
8
|
import type { I18n } from '@keycloakify/angular/login/i18n';
|
|
9
9
|
import type { KcContext } from '@keycloakify/angular/login/KcContext';
|
|
@@ -15,7 +15,7 @@ import type { ClassKey } from 'keycloakify/login/lib/kcClsx';
|
|
|
15
15
|
|
|
16
16
|
@Component({
|
|
17
17
|
standalone: true,
|
|
18
|
-
imports: [KcClassDirective, NgComponentOutlet
|
|
18
|
+
imports: [KcClassDirective, NgComponentOutlet],
|
|
19
19
|
selector: 'kc-idp-review-user-profile',
|
|
20
20
|
templateUrl: 'idp-review-user-profile.component.html',
|
|
21
21
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -45,6 +45,7 @@ export class IdpReviewUserProfileComponent extends ComponentReference {
|
|
|
45
45
|
infoNode? = viewChild<TemplateRef<HTMLElement>>('infoNode');
|
|
46
46
|
socialProvidersNode? = viewChild<TemplateRef<HTMLElement>>('socialProvidersNode');
|
|
47
47
|
|
|
48
|
+
userProfileFormFields = input<Type<UserProfileFormFieldsComponent>>();
|
|
48
49
|
isFormSubmittable = signal(false);
|
|
49
50
|
|
|
50
51
|
constructor() {
|