@keycloakify/angular 0.2.20 → 0.2.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.
Files changed (60) hide show
  1. package/README.md +1 -1
  2. package/bin/671.index.js +32 -25
  3. package/fesm2022/keycloakify-angular-account-directives-kc-class.mjs +1 -1
  4. package/fesm2022/keycloakify-angular-account-template.mjs +1 -1
  5. package/fesm2022/keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.mjs +1 -1
  6. package/fesm2022/keycloakify-angular-login-components-field-errors.mjs +1 -1
  7. package/fesm2022/keycloakify-angular-login-components-group-label.mjs +1 -1
  8. package/fesm2022/keycloakify-angular-login-components-input-field-by-type.mjs +1 -1
  9. package/fesm2022/keycloakify-angular-login-components-input-tag-selects.mjs +1 -1
  10. package/fesm2022/keycloakify-angular-login-components-input-tag.mjs +1 -1
  11. package/fesm2022/keycloakify-angular-login-components-logout-other-sessions.mjs +1 -1
  12. package/fesm2022/keycloakify-angular-login-components-password-wrapper.mjs +1 -1
  13. package/fesm2022/keycloakify-angular-login-components-select-tag.mjs +1 -1
  14. package/fesm2022/keycloakify-angular-login-components-textarea-tag.mjs +1 -1
  15. package/fesm2022/keycloakify-angular-login-components-user-profile-form-fields.mjs +1 -1
  16. package/fesm2022/keycloakify-angular-login-directives-kc-class.mjs +1 -1
  17. package/fesm2022/keycloakify-angular-login-pages-code.mjs +1 -1
  18. package/fesm2022/keycloakify-angular-login-pages-delete-account-confirm.mjs +1 -1
  19. package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs +1 -1
  20. package/fesm2022/keycloakify-angular-login-pages-error.mjs +1 -1
  21. package/fesm2022/keycloakify-angular-login-pages-frontchannel-logout.mjs +1 -1
  22. package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs +1 -1
  23. package/fesm2022/keycloakify-angular-login-pages-info.mjs +1 -1
  24. package/fesm2022/keycloakify-angular-login-pages-login-config-totp.mjs +1 -1
  25. package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm-override.mjs +1 -1
  26. package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm.mjs +1 -1
  27. package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs +1 -1
  28. package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs +1 -1
  29. package/fesm2022/keycloakify-angular-login-pages-login-oauth2-device-verify-user-code.mjs +1 -1
  30. package/fesm2022/keycloakify-angular-login-pages-login-otp.mjs +1 -1
  31. package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs +1 -1
  32. package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs +1 -1
  33. package/fesm2022/keycloakify-angular-login-pages-login-password.mjs +1 -1
  34. package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-config.mjs +1 -1
  35. package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs +1 -1
  36. package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs +1 -1
  37. package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs +1 -1
  38. package/fesm2022/keycloakify-angular-login-pages-login-update-password.mjs +1 -1
  39. package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs +1 -1
  40. package/fesm2022/keycloakify-angular-login-pages-login-username.mjs +1 -1
  41. package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs +1 -1
  42. package/fesm2022/keycloakify-angular-login-pages-login-x509-info.mjs +1 -1
  43. package/fesm2022/keycloakify-angular-login-pages-login.mjs +2 -2
  44. package/fesm2022/keycloakify-angular-login-pages-login.mjs.map +1 -1
  45. package/fesm2022/keycloakify-angular-login-pages-logout-confirm.mjs +1 -1
  46. package/fesm2022/keycloakify-angular-login-pages-register.mjs +1 -1
  47. package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs +2 -2
  48. package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs.map +1 -1
  49. package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs +1 -1
  50. package/fesm2022/keycloakify-angular-login-pages-terms.mjs +1 -1
  51. package/fesm2022/keycloakify-angular-login-pages-update-email.mjs +1 -1
  52. package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs +1 -1
  53. package/fesm2022/keycloakify-angular-login-pages-webauthn-error.mjs +1 -1
  54. package/fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs +1 -1
  55. package/fesm2022/keycloakify-angular-login-template.mjs +1 -1
  56. package/login/pages/saml-post-form/saml-post-form.component.d.ts +2 -2
  57. package/package.json +1 -1
  58. package/src/bin/eject-page.ts +45 -41
  59. package/src/login/pages/login/login.component.ts +1 -1
  60. package/src/login/pages/saml-post-form/saml-post-form.component.ts +3 -3
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  <br>
7
7
  <br>
8
8
  <a href="https://github.com/keycloakify/keycloakify-angular/actions">
9
- <img src="https://github.com/keycloakify/keycloakify/workflows/ci/badge.svg?branch=main">
9
+ <img src="https://github.com/keycloakify/keycloakify-angular/actions/workflows/ci.yaml/badge.svg">
10
10
  </a>
11
11
  <a href="https://www.npmjs.com/package/@keycloakify/angular">
12
12
  <img src="https://img.shields.io/npm/dm/@keycloakify/angular">
package/bin/671.index.js CHANGED
@@ -996,37 +996,44 @@ async function command(params) {
996
996
  console.log(`${source/* default */.Ay.green('✓')} ${source/* default */.Ay.bold(`.${external_path_.sep}` + (0,external_path_.relative)(process.cwd(), destDirPath))} moved from the @keycloakify/angular to your project`);
997
997
  }
998
998
  }
