@acorex-platform/module-auth-client 0.0.38 → 0.0.48

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 (107) hide show
  1. package/fesm2022/acorex-platform-module-auth-client-accept-invitation.component-Ct28GG3a.mjs +179 -0
  2. package/fesm2022/acorex-platform-module-auth-client-accept-invitation.component-Ct28GG3a.mjs.map +1 -0
  3. package/fesm2022/{acorex-platform-module-auth-client-acorex-platform-module-auth-client-CRl74b8g.mjs → acorex-platform-module-auth-client-acorex-platform-module-auth-client-C1oSPf12.mjs} +1154 -107
  4. package/fesm2022/acorex-platform-module-auth-client-acorex-platform-module-auth-client-C1oSPf12.mjs.map +1 -0
  5. package/fesm2022/{acorex-platform-module-auth-client-app-chooser.component-CjWofUGR.mjs → acorex-platform-module-auth-client-app-chooser.component-CLKLwWW8.mjs} +4 -4
  6. package/fesm2022/{acorex-platform-module-auth-client-app-chooser.component-CjWofUGR.mjs.map → acorex-platform-module-auth-client-app-chooser.component-CLKLwWW8.mjs.map} +1 -1
  7. package/fesm2022/{acorex-platform-module-auth-client-blank.layout-BCXNPgrp.mjs → acorex-platform-module-auth-client-blank.layout-xSXPWxyw.mjs} +3 -3
  8. package/fesm2022/acorex-platform-module-auth-client-blank.layout-xSXPWxyw.mjs.map +1 -0
  9. package/fesm2022/{acorex-platform-module-auth-client-change-password.command-BqU3jYV9.mjs → acorex-platform-module-auth-client-change-password.command-CknYaMZD.mjs} +2 -2
  10. package/fesm2022/{acorex-platform-module-auth-client-change-password.command-BqU3jYV9.mjs.map → acorex-platform-module-auth-client-change-password.command-CknYaMZD.mjs.map} +1 -1
  11. package/fesm2022/{acorex-platform-module-auth-client-change-photo.command-CzO3A7OG.mjs → acorex-platform-module-auth-client-change-photo.command-CML784Lg.mjs} +71 -21
  12. package/fesm2022/acorex-platform-module-auth-client-change-photo.command-CML784Lg.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-auth-client-command-return-url.util-mBmtJ7T2.mjs +69 -0
  14. package/fesm2022/acorex-platform-module-auth-client-command-return-url.util-mBmtJ7T2.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-auth-client-contracts.mjs +12 -7
  16. package/fesm2022/acorex-platform-module-auth-client-contracts.mjs.map +1 -1
  17. package/fesm2022/{acorex-platform-module-auth-client-edit-account-info.command-CD9IrimO.mjs → acorex-platform-module-auth-client-edit-account-info.command-DulLUfWs.mjs} +25 -4
  18. package/fesm2022/acorex-platform-module-auth-client-edit-account-info.command-DulLUfWs.mjs.map +1 -0
  19. package/fesm2022/{acorex-platform-module-auth-client-get-user-activity.query-B1bKcSVQ.mjs → acorex-platform-module-auth-client-get-user-activity.query-CV9mdOBi.mjs} +2 -2
  20. package/fesm2022/{acorex-platform-module-auth-client-get-user-activity.query-B1bKcSVQ.mjs.map → acorex-platform-module-auth-client-get-user-activity.query-CV9mdOBi.mjs.map} +1 -1
  21. package/fesm2022/{acorex-platform-module-auth-client-lock-screen.command-DKtlBzS7.mjs → acorex-platform-module-auth-client-lock-screen.command-BH3Q6lJE.mjs} +2 -2
  22. package/fesm2022/{acorex-platform-module-auth-client-lock-screen.command-DKtlBzS7.mjs.map → acorex-platform-module-auth-client-lock-screen.command-BH3Q6lJE.mjs.map} +1 -1
  23. package/fesm2022/{acorex-platform-module-auth-client-login.module-CXl61yOu.mjs → acorex-platform-module-auth-client-login.module-DtvnPpBH.mjs} +3 -3
  24. package/fesm2022/{acorex-platform-module-auth-client-login.module-CXl61yOu.mjs.map → acorex-platform-module-auth-client-login.module-DtvnPpBH.mjs.map} +1 -1
  25. package/fesm2022/acorex-platform-module-auth-client-manage-two-factor.command-BAg2W20W.mjs +445 -0
  26. package/fesm2022/acorex-platform-module-auth-client-manage-two-factor.command-BAg2W20W.mjs.map +1 -0
  27. package/fesm2022/{acorex-platform-module-auth-client-master.layout-D7zUm7aL.mjs → acorex-platform-module-auth-client-master.layout-B3krDskY.mjs} +5 -5
  28. package/fesm2022/{acorex-platform-module-auth-client-master.layout-D7zUm7aL.mjs.map → acorex-platform-module-auth-client-master.layout-B3krDskY.mjs.map} +1 -1
  29. package/fesm2022/{acorex-platform-module-auth-client-oauth-callback.component-fdWC08nA.mjs → acorex-platform-module-auth-client-oauth-callback.component-DWnljN18.mjs} +3 -3
  30. package/fesm2022/{acorex-platform-module-auth-client-oauth-callback.component-fdWC08nA.mjs.map → acorex-platform-module-auth-client-oauth-callback.component-DWnljN18.mjs.map} +1 -1
  31. package/fesm2022/{acorex-platform-module-auth-client-open-sessions.command-DKvyMkhl.mjs → acorex-platform-module-auth-client-open-sessions.command-CEpu6c7D.mjs} +6 -6
  32. package/fesm2022/{acorex-platform-module-auth-client-open-sessions.command-DKvyMkhl.mjs.map → acorex-platform-module-auth-client-open-sessions.command-CEpu6c7D.mjs.map} +1 -1
  33. package/fesm2022/acorex-platform-module-auth-client-open-waiting-room.command-CR-_ppYd.mjs +28 -0
  34. package/fesm2022/acorex-platform-module-auth-client-open-waiting-room.command-CR-_ppYd.mjs.map +1 -0
  35. package/fesm2022/{acorex-platform-module-auth-client-password.component-BE2JkYm_.mjs → acorex-platform-module-auth-client-password.component-Ci5Wy3rO.mjs} +5 -5
  36. package/fesm2022/{acorex-platform-module-auth-client-password.component-BE2JkYm_.mjs.map → acorex-platform-module-auth-client-password.component-Ci5Wy3rO.mjs.map} +1 -1
  37. package/fesm2022/{acorex-platform-module-auth-client-password.component-BoWDVby5.mjs → acorex-platform-module-auth-client-password.component-ddh-_0k3.mjs} +39 -9
  38. package/fesm2022/acorex-platform-module-auth-client-password.component-ddh-_0k3.mjs.map +1 -0
  39. package/fesm2022/{acorex-platform-module-auth-client-platform-settings-unavailable.component-BJMtsa99.mjs → acorex-platform-module-auth-client-platform-settings-unavailable.component-LwuokJiZ.mjs} +4 -4
  40. package/fesm2022/{acorex-platform-module-auth-client-platform-settings-unavailable.component-BJMtsa99.mjs.map → acorex-platform-module-auth-client-platform-settings-unavailable.component-LwuokJiZ.mjs.map} +1 -1
  41. package/fesm2022/{acorex-platform-module-auth-client-profile-activity-chart.component-CFaRGMKu.mjs → acorex-platform-module-auth-client-profile-activity-chart.component-D4bqeKCd.mjs} +5 -5
  42. package/fesm2022/{acorex-platform-module-auth-client-profile-activity-chart.component-CFaRGMKu.mjs.map → acorex-platform-module-auth-client-profile-activity-chart.component-D4bqeKCd.mjs.map} +1 -1
  43. package/fesm2022/{acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-Dx2-o9XL.mjs → acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-DWNbDzDd.mjs} +4 -4
  44. package/fesm2022/{acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-Dx2-o9XL.mjs.map → acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-DWNbDzDd.mjs.map} +1 -1
  45. package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-1Spuexhb.mjs → acorex-platform-module-auth-client-profile-page-component.provider-DLTbTEe6.mjs} +4 -4
  46. package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-1Spuexhb.mjs.map → acorex-platform-module-auth-client-profile-page-component.provider-DLTbTEe6.mjs.map} +1 -1
  47. package/fesm2022/{acorex-platform-module-auth-client-profile-page.component-CGs24n0j.mjs → acorex-platform-module-auth-client-profile-page.component-BhmMsO3g.mjs} +9 -7
  48. package/fesm2022/acorex-platform-module-auth-client-profile-page.component-BhmMsO3g.mjs.map +1 -0
  49. package/fesm2022/acorex-platform-module-auth-client-pwa-install.component-BJOvT0hW.mjs +84 -0
  50. package/fesm2022/acorex-platform-module-auth-client-pwa-install.component-BJOvT0hW.mjs.map +1 -0
  51. package/fesm2022/{acorex-platform-module-auth-client-register-password.component-BlOn9609.mjs → acorex-platform-module-auth-client-register-password.component-M-ayP7oO.mjs} +7 -7
  52. package/fesm2022/{acorex-platform-module-auth-client-register-password.component-BlOn9609.mjs.map → acorex-platform-module-auth-client-register-password.component-M-ayP7oO.mjs.map} +1 -1
  53. package/fesm2022/{acorex-platform-module-auth-client-register.module-CpoYf5uG.mjs → acorex-platform-module-auth-client-register.module-Qa3ovje0.mjs} +4 -4
  54. package/fesm2022/{acorex-platform-module-auth-client-register.module-CpoYf5uG.mjs.map → acorex-platform-module-auth-client-register.module-Qa3ovje0.mjs.map} +1 -1
  55. package/fesm2022/{acorex-platform-module-auth-client-remove-pin-code.command-Da7ryul6.mjs → acorex-platform-module-auth-client-remove-pin-code.command-BenNCyt6.mjs} +2 -2
  56. package/fesm2022/{acorex-platform-module-auth-client-remove-pin-code.command-Da7ryul6.mjs.map → acorex-platform-module-auth-client-remove-pin-code.command-BenNCyt6.mjs.map} +1 -1
  57. package/fesm2022/{acorex-platform-module-auth-client-reset-password.component-D0nxlhJm.mjs → acorex-platform-module-auth-client-reset-password.component-BQfKSqpW.mjs} +6 -6
  58. package/fesm2022/{acorex-platform-module-auth-client-reset-password.component-D0nxlhJm.mjs.map → acorex-platform-module-auth-client-reset-password.component-BQfKSqpW.mjs.map} +1 -1
  59. package/fesm2022/{acorex-platform-module-auth-client-result.component-Bo1QkwMu.mjs → acorex-platform-module-auth-client-result.component-PhPaEAgh.mjs} +3 -3
  60. package/fesm2022/{acorex-platform-module-auth-client-result.component-Bo1QkwMu.mjs.map → acorex-platform-module-auth-client-result.component-PhPaEAgh.mjs.map} +1 -1
  61. package/fesm2022/acorex-platform-module-auth-client-routes-90eFjxx8.mjs +17 -0
  62. package/fesm2022/acorex-platform-module-auth-client-routes-90eFjxx8.mjs.map +1 -0
  63. package/fesm2022/{acorex-platform-module-auth-client-session-limit.component-DH58dRba.mjs → acorex-platform-module-auth-client-session-limit.component-Dc6TIn-2.mjs} +3 -3
  64. package/fesm2022/{acorex-platform-module-auth-client-session-limit.component-DH58dRba.mjs.map → acorex-platform-module-auth-client-session-limit.component-Dc6TIn-2.mjs.map} +1 -1
  65. package/fesm2022/{acorex-platform-module-auth-client-session-lock-overlay.component-cDCrwNRV.mjs → acorex-platform-module-auth-client-session-lock-overlay.component-ChigSAI-.mjs} +7 -7
  66. package/fesm2022/{acorex-platform-module-auth-client-session-lock-overlay.component-cDCrwNRV.mjs.map → acorex-platform-module-auth-client-session-lock-overlay.component-ChigSAI-.mjs.map} +1 -1
  67. package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.command-FjM1kzUj.mjs → acorex-platform-module-auth-client-set-pin-code.command-CefSbJz8.mjs} +3 -3
  68. package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.command-FjM1kzUj.mjs.map → acorex-platform-module-auth-client-set-pin-code.command-CefSbJz8.mjs.map} +1 -1
  69. package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.component-BgEgdFxQ.mjs → acorex-platform-module-auth-client-set-pin-code.component-DqFW_4rM.mjs} +6 -6
  70. package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.component-BgEgdFxQ.mjs.map → acorex-platform-module-auth-client-set-pin-code.component-DqFW_4rM.mjs.map} +1 -1
  71. package/fesm2022/{acorex-platform-module-auth-client-settings.provider-DGiK-MmW.mjs → acorex-platform-module-auth-client-settings.provider-DsKsZrOC.mjs} +18 -13
  72. package/fesm2022/acorex-platform-module-auth-client-settings.provider-DsKsZrOC.mjs.map +1 -0
  73. package/fesm2022/{acorex-platform-module-auth-client-signout-command-B7n_Fn4P.mjs → acorex-platform-module-auth-client-signout-command-D4Qgv7q2.mjs} +7 -1
  74. package/fesm2022/acorex-platform-module-auth-client-signout-command-D4Qgv7q2.mjs.map +1 -0
  75. package/fesm2022/{acorex-platform-module-auth-client-tenant-chooser.component-B8CNqHx5.mjs → acorex-platform-module-auth-client-tenant-chooser.component-DCdRCf1m.mjs} +5 -5
  76. package/fesm2022/{acorex-platform-module-auth-client-tenant-chooser.component-B8CNqHx5.mjs.map → acorex-platform-module-auth-client-tenant-chooser.component-DCdRCf1m.mjs.map} +1 -1
  77. package/fesm2022/acorex-platform-module-auth-client-two-factor-challenge.storage-mi0UD7Sc.mjs +48 -0
  78. package/fesm2022/acorex-platform-module-auth-client-two-factor-challenge.storage-mi0UD7Sc.mjs.map +1 -0
  79. package/fesm2022/acorex-platform-module-auth-client-two-factor-code.component-CtSv3MQu.mjs +200 -0
  80. package/fesm2022/acorex-platform-module-auth-client-two-factor-code.component-CtSv3MQu.mjs.map +1 -0
  81. package/fesm2022/{acorex-platform-module-auth-client-two-factor.module-CI8KC5M_.mjs → acorex-platform-module-auth-client-two-factor.module-B7tETPbq.mjs} +10 -5
  82. package/fesm2022/acorex-platform-module-auth-client-two-factor.module-B7tETPbq.mjs.map +1 -0
  83. package/fesm2022/{acorex-platform-module-auth-client-view-login-history.command-Cqb27L-l.mjs → acorex-platform-module-auth-client-view-login-history.command-CKPbyVWd.mjs} +2 -2
  84. package/fesm2022/{acorex-platform-module-auth-client-view-login-history.command-Cqb27L-l.mjs.map → acorex-platform-module-auth-client-view-login-history.command-CKPbyVWd.mjs.map} +1 -1
  85. package/fesm2022/acorex-platform-module-auth-client-waiting-room.component-IAVIt1fY.mjs +165 -0
  86. package/fesm2022/acorex-platform-module-auth-client-waiting-room.component-IAVIt1fY.mjs.map +1 -0
  87. package/fesm2022/acorex-platform-module-auth-client-welcome-onboarding-page.component-C2WYgv4l.mjs +813 -0
  88. package/fesm2022/acorex-platform-module-auth-client-welcome-onboarding-page.component-C2WYgv4l.mjs.map +1 -0
  89. package/fesm2022/acorex-platform-module-auth-client-welcome-onboarding.command-Ck1A26BI.mjs +59 -0
  90. package/fesm2022/acorex-platform-module-auth-client-welcome-onboarding.command-Ck1A26BI.mjs.map +1 -0
  91. package/fesm2022/acorex-platform-module-auth-client.mjs +1 -1
  92. package/package.json +2 -2
  93. package/types/acorex-platform-module-auth-client-contracts.d.ts +13 -3
  94. package/types/acorex-platform-module-auth-client.d.ts +60 -2
  95. package/fesm2022/acorex-platform-module-auth-client-acorex-platform-module-auth-client-CRl74b8g.mjs.map +0 -1
  96. package/fesm2022/acorex-platform-module-auth-client-blank.layout-BCXNPgrp.mjs.map +0 -1
  97. package/fesm2022/acorex-platform-module-auth-client-change-photo.command-CzO3A7OG.mjs.map +0 -1
  98. package/fesm2022/acorex-platform-module-auth-client-edit-account-info.command-CD9IrimO.mjs.map +0 -1
  99. package/fesm2022/acorex-platform-module-auth-client-password.component-BoWDVby5.mjs.map +0 -1
  100. package/fesm2022/acorex-platform-module-auth-client-profile-page.component-CGs24n0j.mjs.map +0 -1
  101. package/fesm2022/acorex-platform-module-auth-client-routes-B6iJHJ60.mjs +0 -13
  102. package/fesm2022/acorex-platform-module-auth-client-routes-B6iJHJ60.mjs.map +0 -1
  103. package/fesm2022/acorex-platform-module-auth-client-settings.provider-DGiK-MmW.mjs.map +0 -1
  104. package/fesm2022/acorex-platform-module-auth-client-signout-command-B7n_Fn4P.mjs.map +0 -1
  105. package/fesm2022/acorex-platform-module-auth-client-two-factor-code.component-BrqfaY8i.mjs +0 -40
  106. package/fesm2022/acorex-platform-module-auth-client-two-factor-code.component-BrqfaY8i.mjs.map +0 -1
  107. package/fesm2022/acorex-platform-module-auth-client-two-factor.module-CI8KC5M_.mjs.map +0 -1
