@acorex-platform/module-auth-client 0.0.66 → 0.0.69

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 (52) hide show
  1. package/fesm2022/{acorex-platform-module-auth-client-acorex-platform-module-auth-client-CN5vRSEZ.mjs → acorex-platform-module-auth-client-acorex-platform-module-auth-client-Dgo6MzxI.mjs} +31 -31
  2. package/fesm2022/{acorex-platform-module-auth-client-acorex-platform-module-auth-client-CN5vRSEZ.mjs.map → acorex-platform-module-auth-client-acorex-platform-module-auth-client-Dgo6MzxI.mjs.map} +1 -1
  3. package/fesm2022/{acorex-platform-module-auth-client-app-chooser.component-CNR-t2OL.mjs → acorex-platform-module-auth-client-app-chooser.component-nSUtqF_D.mjs} +2 -2
  4. package/fesm2022/{acorex-platform-module-auth-client-app-chooser.component-CNR-t2OL.mjs.map → acorex-platform-module-auth-client-app-chooser.component-nSUtqF_D.mjs.map} +1 -1
  5. package/fesm2022/{acorex-platform-module-auth-client-change-password.command-D7oHp3Tk.mjs → acorex-platform-module-auth-client-change-password.command-Bman8avz.mjs} +2 -2
  6. package/fesm2022/{acorex-platform-module-auth-client-change-password.command-D7oHp3Tk.mjs.map → acorex-platform-module-auth-client-change-password.command-Bman8avz.mjs.map} +1 -1
  7. package/fesm2022/{acorex-platform-module-auth-client-change-photo.command-D_n3Ahmj.mjs → acorex-platform-module-auth-client-change-photo.command-DFS8TE__.mjs} +2 -2
  8. package/fesm2022/{acorex-platform-module-auth-client-change-photo.command-D_n3Ahmj.mjs.map → acorex-platform-module-auth-client-change-photo.command-DFS8TE__.mjs.map} +1 -1
  9. package/fesm2022/{acorex-platform-module-auth-client-get-user-activity.query-BBCDko_I.mjs → acorex-platform-module-auth-client-get-user-activity.query-ZTJMfhir.mjs} +2 -2
  10. package/fesm2022/{acorex-platform-module-auth-client-get-user-activity.query-BBCDko_I.mjs.map → acorex-platform-module-auth-client-get-user-activity.query-ZTJMfhir.mjs.map} +1 -1
  11. package/fesm2022/{acorex-platform-module-auth-client-lock-screen.command-DNQRcNVK.mjs → acorex-platform-module-auth-client-lock-screen.command-CUs7Q6yh.mjs} +2 -2
  12. package/fesm2022/{acorex-platform-module-auth-client-lock-screen.command-DNQRcNVK.mjs.map → acorex-platform-module-auth-client-lock-screen.command-CUs7Q6yh.mjs.map} +1 -1
  13. package/fesm2022/{acorex-platform-module-auth-client-login.module-qkXYibtr.mjs → acorex-platform-module-auth-client-login.module-DFWtA7S3.mjs} +3 -3
  14. package/fesm2022/{acorex-platform-module-auth-client-login.module-qkXYibtr.mjs.map → acorex-platform-module-auth-client-login.module-DFWtA7S3.mjs.map} +1 -1
  15. package/fesm2022/{acorex-platform-module-auth-client-manage-two-factor.command-C3T0gPHl.mjs → acorex-platform-module-auth-client-manage-two-factor.command-BXK7Lvpw.mjs} +2 -2
  16. package/fesm2022/{acorex-platform-module-auth-client-manage-two-factor.command-C3T0gPHl.mjs.map → acorex-platform-module-auth-client-manage-two-factor.command-BXK7Lvpw.mjs.map} +1 -1
  17. package/fesm2022/{acorex-platform-module-auth-client-open-sessions.command-D_YqoYjt.mjs → acorex-platform-module-auth-client-open-sessions.command-DToDT9eb.mjs} +2 -2
  18. package/fesm2022/{acorex-platform-module-auth-client-open-sessions.command-D_YqoYjt.mjs.map → acorex-platform-module-auth-client-open-sessions.command-DToDT9eb.mjs.map} +1 -1
  19. package/fesm2022/{acorex-platform-module-auth-client-password.component-Lvsez0-1.mjs → acorex-platform-module-auth-client-password.component-DAp_-zko.mjs} +2 -2
  20. package/fesm2022/{acorex-platform-module-auth-client-password.component-Lvsez0-1.mjs.map → acorex-platform-module-auth-client-password.component-DAp_-zko.mjs.map} +1 -1
  21. package/fesm2022/{acorex-platform-module-auth-client-profile-activity-chart.component-LpyJFXl9.mjs → acorex-platform-module-auth-client-profile-activity-chart.component-CLW52NUu.mjs} +2 -2
  22. package/fesm2022/{acorex-platform-module-auth-client-profile-activity-chart.component-LpyJFXl9.mjs.map → acorex-platform-module-auth-client-profile-activity-chart.component-CLW52NUu.mjs.map} +1 -1
  23. package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-DzESXOAt.mjs → acorex-platform-module-auth-client-profile-page-component.provider-D5xhGDPH.mjs} +3 -3
  24. package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-DzESXOAt.mjs.map → acorex-platform-module-auth-client-profile-page-component.provider-D5xhGDPH.mjs.map} +1 -1
  25. package/fesm2022/{acorex-platform-module-auth-client-profile-page.component-MatsNuqc.mjs → acorex-platform-module-auth-client-profile-page.component-Dc7gRTQD.mjs} +3 -3
  26. package/fesm2022/{acorex-platform-module-auth-client-profile-page.component-MatsNuqc.mjs.map → acorex-platform-module-auth-client-profile-page.component-Dc7gRTQD.mjs.map} +1 -1
  27. package/fesm2022/{acorex-platform-module-auth-client-register-password.component-CqOsT6I6.mjs → acorex-platform-module-auth-client-register-password.component-C4zu5hpL.mjs} +2 -2
  28. package/fesm2022/{acorex-platform-module-auth-client-register-password.component-CqOsT6I6.mjs.map → acorex-platform-module-auth-client-register-password.component-C4zu5hpL.mjs.map} +1 -1
  29. package/fesm2022/{acorex-platform-module-auth-client-register.module-Izk6-GRU.mjs → acorex-platform-module-auth-client-register.module-Dz-SOKXN.mjs} +3 -3
  30. package/fesm2022/{acorex-platform-module-auth-client-register.module-Izk6-GRU.mjs.map → acorex-platform-module-auth-client-register.module-Dz-SOKXN.mjs.map} +1 -1
  31. package/fesm2022/{acorex-platform-module-auth-client-remove-pin-code.command-Cq9FMrtP.mjs → acorex-platform-module-auth-client-remove-pin-code.command-LKjypQTk.mjs} +2 -2
  32. package/fesm2022/{acorex-platform-module-auth-client-remove-pin-code.command-Cq9FMrtP.mjs.map → acorex-platform-module-auth-client-remove-pin-code.command-LKjypQTk.mjs.map} +1 -1
  33. package/fesm2022/{acorex-platform-module-auth-client-session-lock-overlay.component-BGujfU4G.mjs → acorex-platform-module-auth-client-session-lock-overlay.component-PQ91EQjh.mjs} +2 -2
  34. package/fesm2022/{acorex-platform-module-auth-client-session-lock-overlay.component-BGujfU4G.mjs.map → acorex-platform-module-auth-client-session-lock-overlay.component-PQ91EQjh.mjs.map} +1 -1
  35. package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.command-CoGcZIPV.mjs → acorex-platform-module-auth-client-set-pin-code.command-BdtPwfLH.mjs} +3 -3
  36. package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.command-CoGcZIPV.mjs.map → acorex-platform-module-auth-client-set-pin-code.command-BdtPwfLH.mjs.map} +1 -1
  37. package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.component-CoW81kSQ.mjs → acorex-platform-module-auth-client-set-pin-code.component-L3DlTawo.mjs} +2 -2
  38. package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.component-CoW81kSQ.mjs.map → acorex-platform-module-auth-client-set-pin-code.component-L3DlTawo.mjs.map} +1 -1
  39. package/fesm2022/{acorex-platform-module-auth-client-tenant-chooser.component-CK4ZArN-.mjs → acorex-platform-module-auth-client-tenant-chooser.component-cRTVB-7T.mjs} +2 -2
  40. package/fesm2022/{acorex-platform-module-auth-client-tenant-chooser.component-CK4ZArN-.mjs.map → acorex-platform-module-auth-client-tenant-chooser.component-cRTVB-7T.mjs.map} +1 -1
  41. package/fesm2022/{acorex-platform-module-auth-client-two-factor-code.component-3oy2lQAi.mjs → acorex-platform-module-auth-client-two-factor-code.component-DDzjCHid.mjs} +2 -2
  42. package/fesm2022/{acorex-platform-module-auth-client-two-factor-code.component-3oy2lQAi.mjs.map → acorex-platform-module-auth-client-two-factor-code.component-DDzjCHid.mjs.map} +1 -1
  43. package/fesm2022/{acorex-platform-module-auth-client-two-factor.module-CRx6T5H5.mjs → acorex-platform-module-auth-client-two-factor.module-BC8AJTp4.mjs} +2 -2
  44. package/fesm2022/{acorex-platform-module-auth-client-two-factor.module-CRx6T5H5.mjs.map → acorex-platform-module-auth-client-two-factor.module-BC8AJTp4.mjs.map} +1 -1
  45. package/fesm2022/{acorex-platform-module-auth-client-view-login-history.command-BmjD2Aqv.mjs → acorex-platform-module-auth-client-view-login-history.command-EHXTmZtV.mjs} +2 -2
  46. package/fesm2022/{acorex-platform-module-auth-client-view-login-history.command-BmjD2Aqv.mjs.map → acorex-platform-module-auth-client-view-login-history.command-EHXTmZtV.mjs.map} +1 -1
  47. package/fesm2022/{acorex-platform-module-auth-client-welcome-onboarding-page.component-BwVu2fzw.mjs → acorex-platform-module-auth-client-welcome-onboarding-page.component-CQUpjsZw.mjs} +2 -2
  48. package/fesm2022/{acorex-platform-module-auth-client-welcome-onboarding-page.component-BwVu2fzw.mjs.map → acorex-platform-module-auth-client-welcome-onboarding-page.component-CQUpjsZw.mjs.map} +1 -1
  49. package/fesm2022/{acorex-platform-module-auth-client-welcome-onboarding.command-D-o9nga7.mjs → acorex-platform-module-auth-client-welcome-onboarding.command-D8cyXb5q.mjs} +2 -2
  50. package/fesm2022/{acorex-platform-module-auth-client-welcome-onboarding.command-D-o9nga7.mjs.map → acorex-platform-module-auth-client-welcome-onboarding.command-D8cyXb5q.mjs.map} +1 -1
  51. package/fesm2022/acorex-platform-module-auth-client.mjs +1 -1
  52. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-auth-client-session-lock-overlay.component-BGujfU4G.mjs","sources":["../../../../libs/modules/auth/client/src/lib/features/session-lock/session-lock-overlay.component.ts","../../../../libs/modules/auth/client/src/lib/features/session-lock/session-lock-overlay.component.html"],"sourcesContent":["import { AXFocusTrapDirective } from '@acorex/cdk/focus-trap';\nimport { AXClickEvent, AXComponentState } from '@acorex/cdk/common';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXOtpCompletedEvent, AXOtpComponent, AXOtpModule } from '@acorex/components/otp';\nimport { AXPasswordBoxComponent, AXPasswordBoxModule } from '@acorex/components/password-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPDeviceService } from '@acorex-platform/framework-client/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPUserAvatarComponent, AXPVirtualKeypadComponent } from '@acorex-platform/framework-client/layout/components';\nimport { CommonModule } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n inject,\n Injector,\n OnInit,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { defaultTo, first, get } from 'lodash';\nimport { AXP_AUTH_PIN_CODE_LENGTH, AXP_AUTH_PIN_CODE_PATTERN } from '../../shared/constants/pin-code.constants';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { AXMAuthCommandKeys } from '@acorex-platform/module-auth-client/contracts';\nimport { AXPIdleLockService } from '../../shared/services/idle-lock.service';\n\n//#region ---- Session lock overlay ----\n\ntype AXMSessionLockUnlockMode = 'pin' | 'password';\n\nconst SECURITY_MANAGEMENT_MODULE = 'SecurityManagement';\nconst SECURITY_MANAGEMENT_USER_ENTITY = 'User';\n\n@Component({\n selector: 'axm-session-lock-overlay',\n templateUrl: './session-lock-overlay.component.html',\n styleUrl: './session-lock-overlay.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n CommonModule,\n FormsModule,\n AXButtonModule,\n AXDecoratorModule,\n AXOtpModule,\n AXPasswordBoxModule,\n AXTranslationModule,\n AXPUserAvatarComponent,\n AXPVirtualKeypadComponent,\n AXFocusTrapDirective,\n ],\n host: {\n class: 'axm-session-lock-overlay-host',\n },\n})\nexport class AXMSessionLockOverlayComponent implements OnInit {\n //#region ---- Constants ----\n\n protected readonly pinLength = AXP_AUTH_PIN_CODE_LENGTH;\n\n //#endregion\n\n //#region ---- State ----\n\n protected readonly pinInput = signal('');\n protected readonly passwordInput = signal('');\n protected readonly pinError = signal(false);\n protected readonly passwordError = signal(false);\n protected readonly isVerifying = signal(false);\n protected readonly unlockMode = signal<AXMSessionLockUnlockMode>('pin');\n protected readonly userRoleTitle = signal('');\n\n protected readonly hasPinCode = computed(() => this.idleLockService.hasPinCode());\n\n protected readonly useDeviceKeyboard = computed(() => !this.deviceService.isDesktopDevice());\n protected readonly displayName = computed(() => defaultTo(this.sessionService.user?.title, ''));\n protected readonly userId = computed(() => this.sessionService.user?.id ?? '');\n protected readonly applicationBadge = computed(() => {\n const application = this.sessionService.application;\n return application?.title ?? application?.name ?? '';\n });\n protected readonly otpState = computed((): AXComponentState => (this.pinError() ? 'error' : 'clear'));\n\n //#endregion\n\n //#region ---- View children ----\n\n private readonly otpInput = viewChild(AXOtpComponent);\n private readonly passwordBox = viewChild(AXPasswordBoxComponent);\n\n //#endregion\n\n //#region ---- Services & Dependencies ----\n\n protected readonly idleLockService = inject(AXPIdleLockService);\n protected readonly sessionService = inject(AXPSessionService);\n private readonly deviceService = inject(AXPDeviceService);\n private readonly entityService = inject(AXPEntityService);\n private readonly toastService = inject(AXToastService);\n private readonly translateService = inject(AXTranslationService);\n private readonly commandService = inject(AXPCommandService);\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n //#endregion\n\n //#region ---- Lifecycle Methods ----\n\n ngOnInit(): void {\n void this.initializeUnlockMode();\n void this.loadUserRoleTitle();\n this.bindRefocusOnInteraction();\n }\n\n //#endregion\n\n //#region ---- UI Handlers ----\n\n protected onOverlayClick(): void {\n if (!this.isUnlockEntryFocused()) {\n this.focusUnlockEntry();\n }\n }\n\n protected onDesktopPinChange(value: string): void {\n const normalized = defaultTo(value, '');\n\n if (this.pinError() && normalized.length > 0) {\n this.pinError.set(false);\n }\n\n this.pinInput.set(normalized);\n }\n\n protected onDesktopPinCompleted(event: AXOtpCompletedEvent): void {\n if (!event.isCompleted || this.isVerifying()) {\n return;\n }\n\n this.pinInput.set(defaultTo(event.value, ''));\n void this.submitPin();\n }\n\n protected onMobilePinDigit(digit: number): void {\n if (this.isVerifying()) {\n return;\n }\n\n const current = this.pinInput();\n if (current.length >= AXP_AUTH_PIN_CODE_LENGTH) {\n return;\n }\n\n const next = `${current}${digit}`;\n\n if (this.pinError() && next.length > 0) {\n this.pinError.set(false);\n }\n\n this.pinInput.set(next);\n\n if (next.length === AXP_AUTH_PIN_CODE_LENGTH) {\n void this.submitPin();\n }\n }\n\n protected onMobilePinBackspace(): void {\n if (this.isVerifying()) {\n return;\n }\n\n const current = this.pinInput();\n if (!current.length) {\n return;\n }\n\n const next = current.slice(0, -1);\n\n if (this.pinError() && next.length > 0) {\n this.pinError.set(false);\n }\n\n this.pinInput.set(next);\n }\n\n protected onPasswordChange(value: string): void {\n this.passwordInput.set(defaultTo(value, ''));\n this.passwordError.set(false);\n }\n\n protected showPasswordUnlock(event?: AXClickEvent): void {\n event?.nativeEvent.stopPropagation();\n this.unlockMode.set('password');\n this.resetPinInput();\n this.focusUnlockEntry();\n }\n\n protected showPinUnlock(event?: AXClickEvent): void {\n event?.nativeEvent.stopPropagation();\n\n if (!this.hasPinCode()) {\n return;\n }\n\n this.unlockMode.set('pin');\n this.passwordInput.set('');\n this.passwordError.set(false);\n this.focusUnlockEntry();\n }\n\n protected submitPassword(): void {\n void this.verifyPasswordAndUnlock();\n }\n\n protected signOut(event?: AXClickEvent): void {\n event?.nativeEvent.stopPropagation();\n void this.commandService.execute(AXMAuthCommandKeys.Session.Signout, {});\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private async initializeUnlockMode(): Promise<void> {\n await this.idleLockService.refreshPinState();\n this.resetUnlockState();\n this.focusUnlockEntry();\n }\n\n private getDefaultUnlockMode(): AXMSessionLockUnlockMode {\n return this.idleLockService.hasPinCode() ? 'pin' : 'password';\n }\n\n private async loadUserRoleTitle(): Promise<void> {\n const userId = this.sessionService.user?.id;\n if (!userId || !this.sessionService.isReadyForAppScopedApi) {\n this.userRoleTitle.set('');\n return;\n }\n\n try {\n const user = await this.entityService\n .withEntity(SECURITY_MANAGEMENT_MODULE, SECURITY_MANAGEMENT_USER_ENTITY)\n .data<string>()\n .byKey(userId);\n\n const roleTitle = defaultTo(get(first(get(user, 'roles', [])), 'title'), '');\n this.userRoleTitle.set(roleTitle);\n } catch (error) {\n console.error('Failed to load user role for session lock overlay', error);\n this.userRoleTitle.set('');\n }\n }\n\n private async submitPin(): Promise<void> {\n if (this.isVerifying()) {\n return;\n }\n\n const pin = this.pinInput();\n if (!AXP_AUTH_PIN_CODE_PATTERN.test(pin)) {\n return;\n }\n\n this.isVerifying.set(true);\n try {\n if (this.idleLockService.verifyPin(pin)) {\n this.idleLockService.unlock();\n this.resetUnlockState();\n return;\n }\n\n await this.showIncorrectPinError();\n this.applyPinValidationError();\n } finally {\n this.isVerifying.set(false);\n }\n }\n\n private async verifyPasswordAndUnlock(): Promise<void> {\n if (this.isVerifying() || !this.passwordInput()) {\n return;\n }\n\n this.isVerifying.set(true);\n try {\n if (await this.idleLockService.verifyPassword(this.passwordInput())) {\n this.idleLockService.unlock();\n this.resetUnlockState();\n return;\n }\n\n await this.showIncorrectPasswordError();\n this.triggerPasswordError();\n this.passwordInput.set('');\n this.focusUnlockEntry();\n } finally {\n this.isVerifying.set(false);\n }\n }\n\n private resetUnlockState(): void {\n this.unlockMode.set(this.getDefaultUnlockMode());\n this.resetPinInput();\n this.passwordInput.set('');\n this.passwordError.set(false);\n this.pinError.set(false);\n }\n\n private resetPinInput(clearError = true): void {\n if (clearError) {\n this.pinError.set(false);\n }\n\n this.pinInput.set('');\n this.otpInput()?.reset();\n }\n\n private applyPinValidationError(): void {\n this.resetPinInput(false);\n\n afterNextRender(\n () => {\n this.pinError.set(true);\n this.syncOtpErrorState();\n\n if (!this.useDeviceKeyboard()) {\n this.otpInput()?.focus();\n }\n },\n { injector: this.injector },\n );\n }\n\n private syncOtpErrorState(): void {\n const otp = this.otpInput();\n if (otp) {\n otp.state = 'error';\n }\n }\n\n private focusUnlockEntry(): void {\n afterNextRender(\n () => {\n if (this.unlockMode() === 'password') {\n this.focusPasswordInput();\n return;\n }\n\n if (!this.useDeviceKeyboard()) {\n this.otpInput()?.focus();\n }\n },\n { injector: this.injector },\n );\n }\n\n private focusPasswordInput(): void {\n const attemptFocus = (): boolean => {\n const passwordBox = this.passwordBox();\n if (!passwordBox) {\n return false;\n }\n\n passwordBox.focus();\n\n requestAnimationFrame(() => {\n if (!this.isUnlockEntryFocused()) {\n passwordBox.focus();\n }\n });\n\n return true;\n };\n\n if (!attemptFocus()) {\n afterNextRender(() => attemptFocus(), { injector: this.injector });\n }\n }\n\n private bindRefocusOnInteraction(): void {\n const onKeydown = (event: KeyboardEvent): void => {\n if (this.isUnlockEntryFocused() || event.defaultPrevented) {\n return;\n }\n\n this.focusUnlockEntry();\n };\n\n document.addEventListener('keydown', onKeydown, true);\n this.destroyRef.onDestroy(() => {\n document.removeEventListener('keydown', onKeydown, true);\n });\n }\n\n private isUnlockEntryFocused(): boolean {\n const active = document.activeElement;\n if (!(active instanceof HTMLElement)) {\n return false;\n }\n\n if (this.unlockMode() === 'password') {\n return active.closest('ax-password-box') !== null;\n }\n\n if (this.useDeviceKeyboard()) {\n return active.closest('axp-virtual-keypad') !== null;\n }\n\n return active.closest('ax-otp') !== null;\n }\n\n private triggerPasswordError(): void {\n this.passwordError.set(true);\n setTimeout(() => this.passwordError.set(false), 450);\n }\n\n private async showIncorrectPinError(): Promise<void> {\n const content = await this.translateService.translateAsync('@auth:session-lock.messages.incorrect-pin');\n const title = await this.translateService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'danger', title, content, closeButton: true });\n }\n\n private async showIncorrectPasswordError(): Promise<void> {\n const content = await this.translateService.translateAsync('@auth:session-lock.messages.incorrect-password');\n const title = await this.translateService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'danger', title, content, closeButton: true });\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-session-lock-overlay\" [class.axm-session-lock-overlay--desktop]=\"!useDeviceKeyboard()\"\n [class.axm-session-lock-overlay--mobile]=\"useDeviceKeyboard()\" (click)=\"onOverlayClick()\">\n <div class=\"axm-session-lock-overlay__panel\" axFocusTrap tabindex=\"-1\" (click)=\"$event.stopPropagation()\">\n <div class=\"axm-session-lock-overlay__profile\">\n <div class=\"axm-session-lock-overlay__avatar-wrap\">\n @if (userId(); as resolvedUserId) {\n <axp-user-avatar [size]=\"useDeviceKeyboard() ? 64 : 80\" [userId]=\"resolvedUserId\"></axp-user-avatar>\n }\n </div>\n\n @if (displayName()) {\n <p class=\"axm-session-lock-overlay__name m-0\">\n {{ displayName() }}\n </p>\n }\n\n <!-- @if (userRoleTitle()) {\n <p class=\"axm-session-lock-overlay__role m-0\">\n {{ userRoleTitle() }}\n </p>\n } -->\n\n @if (applicationBadge()) {\n <div class=\"axm-session-lock-overlay__user-badge\">\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n <span>{{ applicationBadge() | translate | async }}</span>\n </div>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__divider\" aria-hidden=\"true\"></div>\n\n <div class=\"axm-session-lock-overlay__body\">\n <div class=\"axm-session-lock-overlay__body-main\">\n <div class=\"axm-session-lock-overlay__lock-badge\" aria-hidden=\"true\">\n <i class=\"fa-light fa-lock\"></i>\n </div>\n\n <h2 class=\"axm-session-lock-overlay__title m-0\">\n {{ '@auth:session-lock.title' | translate | async }}\n </h2>\n\n @if (unlockMode() === 'pin' && hasPinCode()) {\n <p class=\"axm-session-lock-overlay__instruction m-0\">\n {{ '@auth:session-lock.pin-instruction' | translate | async }}\n </p>\n\n <div class=\"axm-session-lock-overlay__otp\" [class.axm-session-lock-overlay__otp--error]=\"pinError()\">\n <ax-otp class=\"w-full block\" [type]=\"'number'\" [mode]=\"'star'\" [length]=\"pinLength\" [state]=\"otpState()\"\n [readonly]=\"useDeviceKeyboard()\" [disabled]=\"isVerifying()\" [ngModel]=\"pinInput()\"\n (ngModelChange)=\"onDesktopPinChange($event)\" (onCompleted)=\"onDesktopPinCompleted($event)\"></ax-otp>\n </div>\n } @else {\n <p class=\"axm-session-lock-overlay__instruction m-0\">\n {{ '@auth:session-lock.password-instruction' | translate | async }}\n </p>\n\n <div class=\"axm-session-lock-overlay__password\"\n [class.axm-session-lock-overlay__password--error]=\"passwordError()\">\n <ax-password-box class=\"axm-session-lock-overlay__password-input w-full\" look=\"outline\"\n [disabled]=\"isVerifying()\" [ngModel]=\"passwordInput()\" (ngModelChange)=\"onPasswordChange($event)\"\n (keydown.enter)=\"submitPassword()\" [placeholder]=\"'@auth:password' | translate | async\"></ax-password-box>\n </div>\n\n <div class=\"axm-session-lock-overlay__actions\">\n <ax-button class=\"axm-session-lock-overlay__action w-full rounded-lg\" look=\"solid\" color=\"primary\"\n [disabled]=\"isVerifying() || !passwordInput()\" [text]=\"'@auth:session-lock.unlock' | translate | async\"\n (onClick)=\"submitPassword()\"></ax-button>\n </div>\n }\n </div>\n\n @if (useDeviceKeyboard() && unlockMode() === 'pin' && hasPinCode()) {\n <axp-virtual-keypad class=\"axm-session-lock-overlay__keypad\" look=\"solid\" [disabled]=\"isVerifying()\"\n (digitPress)=\"onMobilePinDigit($event)\" (backspace)=\"onMobilePinBackspace()\">\n </axp-virtual-keypad>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__footer\">\n <div class=\"axm-session-lock-overlay__footer-actions\">\n @if (hasPinCode()) {\n <div class=\"axm-session-lock-overlay__footer-action\">\n @if (unlockMode() === 'pin') {\n <ax-button class=\"w-full\" look=\"blank\" color=\"primary\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.use-password-instead' | translate | async\"\n (onClick)=\"showPasswordUnlock($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n } @else {\n <ax-button class=\"w-full\" look=\"blank\" color=\"primary\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.use-pin-instead' | translate | async\" (onClick)=\"showPinUnlock($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__footer-divider\" aria-hidden=\"true\"></div>\n }\n\n <div class=\"axm-session-lock-overlay__footer-action\">\n <ax-button class=\"w-full\" look=\"blank\" color=\"danger\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.sign-out' | translate | async\" (onClick)=\"signOut($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-arrow-right-from-bracket\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n </div>\n </div>\n</div>"],"names":["i5","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,0BAA0B,GAAG,oBAAoB;AACvD,MAAM,+BAA+B,GAAG,MAAM;MAwBjC,8BAA8B,CAAA;AAtB3C,IAAA,WAAA,GAAA;;QAyBqB,IAAA,CAAA,SAAS,GAAG,wBAAwB;;;QAMpC,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,EAAE;qFAAC;QACrB,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,EAAE;0FAAC;QAC1B,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;QACxB,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,KAAK;0FAAC;QAC7B,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,KAAK;wFAAC;QAC3B,IAAA,CAAA,UAAU,GAAG,MAAM,CAA2B,KAAK;uFAAC;QACpD,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,EAAE;0FAAC;QAE1B,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE;uFAAC;AAE9D,QAAA,IAAA,CAAA,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE;8FAAC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ACZ,WAAW;wBACX,cAAc;wBACd,iBAAiB;wBACjB,WAAW;wBACX,mBAAmB;wBACnB,mBAAmB;wBACnB,sBAAsB;wBACtB,yBAAyB;wBACzB,oBAAoB;qBACrB,EAAA,IAAA,EACK;AACJ,wBAAA,KAAK,EAAE,+BAA+B;AACvC,qBAAA,EAAA,QAAA,EAAA,2yKAAA,EAAA,MAAA,EAAA,CAAA,oqmBAAA,CAAA,EAAA;AAkCqC,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,cAAc,0FACX,sBAAsB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