999
- edit_KcPage: {
999
+ edit_KcFiles: {
1000
1000
  if (pageIdOrComponent !== templateValue &&
1001
1001
  pageIdOrComponent !== userProfileFormFieldsValue) {
1002
- break edit_KcPage;
1002
+ break edit_KcFiles;
1003
1003
  }
1004
- const kcAppTsFilePath = (0,external_path_.join)(buildContext.themeSrcDirPath, themeType, 'KcPage.ts');
1005
- const kcAppTsCode = external_fs_.readFileSync(kcAppTsFilePath).toString('utf8');
1006
- const modifiedKcAppTsCode = await (async () => {
1007
- const componentRelativeDirPath_posix = componentDirRelativeToThemeTypePath
1008
- .split(external_path_.sep)
1009
- .join('/');
1010
- let sourceCode = kcAppTsCode.replace(`@keycloakify/angular/${themeType}/${componentRelativeDirPath_posix}`, componentRelativeDirPath_posix_to_componentRelativeFilePath_posix({
1011
- componentRelativeDirPath_posix: `./${componentRelativeDirPath_posix}`
1012
- }));
1013
- run_prettier: {
1014
- if (!(await (0,runPrettier/* getIsPrettierAvailable */.L)())) {
1015
- break run_prettier;
1004
+ const filesToProcess = ['KcPage.ts', 'KcPageStory.ts'];
1005
+ for (let fileName of filesToProcess) {
1006
+ const filePath = (0,external_path_.join)(buildContext.themeSrcDirPath, themeType, fileName);
1007
+ if (!external_fs_.existsSync(filePath)) {
1008
+ console.log(source/* default */.Ay.yellow(`${fileName} not found, skipping`));
1009
+ continue;
1010
+ }
1011
+ const originalCode = external_fs_.readFileSync(filePath).toString('utf8');
1012
+ const modifiedCode = await (async () => {
1013
+ const componentRelativeDirPath_posix = componentDirRelativeToThemeTypePath
1014
+ .split(external_path_.sep)
1015
+ .join('/');
1016
+ let sourceCode = originalCode.replace(`@keycloakify/angular/${themeType}/${componentRelativeDirPath_posix}`, componentRelativeDirPath_posix_to_componentRelativeFilePath_posix({
1017
+ componentRelativeDirPath_posix: `./${componentRelativeDirPath_posix}`
1018
+ }));
1019
+ run_prettier: {
1020
+ if (!(await (0,runPrettier/* getIsPrettierAvailable */.L)())) {
1021
+ break run_prettier;
1022
+ }
1023
+ sourceCode = await (0,runPrettier/* runPrettier */.JS)({
1024
+ filePath,
1025
+ sourceCode
1026
+ });
1016
1027
  }
1017
- sourceCode = await (0,runPrettier/* runPrettier */.JS)({
1018
- filePath: kcAppTsFilePath,
1019
- sourceCode
1020
- });
1028
+ return sourceCode;
1029
+ })();
1030
+ if (modifiedCode === originalCode) {
1031
+ console.log(source/* default */.Ay.red(`Unable to automatically update ${fileName}, please update it manually`));
1032
+ continue;
1021
1033
  }
1022
- return sourceCode;
1023
- })();
1024
- if (modifiedKcAppTsCode === kcAppTsCode) {
1025
- console.log(source/* default */.Ay.red('Unable to automatically update KcPage.ts, please update it manually'));
1026
- return;
1034
+ external_fs_.writeFileSync(filePath, Buffer.from(modifiedCode, 'utf8'));
1035
+ console.log(`${source/* default */.Ay.green('✓')} ${source/* default */.Ay.bold(`.${external_path_.sep}${(0,external_path_.relative)(process.cwd(), filePath)}`)} Updated`);
1027
1036
  }
1028
- external_fs_.writeFileSync(kcAppTsFilePath, Buffer.from(modifiedKcAppTsCode, 'utf8'));
1029
- console.log(`${source/* default */.Ay.green('✓')} ${source/* default */.Ay.bold(`.${external_path_.sep}` + (0,external_path_.relative)(process.cwd(), kcAppTsFilePath))} Updated`);
1030
1037
  return;
1031
1038
  }
1032
1039
  const pageId = pageIdOrComponent;
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Renderer2, ElementRef, isDevMode, ɵstringify as _stringify, Directive, Input } from '@angular/core';
2
+ import { inject, Renderer2, ElementRef, isDevMode, ɵstringify as _stringify, Input, Directive } from '@angular/core';
3
3
  import { getKcClsx } from 'keycloakify/account/lib/kcClsx';
4
4
  import { ComponentReference } from '@keycloakify/angular/account/classes/component-reference';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { AsyncPipe, NgClass } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, Renderer2, ChangeDetectorRef, input, viewChild, ViewContainerRef, effect, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
3
+ import { inject, Renderer2, ChangeDetectorRef, input, viewChild, ViewContainerRef, effect, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { Meta, Title } from '@angular/platform-browser';
5
5
  import { ComponentReference } from '@keycloakify/angular/account/classes/component-reference';
6
6
  import { KcClassDirective } from '@keycloakify/angular/account/directives/kc-class';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, input, output, computed, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, input, output, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { getButtonToDisplayForMultivaluedAttributeField } from '@keycloakify/angular/login/services/user-profile-form';
4
4
  import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, inject, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { input, inject, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, input, computed, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, input, computed, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { AttributesDirective } from '@keycloakify/angular/lib/directives/attributes';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, inject, computed, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { input, output, inject, computed, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { ToArrayPipe } from '@keycloakify/angular/lib/pipes/to-array';
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';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, input, output, computed, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, input, output, computed, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, input, output, computed, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, input, output, computed, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { AttributesDirective } from '@keycloakify/angular/lib/directives/attributes';
4
4
  import { InputTypePipe } from '@keycloakify/angular/lib/pipes/input-type';
5
5
  import { ToArrayPipe } from '@keycloakify/angular/lib/pipes/to-array';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,6 +1,6 @@
1
1
  import { AsyncPipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, Renderer2, input, signal, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
3
+ import { inject, Renderer2, input, signal, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
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
6
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, input, output, computed, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, input, output, computed, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, inject, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { input, output, inject, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,6 +1,6 @@
1
1
  import { NgTemplateOutlet, AsyncPipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, forwardRef, Component, ChangeDetectionStrategy, ContentChild } from '@angular/core';
3
+ import { inject, forwardRef, ContentChild, ChangeDetectionStrategy, Component } from '@angular/core';
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
6
  import { FieldErrorsComponent } from '@keycloakify/angular/login/components/field-errors';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Renderer2, ElementRef, isDevMode, ɵstringify as _stringify, Directive, Input } from '@angular/core';
2
+ import { inject, Renderer2, ElementRef, isDevMode, ɵstringify as _stringify, Input, Directive } from '@angular/core';
3
3
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
4
4
  import { getKcClsx } from 'keycloakify/login/lib/kcClsx';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';
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';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';
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';
@@ -1,6 +1,6 @@
1
1
  import { NgComponentOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, viewChild, input, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
3
+ import { inject, viewChild, input, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { toSignal } from '@angular/core/rxjs-interop';
5
5
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
6
6
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';
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';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';
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';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
4
4
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
5
5
  import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
4
4
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
5
5
  import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
4
4
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
5
5
  import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
4
4
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
5
5
  import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';
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';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, signal, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, signal, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';
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';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, signal, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, signal, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { LogoutOtherSessionsComponent } from '@keycloakify/angular/login/components/logout-other-sessions';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';
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';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';
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';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';
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';
@@ -1,6 +1,6 @@
1
1
  import { NgComponentOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, viewChild, input, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
3
+ import { inject, viewChild, input, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { toSignal } from '@angular/core/rxjs-interop';
5
5
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
6
6
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
@@ -1,6 +1,6 @@
1
1
  import { NgClass, AsyncPipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, viewChild, signal, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
3
+ import { inject, viewChild, signal, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';
5
5
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
6
6
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,6 +1,6 @@
1
1
  import { NgClass, CommonModule, AsyncPipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, viewChild, signal, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
3
+ import { inject, viewChild, signal, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';
5
5
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
6
6
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
@@ -19,7 +19,7 @@ class LoginComponent extends ComponentReference {
19
19
  this.classes = inject(LOGIN_CLASSES);
20
20
  this.displayRequiredFields = false;
21
21
  this.displayInfo = !!this.kcContext?.realm?.password && !!this.kcContext?.realm?.registrationAllowed && !this.kcContext?.registrationDisabled;
22
- this.displayMessage = this.kcContext?.messagesPerField?.existsError('username', 'password');
22
+ this.displayMessage = !this.kcContext?.messagesPerField?.existsError('username', 'password');
23
23
  this.headerNode = viewChild('headerNode');
24
24
  this.infoNode = viewChild('infoNode');
25
25
  this.socialProvidersNode = viewChild('socialProvidersNode');
@@ -1 +1 @@
1
- {"version":3,"file":"keycloakify-angular-login-pages-login.mjs","sources":["../../src/login/pages/login/login.component.ts","../../src/login/pages/login/login.component.html","../../src/login/pages/login/keycloakify-angular-login-pages-login.ts"],"sourcesContent":["import { AsyncPipe, CommonModule, NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, forwardRef, inject, signal, type TemplateRef, viewChild } from '@angular/core';\nimport { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport { PasswordWrapperComponent } from '@keycloakify/angular/login/components/password-wrapper';\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 { 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 } from 'keycloakify/login/lib/kcClsx';\n\n@Component({\n selector: 'kc-login',\n templateUrl: 'login.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [KcClassDirective, AsyncPipe, KcSanitizePipe, PasswordWrapperComponent, NgClass, CommonModule],\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => LoginComponent)\n }\n ]\n})\nexport class LoginComponent extends ComponentReference {\n kcContext = inject<Extract<KcContext, { pageId: 'login.ftl' }>>(KC_LOGIN_CONTEXT);\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 = !!this.kcContext?.realm?.password && !!this.kcContext?.realm?.registrationAllowed && !this.kcContext?.registrationDisabled;\n displayMessage = this.kcContext?.messagesPerField?.existsError('username', 'password');\n\n headerNode = viewChild<TemplateRef<HTMLElement>>('headerNode');\n infoNode = viewChild<TemplateRef<HTMLElement>>('infoNode');\n socialProvidersNode = viewChild<TemplateRef<HTMLElement>>('socialProvidersNode');\n\n isLoginButtonDisabled = signal(false);\n}\n","@let realm = kcContext.realm;\n@let usernameHidden = kcContext.usernameHidden;\n@let auth = kcContext.auth;\n@let messagesPerField = kcContext.messagesPerField;\n@let url = kcContext.url;\n@let login = kcContext.login;\n\n<ng-template #headerNode>\n {{ i18n.msgStr('loginAccountTitle') }}\n</ng-template>\n<ng-template #infoNode>\n @let url = kcContext.url;\n <div id=\"kc-registration-container\">\n <div id=\"kc-registration\">\n <span>\n {{ i18n.msgStr('noAccount') }}\n <a\n tabindex=\"8\"\n [href]=\"url?.registrationUrl\"\n >\n {{ i18n.msgStr('doRegister') }}\n </a>\n </span>\n </div>\n </div>\n</ng-template>\n<ng-template #socialProvidersNode>\n @let realm = kcContext.realm;\n @let social = kcContext.social;\n @if (!!realm?.password && !!social?.providers?.length) {\n <div\n id=\"kc-social-providers\"\n [kcClass]=\"'kcFormSocialAccountSectionClass'\"\n >\n <hr />\n <h2>{{ i18n.msgStr('identity-provider-login-label') }}</h2>\n <ul\n [kcClass]=\"{\n kcFormSocialAccountListClass: true,\n kcFormSocialAccountListGridClass: (social?.providers?.length ?? 0) > 3\n }\"\n >\n @for (provider of social?.providers; track provider.alias; let idx = $index) {\n <li>\n <a\n type=\"button\"\n [id]=\"provider.alias\"\n [kcClass]=\"{\n kcFormSocialAccountListButtonClass: true,\n kcFormSocialAccountGridItem: (social?.providers?.length ?? 0) > 3\n }\"\n [href]=\"provider.loginUrl\"\n >\n @if (provider.iconClasses) {\n <i\n aria-hidden=\"true\"\n [ngClass]=\"provider.iconClasses\"\n [kcClass]=\"'kcCommonLogoIdP'\"\n ></i>\n }\n <span\n [ngClass]=\"{\n 'kc-social-icon-text': provider.iconClasses\n }\"\n [kcClass]=\"'kcFormSocialAccountNameClass'\"\n [innerHTML]=\"provider.displayName | kcSanitize: 'html'\"\n ></span>\n </a>\n </li>\n }\n </ul>\n </div>\n }\n</ng-template>\n<div id=\"kc-form\">\n <div id=\"kc-form-wrapper\">\n <!-- login.component.html -->\n @if (realm?.password) {\n <form\n id=\"kc-form-login\"\n method=\"post\"\n [action]=\"url?.loginAction\"\n (onSubmit)=\"isLoginButtonDisabled.set(true)\"\n >\n @if (!usernameHidden) {\n <div [kcClass]=\"'kcFormGroupClass'\">\n <label\n for=\"username\"\n [kcClass]=\"'kcLabelClass'\"\n >\n @if (!realm?.loginWithEmailAllowed) {\n {{ i18n.msgStr('username') }}\n } @else if (!realm?.registrationEmailAsUsername) {\n {{ i18n.msgStr('usernameOrEmail') }}\n } @else {\n {{ i18n.msgStr('email') }}\n }\n </label>\n <input\n tabindex=\"2\"\n id=\"username\"\n name=\"username\"\n type=\"text\"\n autofocus\n [kcClass]=\"'kcInputClass'\"\n [defaultValue]=\"login?.username || ''\"\n [attr.aria-invalid]=\"messagesPerField?.existsError('username', 'password')\"\n />\n @if (messagesPerField?.existsError('username', 'password')) {\n <span\n id=\"input-error\"\n aria-live=\"polite\"\n [kcClass]=\"'kcInputErrorMessageClass'\"\n [innerHTML]=\"messagesPerField.getFirstError('username', 'password') | kcSanitize: 'html'\"\n >\n </span>\n }\n </div>\n }\n\n <div [kcClass]=\"'kcFormGroupClass'\">\n <label\n for=\"password\"\n [kcClass]=\"'kcLabelClass'\"\n >\n {{ i18n.msgStr('password') }}\n </label>\n\n <kc-password-wrapper passwordInputId=\"password\">\n <input\n tabindex=\"3\"\n id=\"password\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n [kcClass]=\"'kcInputClass'\"\n [attr.aria-invalid]=\"messagesPerField.existsError('username', 'password')\"\n />\n </kc-password-wrapper>\n @if (usernameHidden && messagesPerField?.existsError('username', 'password')) {\n <span\n id=\"input-error\"\n aria-live=\"polite\"\n [kcClass]=\"'kcInputErrorMessageClass'\"\n [innerHTML]=\"messagesPerField.getFirstError('username', 'password') | kcSanitize: 'html'\"\n >\n </span>\n }\n </div>\n\n <div [kcClass]=\"['kcFormGroupClass', 'kcFormSettingClass']\">\n <div id=\"kc-form-options\">\n @if (realm?.rememberMe && !usernameHidden) {\n <div class=\"checkbox\">\n <label>\n <input\n tabindex=\"5\"\n id=\"rememberMe\"\n name=\"rememberMe\"\n type=\"checkbox\"\n [defaultChecked]=\"!!login?.rememberMe\"\n />\n {{ i18n.msgStr('rememberMe') }}\n </label>\n </div>\n }\n </div>\n\n <div [kcClass]=\"'kcFormOptionsWrapperClass'\">\n @if (realm?.resetPasswordAllowed) {\n <span>\n <a\n tabindex=\"6\"\n [href]=\"url?.loginResetCredentialsUrl\"\n >{{ i18n.msgStr('doForgotPassword') }}</a\n >\n </span>\n }\n </div>\n </div>\n <div\n id=\"kc-form-buttons\"\n [kcClass]=\"'kcFormGroupClass'\"\n >\n <input\n type=\"hidden\"\n id=\"id-hidden-input\"\n name=\"credentialId\"\n [value]=\"auth?.selectedCredential\"\n />\n <input\n tabindex=\"7\"\n name=\"login\"\n id=\"kc-login\"\n type=\"submit\"\n [kcClass]=\"['kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonBlockClass', 'kcButtonLargeClass']\"\n [value]=\"i18n.msgStr('doLogIn')\"\n [disabled]=\"isLoginButtonDisabled()\"\n />\n </div>\n </form>\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA0BM,MAAO,cAAe,SAAQ,kBAAkB,CAAA;AAZtD,IAAA,WAAA,GAAA;;AAaI,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAA8C,gBAAgB,CAAC;AACjF,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAO,UAAU,CAAC;AAEtB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAU,eAAe,CAAC;AAClD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAoC,aAAa,CAAC;QAK3E,IAAqB,CAAA,qBAAA,GAAG,KAAK;QAC7B,IAAW,CAAA,WAAA,GAAG,CAAC,CAAC,IA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G;;;;"}
1
+ {"version":3,"file":"keycloakify-angular-login-pages-login.mjs","sources":["../../src/login/pages/login/login.component.ts","../../src/login/pages/login/login.component.html","../../src/login/pages/login/keycloakify-angular-login-pages-login.ts"],"sourcesContent":["import { AsyncPipe, CommonModule, NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, forwardRef, inject, signal, type TemplateRef, viewChild } from '@angular/core';\nimport { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport { PasswordWrapperComponent } from '@keycloakify/angular/login/components/password-wrapper';\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 { 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 } from 'keycloakify/login/lib/kcClsx';\n\n@Component({\n selector: 'kc-login',\n templateUrl: 'login.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [KcClassDirective, AsyncPipe, KcSanitizePipe, PasswordWrapperComponent, NgClass, CommonModule],\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => LoginComponent)\n }\n ]\n})\nexport class LoginComponent extends ComponentReference {\n kcContext = inject<Extract<KcContext, { pageId: 'login.ftl' }>>(KC_LOGIN_CONTEXT);\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 = !!this.kcContext?.realm?.password && !!this.kcContext?.realm?.registrationAllowed && !this.kcContext?.registrationDisabled;\n displayMessage = !this.kcContext?.messagesPerField?.existsError('username', 'password');\n\n headerNode = viewChild<TemplateRef<HTMLElement>>('headerNode');\n infoNode = viewChild<TemplateRef<HTMLElement>>('infoNode');\n socialProvidersNode = viewChild<TemplateRef<HTMLElement>>('socialProvidersNode');\n\n isLoginButtonDisabled = signal(false);\n}\n","@let realm = kcContext.realm;\n@let usernameHidden = kcContext.usernameHidden;\n@let auth = kcContext.auth;\n@let messagesPerField = kcContext.messagesPerField;\n@let url = kcContext.url;\n@let login = kcContext.login;\n\n<ng-template #headerNode>\n {{ i18n.msgStr('loginAccountTitle') }}\n</ng-template>\n<ng-template #infoNode>\n @let url = kcContext.url;\n <div id=\"kc-registration-container\">\n <div id=\"kc-registration\">\n <span>\n {{ i18n.msgStr('noAccount') }}\n <a\n tabindex=\"8\"\n [href]=\"url?.registrationUrl\"\n >\n {{ i18n.msgStr('doRegister') }}\n </a>\n </span>\n </div>\n </div>\n</ng-template>\n<ng-template #socialProvidersNode>\n @let realm = kcContext.realm;\n @let social = kcContext.social;\n @if (!!realm?.password && !!social?.providers?.length) {\n <div\n id=\"kc-social-providers\"\n [kcClass]=\"'kcFormSocialAccountSectionClass'\"\n >\n <hr />\n <h2>{{ i18n.msgStr('identity-provider-login-label') }}</h2>\n <ul\n [kcClass]=\"{\n kcFormSocialAccountListClass: true,\n kcFormSocialAccountListGridClass: (social?.providers?.length ?? 0) > 3\n }\"\n >\n @for (provider of social?.providers; track provider.alias; let idx = $index) {\n <li>\n <a\n type=\"button\"\n [id]=\"provider.alias\"\n [kcClass]=\"{\n kcFormSocialAccountListButtonClass: true,\n kcFormSocialAccountGridItem: (social?.providers?.length ?? 0) > 3\n }\"\n [href]=\"provider.loginUrl\"\n >\n @if (provider.iconClasses) {\n <i\n aria-hidden=\"true\"\n [ngClass]=\"provider.iconClasses\"\n [kcClass]=\"'kcCommonLogoIdP'\"\n ></i>\n }\n <span\n [ngClass]=\"{\n 'kc-social-icon-text': provider.iconClasses\n }\"\n [kcClass]=\"'kcFormSocialAccountNameClass'\"\n [innerHTML]=\"provider.displayName | kcSanitize: 'html'\"\n ></span>\n </a>\n </li>\n }\n </ul>\n </div>\n }\n</ng-template>\n<div id=\"kc-form\">\n <div id=\"kc-form-wrapper\">\n <!-- login.component.html -->\n @if (realm?.password) {\n <form\n id=\"kc-form-login\"\n method=\"post\"\n [action]=\"url?.loginAction\"\n (onSubmit)=\"isLoginButtonDisabled.set(true)\"\n >\n @if (!usernameHidden) {\n <div [kcClass]=\"'kcFormGroupClass'\">\n <label\n for=\"username\"\n [kcClass]=\"'kcLabelClass'\"\n >\n @if (!realm?.loginWithEmailAllowed) {\n {{ i18n.msgStr('username') }}\n } @else if (!realm?.registrationEmailAsUsername) {\n {{ i18n.msgStr('usernameOrEmail') }}\n } @else {\n {{ i18n.msgStr('email') }}\n }\n </label>\n <input\n tabindex=\"2\"\n id=\"username\"\n name=\"username\"\n type=\"text\"\n autofocus\n [kcClass]=\"'kcInputClass'\"\n [defaultValue]=\"login?.username || ''\"\n [attr.aria-invalid]=\"messagesPerField?.existsError('username', 'password')\"\n />\n @if (messagesPerField?.existsError('username', 'password')) {\n <span\n id=\"input-error\"\n aria-live=\"polite\"\n [kcClass]=\"'kcInputErrorMessageClass'\"\n [innerHTML]=\"messagesPerField.getFirstError('username', 'password') | kcSanitize: 'html'\"\n >\n </span>\n }\n </div>\n }\n\n <div [kcClass]=\"'kcFormGroupClass'\">\n <label\n for=\"password\"\n [kcClass]=\"'kcLabelClass'\"\n >\n {{ i18n.msgStr('password') }}\n </label>\n\n <kc-password-wrapper passwordInputId=\"password\">\n <input\n tabindex=\"3\"\n id=\"password\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n [kcClass]=\"'kcInputClass'\"\n [attr.aria-invalid]=\"messagesPerField.existsError('username', 'password')\"\n />\n </kc-password-wrapper>\n @if (usernameHidden && messagesPerField?.existsError('username', 'password')) {\n <span\n id=\"input-error\"\n aria-live=\"polite\"\n [kcClass]=\"'kcInputErrorMessageClass'\"\n [innerHTML]=\"messagesPerField.getFirstError('username', 'password') | kcSanitize: 'html'\"\n >\n </span>\n }\n </div>\n\n <div [kcClass]=\"['kcFormGroupClass', 'kcFormSettingClass']\">\n <div id=\"kc-form-options\">\n @if (realm?.rememberMe && !usernameHidden) {\n <div class=\"checkbox\">\n <label>\n <input\n tabindex=\"5\"\n id=\"rememberMe\"\n name=\"rememberMe\"\n type=\"checkbox\"\n [defaultChecked]=\"!!login?.rememberMe\"\n />\n {{ i18n.msgStr('rememberMe') }}\n </label>\n </div>\n }\n </div>\n\n <div [kcClass]=\"'kcFormOptionsWrapperClass'\">\n @if (realm?.resetPasswordAllowed) {\n <span>\n <a\n tabindex=\"6\"\n [href]=\"url?.loginResetCredentialsUrl\"\n >{{ i18n.msgStr('doForgotPassword') }}</a\n >\n </span>\n }\n </div>\n </div>\n <div\n id=\"kc-form-buttons\"\n [kcClass]=\"'kcFormGroupClass'\"\n >\n <input\n type=\"hidden\"\n id=\"id-hidden-input\"\n name=\"credentialId\"\n [value]=\"auth?.selectedCredential\"\n />\n <input\n tabindex=\"7\"\n name=\"login\"\n id=\"kc-login\"\n type=\"submit\"\n [kcClass]=\"['kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonBlockClass', 'kcButtonLargeClass']\"\n [value]=\"i18n.msgStr('doLogIn')\"\n [disabled]=\"isLoginButtonDisabled()\"\n />\n </div>\n </form>\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA0BM,MAAO,cAAe,SAAQ,kBAAkB,CAAA;AAZtD,IAAA,WAAA,GAAA;;AAaI,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAA8C,gBAAgB,CAAC;AACjF,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAO,UAAU,CAAC;AAEtB,QAAA,IAAA,CAAA,eAAe,GA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AC,EAC5F,SAAA,EAAA;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,kBAAkB;AAC3B,4BAAA,WAAW,EAAE,UAAU,CAAC,oBAAoB;AAC/C;AACJ,qBAAA,EAAA,QAAA,EAAA,6mRAAA,EAAA;;;AExBL;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
4
4
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
5
5
  import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
@@ -1,6 +1,6 @@
1
1
  import { NgComponentOutlet, AsyncPipe, NgClass } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, viewChild, signal, input, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
3
+ import { inject, viewChild, signal, input, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { toSignal } from '@angular/core/rxjs-interop';
5
5
  import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';
6
6
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';
@@ -29,7 +29,7 @@ class SamlPostFormComponent extends ComponentReference {
29
29
  alert('In a real Keycloak the user would be redirected immediately');
30
30
  return;
31
31
  }
32
- this.htmlFormElement().submit();
32
+ this.htmlFormElement().nativeElement.submit();
33
33
  }
34
34
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SamlPostFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
35
35
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: SamlPostFormComponent, isStandalone: true, selector: "kc-saml-post-form", providers: [
@@ -1 +1 @@
1
- {"version":3,"file":"keycloakify-angular-login-pages-saml-post-form.mjs","sources":["../../src/login/pages/saml-post-form/saml-post-form.component.ts","../../src/login/pages/saml-post-form/saml-post-form.component.html","../../src/login/pages/saml-post-form/keycloakify-angular-login-pages-saml-post-form.ts"],"sourcesContent":["import { AfterViewInit, ChangeDetectionStrategy, Component, forwardRef, inject, type TemplateRef, viewChild } from '@angular/core';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\nimport type { KcContext } from '@keycloakify/angular/login/KcContext';\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 } from 'keycloakify/login/lib/kcClsx';\n\n@Component({\n imports: [],\n selector: 'kc-saml-post-form',\n templateUrl: 'saml-post-form.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => SamlPostFormComponent)\n }\n ]\n})\nexport class SamlPostFormComponent extends ComponentReference implements AfterViewInit {\n kcContext = inject<Extract<KcContext, { pageId: 'saml-post-form.ftl' }>>(KC_LOGIN_CONTEXT);\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 htmlFormElement = viewChild<HTMLFormElement>('setHtmlFormElement');\n\n ngAfterViewInit(): void {\n if (this.htmlFormElement() === null || this.htmlFormElement() === undefined) {\n return;\n }\n\n if (this.kcContext.samlPost.url === '#') {\n alert('In a real Keycloak the user would be redirected immediately');\n return;\n }\n\n this.htmlFormElement()!.submit();\n }\n}\n","@let samlPost = kcContext.samlPost;\n\n<ng-template #headerNode>\n {{ i18n.msgStr('saml.post-form.title') }}\n</ng-template>\n<p>{{ i18n.msgStr('saml.post-form.message') }}</p>\n<form\n #setHtmlFormElement\n name=\"saml-post-binding\"\n method=\"post\"\n [action]=\"samlPost.url\"\n>\n @if (!!samlPost.SAMLRequest) {\n <input\n type=\"hidden\"\n name=\"SAMLRequest\"\n [value]=\"samlPost.SAMLRequest\"\n />\n }\n @if (!!samlPost.SAMLResponse) {\n <input\n type=\"hidden\"\n name=\"SAMLResponse\"\n [value]=\"samlPost.SAMLResponse\"\n />\n }\n @if (!!samlPost.relayState) {\n <input\n type=\"hidden\"\n name=\"RelayState\"\n [value]=\"samlPost.relayState\"\n />\n }\n <noscript>\n <p>{{ i18n.msgStr('saml.post-form.js-disabled') }}</p>\n <input\n type=\"submit\"\n [value]=\"i18n.msgStr('doContinue')\"\n />\n </noscript>\n</form>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAsBM,MAAO,qBAAsB,SAAQ,kBAAkB,CAAA;AAZ7D,IAAA,WAAA,GAAA;;AAaI,QAAA,IAAA,CAAA,SAAS,GAAG,M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["../../src/login/pages/saml-post-form/saml-post-form.component.ts","../../src/login/pages/saml-post-form/saml-post-form.component.html","../../src/login/pages/saml-post-form/keycloakify-angular-login-pages-saml-post-form.ts"],"sourcesContent":["import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, forwardRef, inject, type TemplateRef, viewChild } from '@angular/core';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\nimport type { KcContext } from '@keycloakify/angular/login/KcContext';\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 } from 'keycloakify/login/lib/kcClsx';\n\n@Component({\n imports: [],\n selector: 'kc-saml-post-form',\n templateUrl: 'saml-post-form.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => SamlPostFormComponent)\n }\n ]\n})\nexport class SamlPostFormComponent extends ComponentReference implements AfterViewInit {\n kcContext = inject<Extract<KcContext, { pageId: 'saml-post-form.ftl' }>>(KC_LOGIN_CONTEXT);\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 htmlFormElement = viewChild<ElementRef<HTMLFormElement>>('setHtmlFormElement');\n\n ngAfterViewInit(): void {\n if (this.htmlFormElement() === null || this.htmlFormElement() === undefined) {\n return;\n }\n\n if (this.kcContext.samlPost.url === '#') {\n alert('In a real Keycloak the user would be redirected immediately');\n return;\n }\n\n this.htmlFormElement()!.nativeElement.submit();\n }\n}\n","@let samlPost = kcContext.samlPost;\n\n<ng-template #headerNode>\n {{ i18n.msgStr('saml.post-form.title') }}\n</ng-template>\n<p>{{ i18n.msgStr('saml.post-form.message') }}</p>\n<form\n #setHtmlFormElement\n name=\"saml-post-binding\"\n method=\"post\"\n [action]=\"samlPost.url\"\n>\n @if (!!samlPost.SAMLRequest) {\n <input\n type=\"hidden\"\n name=\"SAMLRequest\"\n [value]=\"samlPost.SAMLRequest\"\n />\n }\n @if (!!samlPost.SAMLResponse) {\n <input\n type=\"hidden\"\n name=\"SAMLResponse\"\n [value]=\"samlPost.SAMLResponse\"\n />\n }\n @if (!!samlPost.relayState) {\n <input\n type=\"hidden\"\n name=\"RelayState\"\n [value]=\"samlPost.relayState\"\n />\n }\n <noscript>\n <p>{{ i18n.msgStr('saml.post-form.js-disabled') }}</p>\n <input\n type=\"submit\"\n [value]=\"i18n.msgStr('doContinue')\"\n />\n </noscript>\n</form>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAsBM,MAAO,qBAAsB,SAAQ,kBAAkB,CAAA;AAZ7D,IAAA,WAAA,GAAA;;AAaI,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAuD,gBAAgB,CAAC;AAC1F,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAO,UAAU,CAAC;AAEtB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAU,eAAe,CAAC;AAClD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAoC,aAAa,CAAC;QAK3E,IAAqB,CAAA,qBAAA,GAAG,KAAK;QAC7B,IAAW,CAAA,WAAA,GAAG,KAAK;QACnB,IAAc,CAAA,cAAA,GAAG,IAAI;AAErB,QAAA,I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,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,EAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECpBL,giCAyCA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDnBa,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAZjC,SAAS;AACG,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA,EAAE,YACD,mBAAmB,EAAA,eAAA,EAEZ,uBAAuB,CAAC,MAAM,EACpC,SAAA,EAAA;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,kBAAkB;AAC3B,4BAAA,WAAW,EAAE,UAAU,CAAC,2BAA2B;AACtD;AACJ,qBAAA,EAAA,QAAA,EAAA,giCAAA,EAAA;;;AEpBL;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { NgClass } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
3
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
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
6
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
@@ -1,6 +1,6 @@
1
1
  import { NgComponentOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, viewChild, input, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
3
+ import { inject, viewChild, input, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { toSignal } from '@angular/core/rxjs-interop';
5
5
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
6
6
  import { LogoutOtherSessionsComponent } from '@keycloakify/angular/login/components/logout-other-sessions';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { LogoutOtherSessionsComponent } from '@keycloakify/angular/login/components/logout-other-sessions';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { LogoutOtherSessionsComponent } from '@keycloakify/angular/login/components/logout-other-sessions';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, viewChild, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, viewChild, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
4
4
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
5
5
  import { LogoutOtherSessionsComponent } from '@keycloakify/angular/login/components/logout-other-sessions';
@@ -1,6 +1,6 @@
1
1
  import { AsyncPipe, NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, Renderer2, ChangeDetectorRef, input, viewChild, ViewContainerRef, effect, computed, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core';
3
+ import { inject, Renderer2, ChangeDetectorRef, input, viewChild, ViewContainerRef, effect, computed, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { Meta, Title } from '@angular/platform-browser';
5
5
  import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize';
6
6
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
@@ -1,4 +1,4 @@
1
- import { AfterViewInit, type TemplateRef } from '@angular/core';
1
+ import { AfterViewInit, ElementRef, type TemplateRef } from '@angular/core';
2
2
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
3
3
  import type { I18n } from '@keycloakify/angular/login/i18n';
4
4
  import type { KcContext } from '@keycloakify/angular/login/KcContext';
@@ -17,7 +17,7 @@ export declare class SamlPostFormComponent extends ComponentReference implements
17
17
  headerNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
18
18
  infoNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
19
19
  socialProvidersNode: import("@angular/core").Signal<TemplateRef<HTMLElement> | undefined>;
20
- htmlFormElement: import("@angular/core").Signal<HTMLFormElement | undefined>;
20
+ htmlFormElement: import("@angular/core").Signal<ElementRef<HTMLFormElement> | undefined>;
21
21
  ngAfterViewInit(): void;
22
22
  static ɵfac: i0.ɵɵFactoryDeclaration<SamlPostFormComponent, never>;
23
23
  static ɵcmp: i0.ɵɵComponentDeclaration<SamlPostFormComponent, "kc-saml-post-form", never, {}, {}, never, never, true, never>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@keycloakify/angular",
3
3
  "type": "module",
4
- "version": "0.2.20",
4
+ "version": "0.2.22",
5
5
  "peerDependencies": {
6
6
  "keycloakify": "^11.8.0",
7
7
  "@angular/core": "^19.0.0",
@@ -300,65 +300,69 @@ export async function command(params: { buildContext: BuildContext }) {
300
300
  }
301
301
  }
302
302
 
303
- edit_KcPage: {
303
+ edit_KcFiles: {
304
304
  if (
305
305
  pageIdOrComponent !== templateValue &&
306
306
  pageIdOrComponent !== userProfileFormFieldsValue
307
307
  ) {
308
- break edit_KcPage;
308
+ break edit_KcFiles;
309
309
  }
310
310
 
311
- const kcAppTsFilePath = pathJoin(
312
- buildContext.themeSrcDirPath,
313
- themeType,
314
- 'KcPage.ts'
315
- );
311
+ const filesToProcess = ['KcPage.ts', 'KcPageStory.ts'];
316
312
 
317
- const kcAppTsCode = fs.readFileSync(kcAppTsFilePath).toString('utf8');
313
+ for (let fileName of filesToProcess) {
314
+ const filePath = pathJoin(buildContext.themeSrcDirPath, themeType, fileName);
318
315
 
319
- const modifiedKcAppTsCode = await (async () => {
320
- const componentRelativeDirPath_posix = componentDirRelativeToThemeTypePath
321
- .split(pathSep)
322
- .join('/');
316
+ if (!fs.existsSync(filePath)) {
317
+ console.log(chalk.yellow(`${fileName} not found, skipping`));
318
+ continue;
319
+ }
323
320
 
324
- let sourceCode = kcAppTsCode.replace(
325
- `@keycloakify/angular/${themeType}/${componentRelativeDirPath_posix}`,
326
- componentRelativeDirPath_posix_to_componentRelativeFilePath_posix({
327
- componentRelativeDirPath_posix: `./${componentRelativeDirPath_posix}`
328
- })
329
- );
321
+ const originalCode = fs.readFileSync(filePath).toString('utf8');
322
+
323
+ const modifiedCode = await (async () => {
324
+ const componentRelativeDirPath_posix = componentDirRelativeToThemeTypePath
325
+ .split(pathSep)
326
+ .join('/');
327
+
328
+ let sourceCode = originalCode.replace(
329
+ `@keycloakify/angular/${themeType}/${componentRelativeDirPath_posix}`,
330
+ componentRelativeDirPath_posix_to_componentRelativeFilePath_posix({
331
+ componentRelativeDirPath_posix: `./${componentRelativeDirPath_posix}`
332
+ })
333
+ );
330
334
 
331
- run_prettier: {
332
- if (!(await getIsPrettierAvailable())) {
333
- break run_prettier;
335
+ run_prettier: {
336
+ if (!(await getIsPrettierAvailable())) {
337
+ break run_prettier;
338
+ }
339
+
340
+ sourceCode = await runPrettier({
341
+ filePath,
342
+ sourceCode
343
+ });
334
344
  }
335
345
 
336
- sourceCode = await runPrettier({
337
- filePath: kcAppTsFilePath,
338
- sourceCode
339
- });
346
+ return sourceCode;
347
+ })();
348
+
349
+ if (modifiedCode === originalCode) {
350
+ console.log(
351
+ chalk.red(
352
+ `Unable to automatically update ${fileName}, please update it manually`
353
+ )
354
+ );
355
+ continue;
340
356
  }
341
357
 
342
- return sourceCode;
343
- })();
358
+ fs.writeFileSync(filePath, Buffer.from(modifiedCode, 'utf8'));
344
359
 
345
- if (modifiedKcAppTsCode === kcAppTsCode) {
346
360
  console.log(
347
- chalk.red(
348
- 'Unable to automatically update KcPage.ts, please update it manually'
349
- )
361
+ `${chalk.green('✓')} ${chalk.bold(
362
+ `.${pathSep}${pathRelative(process.cwd(), filePath)}`
363
+ )} Updated`
350
364
  );
351
- return;
352
365
  }
353
-
354
- fs.writeFileSync(kcAppTsFilePath, Buffer.from(modifiedKcAppTsCode, 'utf8'));
355
-
356
- console.log(
357
- `${chalk.green('✓')} ${chalk.bold(
358
- `.${pathSep}` + pathRelative(process.cwd(), kcAppTsFilePath)
359
- )} Updated`
360
- );
361
-
362
366
  return;
363
367
  }
364
368
 
@@ -36,7 +36,7 @@ export class LoginComponent extends ComponentReference {
36
36
 
37
37
  displayRequiredFields = false;
38
38
  displayInfo = !!this.kcContext?.realm?.password && !!this.kcContext?.realm?.registrationAllowed && !this.kcContext?.registrationDisabled;
39
- displayMessage = this.kcContext?.messagesPerField?.existsError('username', 'password');
39
+ displayMessage = !this.kcContext?.messagesPerField?.existsError('username', 'password');
40
40
 
41
41
  headerNode = viewChild<TemplateRef<HTMLElement>>('headerNode');
42
42
  infoNode = viewChild<TemplateRef<HTMLElement>>('infoNode');
@@ -1,4 +1,4 @@
1
- import { AfterViewInit, ChangeDetectionStrategy, Component, forwardRef, inject, type TemplateRef, viewChild } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, forwardRef, inject, type TemplateRef, viewChild } from '@angular/core';
2
2
  import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
3
3
  import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
4
4
  import type { I18n } from '@keycloakify/angular/login/i18n';
@@ -37,7 +37,7 @@ export class SamlPostFormComponent extends ComponentReference implements AfterVi
37
37
  headerNode = viewChild<TemplateRef<HTMLElement>>('headerNode');
38
38
  infoNode = viewChild<TemplateRef<HTMLElement>>('infoNode');
39
39
  socialProvidersNode = viewChild<TemplateRef<HTMLElement>>('socialProvidersNode');
40
- htmlFormElement = viewChild<HTMLFormElement>('setHtmlFormElement');
40
+ htmlFormElement = viewChild<ElementRef<HTMLFormElement>>('setHtmlFormElement');
41
41
 
42
42
  ngAfterViewInit(): void {
43
43
  if (this.htmlFormElement() === null || this.htmlFormElement() === undefined) {
@@ -49,6 +49,6 @@ export class SamlPostFormComponent extends ComponentReference implements AfterVi
49
49
  return;
50
50
  }
51
51
 
52
- this.htmlFormElement()!.submit();
52
+ this.htmlFormElement()!.nativeElement.submit();
53
53
  }
54
54
  }