@@ -16,10 +16,10 @@ import { AXPSessionService } from '@acorex-platform/framework-client/auth';
16
16
  import { AXPPlatformBrandingService } from '@acorex-platform/framework-client/common';
17
17
  import { AXPLogoComponent } from '@acorex-platform/framework-client/core';
18
18
  import { AXPUserAvatarComponent } from '@acorex-platform/framework-client/layout/components';
19
- import * as i5$1 from '@angular/common';
19
+ import * as i3$1 from '@angular/common';
20
20
  import { CommonModule } from '@angular/common';
21
21
  import { Router } from '@angular/router';
22
- import { w as AXPTenantChooserListComponent } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-CRl74b8g.mjs';
22
+ import { z as AXPTenantChooserListComponent } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-C1oSPf12.mjs';
23
23
 
24
24
  class AXPAuthTenantChooserComponent {
25
25
  constructor() {
@@ -41,7 +41,7 @@ class AXPAuthTenantChooserComponent {
41
41
  this.router.navigate(['/auth/login']);
42
42
  }
43
43
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPAuthTenantChooserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
44
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPAuthTenantChooserComponent, isStandalone: true, selector: "axp-auth-tenant-chooser", ngImport: i0, template: "<main *translate=\"let t\" class=\"axp-auth-chooser\">\n <div class=\"axp-auth-chooser__inner\">\n <!-- ----- Platform branding ----- -->\n <section class=\"axp-auth-chooser__brand\">\n <axp-logo\n logoKey=\"platform\"\n appearance=\"onLight\"\n format=\"full\"\n [size]=\"260\"\n [attr.alt]=\"platformTitle()\"\n ></axp-logo>\n </section>\n <!-- ----- Tenant selection card ----- -->\n <section class=\"axp-auth-chooser__card-wrap\">\n <div class=\"axp-auth-chooser__card\">\n <!-- ----- Profile header while catalog loads ----- -->\n @if (catalogLoading()) {\n <ax-skeleton [animated]=\"true\" class=\"size-[72px] rounded-full shrink-0\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-6 w-56 max-w-full\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-4 w-64 max-w-full\"></ax-skeleton>\n } @else {\n <axp-user-avatar\n [size]=\"72\"\n [userId]=\"$safeNavigationMigration(user?.id)!\"\n [showPresence]=\"false\"\n ></axp-user-avatar>\n <h2 class=\"md:text-lg font-medium\">\n {{ '@auth:welcome.message' | translate | async }}, {{ user?.title }}\n </h2>\n <p class=\"text-neutral-500 text-sm md:text-base font-medium\">\n {{ '@auth:tenant-chooser.description' | translate | async }}\n </p>\n }\n <div class=\"mt-3 w-full\">\n <axp-tenant-chooser-list (loadingChange)=\"handleCatalogLoading($event)\"></axp-tenant-chooser-list>\n </div>\n </div>\n </section>\n <!-- ----- Sign-out footer ----- -->\n <section class=\"axp-auth-chooser__footer\">\n <p class=\"text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a (click)=\"handleSignout()\" class=\"text-primary cursor-pointer hover:underline font-medium\">\n {{ '@auth:backLogin' | translate | async }}\n </a>\n </p>\n </section>\n </div>\n</main>\n", styles: ["@layer properties;.axp-auth-chooser{display:flex;width:100%;flex-direction:column;align-items:center;overflow-y:auto;background-color:rgba(var(--ax-sys-color-lightest-surface));height:100vh;height:100dvh;-webkit-overflow-scrolling:touch}.axp-auth-chooser__inner{display:flex;width:100%;flex-grow:1;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 6);padding-inline:calc(var(--spacing, .25rem) * 4);min-height:100%;box-sizing:border-box;padding-top:max(2.75rem,calc(env(safe-area-inset-top,0px) + 1.75rem));padding-bottom:max(1.5rem,env(safe-area-inset-bottom,0px))}.axp-auth-chooser__brand{display:flex;width:100%;flex-shrink:0;justify-content:center}.axp-auth-chooser__brand axp-logo{width:min(16.25rem,85vw);max-width:100%}.axp-auth-chooser__card-wrap{display:flex;width:100%;flex-shrink:0;justify-content:center}.axp-auth-chooser__card{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 4);border-radius:var(--radius-lg, .5rem);border-style:var(--tw-border-style);border-width:0px;padding:calc(var(--spacing, .25rem) * 5);text-align:center;--tw-shadow: 0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);max-width:28rem}.axp-auth-chooser__footer{flex-shrink:0;padding-inline:var(--spacing, .25rem);text-align:center}@media(min-width:640px){.axp-auth-chooser__inner{gap:calc(var(--spacing, .25rem) * 8);padding-inline:calc(var(--spacing, .25rem) * 6);padding-top:max(3rem,calc(env(safe-area-inset-top,0px) + 2rem))}.axp-auth-chooser__brand axp-logo{width:min(16.25rem,90vw)}}@media(min-width:768px){.axp-auth-chooser{background-color:var(--color-bg-default)}.axp-auth-chooser__inner{gap:calc(var(--spacing, .25rem) * 10);padding-inline:calc(var(--spacing, .25rem) * 6);padding-top:3.5rem;padding-bottom:2.5rem}.axp-auth-chooser__card{gap:calc(var(--spacing, .25rem) * 2);border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 6);--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);width:min(90vw,28rem);max-width:28rem}}@media(min-width:1024px){.axp-auth-chooser__inner{padding-inline:0px;padding-top:3.5rem;padding-bottom:2.5rem}.axp-auth-chooser__card{width:min(90vw,28rem)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n", ":host{display:contents}.gradient{background:-webkit-linear-gradient(var(--ax-current-v1),var(--ax-current-v2));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXImageModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: AXPLogoComponent, selector: "axp-logo", inputs: ["logoKey", "appearance", "size", "format"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i3.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "component", type: AXPUserAvatarComponent, selector: "axp-user-avatar", inputs: ["size", "userId", "showPresence", "displayName", "displayAvatar"] }, { kind: "component", type: AXPTenantChooserListComponent, selector: "axp-tenant-chooser-list", inputs: ["simple"], outputs: ["tenantChosen", "loadingChange"] }, { kind: "pipe", type: i5$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None }); }
44
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPAuthTenantChooserComponent, isStandalone: true, selector: "axp-auth-tenant-chooser", ngImport: i0, template: "<main *translate=\"let t\" class=\"axp-auth-chooser\">\n <div class=\"axp-auth-chooser__inner\">\n <!-- ----- Platform branding ----- -->\n <section class=\"axp-auth-chooser__brand\">\n <axp-logo\n logoKey=\"platform\"\n appearance=\"colored\"\n format=\"full\"\n [size]=\"260\"\n [attr.alt]=\"platformTitle()\"\n ></axp-logo>\n </section>\n <!-- ----- Tenant selection card ----- -->\n <section class=\"axp-auth-chooser__card-wrap\">\n <div class=\"axp-auth-chooser__card\">\n <!-- ----- Profile header while catalog loads ----- -->\n @if (catalogLoading()) {\n <ax-skeleton [animated]=\"true\" class=\"size-[72px] rounded-full shrink-0\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-6 w-56 max-w-full\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-4 w-64 max-w-full\"></ax-skeleton>\n } @else {\n <axp-user-avatar\n [size]=\"72\"\n [userId]=\"$safeNavigationMigration(user?.id)!\"\n [showPresence]=\"false\"\n ></axp-user-avatar>\n <h2 class=\"md:text-lg font-medium\">\n {{ '@auth:welcome.message' | translate | async }}, {{ user?.title }}\n </h2>\n <p class=\"text-neutral-500 text-sm md:text-base font-medium\">\n {{ '@auth:tenant-chooser.description' | translate | async }}\n </p>\n }\n <div class=\"mt-3 w-full\">\n <axp-tenant-chooser-list (loadingChange)=\"handleCatalogLoading($event)\"></axp-tenant-chooser-list>\n </div>\n </div>\n </section>\n <!-- ----- Sign-out footer ----- -->\n <section class=\"axp-auth-chooser__footer\">\n <p class=\"text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a (click)=\"handleSignout()\" class=\"text-primary cursor-pointer hover:underline font-medium\">\n {{ '@auth:backLogin' | translate | async }}\n </a>\n </p>\n </section>\n </div>\n</main>\n", styles: ["@layer properties;.axp-auth-chooser{display:flex;width:100%;flex-direction:column;align-items:center;overflow-y:auto;background-color:rgba(var(--ax-sys-color-lightest-surface));height:100vh;height:100dvh;-webkit-overflow-scrolling:touch}.axp-auth-chooser__inner{display:flex;width:100%;flex-grow:1;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 6);padding-inline:calc(var(--spacing, .25rem) * 4);min-height:100%;box-sizing:border-box;padding-top:max(2.75rem,calc(env(safe-area-inset-top,0px) + 1.75rem));padding-bottom:max(1.5rem,env(safe-area-inset-bottom,0px))}.axp-auth-chooser__brand{display:flex;width:100%;flex-shrink:0;justify-content:center}.axp-auth-chooser__brand axp-logo{width:min(16.25rem,85vw);max-width:100%}.axp-auth-chooser__card-wrap{display:flex;width:100%;flex-shrink:0;justify-content:center}.axp-auth-chooser__card{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 4);border-radius:var(--radius-lg, .5rem);border-style:var(--tw-border-style);border-width:0px;padding:calc(var(--spacing, .25rem) * 5);text-align:center;--tw-shadow: 0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);max-width:28rem}.axp-auth-chooser__footer{flex-shrink:0;padding-inline:var(--spacing, .25rem);text-align:center}@media(min-width:640px){.axp-auth-chooser__inner{gap:calc(var(--spacing, .25rem) * 8);padding-inline:calc(var(--spacing, .25rem) * 6);padding-top:max(3rem,calc(env(safe-area-inset-top,0px) + 2rem))}.axp-auth-chooser__brand axp-logo{width:min(16.25rem,90vw)}}@media(min-width:768px){.axp-auth-chooser{background-color:var(--color-bg-default)}.axp-auth-chooser__inner{gap:calc(var(--spacing, .25rem) * 10);padding-inline:calc(var(--spacing, .25rem) * 6);padding-top:3.5rem;padding-bottom:2.5rem}.axp-auth-chooser__card{gap:calc(var(--spacing, .25rem) * 2);border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 6);--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);width:min(90vw,28rem);max-width:28rem}}@media(min-width:1024px){.axp-auth-chooser__inner{padding-inline:0px;padding-top:3.5rem;padding-bottom:2.5rem}.axp-auth-chooser__card{width:min(90vw,28rem)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n", ":host{display:contents}.gradient{background:-webkit-linear-gradient(var(--ax-current-v1),var(--ax-current-v2));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXImageModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: AXPLogoComponent, selector: "axp-logo", inputs: ["logoKey", "appearance", "size", "format"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i3.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "component", type: AXPUserAvatarComponent, selector: "axp-user-avatar", inputs: ["size", "userId", "showPresence", "displayName", "displayAvatar"] }, { kind: "component", type: AXPTenantChooserListComponent, selector: "axp-tenant-chooser-list", inputs: ["simple"], outputs: ["tenantChosen", "loadingChange"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None }); }
45
45
  }
46
46
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPAuthTenantChooserComponent, decorators: [{
47
47
  type: Component,
@@ -60,8 +60,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
60
60
  AXTranslationModule,
61
61
  AXPUserAvatarComponent,
62
62
  AXPTenantChooserListComponent,
63
- ], changeDetection: ChangeDetectionStrategy.Eager, encapsulation: ViewEncapsulation.None, template: "<main *translate=\"let t\" class=\"axp-auth-chooser\">\n <div class=\"axp-auth-chooser__inner\">\n <!-- ----- Platform branding ----- -->\n <section class=\"axp-auth-chooser__brand\">\n <axp-logo\n logoKey=\"platform\"\n appearance=\"onLight\"\n format=\"full\"\n [size]=\"260\"\n [attr.alt]=\"platformTitle()\"\n ></axp-logo>\n </section>\n <!-- ----- Tenant selection card ----- -->\n <section class=\"axp-auth-chooser__card-wrap\">\n <div class=\"axp-auth-chooser__card\">\n <!-- ----- Profile header while catalog loads ----- -->\n @if (catalogLoading()) {\n <ax-skeleton [animated]=\"true\" class=\"size-[72px] rounded-full shrink-0\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-6 w-56 max-w-full\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-4 w-64 max-w-full\"></ax-skeleton>\n } @else {\n <axp-user-avatar\n [size]=\"72\"\n [userId]=\"$safeNavigationMigration(user?.id)!\"\n [showPresence]=\"false\"\n ></axp-user-avatar>\n <h2 class=\"md:text-lg font-medium\">\n {{ '@auth:welcome.message' | translate | async }}, {{ user?.title }}\n </h2>\n <p class=\"text-neutral-500 text-sm md:text-base font-medium\">\n {{ '@auth:tenant-chooser.description' | translate | async }}\n </p>\n }\n <div class=\"mt-3 w-full\">\n <axp-tenant-chooser-list (loadingChange)=\"handleCatalogLoading($event)\"></axp-tenant-chooser-list>\n </div>\n </div>\n </section>\n <!-- ----- Sign-out footer ----- -->\n <section class=\"axp-auth-chooser__footer\">\n <p class=\"text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a (click)=\"handleSignout()\" class=\"text-primary cursor-pointer hover:underline font-medium\">\n {{ '@auth:backLogin' | translate | async }}\n </a>\n </p>\n </section>\n </div>\n</main>\n", styles: ["@layer properties;.axp-auth-chooser{display:flex;width:100%;flex-direction:column;align-items:center;overflow-y:auto;background-color:rgba(var(--ax-sys-color-lightest-surface));height:100vh;height:100dvh;-webkit-overflow-scrolling:touch}.axp-auth-chooser__inner{display:flex;width:100%;flex-grow:1;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 6);padding-inline:calc(var(--spacing, .25rem) * 4);min-height:100%;box-sizing:border-box;padding-top:max(2.75rem,calc(env(safe-area-inset-top,0px) + 1.75rem));padding-bottom:max(1.5rem,env(safe-area-inset-bottom,0px))}.axp-auth-chooser__brand{display:flex;width:100%;flex-shrink:0;justify-content:center}.axp-auth-chooser__brand axp-logo{width:min(16.25rem,85vw);max-width:100%}.axp-auth-chooser__card-wrap{display:flex;width:100%;flex-shrink:0;justify-content:center}.axp-auth-chooser__card{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 4);border-radius:var(--radius-lg, .5rem);border-style:var(--tw-border-style);border-width:0px;padding:calc(var(--spacing, .25rem) * 5);text-align:center;--tw-shadow: 0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);max-width:28rem}.axp-auth-chooser__footer{flex-shrink:0;padding-inline:var(--spacing, .25rem);text-align:center}@media(min-width:640px){.axp-auth-chooser__inner{gap:calc(var(--spacing, .25rem) * 8);padding-inline:calc(var(--spacing, .25rem) * 6);padding-top:max(3rem,calc(env(safe-area-inset-top,0px) + 2rem))}.axp-auth-chooser__brand axp-logo{width:min(16.25rem,90vw)}}@media(min-width:768px){.axp-auth-chooser{background-color:var(--color-bg-default)}.axp-auth-chooser__inner{gap:calc(var(--spacing, .25rem) * 10);padding-inline:calc(var(--spacing, .25rem) * 6);padding-top:3.5rem;padding-bottom:2.5rem}.axp-auth-chooser__card{gap:calc(var(--spacing, .25rem) * 2);border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 6);--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);width:min(90vw,28rem);max-width:28rem}}@media(min-width:1024px){.axp-auth-chooser__inner{padding-inline:0px;padding-top:3.5rem;padding-bottom:2.5rem}.axp-auth-chooser__card{width:min(90vw,28rem)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n", ":host{display:contents}.gradient{background:-webkit-linear-gradient(var(--ax-current-v1),var(--ax-current-v2));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
63
+ ], changeDetection: ChangeDetectionStrategy.Eager, encapsulation: ViewEncapsulation.None, template: "<main *translate=\"let t\" class=\"axp-auth-chooser\">\n <div class=\"axp-auth-chooser__inner\">\n <!-- ----- Platform branding ----- -->\n <section class=\"axp-auth-chooser__brand\">\n <axp-logo\n logoKey=\"platform\"\n appearance=\"colored\"\n format=\"full\"\n [size]=\"260\"\n [attr.alt]=\"platformTitle()\"\n ></axp-logo>\n </section>\n <!-- ----- Tenant selection card ----- -->\n <section class=\"axp-auth-chooser__card-wrap\">\n <div class=\"axp-auth-chooser__card\">\n <!-- ----- Profile header while catalog loads ----- -->\n @if (catalogLoading()) {\n <ax-skeleton [animated]=\"true\" class=\"size-[72px] rounded-full shrink-0\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-6 w-56 max-w-full\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-4 w-64 max-w-full\"></ax-skeleton>\n } @else {\n <axp-user-avatar\n [size]=\"72\"\n [userId]=\"$safeNavigationMigration(user?.id)!\"\n [showPresence]=\"false\"\n ></axp-user-avatar>\n <h2 class=\"md:text-lg font-medium\">\n {{ '@auth:welcome.message' | translate | async }}, {{ user?.title }}\n </h2>\n <p class=\"text-neutral-500 text-sm md:text-base font-medium\">\n {{ '@auth:tenant-chooser.description' | translate | async }}\n </p>\n }\n <div class=\"mt-3 w-full\">\n <axp-tenant-chooser-list (loadingChange)=\"handleCatalogLoading($event)\"></axp-tenant-chooser-list>\n </div>\n </div>\n </section>\n <!-- ----- Sign-out footer ----- -->\n <section class=\"axp-auth-chooser__footer\">\n <p class=\"text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a (click)=\"handleSignout()\" class=\"text-primary cursor-pointer hover:underline font-medium\">\n {{ '@auth:backLogin' | translate | async }}\n </a>\n </p>\n </section>\n </div>\n</main>\n", styles: ["@layer properties;.axp-auth-chooser{display:flex;width:100%;flex-direction:column;align-items:center;overflow-y:auto;background-color:rgba(var(--ax-sys-color-lightest-surface));height:100vh;height:100dvh;-webkit-overflow-scrolling:touch}.axp-auth-chooser__inner{display:flex;width:100%;flex-grow:1;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 6);padding-inline:calc(var(--spacing, .25rem) * 4);min-height:100%;box-sizing:border-box;padding-top:max(2.75rem,calc(env(safe-area-inset-top,0px) + 1.75rem));padding-bottom:max(1.5rem,env(safe-area-inset-bottom,0px))}.axp-auth-chooser__brand{display:flex;width:100%;flex-shrink:0;justify-content:center}.axp-auth-chooser__brand axp-logo{width:min(16.25rem,85vw);max-width:100%}.axp-auth-chooser__card-wrap{display:flex;width:100%;flex-shrink:0;justify-content:center}.axp-auth-chooser__card{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 4);border-radius:var(--radius-lg, .5rem);border-style:var(--tw-border-style);border-width:0px;padding:calc(var(--spacing, .25rem) * 5);text-align:center;--tw-shadow: 0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);max-width:28rem}.axp-auth-chooser__footer{flex-shrink:0;padding-inline:var(--spacing, .25rem);text-align:center}@media(min-width:640px){.axp-auth-chooser__inner{gap:calc(var(--spacing, .25rem) * 8);padding-inline:calc(var(--spacing, .25rem) * 6);padding-top:max(3rem,calc(env(safe-area-inset-top,0px) + 2rem))}.axp-auth-chooser__brand axp-logo{width:min(16.25rem,90vw)}}@media(min-width:768px){.axp-auth-chooser{background-color:var(--color-bg-default)}.axp-auth-chooser__inner{gap:calc(var(--spacing, .25rem) * 10);padding-inline:calc(var(--spacing, .25rem) * 6);padding-top:3.5rem;padding-bottom:2.5rem}.axp-auth-chooser__card{gap:calc(var(--spacing, .25rem) * 2);border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 6);--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);width:min(90vw,28rem);max-width:28rem}}@media(min-width:1024px){.axp-auth-chooser__inner{padding-inline:0px;padding-top:3.5rem;padding-bottom:2.5rem}.axp-auth-chooser__card{width:min(90vw,28rem)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n", ":host{display:contents}.gradient{background:-webkit-linear-gradient(var(--ax-current-v1),var(--ax-current-v2));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
64
64
  }], ctorParameters: () => [] });
65
65
 
66
66
  export { AXPAuthTenantChooserComponent };
67
- //# sourceMappingURL=acorex-platform-module-auth-client-tenant-chooser.component-B8CNqHx5.mjs.map
67
+ //# sourceMappingURL=acorex-platform-module-auth-client-tenant-chooser.component-DCdRCf1m.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-auth-client-tenant-chooser.component-B8CNqHx5.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/account/tenant-chooser/tenant-chooser.component.ts","../../../../libs/modules/auth/client/src/lib/pages/account/tenant-chooser/tenant-chooser.component.html"],"sourcesContent":["import { Component, ViewEncapsulation, inject, ChangeDetectionStrategy, signal } from '@angular/core';\n\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXImageModule } from '@acorex/components/image';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXSkeletonModule } from '@acorex/components/skeleton';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPPlatformBrandingService } from '@acorex-platform/framework-client/common';\nimport { AXPLogoComponent } from '@acorex-platform/framework-client/core';\nimport { AXPUserAvatarComponent } from '@acorex-platform/framework-client/layout/components';\nimport { CommonModule } from '@angular/common';\nimport { Router } from '@angular/router';\nimport { AXPTenantChooserListComponent } from './tenant-chooser-list.component';\n\n@Component({\n selector: 'axp-auth-tenant-chooser',\n templateUrl: './tenant-chooser.component.html',\n styleUrls: ['../shared/auth-chooser.layout.css', './tenant-chooser.component.css'],\n imports: [\n CommonModule,\n AXFormModule,\n AXTextBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXCheckBoxModule,\n AXImageModule,\n AXDecoratorModule,\n AXPLogoComponent,\n AXLoadingModule,\n AXSkeletonModule,\n AXTranslationModule,\n AXPUserAvatarComponent,\n AXPTenantChooserListComponent,\n ],\n changeDetection: ChangeDetectionStrategy.Eager,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPAuthTenantChooserComponent {\n private router = inject(Router);\n private readonly platformBranding = inject(AXPPlatformBrandingService);\n protected readonly platformTitle = signal('');\n private sessionService = inject(AXPSessionService);\n\n constructor() {\n void this.platformBranding.resolvePlatformTitle().then((title) => this.platformTitle.set(title));\n }\n\n protected user = this.sessionService.user;\n protected catalogLoading = signal(true);\n\n handleCatalogLoading(loading: boolean): void {\n this.catalogLoading.set(loading);\n }\n\n async handleSignout() {\n await this.sessionService.signout();\n this.router.navigate(['/auth/login']);\n }\n}\n","<main *translate=\"let t\" class=\"axp-auth-chooser\">\n <div class=\"axp-auth-chooser__inner\">\n <!-- ----- Platform branding ----- -->\n <section class=\"axp-auth-chooser__brand\">\n <axp-logo\n logoKey=\"platform\"\n appearance=\"onLight\"\n format=\"full\"\n [size]=\"260\"\n [attr.alt]=\"platformTitle()\"\n ></axp-logo>\n </section>\n <!-- ----- Tenant selection card ----- -->\n <section class=\"axp-auth-chooser__card-wrap\">\n <div class=\"axp-auth-chooser__card\">\n <!-- ----- Profile header while catalog loads ----- -->\n @if (catalogLoading()) {\n <ax-skeleton [animated]=\"true\" class=\"size-[72px] rounded-full shrink-0\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-6 w-56 max-w-full\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-4 w-64 max-w-full\"></ax-skeleton>\n } @else {\n <axp-user-avatar\n [size]=\"72\"\n [userId]=\"$safeNavigationMigration(user?.id)!\"\n [showPresence]=\"false\"\n ></axp-user-avatar>\n <h2 class=\"md:text-lg font-medium\">\n {{ '@auth:welcome.message' | translate | async }}, {{ user?.title }}\n </h2>\n <p class=\"text-neutral-500 text-sm md:text-base font-medium\">\n {{ '@auth:tenant-chooser.description' | translate | async }}\n </p>\n }\n <div class=\"mt-3 w-full\">\n <axp-tenant-chooser-list (loadingChange)=\"handleCatalogLoading($event)\"></axp-tenant-chooser-list>\n </div>\n </div>\n </section>\n <!-- ----- Sign-out footer ----- -->\n <section class=\"axp-auth-chooser__footer\">\n <p class=\"text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a (click)=\"handleSignout()\" class=\"text-primary cursor-pointer hover:underline font-medium\">\n {{ '@auth:backLogin' | translate | async }}\n </a>\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,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,EAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAD,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAKpB,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAvBzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EAAA,OAAA,EAG1B;wBACP,YAAY;wBACZ,YAAY;wBACZ,eAAe;wBACf,cAAc;wBACd,aAAa;wBACb,gBAAgB;wBAChB,aAAa;wBACb,iBAAiB;wBACjB,gBAAgB;wBAChB,eAAe;wBACf,gBAAgB;wBAChB,mBAAmB;wBACnB,sBAAsB;wBACtB,6BAA6B;AAC9B,qBAAA,EAAA,eAAA,EACgB,uBAAuB,CAAC,KAAK,EAAA,aAAA,EAC/B,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,2hEAAA,EAAA,MAAA,EAAA,CAAA,4yIAAA,EAAA,4QAAA,CAAA,EAAA;;;"}
1
+ {"version":3,"file":"acorex-platform-module-auth-client-tenant-chooser.component-DCdRCf1m.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/account/tenant-chooser/tenant-chooser.component.ts","../../../../libs/modules/auth/client/src/lib/pages/account/tenant-chooser/tenant-chooser.component.html"],"sourcesContent":["import { Component, ViewEncapsulation, inject, ChangeDetectionStrategy, signal } from '@angular/core';\n\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXImageModule } from '@acorex/components/image';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXSkeletonModule } from '@acorex/components/skeleton';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPPlatformBrandingService } from '@acorex-platform/framework-client/common';\nimport { AXPLogoComponent } from '@acorex-platform/framework-client/core';\nimport { AXPUserAvatarComponent } from '@acorex-platform/framework-client/layout/components';\nimport { CommonModule } from '@angular/common';\nimport { Router } from '@angular/router';\nimport { AXPTenantChooserListComponent } from './tenant-chooser-list.component';\n\n@Component({\n selector: 'axp-auth-tenant-chooser',\n templateUrl: './tenant-chooser.component.html',\n styleUrls: ['../shared/auth-chooser.layout.css', './tenant-chooser.component.css'],\n imports: [\n CommonModule,\n AXFormModule,\n AXTextBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXCheckBoxModule,\n AXImageModule,\n AXDecoratorModule,\n AXPLogoComponent,\n AXLoadingModule,\n AXSkeletonModule,\n AXTranslationModule,\n AXPUserAvatarComponent,\n AXPTenantChooserListComponent,\n ],\n changeDetection: ChangeDetectionStrategy.Eager,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPAuthTenantChooserComponent {\n private router = inject(Router);\n private readonly platformBranding = inject(AXPPlatformBrandingService);\n protected readonly platformTitle = signal('');\n private sessionService = inject(AXPSessionService);\n\n constructor() {\n void this.platformBranding.resolvePlatformTitle().then((title) => this.platformTitle.set(title));\n }\n\n protected user = this.sessionService.user;\n protected catalogLoading = signal(true);\n\n handleCatalogLoading(loading: boolean): void {\n this.catalogLoading.set(loading);\n }\n\n async handleSignout() {\n await this.sessionService.signout();\n this.router.navigate(['/auth/login']);\n }\n}\n","<main *translate=\"let t\" class=\"axp-auth-chooser\">\n <div class=\"axp-auth-chooser__inner\">\n <!-- ----- Platform branding ----- -->\n <section class=\"axp-auth-chooser__brand\">\n <axp-logo\n logoKey=\"platform\"\n appearance=\"colored\"\n format=\"full\"\n [size]=\"260\"\n [attr.alt]=\"platformTitle()\"\n ></axp-logo>\n </section>\n <!-- ----- Tenant selection card ----- -->\n <section class=\"axp-auth-chooser__card-wrap\">\n <div class=\"axp-auth-chooser__card\">\n <!-- ----- Profile header while catalog loads ----- -->\n @if (catalogLoading()) {\n <ax-skeleton [animated]=\"true\" class=\"size-[72px] rounded-full shrink-0\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-6 w-56 max-w-full\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-4 w-64 max-w-full\"></ax-skeleton>\n } @else {\n <axp-user-avatar\n [size]=\"72\"\n [userId]=\"$safeNavigationMigration(user?.id)!\"\n [showPresence]=\"false\"\n ></axp-user-avatar>\n <h2 class=\"md:text-lg font-medium\">\n {{ '@auth:welcome.message' | translate | async }}, {{ user?.title }}\n </h2>\n <p class=\"text-neutral-500 text-sm md:text-base font-medium\">\n {{ '@auth:tenant-chooser.description' | translate | async }}\n </p>\n }\n <div class=\"mt-3 w-full\">\n <axp-tenant-chooser-list (loadingChange)=\"handleCatalogLoading($event)\"></axp-tenant-chooser-list>\n </div>\n </div>\n </section>\n <!-- ----- Sign-out footer ----- -->\n <section class=\"axp-auth-chooser__footer\">\n <p class=\"text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a (click)=\"handleSignout()\" class=\"text-primary cursor-pointer hover:underline font-medium\">\n {{ '@auth:backLogin' | translate | async }}\n </a>\n </p>\n </section>\n </div>\n</main>\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;MA2Ca,6BAA6B,CAAA;AAMxC,IAAA,WAAA,GAAA;AALQ,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC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AAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAD,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAKpB,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAvBzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EAAA,OAAA,EAG1B;wBACP,YAAY;wBACZ,YAAY;wBACZ,eAAe;wBACf,cAAc;wBACd,aAAa;wBACb,gBAAgB;wBAChB,aAAa;wBACb,iBAAiB;wBACjB,gBAAgB;wBAChB,eAAe;wBACf,gBAAgB;wBAChB,mBAAmB;wBACnB,sBAAsB;wBACtB,6BAA6B;AAC9B,qBAAA,EAAA,eAAA,EACgB,uBAAuB,CAAC,KAAK,EAAA,aAAA,EAC/B,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,2hEAAA,EAAA,MAAA,EAAA,CAAA,4yIAAA,EAAA,4QAAA,CAAA,EAAA;;;"}
@@ -0,0 +1,48 @@
1
+ //#region ----- Types -----
2
+ //#endregion
3
+ //#region ----- Constants -----
4
+ const AXP_TWO_FACTOR_CHALLENGE_STORAGE_KEY = 'axp.auth.twoFactorChallenge';
5
+ //#endregion
6
+ //#region ----- Storage helpers -----
7
+ function readTwoFactorChallenge() {
8
+ if (typeof sessionStorage === 'undefined') {
9
+ return null;
10
+ }
11
+ try {
12
+ const raw = sessionStorage.getItem(AXP_TWO_FACTOR_CHALLENGE_STORAGE_KEY);
13
+ if (!raw) {
14
+ return null;
15
+ }
16
+ const parsed = JSON.parse(raw);
17
+ const challengeId = typeof parsed.challengeId === 'string' ? parsed.challengeId.trim() : '';
18
+ if (!challengeId) {
19
+ return null;
20
+ }
21
+ return {
22
+ challengeId,
23
+ rememberMe: parsed.rememberMe === true,
24
+ };
25
+ }
26
+ catch {
27
+ return null;
28
+ }
29
+ }
30
+ function writeTwoFactorChallenge(value) {
31
+ if (typeof sessionStorage === 'undefined') {
32
+ return;
33
+ }
34
+ sessionStorage.setItem(AXP_TWO_FACTOR_CHALLENGE_STORAGE_KEY, JSON.stringify({
35
+ challengeId: value.challengeId.trim(),
36
+ rememberMe: value.rememberMe === true,
37
+ }));
38
+ }
39
+ function clearTwoFactorChallenge() {
40
+ if (typeof sessionStorage === 'undefined') {
41
+ return;
42
+ }
43
+ sessionStorage.removeItem(AXP_TWO_FACTOR_CHALLENGE_STORAGE_KEY);
44
+ }
45
+ //#endregion
46
+
47
+ export { clearTwoFactorChallenge as c, readTwoFactorChallenge as r, writeTwoFactorChallenge as w };
48
+ //# sourceMappingURL=acorex-platform-module-auth-client-two-factor-challenge.storage-mi0UD7Sc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-auth-client-two-factor-challenge.storage-mi0UD7Sc.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/two-factor/two-factor-challenge.storage.ts"],"sourcesContent":["//#region ----- Types -----\n\nexport type AXPTwoFactorChallengeStorage = {\n challengeId: string;\n rememberMe: boolean;\n};\n\n//#endregion\n\n//#region ----- Constants -----\n\nexport const AXP_TWO_FACTOR_CHALLENGE_STORAGE_KEY = 'axp.auth.twoFactorChallenge';\n\n//#endregion\n\n//#region ----- Storage helpers -----\n\nexport function readTwoFactorChallenge(): AXPTwoFactorChallengeStorage | null {\n if (typeof sessionStorage === 'undefined') {\n return null;\n }\n\n try {\n const raw = sessionStorage.getItem(AXP_TWO_FACTOR_CHALLENGE_STORAGE_KEY);\n if (!raw) {\n return null;\n }\n\n const parsed = JSON.parse(raw) as Partial<AXPTwoFactorChallengeStorage>;\n const challengeId = typeof parsed.challengeId === 'string' ? parsed.challengeId.trim() : '';\n if (!challengeId) {\n return null;\n }\n\n return {\n challengeId,\n rememberMe: parsed.rememberMe === true,\n };\n } catch {\n return null;\n }\n}\n\nexport function writeTwoFactorChallenge(value: AXPTwoFactorChallengeStorage): void {\n if (typeof sessionStorage === 'undefined') {\n return;\n }\n\n sessionStorage.setItem(\n AXP_TWO_FACTOR_CHALLENGE_STORAGE_KEY,\n JSON.stringify({\n challengeId: value.challengeId.trim(),\n rememberMe: value.rememberMe === true,\n }),\n );\n}\n\nexport function clearTwoFactorChallenge(): void {\n if (typeof sessionStorage === 'undefined') {\n return;\n }\n\n sessionStorage.removeItem(AXP_TWO_FACTOR_CHALLENGE_STORAGE_KEY);\n}\n\n//#endregion\n"],"names":[],"mappings":"AAAA;AAOA;AAEA;AAEO,MAAM,oCAAoC,GAAG,6BAA6B;AAEjF;AAEA;SAEgB,sBAAsB,GAAA;AACpC,IAAA,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE;AACzC,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,IAAI;QACF,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,CAAC,oCAAoC,CAAC;QACxE,IAAI,CAAC,GAAG,EAAE;AACR,YAAA,OAAO,IAAI;QACb;QAEA,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA0C;QACvE,MAAM,WAAW,GAAG,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE;QAC3F,IAAI,CAAC,WAAW,EAAE;AAChB,YAAA,OAAO,IAAI;QACb;QAEA,OAAO;YACL,WAAW;AACX,YAAA,UAAU,EAAE,MAAM,CAAC,UAAU,KAAK,IAAI;SACvC;IACH;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,IAAI;IACb;AACF;AAEM,SAAU,uBAAuB,CAAC,KAAmC,EAAA;AACzE,IAAA,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE;QACzC;IACF;IAEA,cAAc,CAAC,OAAO,CACpB,oCAAoC,EACpC,IAAI,CAAC,SAAS,CAAC;AACb,QAAA,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE;AACrC,QAAA,UAAU,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI;AACtC,KAAA,CAAC,CACH;AACH;SAEgB,uBAAuB,GAAA;AACrC,IAAA,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE;QACzC;IACF;AAEA,IAAA,cAAc,CAAC,UAAU,CAAC,oCAAoC,CAAC;AACjE;AAEA;;"}
@@ -0,0 +1,200 @@
1
+ import * as i1$1 from '@acorex/components/button';
2
+ import { AXButtonModule } from '@acorex/components/button';
3
+ import { AXDecoratorModule } from '@acorex/components/decorators';
4
+ import * as i1 from '@acorex/components/form';
5
+ import { AXFormModule, AXFormComponent } from '@acorex/components/form';
6
+ import * as i4 from '@acorex/components/label';
7
+ import { AXLabelModule } from '@acorex/components/label';
8
+ import * as i2$1 from '@acorex/components/loading';
9
+ import { AXLoadingModule } from '@acorex/components/loading';
10
+ import * as i2 from '@acorex/components/text-box';
11
+ import { AXTextBoxModule } from '@acorex/components/text-box';
12
+ import { AXToastService } from '@acorex/components/toast';
13
+ import * as i5 from '@acorex/core/translation';
14
+ import { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';
15
+ import { AXValidationModule } from '@acorex/core/validation';
16
+ import { AXPSessionService } from '@acorex-platform/framework-client/auth';
17
+ import { AXPHomePageService } from '@acorex-platform/framework-client/common';
18
+ import { AXM_TWO_FACTOR_ERROR_CODES } from '@acorex-platform/module-security-management-client/contracts';
19
+ import * as i3 from '@angular/common';
20
+ import { CommonModule } from '@angular/common';
21
+ import * as i0 from '@angular/core';
22
+ import { inject, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
23
+ import { FormsModule } from '@angular/forms';
24
+ import { RouterModule, Router, ActivatedRoute } from '@angular/router';
25
+ import { BehaviorSubject, firstValueFrom } from 'rxjs';
26
+ import { w as AXMAuthPlatformSettingsService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-C1oSPf12.mjs';
27
+ import { r as readTwoFactorChallenge, c as clearTwoFactorChallenge } from './acorex-platform-module-auth-client-two-factor-challenge.storage-mi0UD7Sc.mjs';
28
+
29
+ //#region ----- Constants -----
30
+ const TWO_FACTOR_ERROR_I18N = {
31
+ [AXM_TWO_FACTOR_ERROR_CODES.InvalidInput]: '@auth:twofactor.errors.invalid-input',
32
+ [AXM_TWO_FACTOR_ERROR_CODES.IncorrectCode]: '@auth:twofactor.errors.incorrect-code',
33
+ [AXM_TWO_FACTOR_ERROR_CODES.ChallengeExpired]: '@auth:twofactor.errors.challenge-expired',
34
+ [AXM_TWO_FACTOR_ERROR_CODES.RateLimited]: '@auth:twofactor.errors.rate-limited',
35
+ [AXM_TWO_FACTOR_ERROR_CODES.InvalidConfiguration]: '@auth:twofactor.errors.invalid-configuration',
36
+ [AXM_TWO_FACTOR_ERROR_CODES.NotEnabled]: '@auth:twofactor.errors.not-enabled',
37
+ };
38
+ const CHALLENGE_CLEARING_CODES = new Set([
39
+ AXM_TWO_FACTOR_ERROR_CODES.ChallengeExpired,
40
+ AXM_TWO_FACTOR_ERROR_CODES.InvalidConfiguration,
41
+ AXM_TWO_FACTOR_ERROR_CODES.NotEnabled,
42
+ ]);
43
+ //#endregion
44
+ //#region ----- Module Imports -----
45
+ const MODULES = [
46
+ CommonModule,
47
+ FormsModule,
48
+ AXFormModule,
49
+ AXTextBoxModule,
50
+ AXButtonModule,
51
+ AXLabelModule,
52
+ AXDecoratorModule,
53
+ AXTranslationModule,
54
+ AXLoadingModule,
55
+ RouterModule,
56
+ AXValidationModule,
57
+ ];
58
+ //#endregion
59
+ //#region ----- Component -----
60
+ class AXPAuthTwoFactorCodeComponent {
61
+ constructor() {
62
+ //#region ----- Services & Dependencies -----
63
+ this.sessionService = inject(AXPSessionService);
64
+ this.authPlatformSettings = inject(AXMAuthPlatformSettingsService);
65
+ this.homePageService = inject(AXPHomePageService);
66
+ this.toastService = inject(AXToastService);
67
+ this.translateService = inject(AXTranslationService);
68
+ this.router = inject(Router);
69
+ this.activateRoute = inject(ActivatedRoute);
70
+ //#endregion
71
+ //#region ----- State -----
72
+ this.code = '';
73
+ this.isLoading$ = new BehaviorSubject(false);
74
+ this.submitText = 'twofactor.submit';
75
+ this.challengeId = '';
76
+ this.rememberMe = false;
77
+ }
78
+ //#endregion
79
+ //#region ----- Lifecycle -----
80
+ ngOnInit() {
81
+ const stored = readTwoFactorChallenge();
82
+ if (!stored?.challengeId) {
83
+ void this.router.navigate(['/auth/login'], {
84
+ queryParams: this.activateRoute.snapshot.queryParams,
85
+ });
86
+ return;
87
+ }
88
+ this.challengeId = stored.challengeId;
89
+ this.rememberMe = stored.rememberMe;
90
+ }
91
+ //#endregion
92
+ //#region ----- Event Handlers -----
93
+ handleBackToLogin() {
94
+ clearTwoFactorChallenge();
95
+ void this.router.navigate(['/auth/login'], {
96
+ queryParams: this.activateRoute.snapshot.queryParams,
97
+ });
98
+ }
99
+ handleVerifyClick() {
100
+ const strategyName = this.authPlatformSettings.defaultStrategyName();
101
+ this.sessionService.setStrategy(strategyName);
102
+ const redirectUrl = this.activateRoute.snapshot.queryParams['redirectUrl'];
103
+ void this.form.validate().then(async (form) => {
104
+ if (!form.result) {
105
+ return;
106
+ }
107
+ const trimmedCode = this.code.trim();
108
+ if (!trimmedCode || !this.challengeId) {
109
+ return;
110
+ }
111
+ this.isLoading$.next(true);
112
+ this.submitText = 'processing';
113
+ try {
114
+ await this.sessionService.signin({
115
+ strategy: strategyName,
116
+ username: '',
117
+ password: '',
118
+ challengeId: this.challengeId,
119
+ code: trimmedCode,
120
+ rememberMe: this.rememberMe,
121
+ });
122
+ const isAuthenticated = await firstValueFrom(this.sessionService.isAuthenticated$);
123
+ if (!isAuthenticated) {
124
+ throw new Error('Authentication failed after two-factor verification');
125
+ }
126
+ clearTwoFactorChallenge();
127
+ await this.navigateAfterAuth(redirectUrl);
128
+ }
129
+ catch (error) {
130
+ await this.handleVerifyError(error);
131
+ }
132
+ finally {
133
+ this.submitText = 'twofactor.submit';
134
+ this.isLoading$.next(false);
135
+ }
136
+ });
137
+ }
138
+ //#endregion
139
+ //#region ----- Private Helpers -----
140
+ async navigateAfterAuth(redirectUrl) {
141
+ if (this.sessionService.tenant?.id == null) {
142
+ await this.router.navigate(['/auth/account/tenant-chooser']);
143
+ return;
144
+ }
145
+ if (this.sessionService.application?.id == null) {
146
+ await this.router.navigate(['/auth/account/app-chooser']);
147
+ return;
148
+ }
149
+ if (redirectUrl) {
150
+ await this.router.navigate([redirectUrl]);
151
+ return;
152
+ }
153
+ await this.homePageService.navigateTo();
154
+ }
155
+ async handleVerifyError(error) {
156
+ const apiError = this.extractApiError(error);
157
+ const errorCode = (typeof apiError?.['error'] === 'string' && apiError['error']) ||
158
+ (typeof apiError?.['code'] === 'string' && apiError['code']) ||
159
+ '';
160
+ const messageKey = TWO_FACTOR_ERROR_I18N[errorCode] ?? '@auth:twofactor.errors.verify-failed';
161
+ const content = await this.translateService.translateAsync(messageKey);
162
+ this.toastService.show({
163
+ color: 'danger',
164
+ content,
165
+ timeOut: 5000,
166
+ });
167
+ this.code = '';
168
+ if (CHALLENGE_CLEARING_CODES.has(errorCode)) {
169
+ clearTwoFactorChallenge();
170
+ await this.router.navigate(['/auth/login'], {
171
+ queryParams: this.activateRoute.snapshot.queryParams,
172
+ });
173
+ }
174
+ }
175
+ extractApiError(error) {
176
+ if (!error || typeof error !== 'object') {
177
+ return null;
178
+ }
179
+ const err = error;
180
+ if (err['apiError'] && typeof err['apiError'] === 'object') {
181
+ return err['apiError'];
182
+ }
183
+ if (err['error'] && typeof err['error'] === 'object') {
184
+ return err['error'];
185
+ }
186
+ return null;
187
+ }
188
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPAuthTwoFactorCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
189
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPAuthTwoFactorCodeComponent, isStandalone: true, selector: "axp-auth-two-factor-code", viewQueries: [{ propertyName: "form", first: true, predicate: AXFormComponent, descendants: true }], ngImport: i0, template: "<ng-container *translate=\"let t\">\n <div class=\"axp-auth-form\">\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:twofactor.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:twofactor.hint' | translate | async }}\n </p>\n </div>\n <div class=\"w-full lg:w-96 mx-auto\">\n <ax-form>\n <div class=\"flex flex-col gap-4 lg:gap-6\">\n <ax-form-field>\n <ax-label class=\"text-start\">{{ '@auth:twofactor.textBoxHint' | translate | async }}</ax-label>\n <ax-text-box\n [name]=\"'twoFactorCode'\"\n id=\"twoFactorCode\"\n [autoComplete]=\"'one-time-code'\"\n [(value)]=\"code\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n <ax-button\n class=\"w-full\"\n [text]=\"('@auth:' + submitText) | translate | async\"\n color=\"primary\"\n [disabled]=\"isLoading$ | async\"\n (onClick)=\"handleVerifyClick()\"\n >\n @if (isLoading$ | async) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n <ax-button\n class=\"w-full\"\n look=\"outline\"\n [text]=\"'@auth:twofactor.back-to-login' | translate | async\"\n [disabled]=\"isLoading$ | async\"\n (onClick)=\"handleBackToLogin()\"\n >\n </ax-button>\n </div>\n </ax-form>\n </div>\n </div>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i1.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i1.AXFormComponent, selector: "ax-form", inputs: ["disabled", "readonly", "labelMode", "look", "messageStyle", "updateOn", "inUserInteractionActive"], outputs: ["onValidate", "updateOnChange"] }, { kind: "directive", type: i1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i2.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "maskPattern", "customTokens", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onMaskChanged"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i4.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i2$1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None }); }
190
+ }
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPAuthTwoFactorCodeComponent, decorators: [{
192
+ type: Component,
193
+ args: [{ selector: 'axp-auth-two-factor-code', imports: [...MODULES], changeDetection: ChangeDetectionStrategy.Eager, encapsulation: ViewEncapsulation.None, template: "<ng-container *translate=\"let t\">\n <div class=\"axp-auth-form\">\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:twofactor.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:twofactor.hint' | translate | async }}\n </p>\n </div>\n <div class=\"w-full lg:w-96 mx-auto\">\n <ax-form>\n <div class=\"flex flex-col gap-4 lg:gap-6\">\n <ax-form-field>\n <ax-label class=\"text-start\">{{ '@auth:twofactor.textBoxHint' | translate | async }}</ax-label>\n <ax-text-box\n [name]=\"'twoFactorCode'\"\n id=\"twoFactorCode\"\n [autoComplete]=\"'one-time-code'\"\n [(value)]=\"code\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n <ax-button\n class=\"w-full\"\n [text]=\"('@auth:' + submitText) | translate | async\"\n color=\"primary\"\n [disabled]=\"isLoading$ | async\"\n (onClick)=\"handleVerifyClick()\"\n >\n @if (isLoading$ | async) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n <ax-button\n class=\"w-full\"\n look=\"outline\"\n [text]=\"'@auth:twofactor.back-to-login' | translate | async\"\n [disabled]=\"isLoading$ | async\"\n (onClick)=\"handleBackToLogin()\"\n >\n </ax-button>\n </div>\n </ax-form>\n </div>\n </div>\n</ng-container>\n" }]
194
+ }], propDecorators: { form: [{
195
+ type: ViewChild,
196
+ args: [AXFormComponent]
197
+ }] } });
198
+
199
+ export { AXPAuthTwoFactorCodeComponent };
200
+ //# sourceMappingURL=acorex-platform-module-auth-client-two-factor-code.component-CtSv3MQu.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-auth-client-two-factor-code.component-CtSv3MQu.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/two-factor/two-factor-code/two-factor-code.component.ts","../../../../libs/modules/auth/client/src/lib/pages/two-factor/two-factor-code/two-factor-code.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormComponent, AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPHomePageService } from '@acorex-platform/framework-client/common';\nimport { AXM_TWO_FACTOR_ERROR_CODES } from '@acorex-platform/module-security-management-client/contracts';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n OnInit,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ActivatedRoute, Router, RouterModule } from '@angular/router';\nimport { BehaviorSubject, firstValueFrom } from 'rxjs';\n\nimport { AXMAuthPlatformSettingsService } from '../../../auth-platform-settings.service';\nimport {\n clearTwoFactorChallenge,\n readTwoFactorChallenge,\n} from '../two-factor-challenge.storage';\n\n//#region ----- Constants -----\n\nconst TWO_FACTOR_ERROR_I18N: Record<string, string> = {\n [AXM_TWO_FACTOR_ERROR_CODES.InvalidInput]: '@auth:twofactor.errors.invalid-input',\n [AXM_TWO_FACTOR_ERROR_CODES.IncorrectCode]: '@auth:twofactor.errors.incorrect-code',\n [AXM_TWO_FACTOR_ERROR_CODES.ChallengeExpired]: '@auth:twofactor.errors.challenge-expired',\n [AXM_TWO_FACTOR_ERROR_CODES.RateLimited]: '@auth:twofactor.errors.rate-limited',\n [AXM_TWO_FACTOR_ERROR_CODES.InvalidConfiguration]: '@auth:twofactor.errors.invalid-configuration',\n [AXM_TWO_FACTOR_ERROR_CODES.NotEnabled]: '@auth:twofactor.errors.not-enabled',\n};\n\nconst CHALLENGE_CLEARING_CODES = new Set<string>([\n AXM_TWO_FACTOR_ERROR_CODES.ChallengeExpired,\n AXM_TWO_FACTOR_ERROR_CODES.InvalidConfiguration,\n AXM_TWO_FACTOR_ERROR_CODES.NotEnabled,\n]);\n\n//#endregion\n\n//#region ----- Module Imports -----\n\nconst MODULES = [\n CommonModule,\n FormsModule,\n AXFormModule,\n AXTextBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXDecoratorModule,\n AXTranslationModule,\n AXLoadingModule,\n RouterModule,\n AXValidationModule,\n];\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axp-auth-two-factor-code',\n templateUrl: './two-factor-code.component.html',\n imports: [...MODULES],\n changeDetection: ChangeDetectionStrategy.Eager,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPAuthTwoFactorCodeComponent implements OnInit {\n //#region ----- Services & Dependencies -----\n\n private readonly sessionService = inject(AXPSessionService);\n private readonly authPlatformSettings = inject(AXMAuthPlatformSettingsService);\n private readonly homePageService = inject(AXPHomePageService);\n private readonly toastService = inject(AXToastService);\n private readonly translateService = inject(AXTranslationService);\n private readonly router = inject(Router);\n private readonly activateRoute = inject(ActivatedRoute);\n\n //#endregion\n\n //#region ----- Form References -----\n\n @ViewChild(AXFormComponent)\n private form!: AXFormComponent;\n\n //#endregion\n\n //#region ----- State -----\n\n protected code = '';\n protected isLoading$ = new BehaviorSubject<boolean>(false);\n protected submitText = 'twofactor.submit';\n private challengeId = '';\n private rememberMe = false;\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n ngOnInit(): void {\n const stored = readTwoFactorChallenge();\n if (!stored?.challengeId) {\n void this.router.navigate(['/auth/login'], {\n queryParams: this.activateRoute.snapshot.queryParams,\n });\n return;\n }\n\n this.challengeId = stored.challengeId;\n this.rememberMe = stored.rememberMe;\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected handleBackToLogin(): void {\n clearTwoFactorChallenge();\n void this.router.navigate(['/auth/login'], {\n queryParams: this.activateRoute.snapshot.queryParams,\n });\n }\n\n protected handleVerifyClick(): void {\n const strategyName = this.authPlatformSettings.defaultStrategyName();\n this.sessionService.setStrategy(strategyName);\n const redirectUrl = this.activateRoute.snapshot.queryParams['redirectUrl'];\n\n void this.form.validate().then(async (form) => {\n if (!form.result) {\n return;\n }\n\n const trimmedCode = this.code.trim();\n if (!trimmedCode || !this.challengeId) {\n return;\n }\n\n this.isLoading$.next(true);\n this.submitText = 'processing';\n\n try {\n await this.sessionService.signin({\n strategy: strategyName,\n username: '',\n password: '',\n challengeId: this.challengeId,\n code: trimmedCode,\n rememberMe: this.rememberMe,\n });\n\n const isAuthenticated = await firstValueFrom(this.sessionService.isAuthenticated$);\n if (!isAuthenticated) {\n throw new Error('Authentication failed after two-factor verification');\n }\n\n clearTwoFactorChallenge();\n await this.navigateAfterAuth(redirectUrl);\n } catch (error: unknown) {\n await this.handleVerifyError(error);\n } finally {\n this.submitText = 'twofactor.submit';\n this.isLoading$.next(false);\n }\n });\n }\n\n //#endregion\n\n //#region ----- Private Helpers -----\n\n private async navigateAfterAuth(redirectUrl?: string): Promise<void> {\n if (this.sessionService.tenant?.id == null) {\n await this.router.navigate(['/auth/account/tenant-chooser']);\n return;\n }\n\n if (this.sessionService.application?.id == null) {\n await this.router.navigate(['/auth/account/app-chooser']);\n return;\n }\n\n if (redirectUrl) {\n await this.router.navigate([redirectUrl]);\n return;\n }\n\n await this.homePageService.navigateTo();\n }\n\n private async handleVerifyError(error: unknown): Promise<void> {\n const apiError = this.extractApiError(error);\n const errorCode =\n (typeof apiError?.['error'] === 'string' && apiError['error']) ||\n (typeof apiError?.['code'] === 'string' && apiError['code']) ||\n '';\n\n const messageKey = TWO_FACTOR_ERROR_I18N[errorCode] ?? '@auth:twofactor.errors.verify-failed';\n const content = await this.translateService.translateAsync(messageKey);\n\n this.toastService.show({\n color: 'danger',\n content,\n timeOut: 5000,\n });\n\n this.code = '';\n\n if (CHALLENGE_CLEARING_CODES.has(errorCode)) {\n clearTwoFactorChallenge();\n await this.router.navigate(['/auth/login'], {\n queryParams: this.activateRoute.snapshot.queryParams,\n });\n }\n }\n\n private extractApiError(error: unknown): Record<string, unknown> | null {\n if (!error || typeof error !== 'object') {\n return null;\n }\n\n const err = error as Record<string, unknown>;\n if (err['apiError'] && typeof err['apiError'] === 'object') {\n return err['apiError'] as Record<string, unknown>;\n }\n\n if (err['error'] && typeof err['error'] === 'object') {\n return err['error'] as Record<string, unknown>;\n }\n\n return null;\n }\n\n //#endregion\n}\n\n//#endregion\n","<ng-container *translate=\"let t\">\n <div class=\"axp-auth-form\">\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:twofactor.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:twofactor.hint' | translate | async }}\n </p>\n </div>\n <div class=\"w-full lg:w-96 mx-auto\">\n <ax-form>\n <div class=\"flex flex-col gap-4 lg:gap-6\">\n <ax-form-field>\n <ax-label class=\"text-start\">{{ '@auth:twofactor.textBoxHint' | translate | async }}</ax-label>\n <ax-text-box\n [name]=\"'twoFactorCode'\"\n id=\"twoFactorCode\"\n [autoComplete]=\"'one-time-code'\"\n [(value)]=\"code\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n <ax-button\n class=\"w-full\"\n [text]=\"('@auth:' + submitText) | translate | async\"\n color=\"primary\"\n [disabled]=\"isLoading$ | async\"\n (onClick)=\"handleVerifyClick()\"\n >\n @if (isLoading$ | async) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n <ax-button\n class=\"w-full\"\n look=\"outline\"\n [text]=\"'@auth:twofactor.back-to-login' | translate | async\"\n [disabled]=\"isLoading$ | async\"\n (onClick)=\"handleBackToLogin()\"\n >\n </ax-button>\n </div>\n </ax-form>\n </div>\n </div>\n</ng-container>\n"],"names":["i3","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;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EAAA,EAAA,CAAA,qBAAA,EAAA,QAAA,EAAA,aAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACnB,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACf,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACZ,kBAAkB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAcP,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAPzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,EAAA,OAAA,EAE3B,CAAC,GAAG,OAAO,CAAC,EAAA,eAAA,EACJ,uBAAuB,CAAC,KAAK,EAAA,aAAA,EAC/B,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,oqDAAA,EAAA;;sBAiBpC,SAAS;uBAAC,eAAe;;;"}
@@ -2,11 +2,16 @@ import * as i0 from '@angular/core';
2
2
  import { NgModule } from '@angular/core';