1
+ {"version":3,"file":"acorex-platform-module-auth-client-session-lock-overlay.component-PQ91EQjh.mjs","sources":["../../../../libs/modules/auth/client/src/lib/features/session-lock/session-lock-overlay.component.ts","../../../../libs/modules/auth/client/src/lib/features/session-lock/session-lock-overlay.component.html"],"sourcesContent":["import { AXFocusTrapDirective } from '@acorex/cdk/focus-trap';\nimport { AXClickEvent, AXComponentState } from '@acorex/cdk/common';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXOtpCompletedEvent, AXOtpComponent, AXOtpModule } from '@acorex/components/otp';\nimport { AXPasswordBoxComponent, AXPasswordBoxModule } from '@acorex/components/password-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPDeviceService } from '@acorex-platform/framework-client/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPUserAvatarComponent, AXPVirtualKeypadComponent } from '@acorex-platform/framework-client/layout/components';\nimport { CommonModule } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n inject,\n Injector,\n OnInit,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { defaultTo, first, get } from 'lodash';\nimport { AXP_AUTH_PIN_CODE_LENGTH, AXP_AUTH_PIN_CODE_PATTERN } from '../../shared/constants/pin-code.constants';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { AXMAuthCommandKeys } from '@acorex-platform/module-auth-client/contracts';\nimport { AXPIdleLockService } from '../../shared/services/idle-lock.service';\n\n//#region ---- Session lock overlay ----\n\ntype AXMSessionLockUnlockMode = 'pin' | 'password';\n\nconst SECURITY_MANAGEMENT_MODULE = 'SecurityManagement';\nconst SECURITY_MANAGEMENT_USER_ENTITY = 'User';\n\n@Component({\n selector: 'axm-session-lock-overlay',\n templateUrl: './session-lock-overlay.component.html',\n styleUrl: './session-lock-overlay.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n CommonModule,\n FormsModule,\n AXButtonModule,\n AXDecoratorModule,\n AXOtpModule,\n AXPasswordBoxModule,\n AXTranslationModule,\n AXPUserAvatarComponent,\n AXPVirtualKeypadComponent,\n AXFocusTrapDirective,\n ],\n host: {\n class: 'axm-session-lock-overlay-host',\n },\n})\nexport class AXMSessionLockOverlayComponent implements OnInit {\n //#region ---- Constants ----\n\n protected readonly pinLength = AXP_AUTH_PIN_CODE_LENGTH;\n\n //#endregion\n\n //#region ---- State ----\n\n protected readonly pinInput = signal('');\n protected readonly passwordInput = signal('');\n protected readonly pinError = signal(false);\n protected readonly passwordError = signal(false);\n protected readonly isVerifying = signal(false);\n protected readonly unlockMode = signal<AXMSessionLockUnlockMode>('pin');\n protected readonly userRoleTitle = signal('');\n\n protected readonly hasPinCode = computed(() => this.idleLockService.hasPinCode());\n\n protected readonly useDeviceKeyboard = computed(() => !this.deviceService.isDesktopDevice());\n protected readonly displayName = computed(() => defaultTo(this.sessionService.user?.title, ''));\n protected readonly userId = computed(() => this.sessionService.user?.id ?? '');\n protected readonly applicationBadge = computed(() => {\n const application = this.sessionService.application;\n return application?.title ?? application?.name ?? '';\n });\n protected readonly otpState = computed((): AXComponentState => (this.pinError() ? 'error' : 'clear'));\n\n //#endregion\n\n //#region ---- View children ----\n\n private readonly otpInput = viewChild(AXOtpComponent);\n private readonly passwordBox = viewChild(AXPasswordBoxComponent);\n\n //#endregion\n\n //#region ---- Services & Dependencies ----\n\n protected readonly idleLockService = inject(AXPIdleLockService);\n protected readonly sessionService = inject(AXPSessionService);\n private readonly deviceService = inject(AXPDeviceService);\n private readonly entityService = inject(AXPEntityService);\n private readonly toastService = inject(AXToastService);\n private readonly translateService = inject(AXTranslationService);\n private readonly commandService = inject(AXPCommandService);\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n //#endregion\n\n //#region ---- Lifecycle Methods ----\n\n ngOnInit(): void {\n void this.initializeUnlockMode();\n void this.loadUserRoleTitle();\n this.bindRefocusOnInteraction();\n }\n\n //#endregion\n\n //#region ---- UI Handlers ----\n\n protected onOverlayClick(): void {\n if (!this.isUnlockEntryFocused()) {\n this.focusUnlockEntry();\n }\n }\n\n protected onDesktopPinChange(value: string): void {\n const normalized = defaultTo(value, '');\n\n if (this.pinError() && normalized.length > 0) {\n this.pinError.set(false);\n }\n\n this.pinInput.set(normalized);\n }\n\n protected onDesktopPinCompleted(event: AXOtpCompletedEvent): void {\n if (!event.isCompleted || this.isVerifying()) {\n return;\n }\n\n this.pinInput.set(defaultTo(event.value, ''));\n void this.submitPin();\n }\n\n protected onMobilePinDigit(digit: number): void {\n if (this.isVerifying()) {\n return;\n }\n\n const current = this.pinInput();\n if (current.length >= AXP_AUTH_PIN_CODE_LENGTH) {\n return;\n }\n\n const next = `${current}${digit}`;\n\n if (this.pinError() && next.length > 0) {\n this.pinError.set(false);\n }\n\n this.pinInput.set(next);\n\n if (next.length === AXP_AUTH_PIN_CODE_LENGTH) {\n void this.submitPin();\n }\n }\n\n protected onMobilePinBackspace(): void {\n if (this.isVerifying()) {\n return;\n }\n\n const current = this.pinInput();\n if (!current.length) {\n return;\n }\n\n const next = current.slice(0, -1);\n\n if (this.pinError() && next.length > 0) {\n this.pinError.set(false);\n }\n\n this.pinInput.set(next);\n }\n\n protected onPasswordChange(value: string): void {\n this.passwordInput.set(defaultTo(value, ''));\n this.passwordError.set(false);\n }\n\n protected showPasswordUnlock(event?: AXClickEvent): void {\n event?.nativeEvent.stopPropagation();\n this.unlockMode.set('password');\n this.resetPinInput();\n this.focusUnlockEntry();\n }\n\n protected showPinUnlock(event?: AXClickEvent): void {\n event?.nativeEvent.stopPropagation();\n\n if (!this.hasPinCode()) {\n return;\n }\n\n this.unlockMode.set('pin');\n this.passwordInput.set('');\n this.passwordError.set(false);\n this.focusUnlockEntry();\n }\n\n protected submitPassword(): void {\n void this.verifyPasswordAndUnlock();\n }\n\n protected signOut(event?: AXClickEvent): void {\n event?.nativeEvent.stopPropagation();\n void this.commandService.execute(AXMAuthCommandKeys.Session.Signout, {});\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private async initializeUnlockMode(): Promise<void> {\n await this.idleLockService.refreshPinState();\n this.resetUnlockState();\n this.focusUnlockEntry();\n }\n\n private getDefaultUnlockMode(): AXMSessionLockUnlockMode {\n return this.idleLockService.hasPinCode() ? 'pin' : 'password';\n }\n\n private async loadUserRoleTitle(): Promise<void> {\n const userId = this.sessionService.user?.id;\n if (!userId || !this.sessionService.isReadyForAppScopedApi) {\n this.userRoleTitle.set('');\n return;\n }\n\n try {\n const user = await this.entityService\n .withEntity(SECURITY_MANAGEMENT_MODULE, SECURITY_MANAGEMENT_USER_ENTITY)\n .data<string>()\n .byKey(userId);\n\n const roleTitle = defaultTo(get(first(get(user, 'roles', [])), 'title'), '');\n this.userRoleTitle.set(roleTitle);\n } catch (error) {\n console.error('Failed to load user role for session lock overlay', error);\n this.userRoleTitle.set('');\n }\n }\n\n private async submitPin(): Promise<void> {\n if (this.isVerifying()) {\n return;\n }\n\n const pin = this.pinInput();\n if (!AXP_AUTH_PIN_CODE_PATTERN.test(pin)) {\n return;\n }\n\n this.isVerifying.set(true);\n try {\n if (this.idleLockService.verifyPin(pin)) {\n this.idleLockService.unlock();\n this.resetUnlockState();\n return;\n }\n\n await this.showIncorrectPinError();\n this.applyPinValidationError();\n } finally {\n this.isVerifying.set(false);\n }\n }\n\n private async verifyPasswordAndUnlock(): Promise<void> {\n if (this.isVerifying() || !this.passwordInput()) {\n return;\n }\n\n this.isVerifying.set(true);\n try {\n if (await this.idleLockService.verifyPassword(this.passwordInput())) {\n this.idleLockService.unlock();\n this.resetUnlockState();\n return;\n }\n\n await this.showIncorrectPasswordError();\n this.triggerPasswordError();\n this.passwordInput.set('');\n this.focusUnlockEntry();\n } finally {\n this.isVerifying.set(false);\n }\n }\n\n private resetUnlockState(): void {\n this.unlockMode.set(this.getDefaultUnlockMode());\n this.resetPinInput();\n this.passwordInput.set('');\n this.passwordError.set(false);\n this.pinError.set(false);\n }\n\n private resetPinInput(clearError = true): void {\n if (clearError) {\n this.pinError.set(false);\n }\n\n this.pinInput.set('');\n this.otpInput()?.reset();\n }\n\n private applyPinValidationError(): void {\n this.resetPinInput(false);\n\n afterNextRender(\n () => {\n this.pinError.set(true);\n this.syncOtpErrorState();\n\n if (!this.useDeviceKeyboard()) {\n this.otpInput()?.focus();\n }\n },\n { injector: this.injector },\n );\n }\n\n private syncOtpErrorState(): void {\n const otp = this.otpInput();\n if (otp) {\n otp.state = 'error';\n }\n }\n\n private focusUnlockEntry(): void {\n afterNextRender(\n () => {\n if (this.unlockMode() === 'password') {\n this.focusPasswordInput();\n return;\n }\n\n if (!this.useDeviceKeyboard()) {\n this.otpInput()?.focus();\n }\n },\n { injector: this.injector },\n );\n }\n\n private focusPasswordInput(): void {\n const attemptFocus = (): boolean => {\n const passwordBox = this.passwordBox();\n if (!passwordBox) {\n return false;\n }\n\n passwordBox.focus();\n\n requestAnimationFrame(() => {\n if (!this.isUnlockEntryFocused()) {\n passwordBox.focus();\n }\n });\n\n return true;\n };\n\n if (!attemptFocus()) {\n afterNextRender(() => attemptFocus(), { injector: this.injector });\n }\n }\n\n private bindRefocusOnInteraction(): void {\n const onKeydown = (event: KeyboardEvent): void => {\n if (this.isUnlockEntryFocused() || event.defaultPrevented) {\n return;\n }\n\n this.focusUnlockEntry();\n };\n\n document.addEventListener('keydown', onKeydown, true);\n this.destroyRef.onDestroy(() => {\n document.removeEventListener('keydown', onKeydown, true);\n });\n }\n\n private isUnlockEntryFocused(): boolean {\n const active = document.activeElement;\n if (!(active instanceof HTMLElement)) {\n return false;\n }\n\n if (this.unlockMode() === 'password') {\n return active.closest('ax-password-box') !== null;\n }\n\n if (this.useDeviceKeyboard()) {\n return active.closest('axp-virtual-keypad') !== null;\n }\n\n return active.closest('ax-otp') !== null;\n }\n\n private triggerPasswordError(): void {\n this.passwordError.set(true);\n setTimeout(() => this.passwordError.set(false), 450);\n }\n\n private async showIncorrectPinError(): Promise<void> {\n const content = await this.translateService.translateAsync('@auth:session-lock.messages.incorrect-pin');\n const title = await this.translateService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'danger', title, content, closeButton: true });\n }\n\n private async showIncorrectPasswordError(): Promise<void> {\n const content = await this.translateService.translateAsync('@auth:session-lock.messages.incorrect-password');\n const title = await this.translateService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'danger', title, content, closeButton: true });\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-session-lock-overlay\" [class.axm-session-lock-overlay--desktop]=\"!useDeviceKeyboard()\"\n [class.axm-session-lock-overlay--mobile]=\"useDeviceKeyboard()\" (click)=\"onOverlayClick()\">\n <div class=\"axm-session-lock-overlay__panel\" axFocusTrap tabindex=\"-1\" (click)=\"$event.stopPropagation()\">\n <div class=\"axm-session-lock-overlay__profile\">\n <div class=\"axm-session-lock-overlay__avatar-wrap\">\n @if (userId(); as resolvedUserId) {\n <axp-user-avatar [size]=\"useDeviceKeyboard() ? 64 : 80\" [userId]=\"resolvedUserId\"></axp-user-avatar>\n }\n </div>\n\n @if (displayName()) {\n <p class=\"axm-session-lock-overlay__name m-0\">\n {{ displayName() }}\n </p>\n }\n\n <!-- @if (userRoleTitle()) {\n <p class=\"axm-session-lock-overlay__role m-0\">\n {{ userRoleTitle() }}\n </p>\n } -->\n\n @if (applicationBadge()) {\n <div class=\"axm-session-lock-overlay__user-badge\">\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n <span>{{ applicationBadge() | translate | async }}</span>\n </div>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__divider\" aria-hidden=\"true\"></div>\n\n <div class=\"axm-session-lock-overlay__body\">\n <div class=\"axm-session-lock-overlay__body-main\">\n <div class=\"axm-session-lock-overlay__lock-badge\" aria-hidden=\"true\">\n <i class=\"fa-light fa-lock\"></i>\n </div>\n\n <h2 class=\"axm-session-lock-overlay__title m-0\">\n {{ '@auth:session-lock.title' | translate | async }}\n </h2>\n\n @if (unlockMode() === 'pin' && hasPinCode()) {\n <p class=\"axm-session-lock-overlay__instruction m-0\">\n {{ '@auth:session-lock.pin-instruction' | translate | async }}\n </p>\n\n <div class=\"axm-session-lock-overlay__otp\" [class.axm-session-lock-overlay__otp--error]=\"pinError()\">\n <ax-otp class=\"w-full block\" [type]=\"'number'\" [mode]=\"'star'\" [length]=\"pinLength\" [state]=\"otpState()\"\n [readonly]=\"useDeviceKeyboard()\" [disabled]=\"isVerifying()\" [ngModel]=\"pinInput()\"\n (ngModelChange)=\"onDesktopPinChange($event)\" (onCompleted)=\"onDesktopPinCompleted($event)\"></ax-otp>\n </div>\n } @else {\n <p class=\"axm-session-lock-overlay__instruction m-0\">\n {{ '@auth:session-lock.password-instruction' | translate | async }}\n </p>\n\n <div class=\"axm-session-lock-overlay__password\"\n [class.axm-session-lock-overlay__password--error]=\"passwordError()\">\n <ax-password-box class=\"axm-session-lock-overlay__password-input w-full\" look=\"outline\"\n [disabled]=\"isVerifying()\" [ngModel]=\"passwordInput()\" (ngModelChange)=\"onPasswordChange($event)\"\n (keydown.enter)=\"submitPassword()\" [placeholder]=\"'@auth:password' | translate | async\"></ax-password-box>\n </div>\n\n <div class=\"axm-session-lock-overlay__actions\">\n <ax-button class=\"axm-session-lock-overlay__action w-full rounded-lg\" look=\"solid\" color=\"primary\"\n [disabled]=\"isVerifying() || !passwordInput()\" [text]=\"'@auth:session-lock.unlock' | translate | async\"\n (onClick)=\"submitPassword()\"></ax-button>\n </div>\n }\n </div>\n\n @if (useDeviceKeyboard() && unlockMode() === 'pin' && hasPinCode()) {\n <axp-virtual-keypad class=\"axm-session-lock-overlay__keypad\" look=\"solid\" [disabled]=\"isVerifying()\"\n (digitPress)=\"onMobilePinDigit($event)\" (backspace)=\"onMobilePinBackspace()\">\n </axp-virtual-keypad>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__footer\">\n <div class=\"axm-session-lock-overlay__footer-actions\">\n @if (hasPinCode()) {\n <div class=\"axm-session-lock-overlay__footer-action\">\n @if (unlockMode() === 'pin') {\n <ax-button class=\"w-full\" look=\"blank\" color=\"primary\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.use-password-instead' | translate | async\"\n (onClick)=\"showPasswordUnlock($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n } @else {\n <ax-button class=\"w-full\" look=\"blank\" color=\"primary\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.use-pin-instead' | translate | async\" (onClick)=\"showPinUnlock($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__footer-divider\" aria-hidden=\"true\"></div>\n }\n\n <div class=\"axm-session-lock-overlay__footer-action\">\n <ax-button class=\"w-full\" look=\"blank\" color=\"danger\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.sign-out' | translate | async\" (onClick)=\"signOut($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-arrow-right-from-bracket\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n </div>\n </div>\n</div>"],"names":["i5","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,0BAA0B,GAAG,oBAAoB;AACvD,MAAM,+BAA+B,GAAG,MAAM;MAwBjC,8BAA8B,CAAA;AAtB3C,IAAA,WAAA,GAAA;;QAyBqB,IAAA,CAAA,SAAS,GAAG,wBAAwB;;;QAMpC,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,EAAE;qFAAC;QACrB,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,EAAE;0FAAC;QAC1B,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;QACxB,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,KAAK;0FAAC;QAC7B,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,KAAK;wFAAC;QAC3B,IAAA,CAAA,UAAU,GAAG,MAAM,CAA2B,KAAK;uFAAC;QACpD,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,EAAE;0FAAC;QAE1B,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE;uFAAC;AAE9D,QAAA,IAAA,CAAA,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE;8FAAC;AACzE,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;wFAAC;AAC5E,QAAA,IAAA,CAAA,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,cAAc,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EAAA,2yKAAA,EAAA,MAAA,EAAA,CAAA,oqmBAAA,CAAA,EAAA;AAkCqC,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,cAAc,0FACX,sBAAsB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
@@ -8,7 +8,7 @@ import { AXPPlatformScope } from '@acorex-platform/framework-shared/core';
8
8
  import { AXPAuthSettings } from '@acorex-platform/module-auth-client/contracts';
9
9
  import * as i0 from '@angular/core';
10
10
  import { inject, Injectable } from '@angular/core';
11
- import { j as AXPIdleLockService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-CN5vRSEZ.mjs';
11
+ import { j as AXPIdleLockService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-Dgo6MzxI.mjs';
12
12
 
13
13
  //#region ---- Set PIN code command ----
14
14
  /** Opens the step-by-step security PIN setup popup for the current user. */
@@ -28,7 +28,7 @@ class AXPSetPinCodeCommand {
28
28
  async execute() {
29
29
  let title = '';
30
30
  const popupResult = await this.dialogOpener.openPopup({
31
- load: () => import('./acorex-platform-module-auth-client-set-pin-code.component-CoW81kSQ.mjs').then((module) => module.AXMSetPinCodeComponent),
31
+ load: () => import('./acorex-platform-module-auth-client-set-pin-code.component-L3DlTawo.mjs').then((module) => module.AXMSetPinCodeComponent),
32
32
  prepare: async () => {
33
33
  title = await this.translateService.translateAsync('@auth:profile-page.commands.set-pin-code.dialog.title');
34
34
  },
@@ -121,4 +121,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
121
121
  }] });
122
122
 
123
123
  export { AXPSetPinCodeCommand };
124
- //# sourceMappingURL=acorex-platform-module-auth-client-set-pin-code.command-CoGcZIPV.mjs.map
124
+ //# sourceMappingURL=acorex-platform-module-auth-client-set-pin-code.command-BdtPwfLH.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-auth-client-set-pin-code.command-CoGcZIPV.mjs","sources":["../../../../libs/modules/auth/client/src/lib/commands/set-pin-code.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXPopupService } from '@acorex/components/popup';\nimport { AXPDialogOpener } from '@acorex-platform/framework-client/core';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPPlatformScope } from '@acorex-platform/framework-shared/core';\nimport { AXPAuthSettings } from '@acorex-platform/module-auth-client/contracts';\n\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPIdleLockService } from '../shared/services/idle-lock.service';\n\n//#region ---- Set PIN code command ----\n\n/** Opens the step-by-step security PIN setup popup for the current user. */\n@Injectable({ providedIn: 'root' })\nexport class AXPSetPinCodeCommand implements AXPCommand {\n //#region ---- Services & Dependencies ----\n\n private readonly popupService = inject(AXPopupService);\n private readonly dialogOpener = inject(AXPDialogOpener);\n private readonly dialogService = inject(AXDialogService);\n private readonly translateService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly idleLockService = inject(AXPIdleLockService);\n\n //#endregion\n\n //#region ---- Command ----\n\n async execute(): AXPCommandExecuteResultPromise<void> {\n let title = '';\n const popupResult = await this.dialogOpener.openPopup({\n load: () =>\n import('../pages/account/set-pin-code/set-pin-code.component').then((module) => module.AXMSetPinCodeComponent),\n prepare: async () => {\n title = await this.translateService.translateAsync('@auth:profile-page.commands.set-pin-code.dialog.title');\n },\n show: (component) =>\n this.popupService.open(component, {\n title,\n size: 'sm',\n }),\n });\n\n if (this.idleLockService.consumeLockScreenOffer() || this.isSuccessfulPinSave(popupResult)) {\n await this.afterPinSaved();\n }\n\n return { success: true, kind: 'object', data: undefined };\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private isSuccessfulPinSave(popupResult: unknown): boolean {\n if (!popupResult || typeof popupResult !== 'object') {\n return false;\n }\n\n const root = popupResult as Record<string, unknown>;\n if (root['success'] === true) {\n return true;\n }\n\n const data = root['data'];\n if (!data || typeof data !== 'object') {\n return false;\n }\n\n const nested = data as Record<string, unknown>;\n if (nested['success'] === true) {\n return true;\n }\n\n const inner = nested['data'];\n return Boolean(inner && typeof inner === 'object' && (inner as Record<string, unknown>)['success'] === true);\n }\n\n private async afterPinSaved(): Promise<void> {\n await this.idleLockService.refreshLockMenuState();\n\n if (this.idleLockService.canLock()) {\n await this.idleLockService.notifyPinChanged();\n await this.showLockActiveAlert();\n return;\n }\n\n await this.offerLockScreenActivation();\n }\n\n private async offerLockScreenActivation(): Promise<void> {\n const dialogResult = await this.dialogService.show({\n title: '@auth:profile-page.commands.set-pin-code.activate-lock-screen.dialog.title',\n content: '@auth:profile-page.commands.set-pin-code.activate-lock-screen.dialog.description',\n type: 'primary',\n orientation: 'horizontal',\n buttons: [\n {\n name: 'confirm',\n text: '@auth:profile-page.commands.set-pin-code.activate-lock-screen.actions.activate',\n color: 'primary',\n autofocus: true,\n },\n {\n name: 'cancel',\n text: '@auth:profile-page.commands.set-pin-code.activate-lock-screen.actions.not-now',\n color: 'default',\n },\n ],\n });\n\n if (dialogResult?.name !== 'confirm') {\n return;\n }\n\n try {\n await this.settingsService\n .scope(AXPPlatformScope.User)\n .set(AXPAuthSettings.LockWhenIdleEnabled, true, { flush: true });\n await this.idleLockService.notifyPinChanged();\n await this.showLockActiveAlert();\n } catch (error) {\n console.error('Failed to activate lock screen after PIN setup', error);\n const content = await this.translateService.translateAsync(\n '@auth:profile-page.commands.set-pin-code.activate-lock-screen.messages.activate-failed',\n );\n const title = await this.translateService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'danger', title, content, closeButton: true });\n }\n }\n\n private async showLockActiveAlert(): Promise<void> {\n await this.dialogService.alert(\n '@auth:profile-page.commands.set-pin-code.activate-lock-screen.alert.title',\n '@auth:profile-page.commands.set-pin-code.activate-lock-screen.alert.description',\n 'success',\n 'horizontal',\n );\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;;;AAcA;AAEA;MAEa,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,eAAe,CAAC;AACtC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAC/C,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAuH9D,IAAA;;;AAjHC,IAAA,MAAM,OAAO,GAAA;QACX,IAAI,KAAK,GAAG,EAAE;QACd,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC;AACpD,YAAA,IAAI,EAAE,MACJ,OAAO,0EAAsD,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,sBAAsB,CAAC;YAChH,OAAO,EAAE,YAAW;gBAClB,KAAK,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,uDAAuD,CAAC;YAC7G,CAAC;AACD,YAAA,IAAI,EAAE,CAAC,SAAS,KACd,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE;gBAChC,KAAK;AACL,gBAAA,IAAI,EAAE,IAAI;aACX,CAAC;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IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QAChF;IACF;AAEQ,IAAA,MAAM,mBAAmB,GAAA;AAC/B,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAC5B,2EAA2E,EAC3E,iFAAiF,EACjF,SAAS,EACT,YAAY,CACb;IACH;8GA7HW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cADP,MAAM,EAAA,CAAA,CAAA;;2FACnB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
1
+ {"version":3,"file":"acorex-platform-module-auth-client-set-pin-code.command-BdtPwfLH.mjs","sources":["../../../../libs/modules/auth/client/src/lib/commands/set-pin-code.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXPopupService } from '@acorex/components/popup';\nimport { AXPDialogOpener } from '@acorex-platform/framework-client/core';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPPlatformScope } from '@acorex-platform/framework-shared/core';\nimport { AXPAuthSettings } from '@acorex-platform/module-auth-client/contracts';\n\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPIdleLockService } from '../shared/services/idle-lock.service';\n\n//#region ---- Set PIN code command ----\n\n/** Opens the step-by-step security PIN setup popup for the current user. */\n@Injectable({ providedIn: 'root' })\nexport class AXPSetPinCodeCommand implements AXPCommand {\n //#region ---- Services & Dependencies ----\n\n private readonly popupService = inject(AXPopupService);\n private readonly dialogOpener = inject(AXPDialogOpener);\n private readonly dialogService = inject(AXDialogService);\n private readonly translateService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly idleLockService = inject(AXPIdleLockService);\n\n //#endregion\n\n //#region ---- Command ----\n\n async execute(): AXPCommandExecuteResultPromise<void> {\n let title = '';\n const popupResult = await this.dialogOpener.openPopup({\n load: () =>\n import('../pages/account/set-pin-code/set-pin-code.component').then((module) => module.AXMSetPinCodeComponent),\n prepare: async () => {\n title = await this.translateService.translateAsync('@auth:profile-page.commands.set-pin-code.dialog.title');\n },\n show: (component) =>\n this.popupService.open(component, {\n title,\n size: 'sm',\n }),\n });\n\n if (this.idleLockService.consumeLockScreenOffer() || this.isSuccessfulPinSave(popupResult)) {\n await this.afterPinSaved();\n }\n\n return { success: true, kind: 'object', data: undefined };\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private isSuccessfulPinSave(popupResult: unknown): boolean {\n if (!popupResult || typeof popupResult !== 'object') {\n return false;\n }\n\n const root = popupResult as Record<string, unknown>;\n if (root['success'] === true) {\n return true;\n }\n\n const data = root['data'];\n if (!data || typeof data !== 'object') {\n return false;\n }\n\n const nested = data as Record<string, unknown>;\n if (nested['success'] === true) {\n return true;\n }\n\n const inner = nested['data'];\n return Boolean(inner && typeof inner === 'object' && (inner as Record<string, unknown>)['success'] === true);\n }\n\n private async afterPinSaved(): Promise<void> {\n await this.idleLockService.refreshLockMenuState();\n\n if (this.idleLockService.canLock()) {\n await this.idleLockService.notifyPinChanged();\n await this.showLockActiveAlert();\n return;\n }\n\n await this.offerLockScreenActivation();\n }\n\n private async offerLockScreenActivation(): Promise<void> {\n const dialogResult = await this.dialogService.show({\n title: '@auth:profile-page.commands.set-pin-code.activate-lock-screen.dialog.title',\n content: '@auth:profile-page.commands.set-pin-code.activate-lock-screen.dialog.description',\n type: 'primary',\n orientation: 'horizontal',\n buttons: [\n {\n name: 'confirm',\n text: '@auth:profile-page.commands.set-pin-code.activate-lock-screen.actions.activate',\n color: 'primary',\n autofocus: true,\n },\n {\n name: 'cancel',\n text: '@auth:profile-page.commands.set-pin-code.activate-lock-screen.actions.not-now',\n color: 'default',\n },\n ],\n });\n\n if (dialogResult?.name !== 'confirm') {\n return;\n }\n\n try {\n await this.settingsService\n .scope(AXPPlatformScope.User)\n .set(AXPAuthSettings.LockWhenIdleEnabled, true, { flush: true });\n await this.idleLockService.notifyPinChanged();\n await this.showLockActiveAlert();\n } catch (error) {\n console.error('Failed to activate lock screen after PIN setup', error);\n const content = await this.translateService.translateAsync(\n '@auth:profile-page.commands.set-pin-code.activate-lock-screen.messages.activate-failed',\n );\n const title = await this.translateService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'danger', title, content, closeButton: true });\n }\n }\n\n private async showLockActiveAlert(): Promise<void> {\n await this.dialogService.alert(\n '@auth:profile-page.commands.set-pin-code.activate-lock-screen.alert.title',\n '@auth:profile-page.commands.set-pin-code.activate-lock-screen.alert.description',\n 'success',\n 'horizontal',\n );\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;;;AAcA;AAEA;MAEa,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,eAAe,CAAC;AACtC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAC/C,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,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AAA;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -20,7 +20,7 @@ import * as i1 from '@angular/forms';
20
20
  import { FormsModule } from '@angular/forms';
21
21
  import { defaultTo, isNil, get, isEmpty } from 'lodash';
22
22
  import { A as AXP_AUTH_PIN_CODE_LENGTH, a as AXP_AUTH_PIN_CODE_PATTERN } from './acorex-platform-module-auth-client-pin-code.constants-CRsFG7fg.mjs';
23
- import { j as AXPIdleLockService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-CN5vRSEZ.mjs';
23
+ import { j as AXPIdleLockService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-Dgo6MzxI.mjs';
24
24
 
25
25
  //#endregion
26
26
  class AXMSetPinCodeComponent extends AXBasePageComponent {
@@ -194,4 +194,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
194
194
  }], ctorParameters: () => [], propDecorators: { otpInput: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXOtpComponent), { isSignal: true }] }] } });
195
195
 
196
196
  export { AXMSetPinCodeComponent };
197
- //# sourceMappingURL=acorex-platform-module-auth-client-set-pin-code.component-CoW81kSQ.mjs.map
197
+ //# sourceMappingURL=acorex-platform-module-auth-client-set-pin-code.component-L3DlTawo.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-auth-client-set-pin-code.component-CoW81kSQ.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/account/set-pin-code/set-pin-code.component.ts","../../../../libs/modules/auth/client/src/lib/pages/account/set-pin-code/set-pin-code.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXOtpCompletedEvent, AXOtpComponent, AXOtpModule } from '@acorex/components/otp';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport {RootConfig as SecurityManagementRootConfig} from '@acorex-platform/module-security-management-client/contracts'\nimport {AXMSecurityManagementUsersEntityModel} from '@acorex-platform/module-security-management-client/contracts';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { defaultTo, get, isEmpty, isNil } from 'lodash';\nimport { AXP_AUTH_PIN_CODE_LENGTH, AXP_AUTH_PIN_CODE_PATTERN } from '../../../shared/constants/pin-code.constants';\nimport { AXPIdleLockService } from '../../../shared/services/idle-lock.service';\n\n//#region ---- Types ----\n\ntype SetPinCodeStep = 'verify-current' | 'enter' | 'confirm';\n\n//#endregion\n\n@Component({\n selector: 'axm-set-pin-code',\n templateUrl: './set-pin-code.component.html',\n styleUrl: './set-pin-code.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, FormsModule, AXFormModule, AXButtonModule, AXDecoratorModule, AXOtpModule, AXTranslationModule],\n})\nexport class AXMSetPinCodeComponent extends AXBasePageComponent {\n //#region ---- Constants ----\n\n protected readonly pinLength = AXP_AUTH_PIN_CODE_LENGTH;\n\n //#endregion\n\n //#region ---- State ----\n\n protected readonly step = signal<SetPinCodeStep>('enter');\n protected readonly pinInput = signal('');\n protected readonly draftPin = signal('');\n protected readonly hasExistingPin = signal(false);\n protected readonly isSaving = signal(false);\n protected readonly storedPinCode = signal('');\n\n private isAdvancing = false;\n\n protected readonly canProceed = computed(() => AXP_AUTH_PIN_CODE_PATTERN.test(this.pinInput()));\n\n //#endregion\n\n //#region ---- View children ----\n\n private readonly otpInput = viewChild(AXOtpComponent);\n\n //#endregion\n\n //#region ---- Services & Dependencies ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly idleLockService = inject(AXPIdleLockService);\n private readonly toastService = inject(AXToastService);\n private readonly translateService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Lifecycle ----\n\n constructor() {\n super();\n void this.loadExistingPinState();\n }\n\n //#endregion\n\n //#region ---- UI Handlers ----\n\n protected onPinInputChange(value: string): void {\n this.pinInput.set(defaultTo(value, ''));\n }\n\n protected onPinCompleted(event: AXOtpCompletedEvent): void {\n if (!event.isCompleted || this.isSaving() || this.isAdvancing) {\n return;\n }\n\n this.pinInput.set(defaultTo(event.value, ''));\n void this.onNext();\n }\n\n protected onBack(): void {\n this.draftPin.set('');\n this.goToStep('enter');\n }\n\n protected async onNext(): Promise<void> {\n if (this.isAdvancing || this.isSaving()) {\n return;\n }\n\n this.isAdvancing = true;\n\n try {\n const pin = this.pinInput();\n\n if (!AXP_AUTH_PIN_CODE_PATTERN.test(pin)) {\n await this.showError('@auth:profile-page.commands.set-pin-code.messages.invalid-pin');\n this.focusOtp();\n return;\n }\n\n const currentStep = this.step();\n\n if (currentStep === 'verify-current') {\n if (pin !== this.storedPinCode()) {\n await this.showError('@auth:profile-page.commands.set-pin-code.messages.incorrect-current');\n this.resetPinInput();\n return;\n }\n\n this.goToStep('enter');\n return;\n }\n\n if (currentStep === 'enter') {\n this.draftPin.set(pin);\n this.goToStep('confirm');\n return;\n }\n\n if (pin !== this.draftPin()) {\n await this.showError('@auth:profile-page.commands.set-pin-code.messages.mismatch');\n this.resetPinInput();\n return;\n }\n\n await this.savePin(pin);\n } finally {\n this.isAdvancing = false;\n }\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private async loadExistingPinState(): Promise<void> {\n const userId = this.sessionService.user?.id;\n if (isNil(userId)) {\n return;\n }\n\n try {\n const user = await this.getUserData().byKey(userId);\n const pinCode = defaultTo(get(user, 'pinCode'), '');\n const hasPin = !isEmpty(pinCode);\n\n this.storedPinCode.set(pinCode);\n this.hasExistingPin.set(hasPin);\n this.step.set(hasPin ? 'verify-current' : 'enter');\n this.focusOtp();\n } catch (error) {\n console.error('Failed to load user PIN state', error);\n this.step.set('enter');\n this.focusOtp();\n }\n }\n\n private goToStep(step: SetPinCodeStep): void {\n this.step.set(step);\n this.resetPinInput();\n }\n\n private resetPinInput(): void {\n this.pinInput.set('');\n this.otpInput()?.reset();\n this.focusOtp();\n }\n\n private focusOtp(): void {\n queueMicrotask(() => {\n this.otpInput()?.focus();\n });\n }\n\n private async savePin(pin: string): Promise<void> {\n const userId = this.sessionService.user?.id;\n if (isNil(userId)) {\n await this.showError('@auth:profile-page.commands.set-pin-code.messages.not-signed-in');\n return;\n }\n\n this.isSaving.set(true);\n try {\n await this.getUserData().update(userId, {\n pinCode: pin,\n pinChangedAt: new Date().toISOString(),\n });\n\n const successTitle = await this.translateService.translateAsync(\n '@auth:profile-page.commands.set-pin-code.messages.success',\n );\n this.toastService.show({ color: 'success', title: successTitle });\n this.idleLockService.requestLockScreenOffer();\n this.close({ success: true });\n } catch (error) {\n console.error('Failed to save PIN code', error);\n await this.showError('@auth:profile-page.commands.set-pin-code.messages.save-failed');\n } finally {\n this.isSaving.set(false);\n }\n }\n\n private getUserData() {\n return this.entityService\n .withEntity(SecurityManagementRootConfig.module.name, SecurityManagementRootConfig.entities.users.name)\n .data<string, AXMSecurityManagementUsersEntityModel>();\n }\n\n private async showError(messageKey: string): Promise<void> {\n const content = await this.translateService.translateAsync(messageKey);\n const title = await this.translateService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'danger', title, content, closeButton: true });\n }\n\n //#endregion\n}\n","<ax-content>\n <div class=\"axm-set-pin-code__content flex flex-col items-center gap-4 p-6 text-center\">\n <div class=\"axm-set-pin-code__intro flex flex-col gap-2\">\n <h2 class=\"m-0 text-base font-semibold text-on-lightest\">\n @switch (step()) {\n @case ('verify-current') {\n {{ '@auth:profile-page.commands.set-pin-code.steps.verify-current.title' | translate | async }}\n }\n @case ('enter') {\n {{ '@auth:profile-page.commands.set-pin-code.steps.enter.title' | translate | async }}\n }\n @case ('confirm') {\n {{ '@auth:profile-page.commands.set-pin-code.steps.confirm.title' | translate | async }}\n }\n }\n </h2>\n <p class=\"m-0 text-sm text-on-lighter-surface\">\n @switch (step()) {\n @case ('verify-current') {\n {{ '@auth:profile-page.commands.set-pin-code.steps.verify-current.description' | translate | async }}\n }\n @case ('enter') {\n {{ '@auth:profile-page.commands.set-pin-code.steps.enter.description' | translate | async }}\n }\n @case ('confirm') {\n {{ '@auth:profile-page.commands.set-pin-code.steps.confirm.description' | translate | async }}\n }\n }\n </p>\n </div>\n\n <div class=\"axm-set-pin-code__otp w-full max-w-xs\">\n <ax-otp\n class=\"w-full block\"\n type=\"number\"\n [length]=\"pinLength\"\n [ngModel]=\"pinInput()\"\n (ngModelChange)=\"onPinInputChange($event)\"\n (onCompleted)=\"onPinCompleted($event)\"\n ></ax-otp>\n </div>\n </div>\n</ax-content>\n\n<ax-footer>\n <ax-suffix>\n @if (step() === 'confirm') {\n <ax-button\n look=\"solid\"\n color=\"default\"\n [text]=\"'@general:actions.back.title' | translate | async\"\n [disabled]=\"isSaving()\"\n (onClick)=\"onBack()\"\n ></ax-button>\n }\n\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"\n (step() === 'confirm'\n ? '@auth:profile-page.commands.set-pin-code.actions.save'\n : '@general:actions.next.title'\n )\n | translate\n | async\n \"\n [disabled]=\"!canProceed() || isSaving()\"\n (onClick)=\"onNext()\"\n ></ax-button>\n </ax-suffix>\n</ax-footer>\n"],"names":["SecurityManagementRootConfig","i2","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA8BA;AAUM,MAAO,sBAAuB,SAAQ,mBAAmB,CAAA;;;AAwC7D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;QAtCU,IAAA,CAAA,SAAS,GAAG,wBAAwB;;;QAMpC,IAAA,CAAA,IAAI,GAAG,MAAM,CAAiB,OAA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CAAA;;2FAE3G,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBARlC,SAAS;+BACE,kBAAkB,EAAA,eAAA,EAGX,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,WAAW,EAAE,mBAAmB,CAAC,EAAA,QAAA,EAAA,i2EAAA,EAAA,MAAA,EAAA,CAAA,gSAAA,CAAA,EAAA;oHA0BjF,cAAc,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
1
+ {"version":3,"file":"acorex-platform-module-auth-client-set-pin-code.component-L3DlTawo.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/account/set-pin-code/set-pin-code.component.ts","../../../../libs/modules/auth/client/src/lib/pages/account/set-pin-code/set-pin-code.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXOtpCompletedEvent, AXOtpComponent, AXOtpModule } from '@acorex/components/otp';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport {RootConfig as SecurityManagementRootConfig} from '@acorex-platform/module-security-management-client/contracts'\nimport {AXMSecurityManagementUsersEntityModel} from '@acorex-platform/module-security-management-client/contracts';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { defaultTo, get, isEmpty, isNil } from 'lodash';\nimport { AXP_AUTH_PIN_CODE_LENGTH, AXP_AUTH_PIN_CODE_PATTERN } from '../../../shared/constants/pin-code.constants';\nimport { AXPIdleLockService } from '../../../shared/services/idle-lock.service';\n\n//#region ---- Types ----\n\ntype SetPinCodeStep = 'verify-current' | 'enter' | 'confirm';\n\n//#endregion\n\n@Component({\n selector: 'axm-set-pin-code',\n templateUrl: './set-pin-code.component.html',\n styleUrl: './set-pin-code.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, FormsModule, AXFormModule, AXButtonModule, AXDecoratorModule, AXOtpModule, AXTranslationModule],\n})\nexport class AXMSetPinCodeComponent extends AXBasePageComponent {\n //#region ---- Constants ----\n\n protected readonly pinLength = AXP_AUTH_PIN_CODE_LENGTH;\n\n //#endregion\n\n //#region ---- State ----\n\n protected readonly step = signal<SetPinCodeStep>('enter');\n protected readonly pinInput = signal('');\n protected readonly draftPin = signal('');\n protected readonly hasExistingPin = signal(false);\n protected readonly isSaving = signal(false);\n protected readonly storedPinCode = signal('');\n\n private isAdvancing = false;\n\n protected readonly canProceed = computed(() => AXP_AUTH_PIN_CODE_PATTERN.test(this.pinInput()));\n\n //#endregion\n\n //#region ---- View children ----\n\n private readonly otpInput = viewChild(AXOtpComponent);\n\n //#endregion\n\n //#region ---- Services & Dependencies ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly idleLockService = inject(AXPIdleLockService);\n private readonly toastService = inject(AXToastService);\n private readonly translateService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Lifecycle ----\n\n constructor() {\n super();\n void this.loadExistingPinState();\n }\n\n //#endregion\n\n //#region ---- UI Handlers ----\n\n protected onPinInputChange(value: string): void {\n this.pinInput.set(defaultTo(value, ''));\n }\n\n protected onPinCompleted(event: AXOtpCompletedEvent): void {\n if (!event.isCompleted || this.isSaving() || this.isAdvancing) {\n return;\n }\n\n this.pinInput.set(defaultTo(event.value, ''));\n void this.onNext();\n }\n\n protected onBack(): void {\n this.draftPin.set('');\n this.goToStep('enter');\n }\n\n protected async onNext(): Promise<void> {\n if (this.isAdvancing || this.isSaving()) {\n return;\n }\n\n this.isAdvancing = true;\n\n try {\n const pin = this.pinInput();\n\n if (!AXP_AUTH_PIN_CODE_PATTERN.test(pin)) {\n await this.showError('@auth:profile-page.commands.set-pin-code.messages.invalid-pin');\n this.focusOtp();\n return;\n }\n\n const currentStep = this.step();\n\n if (currentStep === 'verify-current') {\n if (pin !== this.storedPinCode()) {\n await this.showError('@auth:profile-page.commands.set-pin-code.messages.incorrect-current');\n this.resetPinInput();\n return;\n }\n\n this.goToStep('enter');\n return;\n }\n\n if (currentStep === 'enter') {\n this.draftPin.set(pin);\n this.goToStep('confirm');\n return;\n }\n\n if (pin !== this.draftPin()) {\n await this.showError('@auth:profile-page.commands.set-pin-code.messages.mismatch');\n this.resetPinInput();\n return;\n }\n\n await this.savePin(pin);\n } finally {\n this.isAdvancing = false;\n }\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private async loadExistingPinState(): Promise<void> {\n const userId = this.sessionService.user?.id;\n if (isNil(userId)) {\n return;\n }\n\n try {\n const user = await this.getUserData().byKey(userId);\n const pinCode = defaultTo(get(user, 'pinCode'), '');\n const hasPin = !isEmpty(pinCode);\n\n this.storedPinCode.set(pinCode);\n this.hasExistingPin.set(hasPin);\n this.step.set(hasPin ? 'verify-current' : 'enter');\n this.focusOtp();\n } catch (error) {\n console.error('Failed to load user PIN state', error);\n this.step.set('enter');\n this.focusOtp();\n }\n }\n\n private goToStep(step: SetPinCodeStep): void {\n this.step.set(step);\n this.resetPinInput();\n }\n\n private resetPinInput(): void {\n this.pinInput.set('');\n this.otpInput()?.reset();\n this.focusOtp();\n }\n\n private focusOtp(): void {\n queueMicrotask(() => {\n this.otpInput()?.focus();\n });\n }\n\n private async savePin(pin: string): Promise<void> {\n const userId = this.sessionService.user?.id;\n if (isNil(userId)) {\n await this.showError('@auth:profile-page.commands.set-pin-code.messages.not-signed-in');\n return;\n }\n\n this.isSaving.set(true);\n try {\n await this.getUserData().update(userId, {\n pinCode: pin,\n pinChangedAt: new Date().toISOString(),\n });\n\n const successTitle = await this.translateService.translateAsync(\n '@auth:profile-page.commands.set-pin-code.messages.success',\n );\n this.toastService.show({ color: 'success', title: successTitle });\n this.idleLockService.requestLockScreenOffer();\n this.close({ success: true });\n } catch (error) {\n console.error('Failed to save PIN code', error);\n await this.showError('@auth:profile-page.commands.set-pin-code.messages.save-failed');\n } finally {\n this.isSaving.set(false);\n }\n }\n\n private getUserData() {\n return this.entityService\n .withEntity(SecurityManagementRootConfig.module.name, SecurityManagementRootConfig.entities.users.name)\n .data<string, AXMSecurityManagementUsersEntityModel>();\n }\n\n private async showError(messageKey: string): Promise<void> {\n const content = await this.translateService.translateAsync(messageKey);\n const title = await this.translateService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'danger', title, content, closeButton: true });\n }\n\n //#endregion\n}\n","<ax-content>\n <div class=\"axm-set-pin-code__content flex flex-col items-center gap-4 p-6 text-center\">\n <div class=\"axm-set-pin-code__intro flex flex-col gap-2\">\n <h2 class=\"m-0 text-base font-semibold text-on-lightest\">\n @switch (step()) {\n @case ('verify-current') {\n {{ '@auth:profile-page.commands.set-pin-code.steps.verify-current.title' | translate | async }}\n }\n @case ('enter') {\n {{ '@auth:profile-page.commands.set-pin-code.steps.enter.title' | translate | async }}\n }\n @case ('confirm') {\n {{ '@auth:profile-page.commands.set-pin-code.steps.confirm.title' | translate | async }}\n }\n }\n </h2>\n <p class=\"m-0 text-sm text-on-lighter-surface\">\n @switch (step()) {\n @case ('verify-current') {\n {{ '@auth:profile-page.commands.set-pin-code.steps.verify-current.description' | translate | async }}\n }\n @case ('enter') {\n {{ '@auth:profile-page.commands.set-pin-code.steps.enter.description' | translate | async }}\n }\n @case ('confirm') {\n {{ '@auth:profile-page.commands.set-pin-code.steps.confirm.description' | translate | async }}\n }\n }\n </p>\n </div>\n\n <div class=\"axm-set-pin-code__otp w-full max-w-xs\">\n <ax-otp\n class=\"w-full block\"\n type=\"number\"\n [length]=\"pinLength\"\n [ngModel]=\"pinInput()\"\n (ngModelChange)=\"onPinInputChange($event)\"\n (onCompleted)=\"onPinCompleted($event)\"\n ></ax-otp>\n </div>\n </div>\n</ax-content>\n\n<ax-footer>\n <ax-suffix>\n @if (step() === 'confirm') {\n <ax-button\n look=\"solid\"\n color=\"default\"\n [text]=\"'@general:actions.back.title' | translate | async\"\n [disabled]=\"isSaving()\"\n (onClick)=\"onBack()\"\n ></ax-button>\n }\n\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"\n (step() === 'confirm'\n ? '@auth:profile-page.commands.set-pin-code.actions.save'\n : '@general:actions.next.title'\n )\n | translate\n | async\n \"\n [disabled]=\"!canProceed() || isSaving()\"\n (onClick)=\"onNext()\"\n ></ax-button>\n </ax-suffix>\n</ax-footer>\n"],"names":["SecurityManagementRootConfig","i2","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA8BA;AAUM,MAAO,sBAAuB,SAAQ,mBAAmB,CAAA;;;AAwC7D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;QAtCU,IAAA,CAAA,SAAS,GAAG,wBAAwB;;;QAMpC,IAAA,CAAA,IAAI,GAAG,MAAM,CAAiB,OAAO;iFAAC;QACtC,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,EAAE;qFAAC;QACrB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,EAAE;qFAAC;QACrB,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,KAAK;2FAAC;QAC9B,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;QACxB,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,EAAE;0FAAC;QAErC,IAAA,CAAA,WAAW,GAAG,KAAK;AAER,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,yBAAyB,CAAC,IAAI,CAAC,IAAI,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CAAA;;"}
@@ -19,7 +19,7 @@ import { AXPUserAvatarComponent } from '@acorex-platform/framework-client/layout
19
19
  import * as i5$1 from '@angular/common';
20
20
  import { CommonModule } from '@angular/common';
21
21
  import { Router } from '@angular/router';
22
- import { y as AXPTenantChooserListComponent } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-CN5vRSEZ.mjs';
22
+ import { y as AXPTenantChooserListComponent } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-Dgo6MzxI.mjs';
23
23
 
24
24
  class AXPAuthTenantChooserComponent {
25
25
  constructor() {
@@ -64,4 +64,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
64
64
  }], ctorParameters: () => [] });