3
3
  import { ROUTES } from '@angular/router';
4
4
 
5
- function routesFacory() {
5
+ function routesFactory() {
6
6
  const routes = [
7
+ {
8
+ path: 'twofactor',
9
+ loadComponent: () => import('./acorex-platform-module-auth-client-two-factor-code.component-CtSv3MQu.mjs').then((c) => c.AXPAuthTwoFactorCodeComponent),
10
+ },
7
11
  {
8
12
  path: 'two-step',
9
- loadComponent: () => import('./acorex-platform-module-auth-client-two-factor-code.component-BrqfaY8i.mjs').then((c) => c.AXPAuthTwoFactorCodeComponent),
13
+ redirectTo: 'twofactor',
14
+ pathMatch: 'full',
10
15
  },
11
16
  ];
12
17
  return routes;
@@ -18,7 +23,7 @@ class AXPTwoFactorModule {
18
23
  {
19
24
  provide: ROUTES,
20
25
  multi: true,
21
- useFactory: routesFacory,
26
+ useFactory: routesFactory,
22
27
  },
23
28
  ] }); }
24
29
  }
@@ -32,11 +37,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
32
37
  {
33
38
  provide: ROUTES,
34
39
  multi: true,
35
- useFactory: routesFacory,
40
+ useFactory: routesFactory,
36
41
  },