65
65
 
66
66
  export { AXPAuthTenantChooserComponent };
67
- //# sourceMappingURL=acorex-platform-module-auth-client-tenant-chooser.component-CK4ZArN-.mjs.map
67
+ //# sourceMappingURL=acorex-platform-module-auth-client-tenant-chooser.component-cRTVB-7T.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-auth-client-tenant-chooser.component-CK4ZArN-.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;AACd,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,0BAA0B,CAAC;QACnD,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,EAAE;0FAAC;AACrC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAMxC,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI;QAC/B,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,IAAI;2FAAC;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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-cRTVB-7T.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;AACd,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,0BAA0B,CAAC;QACnD,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,EAAE;0FAAC;AACrC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAMxC,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI;QAC/B,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,IAAI;2FAAC;QAJrC,KAAK,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAClG;AAKA,IAAA,oBAAoB,CAAC,OAAgB,E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AgB;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;;;"}
@@ -23,7 +23,7 @@ import { inject, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Componen
23
23
  import { FormsModule } from '@angular/forms';
24
24
  import { RouterModule, Router, ActivatedRoute } from '@angular/router';
25
25
  import { BehaviorSubject, firstValueFrom } from 'rxjs';
26
- import { x as AXMAuthPlatformSettingsService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-CN5vRSEZ.mjs';
26
+ import { x as AXMAuthPlatformSettingsService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-Dgo6MzxI.mjs';
27
27
  import { r as readTwoFactorChallenge, c as clearTwoFactorChallenge } from './acorex-platform-module-auth-client-two-factor-challenge.storage-mi0UD7Sc.mjs';
28
28
 
29
29
  //#region ----- Constants -----
@@ -197,4 +197,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
197
197
  }] } });
198
198
 
199
199
  export { AXPAuthTwoFactorCodeComponent };
200
- //# sourceMappingURL=acorex-platform-module-auth-client-two-factor-code.component-3oy2lQAi.mjs.map
200
+ //# sourceMappingURL=acorex-platform-module-auth-client-two-factor-code.component-DDzjCHid.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-auth-client-two-factor-code.component-3oy2lQAi.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA;AAEA,MAAM,qBAAqB,GAA2B;AACpD,IAAA,CAAC,0BAA0B,CAAC,YAA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AA,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,IAAA,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;;;"}
1
+ {"version":3,"file":"acorex-platform-module-auth-client-two-factor-code.component-DDzjCHid.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA;AAEA,MAAM,qBAAqB,GAA2B;AACpD,IAAA,CAAC,0BAA0B,CAAC,YAAY,GAAG,sCAAsC;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AAA,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,IAAA,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;;;"}
@@ -6,7 +6,7 @@ function routesFactory() {
6
6
  const routes = [
7
7
  {
8
8
  path: 'twofactor',
9
- loadComponent: () => import('./acorex-platform-module-auth-client-two-factor-code.component-3oy2lQAi.mjs').then((c) => c.AXPAuthTwoFactorCodeComponent),
9
+ loadComponent: () => import('./acorex-platform-module-auth-client-two-factor-code.component-DDzjCHid.mjs').then((c) => c.AXPAuthTwoFactorCodeComponent),
10
10
  },
11
11
  {
12
12
  path: 'two-step',
@@ -44,4 +44,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
44
44
  }] });