37
42
  ],
38
43
  }]
39
44
  }] });
40
45
 
41
46
  export { AXPTwoFactorModule };
42
- //# sourceMappingURL=acorex-platform-module-auth-client-two-factor.module-CI8KC5M_.mjs.map
47
+ //# sourceMappingURL=acorex-platform-module-auth-client-two-factor.module-B7tETPbq.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-auth-client-two-factor.module-B7tETPbq.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/two-factor/two-factor.module.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { ROUTES, Routes } from '@angular/router';\n\nfunction routesFactory() {\n const routes: Routes = [\n {\n path: 'twofactor',\n loadComponent: () =>\n import('./two-factor-code/two-factor-code.component').then((c) => c.AXPAuthTwoFactorCodeComponent),\n },\n {\n path: 'two-step',\n redirectTo: 'twofactor',\n pathMatch: 'full',\n },\n ];\n return routes;\n}\n\n@NgModule({\n declarations: [],\n imports: [],\n exports: [],\n providers: [\n {\n provide: ROUTES,\n multi: true,\n useFactory: routesFactory,\n },\n ],\n})\nexport class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A;;;"}
@@ -3,7 +3,7 @@ import { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layou
3
3
  import * as i0 from '@angular/core';
4
4
  import { inject, Injectable } from '@angular/core';
5
5
  import { isEmpty } from 'lodash';
6
- import { s as AXPLoginHistoryService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-CRl74b8g.mjs';
6
+ import { t as AXPLoginHistoryService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-C1oSPf12.mjs';
7
7
 
8
8
  //#region ---- View login history command ----
9
9
  /** Opens a read-only dialog listing recent sign-in attempts for the current user. */
@@ -104,4 +104,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
104
104
  }] });