45
45
 
46
46
  export { AXPTwoFactorModule };
47
- //# sourceMappingURL=acorex-platform-module-auth-client-two-factor.module-CRx6T5H5.mjs.map
47
+ //# sourceMappingURL=acorex-platform-module-auth-client-two-factor.module-BC8AJTp4.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-auth-client-two-factor.module-CRx6T5H5.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 AXPTwoFactorModule {}\n"],"names":[],"mappings":";;;;AAGA,SAAS,aAAa,GAAA;AACpB,IAAA,MAAM,MAAM,GAAW;AACrB,QAAA;AACE,YAAA,IAAI,EAAE,WAAW;AACjB,YAAA,aAAa,EAAE,MACb,OAAO,6EAA6C,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,6BAA6B,CAAC;AACrG,SAAA;AACD,QAAA;AACE,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,UAAU,EAAE,WAAW;AACvB,YAAA,SAAS,EAAE,MAAM;AAClB,SAAA;KACF;AACD,IAAA,OAAO,MAAM;AACf;MAca,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAlB,kBAAkB,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAAA,SAAA,EARlB;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,MAAM;AACf,gBAAA,KAAK,EAAE,IAAI;AACX,gBAAA,UAAU,EAAE,aAAa;AAC1B,aAAA;AACF,SAAA,EAAA,CAAA,CAAA;;2FAEU,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAZ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,MAAM;AACf,4BAAA,KAAK,EAAE,IAAI;AACX,4BAAA,UAAU,EAAE,aAAa;AAC1B,yBAAA;AACF,qBAAA;AACF,iBAAA;;;"}
1
+ {"version":3,"file":"acorex-platform-module-auth-client-two-factor.module-BC8AJTp4.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 AXPTwoFactorModule {}\n"],"names":[],"mappings":";;;;A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BuilderService } 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 { t as AXPLoginHistoryService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-CN5vRSEZ.mjs';
6
+ import { t as AXPLoginHistoryService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-Dgo6MzxI.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-BmjD2Aqv.mjs.map
107
+ //# sourceMappingURL=acorex-platform-module-auth-client-view-login-history.command-EHXTmZtV.mjs.map