105
105
 
106
106
  export { AXPViewLoginHistoryCommand };
107
- //# sourceMappingURL=acorex-platform-module-auth-client-view-login-history.command-Cqb27L-l.mjs.map
107
+ //# sourceMappingURL=acorex-platform-module-auth-client-view-login-history.command-CKPbyVWd.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-auth-client-view-login-history.command-Cqb27L-l.mjs","sources":["../../../../libs/modules/auth/client/src/lib/commands/view-login-history.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';\n\nimport { inject, Injectable } from '@angular/core';\nimport { isEmpty } from 'lodash';\nimport { AXPLoginHistoryEntry, AXPLoginHistoryService } from '../shared/services/login-history.service';\n\n//#region ---- View login history command ----\n\n/** Opens a read-only dialog listing recent sign-in attempts for the current user. */\n@Injectable({ providedIn: 'root' })\nexport class AXPViewLoginHistoryCommand implements AXPCommand {\n //#region ---- Services & Dependencies ----\n\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly loginHistoryService = inject(AXPLoginHistoryService);\n private readonly translateService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Command ----\n\n async execute(): AXPCommandExecuteResultPromise<void> {\n const entries = await this.loginHistoryService.getEntries();\n const rows = await this.buildRows(entries);\n\n const dialogTitle = await this.translateService.translateAsync(\n '@auth:profile-page.commands.view-login-history.dialog.title',\n );\n\n await this.layoutBuilder\n .create()\n .dialog((dialog) => {\n dialog.setTitle(dialogTitle).setSize('lg').setCloseButton(true);\n\n if (isEmpty(rows)) {\n dialog.setMessage('@auth:profile-page.commands.view-login-history.empty');\n } else {\n dialog.content((layout) => {\n layout.list((list) => {\n list\n .setDataSource(rows)\n .setColumns([\n {\n name: 'lastLoginDate',\n title: '@auth:profile-page.commands.view-login-history.columns.date',\n width: '180px',\n widget: {\n type: 'date-time-editor',\n path: 'lastLoginDate',\n options: { format: 'datetime', readOnly: true },\n },\n },\n {\n name: 'device',\n title: '@auth:profile-page.commands.view-login-history.columns.device',\n widget: { type: 'text-editor', path: 'device', options: { readOnly: true } },\n },\n {\n name: 'location',\n title: '@auth:profile-page.commands.view-login-history.columns.location',\n widget: { type: 'text-editor', path: 'location', options: { readOnly: true } },\n },\n {\n name: 'ipAddress',\n title: '@auth:profile-page.commands.view-login-history.columns.ip-address',\n width: '140px',\n widget: { type: 'text-editor', path: 'ipAddress', options: { readOnly: true } },\n },\n {\n name: 'browser',\n title: '@auth:profile-page.commands.view-login-history.columns.browser',\n widget: { type: 'text-editor', path: 'browser', options: { readOnly: true } },\n },\n {\n name: 'statusLabel',\n title: '@auth:profile-page.commands.view-login-history.columns.status',\n width: '120px',\n widget: { type: 'text-editor', path: 'statusLabel', options: { readOnly: true } },\n },\n ])\n .setPaging(true)\n .setShowHeader(true)\n .setAllowSelection(false)\n .setMinHeight(360);\n });\n });\n }\n })\n .show();\n\n return {\n success: true,\n kind: 'object',\n data: undefined,\n metadata: { refresh: false },\n };\n }\n\n //#endregion\n\n //#region ---- Utility Methods ----\n\n private async buildRows(\n entries: AXPLoginHistoryEntry[],\n ): Promise<Array<AXPLoginHistoryEntry & { statusLabel: string }>> {\n return Promise.all(\n entries.map(async (entry) => ({\n ...entry,\n statusLabel: await this.translateService.translateAsync(\n `@auth:profile-page.commands.view-login-history.status.${entry.status}`,\n ),\n })),\n );\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAQA;AAEA;MAEa,0BAA0B,CAAA;AADvC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC/C,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,sBAAsB,CAAC;AACpD,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAqGjE,IAAA;;;AA/FC,IAAA,MAAM,OAAO,GAAA;QACX,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE;QAC3D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;QAE1C,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAC5D,6DAA6D,CAC9D;QAED,MAAM,IAAI,CAAC;AACR,aAAA,MAAM;AACN,aAAA,MAAM,CAAC,CAAC,MAAM,KAAI;AACjB,YAAA,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC;AAE/D,YAAA,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;AACjB,gBAAA,MAAM,CAAC,UAAU,CAAC,sDAAsD,CAAC;YAC3E;iBAAO;AACL,gBAAA,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,KAAI;AACxB,oBAAA,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,KAAI;wBACnB;6BACG,aAAa,CAAC,IAAI;AAClB,6BAAA,UAAU,CAAC;AACV,4BAAA;AACE,gCAAA,IAAI,EAAE,eAAe;AACrB,gCAAA,KAAK,EA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version":3,"file":"acorex-platform-module-auth-client-view-login-history.command-CKPbyVWd.mjs","sources":["../../../../libs/modules/auth/client/src/lib/commands/view-login-history.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';\n\nimport { inject, Injectable } from '@angular/core';\nimport { isEmpty } from 'lodash';\nimport { AXPLoginHistoryEntry, AXPLoginHistoryService } from '../shared/services/login-history.service';\n\n//#region ---- View login history command ----\n\n/** Opens a read-only dialog listing recent sign-in attempts for the current user. */\n@Injectable({ providedIn: 'root' })\nexport class AXPViewLoginHistoryCommand implements AXPCommand {\n //#region ---- Services & Dependencies ----\n\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly loginHistoryService = inject(AXPLoginHistoryService);\n private readonly translateService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Command ----\n\n async execute(): AXPCommandExecuteResultPromise<void> {\n const entries = await this.loginHistoryService.getEntries();\n const rows = await this.buildRows(entries);\n\n const dialogTitle = await this.translateService.translateAsync(\n '@auth:profile-page.commands.view-login-history.dialog.title',\n );\n\n await this.layoutBuilder\n .create()\n .dialog((dialog) => {\n dialog.setTitle(dialogTitle).setSize('lg').setCloseButton(true);\n\n if (isEmpty(rows)) {\n dialog.setMessage('@auth:profile-page.commands.view-login-history.empty');\n } else {\n dialog.content((layout) => {\n layout.list((list) => {\n list\n .setDataSource(rows)\n .setColumns([\n {\n name: 'lastLoginDate',\n title: '@auth:profile-page.commands.view-login-history.columns.date',\n width: '180px',\n widget: {\n type: 'date-time-editor',\n path: 'lastLoginDate',\n options: { format: 'datetime', readOnly: true },\n },\n },\n {\n name: 'device',\n title: '@auth:profile-page.commands.view-login-history.columns.device',\n widget: { type: 'text-editor', path: 'device', options: { readOnly: true } },\n },\n {\n name: 'location',\n title: '@auth:profile-page.commands.view-login-history.columns.location',\n widget: { type: 'text-editor', path: 'location', options: { readOnly: true } },\n },\n {\n name: 'ipAddress',\n title: '@auth:profile-page.commands.view-login-history.columns.ip-address',\n width: '140px',\n widget: { type: 'text-editor', path: 'ipAddress', options: { readOnly: true } },\n },\n {\n name: 'browser',\n title: '@auth:profile-page.commands.view-login-history.columns.browser',\n widget: { type: 'text-editor', path: 'browser', options: { readOnly: true } },\n },\n {\n name: 'statusLabel',\n title: '@auth:profile-page.commands.view-login-history.columns.status',\n width: '120px',\n widget: { type: 'text-editor', path: 'statusLabel', options: { readOnly: true } },\n },\n ])\n .setPaging(true)\n .setShowHeader(true)\n .setAllowSelection(false)\n .setMinHeight(360);\n });\n });\n }\n })\n .show();\n\n return {\n success: true,\n kind: 'object',\n data: undefined,\n metadata: { refresh: false },\n };\n }\n\n //#endregion\n\n //#region ---- Utility Methods ----\n\n private async buildRows(\n entries: AXPLoginHistoryEntry[],\n ): Promise<Array<AXPLoginHistoryEntry & { statusLabel: string }>> {\n return Promise.all(\n entries.map(async (entry) => ({\n ...entry,\n statusLabel: await this.translateService.translateAsync(\n `@auth:profile-page.commands.view-login-history.status.${entry.status}`,\n ),\n })),\n );\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAQA;AAEA;MAEa,0BAA0B,CAAA;AADvC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC/C,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,sBAAsB,CAAC;AACpD,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAqGjE,IAAA;;;AA/FC,IAAA,MAAM,OAAO,GAAA;QACX,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE;QAC3D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;QAE1C,MAAM,WAAW,GAAG,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