@acorex-platform/module-auth-client 2.0.0-next.1 → 2.0.0-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{acorex-platform-module-auth-client-acorex-platform-module-auth-client-CWE43xt1.mjs → acorex-platform-module-auth-client-acorex-platform-module-auth-client-U7QbmK5T.mjs} +37 -37
- package/fesm2022/{acorex-platform-module-auth-client-acorex-platform-module-auth-client-CWE43xt1.mjs.map → acorex-platform-module-auth-client-acorex-platform-module-auth-client-U7QbmK5T.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-app-chooser.component-D14L5cdt.mjs → acorex-platform-module-auth-client-app-chooser.component-C9cVQg-g.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-app-chooser.component-D14L5cdt.mjs.map → acorex-platform-module-auth-client-app-chooser.component-C9cVQg-g.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-change-password.command-DN0yaJ9l.mjs → acorex-platform-module-auth-client-change-password.command-_l8lKWOn.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-change-password.command-DN0yaJ9l.mjs.map → acorex-platform-module-auth-client-change-password.command-_l8lKWOn.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-change-photo.command-CWeeauFw.mjs → acorex-platform-module-auth-client-change-photo.command-xyHCYyfX.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-change-photo.command-CWeeauFw.mjs.map → acorex-platform-module-auth-client-change-photo.command-xyHCYyfX.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-get-user-activity.query-DI0JR1cS.mjs → acorex-platform-module-auth-client-get-user-activity.query-9gS0TMRk.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-get-user-activity.query-DI0JR1cS.mjs.map → acorex-platform-module-auth-client-get-user-activity.query-9gS0TMRk.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-lock-screen.command-BnS3p6z3.mjs → acorex-platform-module-auth-client-lock-screen.command-D047Pw2t.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-lock-screen.command-BnS3p6z3.mjs.map → acorex-platform-module-auth-client-lock-screen.command-D047Pw2t.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-login.module-DVbaukL7.mjs → acorex-platform-module-auth-client-login.module-BV_GlAkm.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-login.module-DVbaukL7.mjs.map → acorex-platform-module-auth-client-login.module-BV_GlAkm.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-manage-two-factor.command-7e4HVcyU.mjs → acorex-platform-module-auth-client-manage-two-factor.command-nB1EJkRj.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-manage-two-factor.command-7e4HVcyU.mjs.map → acorex-platform-module-auth-client-manage-two-factor.command-nB1EJkRj.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-open-sessions.command-CMNlOr22.mjs → acorex-platform-module-auth-client-open-sessions.command-DeQ9GwAJ.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-open-sessions.command-CMNlOr22.mjs.map → acorex-platform-module-auth-client-open-sessions.command-DeQ9GwAJ.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-password.component-DekdMba0.mjs → acorex-platform-module-auth-client-password.component-u9L-KAOX.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-password.component-DekdMba0.mjs.map → acorex-platform-module-auth-client-password.component-u9L-KAOX.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-profile-activity-chart.component-DUpEusRs.mjs → acorex-platform-module-auth-client-profile-activity-chart.component-Cw_5mhoo.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-profile-activity-chart.component-DUpEusRs.mjs.map → acorex-platform-module-auth-client-profile-activity-chart.component-Cw_5mhoo.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-DaFESP6l.mjs → acorex-platform-module-auth-client-profile-page-component.provider-CVzX5u-Z.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-DaFESP6l.mjs.map → acorex-platform-module-auth-client-profile-page-component.provider-CVzX5u-Z.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-profile-page.component-ClNuHd7p.mjs → acorex-platform-module-auth-client-profile-page.component-C378Zeib.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-profile-page.component-ClNuHd7p.mjs.map → acorex-platform-module-auth-client-profile-page.component-C378Zeib.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-register-password.component-Cu_R4Y5F.mjs → acorex-platform-module-auth-client-register-password.component-dfcfqUXk.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-register-password.component-Cu_R4Y5F.mjs.map → acorex-platform-module-auth-client-register-password.component-dfcfqUXk.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-register.module-DwbrjF2b.mjs → acorex-platform-module-auth-client-register.module-_68mSCaS.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-register.module-DwbrjF2b.mjs.map → acorex-platform-module-auth-client-register.module-_68mSCaS.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-remove-pin-code.command-CC5IWpwS.mjs → acorex-platform-module-auth-client-remove-pin-code.command-OIoOeyy7.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-remove-pin-code.command-CC5IWpwS.mjs.map → acorex-platform-module-auth-client-remove-pin-code.command-OIoOeyy7.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-routes-Dw8YhBrw.mjs → acorex-platform-module-auth-client-routes-DAwpb1Ca.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-routes-Dw8YhBrw.mjs.map → acorex-platform-module-auth-client-routes-DAwpb1Ca.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-session-lock-overlay.component-8Bj33U4_.mjs → acorex-platform-module-auth-client-session-lock-overlay.component-COiu9e-T.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-session-lock-overlay.component-8Bj33U4_.mjs.map → acorex-platform-module-auth-client-session-lock-overlay.component-COiu9e-T.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.command-BEyXf2XA.mjs → acorex-platform-module-auth-client-set-pin-code.command-BrJR7voV.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.command-BEyXf2XA.mjs.map → acorex-platform-module-auth-client-set-pin-code.command-BrJR7voV.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.component-CRft8IKd.mjs → acorex-platform-module-auth-client-set-pin-code.component-BdYrFe_q.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.component-CRft8IKd.mjs.map → acorex-platform-module-auth-client-set-pin-code.component-BdYrFe_q.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-tenant-chooser.component-B0kWYel9.mjs → acorex-platform-module-auth-client-tenant-chooser.component-IHKjfFN9.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-tenant-chooser.component-B0kWYel9.mjs.map → acorex-platform-module-auth-client-tenant-chooser.component-IHKjfFN9.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-tenant-request.component-B-qx-HIi.mjs → acorex-platform-module-auth-client-tenant-request.component-CG74dqMX.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-tenant-request.component-B-qx-HIi.mjs.map → acorex-platform-module-auth-client-tenant-request.component-CG74dqMX.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-two-factor-code.component-DkIXfsXi.mjs → acorex-platform-module-auth-client-two-factor-code.component-CV8lutRb.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-two-factor-code.component-DkIXfsXi.mjs.map → acorex-platform-module-auth-client-two-factor-code.component-CV8lutRb.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-two-factor.module-DMlxcFuT.mjs → acorex-platform-module-auth-client-two-factor.module-HCAHar5G.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-two-factor.module-DMlxcFuT.mjs.map → acorex-platform-module-auth-client-two-factor.module-HCAHar5G.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-view-login-history.command-BHbkWOO3.mjs → acorex-platform-module-auth-client-view-login-history.command-KQiMLdQY.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-view-login-history.command-BHbkWOO3.mjs.map → acorex-platform-module-auth-client-view-login-history.command-KQiMLdQY.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-welcome-onboarding-page.component-DcVVR1Zp.mjs → acorex-platform-module-auth-client-welcome-onboarding-page.component-RZfcW_XP.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-welcome-onboarding-page.component-DcVVR1Zp.mjs.map → acorex-platform-module-auth-client-welcome-onboarding-page.component-RZfcW_XP.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-welcome-onboarding.command-BpZt3m22.mjs → acorex-platform-module-auth-client-welcome-onboarding.command-CpPYTYu0.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-welcome-onboarding.command-BpZt3m22.mjs.map → acorex-platform-module-auth-client-welcome-onboarding.command-CpPYTYu0.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-auth-client.mjs +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-auth-client-password.component-DekdMba0.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/login/password/default-challenge.component.ts","../../../../libs/modules/auth/client/src/lib/pages/login/password/password.component.ts","../../../../libs/modules/auth/client/src/lib/pages/login/password/password.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { 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 { AXTranslationModule } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { AXPLoginChallengeComponentBase } from '@acorex-platform/framework-client/auth';\nimport { CommonModule } from '@angular/common';\nimport { Component, signal, ChangeDetectionStrategy } from '@angular/core';\n\n//#region ---- Default Challenge Component ----\n\n/**\n * Default built-in challenge component for login\n * Shows challenge image/content with an input field and refresh button\n */\n@Component({\n selector: 'axp-default-challenge',\n standalone: true,\n imports: [\n AXButtonModule,\n AXTextBoxModule,\n AXLabelModule,\n AXFormModule,\n AXDecoratorModule,\n AXLoadingModule,\n AXTranslationModule,\n AXValidationModule,\n CommonModule,\n ],\n changeDetection: ChangeDetectionStrategy.Eager,\n template: `\n <div class=\"flex flex-col gap-3 p-4 border rounded-md border-warning-300 bg-warning-50\">\n <!-- Challenge Image -->\n <div class=\"flex items-center justify-center gap-2\">\n @if (challengeData(); as challenge) {\n @if (challenge.contentType === 'image-base64') {\n <img\n [src]=\"'data:image/png;base64,' + challenge.content\"\n alt=\"Security Challenge\"\n class=\"h-12 border rounded\"\n />\n } @else if (challenge.contentType === 'image-url') {\n <img [src]=\"challenge.content\" alt=\"Security Challenge\" class=\"h-12 border rounded\" />\n } @else {\n <span class=\"font-mono text-lg p-2 border rounded bg-white\">\n {{ challenge.content }}\n </span>\n }\n }\n <!-- Refresh Challenge Button -->\n <ax-button\n look=\"blank\"\n color=\"primary\"\n class=\"ax-sm\"\n id=\"refresh-challenge\"\n (onClick)=\"onRefreshClick()\"\n [disabled]=\"isLoading()\"\n >\n @if (isLoading()) {\n <ax-loading></ax-loading>\n } @else {\n <ax-icon><i class=\"fa-solid fa-rotate\"></i></ax-icon>\n }\n </ax-button>\n </div>\n\n <!-- Challenge Response Input -->\n <ax-form-field>\n <ax-label>{{ '@auth:challenge.enter-code' | translate | async }}</ax-label>\n <ax-text-box\n [name]=\"'challengeResponse'\"\n id=\"challenge-response\"\n [placeholder]=\"'@auth:challenge.placeholder' | translate | async\"\n [value]=\"response()\"\n (valueChange)=\"onResponseChange($event)\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n </div>\n `,\n})\nexport class AXPDefaultChallengeComponent extends AXPLoginChallengeComponentBase {\n //#region ---- Local State ----\n\n /** Local state for the response input */\n protected response = signal<string>('');\n\n //#endregion\n\n //#region ---- Event Handlers ----\n\n /**\n * Handles response input change\n */\n protected onResponseChange(value: string): void {\n this.response.set(value);\n this.responseChange.emit(value);\n }\n\n /**\n * Handles refresh button click\n */\n protected onRefreshClick(): void {\n this.refreshRequest.emit();\n }\n\n //#endregion\n}\n\n//#endregion\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\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 { AXPasswordBoxModule } from '@acorex/components/password-box';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n ComponentRef,\n Injector,\n OnInit,\n Type,\n ViewChild,\n ViewContainerRef,\n effect,\n inject,\n signal,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterModule } from '@angular/router';\n\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXFormatService } from '@acorex/core/format';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport {\n AXPLoginChallengeComponentBase,\n AXPLoginChallengeData,\n AXPSessionService,\n AXP_LOGIN_CHALLENGE_PROVIDER,\n} from '@acorex-platform/framework-client/auth';\nimport { AXPHomePageService, AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPRegionalSetting } from '@acorex-platform/framework-shared/core';\nimport { FormsModule } from '@angular/forms';\nimport { BehaviorSubject, firstValueFrom } from 'rxjs';\nimport { AXMAuthenticationTypes } from '../../../auth.config';\nimport { AXMAuthPlatformSettingsService } from '../../../auth-platform-settings.service';\nimport { writeTwoFactorChallenge } from '../../two-factor/two-factor-challenge.storage';\nimport { AXPLoginExternalProvidersComponent } from '../login-external-providers.component';\nimport { AXPDefaultChallengeComponent } from './default-challenge.component';\n\n//#region ---- Module Imports ----\n\nconst MODULES = [\n CommonModule,\n FormsModule,\n AXFormModule,\n AXTextBoxModule,\n AXPasswordBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXDecoratorModule,\n AXCheckBoxModule,\n AXTranslationModule,\n AXLoadingModule,\n RouterModule,\n AXValidationModule,\n AXPLoginExternalProvidersComponent,\n];\n\n//#endregion\n\n@Component({\n templateUrl: './password.component.html',\n styleUrls: ['./password.component.css'],\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [...MODULES],\n})\nexport class AXPLoginPasswordComponent implements OnInit {\n //#region ---- Services & Dependencies ----\n\n private readonly authPlatformSettings = inject(AXMAuthPlatformSettingsService);\n private sessionService = inject(AXPSessionService);\n private activateRoute = inject(ActivatedRoute);\n private homePageService = inject(AXPHomePageService);\n private toastService = inject(AXToastService);\n private formatService = inject(AXFormatService);\n private settingsService = inject(AXPSettingsService);\n private translateService = inject(AXTranslationService);\n private router = inject(Router);\n protected injector = inject(Injector);\n\n protected readonly signupEnabled = this.authPlatformSettings.signupEnabled();\n\n /** Optional challenge provider - injected only if configured */\n private challengeProvider = inject(AXP_LOGIN_CHALLENGE_PROVIDER, { optional: true });\n\n //#endregion\n\n //#region ---- Form References ----\n\n @ViewChild(AXFormComponent)\n private form!: AXFormComponent;\n\n //#endregion\n\n //#region ---- Form Fields ----\n\n /** Label key for the first input field (username/email/mobile) */\n protected l1!: string;\n\n /** Label key for the second input field (password) */\n protected l2!: string;\n\n /** Value of the first input field (username/email) */\n protected v1 = '';\n\n /** Value of the second input field (password) */\n protected v2: string | null = '';\n\n /** Whether to keep the user logged in */\n protected isKeepLogin = false;\n\n //#endregion\n\n //#region ---- Challenge State ----\n\n /** ViewContainerRef for rendering the challenge component */\n @ViewChild('challengeContainer', { read: ViewContainerRef })\n private challengeContainerRef?: ViewContainerRef;\n\n /** Reference to the currently rendered challenge component */\n private challengeComponentRef?: ComponentRef<AXPLoginChallengeComponentBase>;\n\n /** Current challenge data from the server */\n protected challengeData = signal<AXPLoginChallengeData | null>(null);\n\n /** User's response to the challenge (e.g., CAPTCHA text) */\n protected challengeResponse = signal<string>('');\n\n /** Loading state for challenge refresh */\n protected isChallengeLoading = signal<boolean>(false);\n\n /**\n * Effect to render the challenge component when challenge data changes\n */\n private challengeRenderEffect = effect(() => {\n const data = this.challengeData();\n const isLoading = this.isChallengeLoading();\n\n // Wait for next tick to ensure ViewContainerRef is available\n setTimeout(() => {\n if (data && this.challengeContainerRef) {\n this.renderChallengeComponent(data, isLoading);\n } else {\n this.destroyChallengeComponent();\n }\n });\n });\n\n //#endregion\n\n //#region ---- Loading & Status State ----\n\n protected isLoading$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n protected submitText = 'signin.submit';\n\n //#endregion\n\n //#region ---- Computed Properties ----\n\n /** Check if a challenge is currently active and should be displayed */\n protected get hasChallengeActive(): boolean {\n return this.challengeData() !== null;\n }\n\n //#endregion\n\n //#region ---- Lifecycle Methods ----\n\n ngOnInit(): void {\n this.l2 = 'password';\n switch (this.authPlatformSettings.credentialType()) {\n case AXMAuthenticationTypes.EmailPassword:\n this.l1 = 'email';\n break;\n case AXMAuthenticationTypes.MobilePassword:\n this.l1 = 'mobile';\n break;\n case AXMAuthenticationTypes.UsernameEmailPassword:\n this.l1 = 'username-email';\n break;\n case AXMAuthenticationTypes.UsernamePassword:\n default:\n this.l1 = 'username';\n }\n }\n\n //#endregion\n\n //#region ---- Navigation Handlers ----\n\n protected handleForgotOnClick(): void {\n this.router.navigate(['/auth/forgot']);\n }\n\n protected handleRegisterOnClick(): void {\n this.router.navigate([this.authPlatformSettings.signupUrl()]);\n }\n\n //#endregion\n\n //#region ---- Login Handlers ----\n\n protected handleLoginClick(): void {\n const strategyName = this.authPlatformSettings.defaultStrategyName();\n this.sessionService.setStrategy(strategyName);\n const redirectUrl = this.activateRoute.snapshot.queryParams['redirectUrl'];\n\n this.form.validate().then(async (form) => {\n if (form.result) {\n this.isLoading$.next(true);\n this.submitText = 'processing';\n\n try {\n // Build credentials object with challenge data if active\n const currentChallenge = this.challengeData();\n const credentials = {\n strategy: strategyName,\n username: this.v1,\n password: this.v2!,\n rememberMe: this.isKeepLogin,\n ...(currentChallenge && {\n challengeId: currentChallenge.id,\n challengeResponse: this.challengeResponse(),\n }),\n };\n\n await this.sessionService.signin(credentials);\n\n // Check authentication status before navigation\n const isAuthenticated = await firstValueFrom(this.sessionService.isAuthenticated$);\n\n if (!isAuthenticated) {\n throw new Error('Authentication failed after signin');\n }\n\n // Clear challenge state on successful login\n this.clearChallengeState();\n\n await this.navigateAfterAuth(redirectUrl);\n } catch (error: unknown) {\n await this.handleLoginError(error);\n } finally {\n // Always unlock the button — success navigates away; failure must not stay \"processing\".\n this.submitText = 'signin.submit';\n this.isLoading$.next(false);\n }\n }\n });\n }\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 /**\n * Handles login errors and checks if a challenge is required\n */\n private async handleLoginError(error: unknown): Promise<void> {\n const apiError = this.extractApiError(error);\n\n if (await this.navigateToTwoFactorIfRequired(apiError)) {\n return;\n }\n\n // Check if challenge provider wants to handle this error\n if (this.challengeProvider) {\n const checkResult = this.challengeProvider.checkResponse(error);\n\n if (checkResult?.required) {\n try {\n // Fetch challenge from server\n const challenge = await this.challengeProvider.getChallenge(checkResult.serverData);\n this.challengeData.set(challenge);\n this.challengeResponse.set('');\n\n // Show challenge message if provided\n if (checkResult.message) {\n this.toastService.show({\n color: 'warning',\n content: checkResult.message,\n timeOut: 5000,\n });\n }\n\n this.submitText = 'signin.submit';\n this.isLoading$.next(false);\n return;\n } catch (challengeError) {\n console.error('Failed to fetch challenge:', challengeError);\n }\n }\n }\n\n // Default error handling (do not add a second toast for requiresCaptcha —\n // that flag is for challenge UI; without a provider it duplicated the error toast)\n await this.showLoginError(error, apiError);\n }\n\n private async navigateToTwoFactorIfRequired(\n apiError: Record<string, unknown> | null,\n ): Promise<boolean> {\n if (!apiError) {\n return false;\n }\n\n const errorCode =\n (typeof apiError['error'] === 'string' && apiError['error']) ||\n (typeof apiError['code'] === 'string' && apiError['code']) ||\n '';\n if (errorCode !== 'TWO_FACTOR_REQUIRED') {\n return false;\n }\n\n const challengeId =\n typeof apiError['challengeId'] === 'string' ? apiError['challengeId'].trim() : '';\n if (!challengeId) {\n return false;\n }\n\n writeTwoFactorChallenge({\n challengeId,\n rememberMe: apiError['rememberMe'] === true,\n });\n\n const redirectUrl = this.activateRoute.snapshot.queryParams['redirectUrl'];\n await this.router.navigate(['/auth/twofactor'], {\n queryParams: redirectUrl ? { redirectUrl } : undefined,\n });\n this.submitText = 'signin.submit';\n this.isLoading$.next(false);\n return true;\n }\n\n /**\n * Displays the login error message to the user\n */\n private async showLoginError(error: unknown, apiError?: Record<string, unknown> | null): Promise<void> {\n let errorMsg =\n (await this.translateService.translateAsync('@auth:signin.errors.generic')) ?? '';\n const resolvedApiError = apiError ?? this.extractApiError(error);\n const errorCode =\n (typeof resolvedApiError?.['error'] === 'string' && resolvedApiError['error']) ||\n (typeof resolvedApiError?.['code'] === 'string' && resolvedApiError['code']) ||\n '';\n\n if (errorCode === 'AccountLocked') {\n errorMsg = await this.formatAccountLockedMessage(resolvedApiError);\n } else if (\n errorCode === 'MAX_ACTIVE_DEVICE_SESSIONS' ||\n resolvedApiError?.['message'] === 'MAX_ACTIVE_DEVICE_SESSIONS'\n ) {\n errorMsg = await this.translateService.translateAsync(\n '@auth:signin.errors.max-active-device-sessions',\n );\n } else if (resolvedApiError?.['message'] && typeof resolvedApiError['message'] === 'string') {\n errorMsg = resolvedApiError['message'];\n } else if (error && typeof error === 'object') {\n const err = error as Record<string, unknown>;\n const errObj = err['error'] as Record<string, unknown> | undefined;\n\n errorMsg =\n (errObj?.['error_description'] as string) ||\n (errObj?.['error'] as string) ||\n (err['message'] as string) ||\n errorMsg;\n\n if (typeof errorMsg === 'object') {\n const msgObj = errorMsg as unknown as Record<string, unknown>;\n errorMsg = (msgObj['message'] as string) || (msgObj['error_description'] as string) || JSON.stringify(errorMsg);\n }\n }\n\n const remainingAttempts = resolvedApiError?.['remainingAttempts'];\n if (typeof remainingAttempts === 'number' && remainingAttempts >= 0 && errorCode !== 'AccountLocked') {\n errorMsg = `${errorMsg} (${remainingAttempts} attempt${remainingAttempts === 1 ? '' : 's'} remaining)`;\n }\n\n this.toastService.show({\n color: 'danger',\n content: errorMsg,\n timeOut: 5000,\n });\n\n console.error('Login error:', error);\n this.submitText = 'signin.submit';\n this.v2 = null;\n this.isLoading$.next(false);\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 // AuthApiError exposes captcha/lockout fields on `.apiError`.\n if ('apiError' in err && err['apiError'] == null && typeof err['message'] === 'string') {\n return { message: err['message'] };\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 private async formatAccountLockedMessage(apiError: Record<string, unknown> | null): Promise<string> {\n const details =\n apiError?.['details'] && typeof apiError['details'] === 'object'\n ? (apiError['details'] as Record<string, unknown>)\n : null;\n const lockedUntil =\n (typeof apiError?.['lockedUntil'] === 'string' && apiError['lockedUntil']) ||\n (typeof details?.['lockedUntil'] === 'string' && details['lockedUntil']) ||\n '';\n const formatted = lockedUntil ? await this.formatLockedUntil(lockedUntil) : '';\n\n if (formatted) {\n return this.translateService.translateAsync('@auth:signin.errors.account-locked-until', {\n params: { datetime: formatted },\n });\n }\n\n return this.translateService.translateAsync('@auth:signin.errors.account-locked');\n }\n\n private async formatLockedUntil(iso: string): Promise<string> {\n const parsed = Date.parse(iso);\n if (!Number.isFinite(parsed)) {\n return '';\n }\n\n const dateFormat = await this.settingsService.get(AXPRegionalSetting.ShortDate);\n const timeFormat = await this.settingsService.get(AXPRegionalSetting.ShortTime);\n const format = `${dateFormat} ${timeFormat}`.trim();\n return this.formatService.format(new Date(parsed), 'datetime', { format });\n }\n\n //#endregion\n\n //#region ---- Challenge Handlers ----\n\n /**\n * Gets the challenge component type from provider or uses default\n */\n private getChallengeComponentType(): Type<AXPLoginChallengeComponentBase> {\n return this.challengeProvider?.getChallengeComponent() ?? AXPDefaultChallengeComponent;\n }\n\n /**\n * Renders the challenge component dynamically\n */\n private renderChallengeComponent(data: AXPLoginChallengeData, isLoading: boolean): void {\n if (!this.challengeContainerRef) return;\n\n // If component already exists, just update inputs\n if (this.challengeComponentRef) {\n this.updateChallengeComponentInputs(data, isLoading);\n return;\n }\n\n // Clear container and create new component\n this.challengeContainerRef.clear();\n const componentType = this.getChallengeComponentType();\n this.challengeComponentRef = this.challengeContainerRef.createComponent(componentType);\n\n // Set inputs\n this.updateChallengeComponentInputs(data, isLoading);\n\n // Subscribe to outputs\n const instance = this.challengeComponentRef.instance;\n instance.responseChange.subscribe((response: string) => {\n this.challengeResponse.set(response);\n });\n instance.refreshRequest.subscribe(() => {\n this.handleRefreshChallenge();\n });\n }\n\n /**\n * Updates the inputs of the challenge component\n */\n private updateChallengeComponentInputs(data: AXPLoginChallengeData, isLoading: boolean): void {\n if (!this.challengeComponentRef) return;\n\n this.challengeComponentRef.setInput('challengeData', data);\n this.challengeComponentRef.setInput('isLoading', isLoading);\n }\n\n /**\n * Destroys the challenge component\n */\n private destroyChallengeComponent(): void {\n if (this.challengeComponentRef) {\n this.challengeComponentRef.destroy();\n this.challengeComponentRef = undefined;\n }\n if (this.challengeContainerRef) {\n this.challengeContainerRef.clear();\n }\n }\n\n /**\n * Refreshes the challenge (e.g., user clicks \"new image\" button)\n */\n protected async handleRefreshChallenge(): Promise<void> {\n if (!this.challengeProvider) return;\n\n this.isChallengeLoading.set(true);\n try {\n const newChallenge = await this.challengeProvider.refreshChallenge();\n this.challengeData.set(newChallenge);\n this.challengeResponse.set('');\n } catch (error) {\n console.error('Failed to refresh challenge:', error);\n this.toastService.show({\n color: 'danger',\n content: 'Failed to load new challenge. Please try again.',\n timeOut: 3000,\n });\n } finally {\n this.isChallengeLoading.set(false);\n }\n }\n\n /**\n * Clears the challenge state (after successful login or manual clear)\n */\n private clearChallengeState(): void {\n this.challengeData.set(null);\n this.challengeResponse.set('');\n this.destroyChallengeComponent();\n }\n\n //#endregion\n}\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:signin.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:signin.hint' | translate | async }}\n </p>\n </div>\n <ax-form>\n <div class=\"flex flex-col gap-4 lg:gap-6\">\n <ax-form-field>\n <ax-label>{{ ('@auth:' + l1) | translate | async }}</ax-label>\n <ax-text-box\n [name]=\"'username'\"\n id=\"username\"\n [autoComplete]=\"'username'\"\n [(value)]=\"v1\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n <ax-form-field>\n <ax-label>{{ '@auth:password' | translate | async }}</ax-label>\n <ax-password-box\n [name]=\"'password'\"\n id=\"password\"\n [autoComplete]=\"'current-password'\"\n [(value)]=\"v2\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-password-box>\n </ax-form-field>\n\n <!-- Challenge Section (CAPTCHA) - rendered via ViewContainerRef -->\n @if (hasChallengeActive) {\n <ng-container #challengeContainer></ng-container>\n }\n\n <div class=\"flex justify-between items-center\">\n <ax-check-box [(ngModel)]=\"isKeepLogin\">\n <ax-label class=\"mb-0\">{{\n '@auth:signin.remember' | translate | async\n }}</ax-label>\n </ax-check-box>\n <ax-button\n color=\"primary\"\n class=\"ax-sm\"\n id=\"forgot-password\"\n [text]=\"'@auth:forgot.password' | translate | async\"\n look=\"blank\"\n (onClick)=\"handleForgotOnClick()\"\n >\n </ax-button>\n </div>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n id=\"submit-login\"\n [text]=\"'@auth:signin.submit' | translate | async\"\n (onClick)=\"handleLoginClick()\"\n [disabled]=\"isLoading$ | async\"\n [type]=\"'submit'\"\n >\n @if (isLoading$ | async) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n @if (externalProviders.hasContent() || signupEnabled) {\n <div class=\"my-5 lg:my-8 flex w-full items-center\">\n <div class=\"h-px flex-1 bg-border-lighter\"></div>\n <span class=\"px-3 text-xs font-medium tracking-wide text-neutral-400\">\n {{ '@auth:signin.or' | translate | async }}\n </span>\n <div class=\"h-px flex-1 bg-border-lighter\"></div>\n </div>\n }\n <axm-login-external-providers\n #externalProviders\n ></axm-login-external-providers>\n </ax-form>\n @if (signupEnabled) {\n <ax-button\n class=\"w-full mt-2\"\n id=\"register\"\n (onClick)=\"handleRegisterOnClick()\"\n text=\"{{ '@auth:register' | translate | async }}\"\n [color]=\"'default'\"\n >\n </ax-button>\n }\n </div>\n</ng-container>\n"],"names":["i4","i5","i6","i7","i8","i1","i2","i3","i9","i10"],"mappings":";;;;;;;;;;;;;;;;;;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,EAAAE,EAAA,CAAA,qBAAA,EAAA,QAAA,EAAA,aAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACnB,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAI,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,+BAClB,kCAAkC,EAAA,QAAA,EAAA,8BAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAL,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,CAAA,CAAA;;2FAWvB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBANrC,SAAS;AAGS,YAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,uBAAuB,CAAC,KAAK,EAAA,OAAA,EACrC,CAAC,GAAG,OAAO,CAAC,EAAA,QAAA,EAAA,iuGAAA,EAAA,MAAA,EAAA,CAAA,6VAAA,CAAA,EAAA;;sBAyBpB,SAAS;uBAAC,eAAe;;sBA2BzB,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,oBAAoB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-auth-client-password.component-u9L-KAOX.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/login/password/default-challenge.component.ts","../../../../libs/modules/auth/client/src/lib/pages/login/password/password.component.ts","../../../../libs/modules/auth/client/src/lib/pages/login/password/password.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { 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 { AXTranslationModule } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { AXPLoginChallengeComponentBase } from '@acorex-platform/framework-client/auth';\nimport { CommonModule } from '@angular/common';\nimport { Component, signal, ChangeDetectionStrategy } from '@angular/core';\n\n//#region ---- Default Challenge Component ----\n\n/**\n * Default built-in challenge component for login\n * Shows challenge image/content with an input field and refresh button\n */\n@Component({\n selector: 'axp-default-challenge',\n standalone: true,\n imports: [\n AXButtonModule,\n AXTextBoxModule,\n AXLabelModule,\n AXFormModule,\n AXDecoratorModule,\n AXLoadingModule,\n AXTranslationModule,\n AXValidationModule,\n CommonModule,\n ],\n changeDetection: ChangeDetectionStrategy.Eager,\n template: `\n <div class=\"flex flex-col gap-3 p-4 border rounded-md border-warning-300 bg-warning-50\">\n <!-- Challenge Image -->\n <div class=\"flex items-center justify-center gap-2\">\n @if (challengeData(); as challenge) {\n @if (challenge.contentType === 'image-base64') {\n <img\n [src]=\"'data:image/png;base64,' + challenge.content\"\n alt=\"Security Challenge\"\n class=\"h-12 border rounded\"\n />\n } @else if (challenge.contentType === 'image-url') {\n <img [src]=\"challenge.content\" alt=\"Security Challenge\" class=\"h-12 border rounded\" />\n } @else {\n <span class=\"font-mono text-lg p-2 border rounded bg-white\">\n {{ challenge.content }}\n </span>\n }\n }\n <!-- Refresh Challenge Button -->\n <ax-button\n look=\"blank\"\n color=\"primary\"\n class=\"ax-sm\"\n id=\"refresh-challenge\"\n (onClick)=\"onRefreshClick()\"\n [disabled]=\"isLoading()\"\n >\n @if (isLoading()) {\n <ax-loading></ax-loading>\n } @else {\n <ax-icon><i class=\"fa-solid fa-rotate\"></i></ax-icon>\n }\n </ax-button>\n </div>\n\n <!-- Challenge Response Input -->\n <ax-form-field>\n <ax-label>{{ '@auth:challenge.enter-code' | translate | async }}</ax-label>\n <ax-text-box\n [name]=\"'challengeResponse'\"\n id=\"challenge-response\"\n [placeholder]=\"'@auth:challenge.placeholder' | translate | async\"\n [value]=\"response()\"\n (valueChange)=\"onResponseChange($event)\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n </div>\n `,\n})\nexport class AXPDefaultChallengeComponent extends AXPLoginChallengeComponentBase {\n //#region ---- Local State ----\n\n /** Local state for the response input */\n protected response = signal<string>('');\n\n //#endregion\n\n //#region ---- Event Handlers ----\n\n /**\n * Handles response input change\n */\n protected onResponseChange(value: string): void {\n this.response.set(value);\n this.responseChange.emit(value);\n }\n\n /**\n * Handles refresh button click\n */\n protected onRefreshClick(): void {\n this.refreshRequest.emit();\n }\n\n //#endregion\n}\n\n//#endregion\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\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 { AXPasswordBoxModule } from '@acorex/components/password-box';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n ComponentRef,\n Injector,\n OnInit,\n Type,\n ViewChild,\n ViewContainerRef,\n effect,\n inject,\n signal,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterModule } from '@angular/router';\n\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXFormatService } from '@acorex/core/format';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport {\n AXPLoginChallengeComponentBase,\n AXPLoginChallengeData,\n AXPSessionService,\n AXP_LOGIN_CHALLENGE_PROVIDER,\n} from '@acorex-platform/framework-client/auth';\nimport { AXPHomePageService, AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPRegionalSetting } from '@acorex-platform/framework-shared/core';\nimport { FormsModule } from '@angular/forms';\nimport { BehaviorSubject, firstValueFrom } from 'rxjs';\nimport { AXMAuthenticationTypes } from '../../../auth.config';\nimport { AXMAuthPlatformSettingsService } from '../../../auth-platform-settings.service';\nimport { writeTwoFactorChallenge } from '../../two-factor/two-factor-challenge.storage';\nimport { AXPLoginExternalProvidersComponent } from '../login-external-providers.component';\nimport { AXPDefaultChallengeComponent } from './default-challenge.component';\n\n//#region ---- Module Imports ----\n\nconst MODULES = [\n CommonModule,\n FormsModule,\n AXFormModule,\n AXTextBoxModule,\n AXPasswordBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXDecoratorModule,\n AXCheckBoxModule,\n AXTranslationModule,\n AXLoadingModule,\n RouterModule,\n AXValidationModule,\n AXPLoginExternalProvidersComponent,\n];\n\n//#endregion\n\n@Component({\n templateUrl: './password.component.html',\n styleUrls: ['./password.component.css'],\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [...MODULES],\n})\nexport class AXPLoginPasswordComponent implements OnInit {\n //#region ---- Services & Dependencies ----\n\n private readonly authPlatformSettings = inject(AXMAuthPlatformSettingsService);\n private sessionService = inject(AXPSessionService);\n private activateRoute = inject(ActivatedRoute);\n private homePageService = inject(AXPHomePageService);\n private toastService = inject(AXToastService);\n private formatService = inject(AXFormatService);\n private settingsService = inject(AXPSettingsService);\n private translateService = inject(AXTranslationService);\n private router = inject(Router);\n protected injector = inject(Injector);\n\n protected readonly signupEnabled = this.authPlatformSettings.signupEnabled();\n\n /** Optional challenge provider - injected only if configured */\n private challengeProvider = inject(AXP_LOGIN_CHALLENGE_PROVIDER, { optional: true });\n\n //#endregion\n\n //#region ---- Form References ----\n\n @ViewChild(AXFormComponent)\n private form!: AXFormComponent;\n\n //#endregion\n\n //#region ---- Form Fields ----\n\n /** Label key for the first input field (username/email/mobile) */\n protected l1!: string;\n\n /** Label key for the second input field (password) */\n protected l2!: string;\n\n /** Value of the first input field (username/email) */\n protected v1 = '';\n\n /** Value of the second input field (password) */\n protected v2: string | null = '';\n\n /** Whether to keep the user logged in */\n protected isKeepLogin = false;\n\n //#endregion\n\n //#region ---- Challenge State ----\n\n /** ViewContainerRef for rendering the challenge component */\n @ViewChild('challengeContainer', { read: ViewContainerRef })\n private challengeContainerRef?: ViewContainerRef;\n\n /** Reference to the currently rendered challenge component */\n private challengeComponentRef?: ComponentRef<AXPLoginChallengeComponentBase>;\n\n /** Current challenge data from the server */\n protected challengeData = signal<AXPLoginChallengeData | null>(null);\n\n /** User's response to the challenge (e.g., CAPTCHA text) */\n protected challengeResponse = signal<string>('');\n\n /** Loading state for challenge refresh */\n protected isChallengeLoading = signal<boolean>(false);\n\n /**\n * Effect to render the challenge component when challenge data changes\n */\n private challengeRenderEffect = effect(() => {\n const data = this.challengeData();\n const isLoading = this.isChallengeLoading();\n\n // Wait for next tick to ensure ViewContainerRef is available\n setTimeout(() => {\n if (data && this.challengeContainerRef) {\n this.renderChallengeComponent(data, isLoading);\n } else {\n this.destroyChallengeComponent();\n }\n });\n });\n\n //#endregion\n\n //#region ---- Loading & Status State ----\n\n protected isLoading$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n protected submitText = 'signin.submit';\n\n //#endregion\n\n //#region ---- Computed Properties ----\n\n /** Check if a challenge is currently active and should be displayed */\n protected get hasChallengeActive(): boolean {\n return this.challengeData() !== null;\n }\n\n //#endregion\n\n //#region ---- Lifecycle Methods ----\n\n ngOnInit(): void {\n this.l2 = 'password';\n switch (this.authPlatformSettings.credentialType()) {\n case AXMAuthenticationTypes.EmailPassword:\n this.l1 = 'email';\n break;\n case AXMAuthenticationTypes.MobilePassword:\n this.l1 = 'mobile';\n break;\n case AXMAuthenticationTypes.UsernameEmailPassword:\n this.l1 = 'username-email';\n break;\n case AXMAuthenticationTypes.UsernamePassword:\n default:\n this.l1 = 'username';\n }\n }\n\n //#endregion\n\n //#region ---- Navigation Handlers ----\n\n protected handleForgotOnClick(): void {\n this.router.navigate(['/auth/forgot']);\n }\n\n protected handleRegisterOnClick(): void {\n this.router.navigate([this.authPlatformSettings.signupUrl()]);\n }\n\n //#endregion\n\n //#region ---- Login Handlers ----\n\n protected handleLoginClick(): void {\n const strategyName = this.authPlatformSettings.defaultStrategyName();\n this.sessionService.setStrategy(strategyName);\n const redirectUrl = this.activateRoute.snapshot.queryParams['redirectUrl'];\n\n this.form.validate().then(async (form) => {\n if (form.result) {\n this.isLoading$.next(true);\n this.submitText = 'processing';\n\n try {\n // Build credentials object with challenge data if active\n const currentChallenge = this.challengeData();\n const credentials = {\n strategy: strategyName,\n username: this.v1,\n password: this.v2!,\n rememberMe: this.isKeepLogin,\n ...(currentChallenge && {\n challengeId: currentChallenge.id,\n challengeResponse: this.challengeResponse(),\n }),\n };\n\n await this.sessionService.signin(credentials);\n\n // Check authentication status before navigation\n const isAuthenticated = await firstValueFrom(this.sessionService.isAuthenticated$);\n\n if (!isAuthenticated) {\n throw new Error('Authentication failed after signin');\n }\n\n // Clear challenge state on successful login\n this.clearChallengeState();\n\n await this.navigateAfterAuth(redirectUrl);\n } catch (error: unknown) {\n await this.handleLoginError(error);\n } finally {\n // Always unlock the button — success navigates away; failure must not stay \"processing\".\n this.submitText = 'signin.submit';\n this.isLoading$.next(false);\n }\n }\n });\n }\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 /**\n * Handles login errors and checks if a challenge is required\n */\n private async handleLoginError(error: unknown): Promise<void> {\n const apiError = this.extractApiError(error);\n\n if (await this.navigateToTwoFactorIfRequired(apiError)) {\n return;\n }\n\n // Check if challenge provider wants to handle this error\n if (this.challengeProvider) {\n const checkResult = this.challengeProvider.checkResponse(error);\n\n if (checkResult?.required) {\n try {\n // Fetch challenge from server\n const challenge = await this.challengeProvider.getChallenge(checkResult.serverData);\n this.challengeData.set(challenge);\n this.challengeResponse.set('');\n\n // Show challenge message if provided\n if (checkResult.message) {\n this.toastService.show({\n color: 'warning',\n content: checkResult.message,\n timeOut: 5000,\n });\n }\n\n this.submitText = 'signin.submit';\n this.isLoading$.next(false);\n return;\n } catch (challengeError) {\n console.error('Failed to fetch challenge:', challengeError);\n }\n }\n }\n\n // Default error handling (do not add a second toast for requiresCaptcha —\n // that flag is for challenge UI; without a provider it duplicated the error toast)\n await this.showLoginError(error, apiError);\n }\n\n private async navigateToTwoFactorIfRequired(\n apiError: Record<string, unknown> | null,\n ): Promise<boolean> {\n if (!apiError) {\n return false;\n }\n\n const errorCode =\n (typeof apiError['error'] === 'string' && apiError['error']) ||\n (typeof apiError['code'] === 'string' && apiError['code']) ||\n '';\n if (errorCode !== 'TWO_FACTOR_REQUIRED') {\n return false;\n }\n\n const challengeId =\n typeof apiError['challengeId'] === 'string' ? apiError['challengeId'].trim() : '';\n if (!challengeId) {\n return false;\n }\n\n writeTwoFactorChallenge({\n challengeId,\n rememberMe: apiError['rememberMe'] === true,\n });\n\n const redirectUrl = this.activateRoute.snapshot.queryParams['redirectUrl'];\n await this.router.navigate(['/auth/twofactor'], {\n queryParams: redirectUrl ? { redirectUrl } : undefined,\n });\n this.submitText = 'signin.submit';\n this.isLoading$.next(false);\n return true;\n }\n\n /**\n * Displays the login error message to the user\n */\n private async showLoginError(error: unknown, apiError?: Record<string, unknown> | null): Promise<void> {\n let errorMsg =\n (await this.translateService.translateAsync('@auth:signin.errors.generic')) ?? '';\n const resolvedApiError = apiError ?? this.extractApiError(error);\n const errorCode =\n (typeof resolvedApiError?.['error'] === 'string' && resolvedApiError['error']) ||\n (typeof resolvedApiError?.['code'] === 'string' && resolvedApiError['code']) ||\n '';\n\n if (errorCode === 'AccountLocked') {\n errorMsg = await this.formatAccountLockedMessage(resolvedApiError);\n } else if (\n errorCode === 'MAX_ACTIVE_DEVICE_SESSIONS' ||\n resolvedApiError?.['message'] === 'MAX_ACTIVE_DEVICE_SESSIONS'\n ) {\n errorMsg = await this.translateService.translateAsync(\n '@auth:signin.errors.max-active-device-sessions',\n );\n } else if (resolvedApiError?.['message'] && typeof resolvedApiError['message'] === 'string') {\n errorMsg = resolvedApiError['message'];\n } else if (error && typeof error === 'object') {\n const err = error as Record<string, unknown>;\n const errObj = err['error'] as Record<string, unknown> | undefined;\n\n errorMsg =\n (errObj?.['error_description'] as string) ||\n (errObj?.['error'] as string) ||\n (err['message'] as string) ||\n errorMsg;\n\n if (typeof errorMsg === 'object') {\n const msgObj = errorMsg as unknown as Record<string, unknown>;\n errorMsg = (msgObj['message'] as string) || (msgObj['error_description'] as string) || JSON.stringify(errorMsg);\n }\n }\n\n const remainingAttempts = resolvedApiError?.['remainingAttempts'];\n if (typeof remainingAttempts === 'number' && remainingAttempts >= 0 && errorCode !== 'AccountLocked') {\n errorMsg = `${errorMsg} (${remainingAttempts} attempt${remainingAttempts === 1 ? '' : 's'} remaining)`;\n }\n\n this.toastService.show({\n color: 'danger',\n content: errorMsg,\n timeOut: 5000,\n });\n\n console.error('Login error:', error);\n this.submitText = 'signin.submit';\n this.v2 = null;\n this.isLoading$.next(false);\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 // AuthApiError exposes captcha/lockout fields on `.apiError`.\n if ('apiError' in err && err['apiError'] == null && typeof err['message'] === 'string') {\n return { message: err['message'] };\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 private async formatAccountLockedMessage(apiError: Record<string, unknown> | null): Promise<string> {\n const details =\n apiError?.['details'] && typeof apiError['details'] === 'object'\n ? (apiError['details'] as Record<string, unknown>)\n : null;\n const lockedUntil =\n (typeof apiError?.['lockedUntil'] === 'string' && apiError['lockedUntil']) ||\n (typeof details?.['lockedUntil'] === 'string' && details['lockedUntil']) ||\n '';\n const formatted = lockedUntil ? await this.formatLockedUntil(lockedUntil) : '';\n\n if (formatted) {\n return this.translateService.translateAsync('@auth:signin.errors.account-locked-until', {\n params: { datetime: formatted },\n });\n }\n\n return this.translateService.translateAsync('@auth:signin.errors.account-locked');\n }\n\n private async formatLockedUntil(iso: string): Promise<string> {\n const parsed = Date.parse(iso);\n if (!Number.isFinite(parsed)) {\n return '';\n }\n\n const dateFormat = await this.settingsService.get(AXPRegionalSetting.ShortDate);\n const timeFormat = await this.settingsService.get(AXPRegionalSetting.ShortTime);\n const format = `${dateFormat} ${timeFormat}`.trim();\n return this.formatService.format(new Date(parsed), 'datetime', { format });\n }\n\n //#endregion\n\n //#region ---- Challenge Handlers ----\n\n /**\n * Gets the challenge component type from provider or uses default\n */\n private getChallengeComponentType(): Type<AXPLoginChallengeComponentBase> {\n return this.challengeProvider?.getChallengeComponent() ?? AXPDefaultChallengeComponent;\n }\n\n /**\n * Renders the challenge component dynamically\n */\n private renderChallengeComponent(data: AXPLoginChallengeData, isLoading: boolean): void {\n if (!this.challengeContainerRef) return;\n\n // If component already exists, just update inputs\n if (this.challengeComponentRef) {\n this.updateChallengeComponentInputs(data, isLoading);\n return;\n }\n\n // Clear container and create new component\n this.challengeContainerRef.clear();\n const componentType = this.getChallengeComponentType();\n this.challengeComponentRef = this.challengeContainerRef.createComponent(componentType);\n\n // Set inputs\n this.updateChallengeComponentInputs(data, isLoading);\n\n // Subscribe to outputs\n const instance = this.challengeComponentRef.instance;\n instance.responseChange.subscribe((response: string) => {\n this.challengeResponse.set(response);\n });\n instance.refreshRequest.subscribe(() => {\n this.handleRefreshChallenge();\n });\n }\n\n /**\n * Updates the inputs of the challenge component\n */\n private updateChallengeComponentInputs(data: AXPLoginChallengeData, isLoading: boolean): void {\n if (!this.challengeComponentRef) return;\n\n this.challengeComponentRef.setInput('challengeData', data);\n this.challengeComponentRef.setInput('isLoading', isLoading);\n }\n\n /**\n * Destroys the challenge component\n */\n private destroyChallengeComponent(): void {\n if (this.challengeComponentRef) {\n this.challengeComponentRef.destroy();\n this.challengeComponentRef = undefined;\n }\n if (this.challengeContainerRef) {\n this.challengeContainerRef.clear();\n }\n }\n\n /**\n * Refreshes the challenge (e.g., user clicks \"new image\" button)\n */\n protected async handleRefreshChallenge(): Promise<void> {\n if (!this.challengeProvider) return;\n\n this.isChallengeLoading.set(true);\n try {\n const newChallenge = await this.challengeProvider.refreshChallenge();\n this.challengeData.set(newChallenge);\n this.challengeResponse.set('');\n } catch (error) {\n console.error('Failed to refresh challenge:', error);\n this.toastService.show({\n color: 'danger',\n content: 'Failed to load new challenge. Please try again.',\n timeOut: 3000,\n });\n } finally {\n this.isChallengeLoading.set(false);\n }\n }\n\n /**\n * Clears the challenge state (after successful login or manual clear)\n */\n private clearChallengeState(): void {\n this.challengeData.set(null);\n this.challengeResponse.set('');\n this.destroyChallengeComponent();\n }\n\n //#endregion\n}\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:signin.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:signin.hint' | translate | async }}\n </p>\n </div>\n <ax-form>\n <div class=\"flex flex-col gap-4 lg:gap-6\">\n <ax-form-field>\n <ax-label>{{ ('@auth:' + l1) | translate | async }}</ax-label>\n <ax-text-box\n [name]=\"'username'\"\n id=\"username\"\n [autoComplete]=\"'username'\"\n [(value)]=\"v1\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n <ax-form-field>\n <ax-label>{{ '@auth:password' | translate | async }}</ax-label>\n <ax-password-box\n [name]=\"'password'\"\n id=\"password\"\n [autoComplete]=\"'current-password'\"\n [(value)]=\"v2\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-password-box>\n </ax-form-field>\n\n <!-- Challenge Section (CAPTCHA) - rendered via ViewContainerRef -->\n @if (hasChallengeActive) {\n <ng-container #challengeContainer></ng-container>\n }\n\n <div class=\"flex justify-between items-center\">\n <ax-check-box [(ngModel)]=\"isKeepLogin\">\n <ax-label class=\"mb-0\">{{\n '@auth:signin.remember' | translate | async\n }}</ax-label>\n </ax-check-box>\n <ax-button\n color=\"primary\"\n class=\"ax-sm\"\n id=\"forgot-password\"\n [text]=\"'@auth:forgot.password' | translate | async\"\n look=\"blank\"\n (onClick)=\"handleForgotOnClick()\"\n >\n </ax-button>\n </div>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n id=\"submit-login\"\n [text]=\"'@auth:signin.submit' | translate | async\"\n (onClick)=\"handleLoginClick()\"\n [disabled]=\"isLoading$ | async\"\n [type]=\"'submit'\"\n >\n @if (isLoading$ | async) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n @if (externalProviders.hasContent() || signupEnabled) {\n <div class=\"my-5 lg:my-8 flex w-full items-center\">\n <div class=\"h-px flex-1 bg-border-lighter\"></div>\n <span class=\"px-3 text-xs font-medium tracking-wide text-neutral-400\">\n {{ '@auth:signin.or' | translate | async }}\n </span>\n <div class=\"h-px flex-1 bg-border-lighter\"></div>\n </div>\n }\n <axm-login-external-providers\n #externalProviders\n ></axm-login-external-providers>\n </ax-form>\n @if (signupEnabled) {\n <ax-button\n class=\"w-full mt-2\"\n id=\"register\"\n (onClick)=\"handleRegisterOnClick()\"\n text=\"{{ '@auth:register' | translate | async }}\"\n [color]=\"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 -12,7 +12,7 @@ import { CommonModule, AsyncPipe } from '@angular/common';
|
|
|
12
12
|
import * as i0 from '@angular/core';
|
|
13
13
|
import { input, inject, signal, computed, effect, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
14
14
|
import { isEmpty } from 'lodash';
|
|
15
|
-
import { E as formatCompactActivityCount } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-
|
|
15
|
+
import { E as formatCompactActivityCount } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-U7QbmK5T.mjs';
|
|
16
16
|
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region ---- Constants ----
|
|
@@ -226,4 +226,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
226
226
|
}], propDecorators: { rootContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootContext", required: false }] }], pageConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageConfig", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
|
|
227
227
|
|
|
228
228
|
export { AXMProfileActivityChartComponent };
|
|
229
|
-
//# sourceMappingURL=acorex-platform-module-auth-client-profile-activity-chart.component-
|
|
229
|
+
//# sourceMappingURL=acorex-platform-module-auth-client-profile-activity-chart.component-Cw_5mhoo.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-auth-client-profile-activity-chart.component-DUpEusRs.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/account/profile-page/components/profile-activity-chart/profile-activity-chart.component.ts","../../../../libs/modules/auth/client/src/lib/pages/account/profile-page/components/profile-activity-chart/profile-activity-chart.component.html"],"sourcesContent":["import { AXPQueryService } from '@acorex-platform/framework-client/runtime';\nimport { AXPRegionalSetting, runtimeQueryObjectData } from '@acorex-platform/framework-shared/core';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormatModule } from '@acorex/core/format';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';\nimport { AsyncPipe, CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { isEmpty } from 'lodash';\nimport {\n AXPUserActivityDataSourceItem,\n AXPUserActivityHeatmapLayout,\n AXPUserActivityHour,\n AXPUserActivityLevel,\n AXPUserActivityStats,\n AXPUserActivityWeek,\n formatCompactActivityCount,\n} from '../../../../../shared/datasources/user-activity';\n\n//#region ---- View types ----\n\ninterface ActivityDay {\n date: Date;\n count: number;\n level: AXPUserActivityLevel;\n}\n\ninterface ActivityWeek {\n days: ActivityDay[];\n}\n\ninterface ActivityHour {\n hour: number;\n date: Date;\n count: number;\n level: AXPUserActivityLevel;\n}\n\ninterface CalendarColumnLabel {\n key: string;\n date: Date;\n weekIndex: number;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst DEFAULT_USER_ACTIVITY_QUERY_KEY = 'Auth:GetUserActivity';\nconst DEFAULT_TIME_FORMAT = 'HH:mm';\n\n//#endregion\n\n//#region ---- Helpers ----\n\nfunction parseLocalDay(value: string): Date {\n const [year, month, day] = value.split('-').map(Number);\n return new Date(year, (month ?? 1) - 1, day ?? 1);\n}\n\n//#endregion\n\n//#region ---- Component ----\n\n/** Contribution-style activity heatmap for the profile Activity tab. */\n@Component({\n selector: 'axm-profile-activity-chart',\n imports: [CommonModule, AsyncPipe, AXDecoratorModule, AXFormatModule, AXTranslationModule],\n templateUrl: './profile-activity-chart.component.html',\n styleUrl: './profile-activity-chart.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'axm-profile-activity-chart' },\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMProfileActivityChartComponent,\n },\n ],\n})\nexport class AXMProfileActivityChartComponent extends AXPPageLayoutBaseComponent {\n //#region ---- Inputs ----\n\n rootContext = input<Record<string, unknown>>({});\n pageConfig = input<Record<string, unknown>>();\n options = input<Record<string, unknown>>({});\n\n //#endregion\n\n //#region ---- Services & Dependencies ----\n\n private readonly queryService = inject(AXPQueryService);\n\n //#endregion\n\n //#region ---- State ----\n\n protected readonly heatmapLayout = signal<AXPUserActivityHeatmapLayout>('calendar');\n protected readonly weeks = signal<ActivityWeek[]>([]);\n protected readonly hours = signal<ActivityHour[]>([]);\n protected readonly stats = signal<AXPUserActivityStats>({\n longestStreak: 0,\n avgPerDay: 0,\n avgPerWeek: 0,\n total: 0,\n });\n protected readonly isLoading = signal(true);\n protected readonly shortDateFormat = signal('');\n protected readonly shortTimeFormat = signal(DEFAULT_TIME_FORMAT);\n\n protected readonly weekdayLabels = ['M', 'W', 'F'];\n protected readonly intensityLevels: Array<AXPUserActivityLevel> = [0, 1, 2, 3, 4];\n\n //#endregion\n\n //#region ---- Derived state ----\n\n protected readonly queryKey = computed(\n () => (this.options()['queryKey'] as string | undefined) ?? DEFAULT_USER_ACTIVITY_QUERY_KEY,\n );\n\n protected readonly stripDays = computed(() => this.weeks().flatMap((week) => week.days));\n\n protected readonly dayCount = computed(() => Math.max(this.stripDays().length, 1));\n\n protected readonly weekCount = computed(() => Math.max(this.weeks().length, 1));\n\n\n protected readonly columnLabels = computed(() => {\n const labels: CalendarColumnLabel[] = [];\n let lastMonth = -1;\n\n this.weeks().forEach((week, weekIndex) => {\n const firstDay = week.days[0];\n const month = firstDay.date.getMonth();\n if (month !== lastMonth) {\n labels.push({\n key: `${firstDay.date.getFullYear()}-${month}`,\n date: firstDay.date,\n weekIndex,\n });\n lastMonth = month;\n }\n });\n\n return labels;\n });\n\n //#endregion\n\n //#region ---- Effects ----\n\n #loadActivityEffect = effect(() => {\n const userId = this.sessionService.user?.id;\n const queryKey = this.queryKey();\n void this.loadActivity(userId, queryKey);\n });\n\n //#endregion\n\n //#region ---- Data loading ----\n\n private async loadActivity(userId: string | undefined, queryKey: string): Promise<void> {\n this.isLoading.set(true);\n\n try {\n await this.loadRegionalFormats();\n\n if (isEmpty(userId)) {\n this.resetChart();\n return;\n }\n\n const result = await this.queryService.fetch<\n { userId: string },\n AXPUserActivityDataSourceItem | null\n >(queryKey, { userId: userId! });\n\n const item = runtimeQueryObjectData(result);\n if (!item) {\n this.resetChart();\n return;\n }\n\n const weeks = item.weeks.map((week: AXPUserActivityWeek) => ({\n days: week.days.map((day) => ({\n date: parseLocalDay(day.date),\n count: day.count,\n level: day.level,\n })),\n }));\n const activityDay = parseLocalDay(item.startDate);\n\n this.heatmapLayout.set(item.layout ?? 'calendar');\n this.weeks.set(weeks);\n this.hours.set(this.mapHours(item.hours ?? [], activityDay));\n this.stats.set(item.stats);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n private async loadRegionalFormats(): Promise<void> {\n const [dateFormat, timeFormat] = await Promise.all([\n this.settingsService.get<string>(AXPRegionalSetting.ShortDate),\n this.settingsService.get<string>(AXPRegionalSetting.ShortTime),\n ]);\n this.shortDateFormat.set(dateFormat ?? '');\n this.shortTimeFormat.set(timeFormat || DEFAULT_TIME_FORMAT);\n }\n\n private resetChart(): void {\n this.heatmapLayout.set('days');\n this.weeks.set([]);\n this.hours.set([]);\n this.stats.set({ longestStreak: 0, avgPerDay: 0, avgPerWeek: 0, total: 0 });\n }\n\n private mapHours(hours: AXPUserActivityHour[], activityDay: Date): ActivityHour[] {\n return hours.map((hour) => {\n const date = new Date(activityDay);\n date.setHours(hour.hour, 0, 0, 0);\n return {\n hour: hour.hour,\n date,\n count: hour.count,\n level: hour.level,\n };\n });\n }\n\n //#endregion\n\n //#region ---- UI helpers ----\n\n protected formatCount(value: number): string {\n return formatCompactActivityCount(value);\n }\n\n protected weekdayRowIndex(label: string): number {\n if (label === 'M') {\n return 1;\n }\n if (label === 'W') {\n return 3;\n }\n return 5;\n }\n\n protected showHourLabel(hour: number): boolean {\n return hour % 3 === 0;\n }\n\n protected showDayStripLabel(index: number): boolean {\n const day = this.stripDays()[index];\n if (!day) {\n return false;\n }\n if (this.dayCount() <= 7) {\n return true;\n }\n return day.date.getDate() === 1 || index % 7 === 0;\n }\n\n protected dayStripLabelFormatFor(day: ActivityDay): string {\n if (this.dayCount() <= 7) {\n return 'ddd';\n }\n return day.date.getDate() === 1 ? 'MMM D' : 'D';\n }\n\n protected cellTitle(day: ActivityDay): string {\n const dateText = String(\n this.formatService.format(day.date, 'date', {\n format: this.shortDateFormat(),\n }) ?? '',\n );\n return `${dateText} — ${day.count}`;\n }\n\n protected hourCellTitle(hour: ActivityHour): string {\n const timeText = String(\n this.formatService.format(hour.date, 'datetime', {\n format: this.shortTimeFormat(),\n }) ?? '',\n );\n return `${timeText} — ${hour.count}`;\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"__panel\" *translate=\"let t\">\n <header class=\"__header\">\n <div class=\"__title-row\">\n <h3 class=\"__title\">{{ '@auth:profile-page.components.activity-chart.title' | translate | async }}</h3>\n <ax-icon icon=\"fa-light fa-circle-info\" class=\"__info-icon\"></ax-icon>\n </div>\n </header>\n\n @if (heatmapLayout() === 'calendar') {\n <!-- ----- Calendar heatmap for month and longer ranges ----- -->\n <div class=\"__heatmap-wrap\" [style.--week-count]=\"weekCount()\">\n <div class=\"__month-labels\" aria-hidden=\"true\">\n @for (month of columnLabels(); track month.key) {\n <span class=\"__month-label\" [style.grid-column-start]=\"month.weekIndex + 2\">\n {{ month.date | format: 'date' : 'MMM' | async }}\n </span>\n }\n </div>\n\n <div class=\"__heatmap\">\n <div class=\"__weekday-labels\" aria-hidden=\"true\">\n @for (label of weekdayLabels; track label) {\n <span class=\"__weekday-label\" [style.grid-row]=\"weekdayRowIndex(label)\">{{ label }}</span>\n }\n </div>\n\n <div\n class=\"__grid\"\n role=\"img\"\n [attr.aria-label]=\"'@auth:profile-page.components.activity-chart.aria-label' | translate | async\"\n >\n @for (week of weeks(); track $index) {\n @for (day of week.days; track day.date.getTime()) {\n <span\n class=\"__cell\"\n [class.--level-0]=\"day.level === 0\"\n [class.--level-1]=\"day.level === 1\"\n [class.--level-2]=\"day.level === 2\"\n [class.--level-3]=\"day.level === 3\"\n [class.--level-4]=\"day.level === 4\"\n [attr.title]=\"cellTitle(day)\"\n ></span>\n }\n }\n </div>\n </div>\n </div>\n }\n <!-- ----- Full-width day or hour strip for short ranges ----- -->\n @else if (heatmapLayout() === 'hours') {\n <!-- ----- Hour cells for a single-day window ----- -->\n <div\n class=\"__strip __strip--hours\"\n role=\"img\"\n [attr.aria-label]=\"'@auth:profile-page.components.activity-chart.aria-label' | translate | async\"\n >\n @for (hour of hours(); track hour.hour) {\n <div class=\"__strip-col\">\n <span class=\"__strip-label\">\n @if (showHourLabel(hour.hour)) {\n <!-- ----- Hour tick every three hours ----- -->\n {{ hour.date | format: 'datetime' : shortTimeFormat() | async }}\n }\n </span>\n <span\n class=\"__cell\"\n [class.--level-0]=\"hour.level === 0\"\n [class.--level-1]=\"hour.level === 1\"\n [class.--level-2]=\"hour.level === 2\"\n [class.--level-3]=\"hour.level === 3\"\n [class.--level-4]=\"hour.level === 4\"\n [attr.title]=\"hourCellTitle(hour)\"\n ></span>\n </div>\n }\n </div>\n }\n <!-- ----- Weekday cells for a seven-day window ----- -->\n @else {\n <div\n class=\"__strip __strip--days\"\n [class.--dense]=\"dayCount() > 14\"\n [style.--day-count]=\"dayCount()\"\n role=\"img\"\n [attr.aria-label]=\"'@auth:profile-page.components.activity-chart.aria-label' | translate | async\"\n >\n @for (day of stripDays(); track day.date.getTime(); let index = $index) {\n <div class=\"__strip-col\">\n <span class=\"__strip-label\">\n @if (showDayStripLabel(index)) {\n <!-- ----- Weekday or day-of-month tick ----- -->\n {{ day.date | format: 'date' : dayStripLabelFormatFor(day) | async }}\n }\n </span>\n <span\n class=\"__cell\"\n [class.--level-0]=\"day.level === 0\"\n [class.--level-1]=\"day.level === 1\"\n [class.--level-2]=\"day.level === 2\"\n [class.--level-3]=\"day.level === 3\"\n [class.--level-4]=\"day.level === 4\"\n [attr.title]=\"cellTitle(day)\"\n ></span>\n </div>\n }\n </div>\n }\n\n <footer class=\"__footer\">\n <div class=\"__legend\" aria-hidden=\"true\">\n <span class=\"__legend-label\">{{ '@auth:profile-page.components.activity-chart.legend.less' | translate | async }}</span>\n @for (level of intensityLevels; track level) {\n <span class=\"__legend-cell\" [class]=\"'--level-' + level\"></span>\n }\n <span class=\"__legend-label\">{{ '@auth:profile-page.components.activity-chart.legend.more' | translate | async }}</span>\n </div>\n\n <!-- ----- Sign-in summaries for the visible heatmap window ----- -->\n <dl class=\"__stats\">\n <div class=\"__stat\">\n <dd>{{ formatCount(stats().total) }}</dd>\n <dt>{{ '@auth:profile-page.components.activity-chart.stats.total' | translate | async }}</dt>\n </div>\n <div class=\"__stat\">\n <dd>{{ stats().longestStreak }}</dd>\n <dt>\n @if (stats().longestStreak === 1) {\n <!-- ----- Singular streak unit ----- -->\n {{ '@auth:profile-page.components.activity-chart.stats.day-streak' | translate | async }}\n }\n <!-- ----- Plural streak unit ----- -->\n @else {\n {{ '@auth:profile-page.components.activity-chart.stats.days-streak' | translate | async }}\n }\n </dt>\n </div>\n <div class=\"__stat\">\n <dd>{{ formatCount(stats().avgPerDay) }}</dd>\n <dt>{{ '@auth:profile-page.components.activity-chart.stats.avg-day' | translate | async }}</dt>\n </div>\n <div class=\"__stat\">\n <dd>{{ formatCount(stats().avgPerWeek) }}</dd>\n <dt>{{ '@auth:profile-page.components.activity-chart.stats.avg-week' | translate | async }}</dt>\n </div>\n </dl>\n </footer>\n</div>\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;AAqDA;AAEA;AAEA,MAAM,+BAA+B,GAAG,sBAAsB;AAC9D,MAAM,mBAAmB,GAAG,OAAO;AAEnC;AAEA;AAEA,SAAS,aAAa,CAAC,KAAa,EAAA;AAClC,IAAA,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,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AAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAa9E,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAf5C,SAAS;+BACE,4BAA4B,EAAA,OAAA,EAC7B,CAAC,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,mBAAmB,CAAC,EAAA,eAAA,EAGzE,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B,EAAE,KAAK,EAAE,4BAA4B,EAAE,EAAA,SAAA,EAClC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,gCAAkC;AAC9C,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,0zLAAA,EAAA,MAAA,EAAA,CAAA,82RAAA,CAAA,EAAA;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-auth-client-profile-activity-chart.component-Cw_5mhoo.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/account/profile-page/components/profile-activity-chart/profile-activity-chart.component.ts","../../../../libs/modules/auth/client/src/lib/pages/account/profile-page/components/profile-activity-chart/profile-activity-chart.component.html"],"sourcesContent":["import { AXPQueryService } from '@acorex-platform/framework-client/runtime';\nimport { AXPRegionalSetting, runtimeQueryObjectData } from '@acorex-platform/framework-shared/core';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormatModule } from '@acorex/core/format';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';\nimport { AsyncPipe, CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { isEmpty } from 'lodash';\nimport {\n AXPUserActivityDataSourceItem,\n AXPUserActivityHeatmapLayout,\n AXPUserActivityHour,\n AXPUserActivityLevel,\n AXPUserActivityStats,\n AXPUserActivityWeek,\n formatCompactActivityCount,\n} from '../../../../../shared/datasources/user-activity';\n\n//#region ---- View types ----\n\ninterface ActivityDay {\n date: Date;\n count: number;\n level: AXPUserActivityLevel;\n}\n\ninterface ActivityWeek {\n days: ActivityDay[];\n}\n\ninterface ActivityHour {\n hour: number;\n date: Date;\n count: number;\n level: AXPUserActivityLevel;\n}\n\ninterface CalendarColumnLabel {\n key: string;\n date: Date;\n weekIndex: number;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst DEFAULT_USER_ACTIVITY_QUERY_KEY = 'Auth:GetUserActivity';\nconst DEFAULT_TIME_FORMAT = 'HH:mm';\n\n//#endregion\n\n//#region ---- Helpers ----\n\nfunction parseLocalDay(value: string): Date {\n const [year, month, day] = value.split('-').map(Number);\n return new Date(year, (month ?? 1) - 1, day ?? 1);\n}\n\n//#endregion\n\n//#region ---- Component ----\n\n/** Contribution-style activity heatmap for the profile Activity tab. */\n@Component({\n selector: 'axm-profile-activity-chart',\n imports: [CommonModule, AsyncPipe, AXDecoratorModule, AXFormatModule, AXTranslationModule],\n templateUrl: './profile-activity-chart.component.html',\n styleUrl: './profile-activity-chart.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'axm-profile-activity-chart' },\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMProfileActivityChartComponent,\n },\n ],\n})\nexport class AXMProfileActivityChartComponent extends AXPPageLayoutBaseComponent {\n //#region ---- Inputs ----\n\n rootContext = input<Record<string, unknown>>({});\n pageConfig = input<Record<string, unknown>>();\n options = input<Record<string, unknown>>({});\n\n //#endregion\n\n //#region ---- Services & Dependencies ----\n\n private readonly queryService = inject(AXPQueryService);\n\n //#endregion\n\n //#region ---- State ----\n\n protected readonly heatmapLayout = signal<AXPUserActivityHeatmapLayout>('calendar');\n protected readonly weeks = signal<ActivityWeek[]>([]);\n protected readonly hours = signal<ActivityHour[]>([]);\n protected readonly stats = signal<AXPUserActivityStats>({\n longestStreak: 0,\n avgPerDay: 0,\n avgPerWeek: 0,\n total: 0,\n });\n protected readonly isLoading = signal(true);\n protected readonly shortDateFormat = signal('');\n protected readonly shortTimeFormat = signal(DEFAULT_TIME_FORMAT);\n\n protected readonly weekdayLabels = ['M', 'W', 'F'];\n protected readonly intensityLevels: Array<AXPUserActivityLevel> = [0, 1, 2, 3, 4];\n\n //#endregion\n\n //#region ---- Derived state ----\n\n protected readonly queryKey = computed(\n () => (this.options()['queryKey'] as string | undefined) ?? DEFAULT_USER_ACTIVITY_QUERY_KEY,\n );\n\n protected readonly stripDays = computed(() => this.weeks().flatMap((week) => week.days));\n\n protected readonly dayCount = computed(() => Math.max(this.stripDays().length, 1));\n\n protected readonly weekCount = computed(() => Math.max(this.weeks().length, 1));\n\n\n protected readonly columnLabels = computed(() => {\n const labels: CalendarColumnLabel[] = [];\n let lastMonth = -1;\n\n this.weeks().forEach((week, weekIndex) => {\n const firstDay = week.days[0];\n const month = firstDay.date.getMonth();\n if (month !== lastMonth) {\n labels.push({\n key: `${firstDay.date.getFullYear()}-${month}`,\n date: firstDay.date,\n weekIndex,\n });\n lastMonth = month;\n }\n });\n\n return labels;\n });\n\n //#endregion\n\n //#region ---- Effects ----\n\n #loadActivityEffect = effect(() => {\n const userId = this.sessionService.user?.id;\n const queryKey = this.queryKey();\n void this.loadActivity(userId, queryKey);\n });\n\n //#endregion\n\n //#region ---- Data loading ----\n\n private async loadActivity(userId: string | undefined, queryKey: string): Promise<void> {\n this.isLoading.set(true);\n\n try {\n await this.loadRegionalFormats();\n\n if (isEmpty(userId)) {\n this.resetChart();\n return;\n }\n\n const result = await this.queryService.fetch<\n { userId: string },\n AXPUserActivityDataSourceItem | null\n >(queryKey, { userId: userId! });\n\n const item = runtimeQueryObjectData(result);\n if (!item) {\n this.resetChart();\n return;\n }\n\n const weeks = item.weeks.map((week: AXPUserActivityWeek) => ({\n days: week.days.map((day) => ({\n date: parseLocalDay(day.date),\n count: day.count,\n level: day.level,\n })),\n }));\n const activityDay = parseLocalDay(item.startDate);\n\n this.heatmapLayout.set(item.layout ?? 'calendar');\n this.weeks.set(weeks);\n this.hours.set(this.mapHours(item.hours ?? [], activityDay));\n this.stats.set(item.stats);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n private async loadRegionalFormats(): Promise<void> {\n const [dateFormat, timeFormat] = await Promise.all([\n this.settingsService.get<string>(AXPRegionalSetting.ShortDate),\n this.settingsService.get<string>(AXPRegionalSetting.ShortTime),\n ]);\n this.shortDateFormat.set(dateFormat ?? '');\n this.shortTimeFormat.set(timeFormat || DEFAULT_TIME_FORMAT);\n }\n\n private resetChart(): void {\n this.heatmapLayout.set('days');\n this.weeks.set([]);\n this.hours.set([]);\n this.stats.set({ longestStreak: 0, avgPerDay: 0, avgPerWeek: 0, total: 0 });\n }\n\n private mapHours(hours: AXPUserActivityHour[], activityDay: Date): ActivityHour[] {\n return hours.map((hour) => {\n const date = new Date(activityDay);\n date.setHours(hour.hour, 0, 0, 0);\n return {\n hour: hour.hour,\n date,\n count: hour.count,\n level: hour.level,\n };\n });\n }\n\n //#endregion\n\n //#region ---- UI helpers ----\n\n protected formatCount(value: number): string {\n return formatCompactActivityCount(value);\n }\n\n protected weekdayRowIndex(label: string): number {\n if (label === 'M') {\n return 1;\n }\n if (label === 'W') {\n return 3;\n }\n return 5;\n }\n\n protected showHourLabel(hour: number): boolean {\n return hour % 3 === 0;\n }\n\n protected showDayStripLabel(index: number): boolean {\n const day = this.stripDays()[index];\n if (!day) {\n return false;\n }\n if (this.dayCount() <= 7) {\n return true;\n }\n return day.date.getDate() === 1 || index % 7 === 0;\n }\n\n protected dayStripLabelFormatFor(day: ActivityDay): string {\n if (this.dayCount() <= 7) {\n return 'ddd';\n }\n return day.date.getDate() === 1 ? 'MMM D' : 'D';\n }\n\n protected cellTitle(day: ActivityDay): string {\n const dateText = String(\n this.formatService.format(day.date, 'date', {\n format: this.shortDateFormat(),\n }) ?? '',\n );\n return `${dateText} — ${day.count}`;\n }\n\n protected hourCellTitle(hour: ActivityHour): string {\n const timeText = String(\n this.formatService.format(hour.date, 'datetime', {\n format: this.shortTimeFormat(),\n }) ?? '',\n );\n return `${timeText} — ${hour.count}`;\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"__panel\" *translate=\"let t\">\n <header class=\"__header\">\n <div class=\"__title-row\">\n <h3 class=\"__title\">{{ '@auth:profile-page.components.activity-chart.title' | translate | async }}</h3>\n <ax-icon icon=\"fa-light fa-circle-info\" class=\"__info-icon\"></ax-icon>\n </div>\n </header>\n\n @if (heatmapLayout() === 'calendar') {\n <!-- ----- Calendar heatmap for month and longer ranges ----- -->\n <div class=\"__heatmap-wrap\" [style.--week-count]=\"weekCount()\">\n <div class=\"__month-labels\" aria-hidden=\"true\">\n @for (month of columnLabels(); track month.key) {\n <span class=\"__month-label\" [style.grid-column-start]=\"month.weekIndex + 2\">\n {{ month.date | format: 'date' : 'MMM' | async }}\n </span>\n }\n </div>\n\n <div class=\"__heatmap\">\n <div class=\"__weekday-labels\" aria-hidden=\"true\">\n @for (label of weekdayLabels; track label) {\n <span class=\"__weekday-label\" [style.grid-row]=\"weekdayRowIndex(label)\">{{ label }}</span>\n }\n </div>\n\n <div\n class=\"__grid\"\n role=\"img\"\n [attr.aria-label]=\"'@auth:profile-page.components.activity-chart.aria-label' | translate | async\"\n >\n @for (week of weeks(); track $index) {\n @for (day of week.days; track day.date.getTime()) {\n <span\n class=\"__cell\"\n [class.--level-0]=\"day.level === 0\"\n [class.--level-1]=\"day.level === 1\"\n [class.--level-2]=\"day.level === 2\"\n [class.--level-3]=\"day.level === 3\"\n [class.--level-4]=\"day.level === 4\"\n [attr.title]=\"cellTitle(day)\"\n ></span>\n }\n }\n </div>\n </div>\n </div>\n }\n <!-- ----- Full-width day or hour strip for short ranges ----- -->\n @else if (heatmapLayout() === 'hours') {\n <!-- ----- Hour cells for a single-day window ----- -->\n <div\n class=\"__strip __strip--hours\"\n role=\"img\"\n [attr.aria-label]=\"'@auth:profile-page.components.activity-chart.aria-label' | translate | async\"\n >\n @for (hour of hours(); track hour.hour) {\n <div class=\"__strip-col\">\n <span class=\"__strip-label\">\n @if (showHourLabel(hour.hour)) {\n <!-- ----- Hour tick every three hours ----- -->\n {{ hour.date | format: 'datetime' : shortTimeFormat() | async }}\n }\n </span>\n <span\n class=\"__cell\"\n [class.--level-0]=\"hour.level === 0\"\n [class.--level-1]=\"hour.level === 1\"\n [class.--level-2]=\"hour.level === 2\"\n [class.--level-3]=\"hour.level === 3\"\n [class.--level-4]=\"hour.level === 4\"\n [attr.title]=\"hourCellTitle(hour)\"\n ></span>\n </div>\n }\n </div>\n }\n <!-- ----- Weekday cells for a seven-day window ----- -->\n @else {\n <div\n class=\"__strip __strip--days\"\n [class.--dense]=\"dayCount() > 14\"\n [style.--day-count]=\"dayCount()\"\n role=\"img\"\n [attr.aria-label]=\"'@auth:profile-page.components.activity-chart.aria-label' | translate | async\"\n >\n @for (day of stripDays(); track day.date.getTime(); let index = $index) {\n <div class=\"__strip-col\">\n <span class=\"__strip-label\">\n @if (showDayStripLabel(index)) {\n <!-- ----- Weekday or day-of-month tick ----- -->\n {{ day.date | format: 'date' : dayStripLabelFormatFor(day) | async }}\n }\n </span>\n <span\n class=\"__cell\"\n [class.--level-0]=\"day.level === 0\"\n [class.--level-1]=\"day.level === 1\"\n [class.--level-2]=\"day.level === 2\"\n [class.--level-3]=\"day.level === 3\"\n [class.--level-4]=\"day.level === 4\"\n [attr.title]=\"cellTitle(day)\"\n ></span>\n </div>\n }\n </div>\n }\n\n <footer class=\"__footer\">\n <div class=\"__legend\" aria-hidden=\"true\">\n <span class=\"__legend-label\">{{ '@auth:profile-page.components.activity-chart.legend.less' | translate | async }}</span>\n @for (level of intensityLevels; track level) {\n <span class=\"__legend-cell\" [class]=\"'--level-' + level\"></span>\n }\n <span class=\"__legend-label\">{{ '@auth:profile-page.components.activity-chart.legend.more' | translate | async }}</span>\n </div>\n\n <!-- ----- Sign-in summaries for the visible heatmap window ----- -->\n <dl class=\"__stats\">\n <div class=\"__stat\">\n <dd>{{ formatCount(stats().total) }}</dd>\n <dt>{{ '@auth:profile-page.components.activity-chart.stats.total' | translate | async }}</dt>\n </div>\n <div class=\"__stat\">\n <dd>{{ stats().longestStreak }}</dd>\n <dt>\n @if (stats().longestStreak === 1) {\n <!-- ----- Singular streak unit ----- -->\n {{ '@auth:profile-page.components.activity-chart.stats.day-streak' | translate | async }}\n }\n <!-- ----- Plural streak unit ----- -->\n @else {\n {{ '@auth:profile-page.components.activity-chart.stats.days-streak' | translate | async }}\n }\n </dt>\n </div>\n <div class=\"__stat\">\n <dd>{{ formatCount(stats().avgPerDay) }}</dd>\n <dt>{{ '@auth:profile-page.components.activity-chart.stats.avg-day' | translate | async }}</dt>\n </div>\n <div class=\"__stat\">\n <dd>{{ formatCount(stats().avgPerWeek) }}</dd>\n <dt>{{ '@auth:profile-page.components.activity-chart.stats.avg-week' | translate | async }}</dt>\n </div>\n </dl>\n </footer>\n</div>\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;AAqDA;AAEA;AAEA,MAAM,+BAA+B,GAAG,sBAAsB;AAC9D,MAAM,mBAAmB,GAAG,OAAO;AAEnC;AAEA;AAEA,SAAS,aAAa,CAAC,KAAa,EAAA;AAClC,IAAA,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;AACvD,IAAA,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;AACnD;AAEA;AAEA;AAEA;AAgBM,MAAO,gCAAiC,SAAQ,0BAA0B,CAAA;AAfhF,IAAA,WAAA,GAAA;;;QAkBE,IAAA,CAAA,WAAW,GAAG,KAAK,CAA0B,EAAE;wFAAC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AA,IAAA,EAC/B,EAAE,KAAK,EAAE,4BAA4B,EAAE,EAAA,SAAA,EAClC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,gCAAkC;AAC9C,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,0zLAAA,EAAA,MAAA,EAAA,CAAA,82RAAA,CAAA,EAAA;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable } from '@angular/core';
|
|
3
|
-
import { e as PROFILE_ACTIVITY_CHART_COMPONENT_KEY, f as PROFILE_DELETE_ACCOUNT_DANGER_ZONE_COMPONENT_KEY } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-
|
|
3
|
+
import { e as PROFILE_ACTIVITY_CHART_COMPONENT_KEY, f as PROFILE_DELETE_ACCOUNT_DANGER_ZONE_COMPONENT_KEY } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-U7QbmK5T.mjs';
|
|
4
4
|
|
|
5
5
|
//#region ---- Profile page component provider ----
|
|
6
6
|
class AXMProfilePageComponentProvider {
|
|
@@ -8,7 +8,7 @@ class AXMProfilePageComponentProvider {
|
|
|
8
8
|
return [
|
|
9
9
|
{
|
|
10
10
|
key: PROFILE_ACTIVITY_CHART_COMPONENT_KEY,
|
|
11
|
-
loader: () => import('./acorex-platform-module-auth-client-profile-activity-chart.component-
|
|
11
|
+
loader: () => import('./acorex-platform-module-auth-client-profile-activity-chart.component-Cw_5mhoo.mjs').then((module) => module.AXMProfileActivityChartComponent),
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
key: PROFILE_DELETE_ACCOUNT_DANGER_ZONE_COMPONENT_KEY,
|
|
@@ -24,4 +24,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
24
24
|
}] });
|
|
25
25
|
|
|
26
26
|
export { AXMProfilePageComponentProvider };
|
|
27
|
-
//# sourceMappingURL=acorex-platform-module-auth-client-profile-page-component.provider-
|
|
27
|
+
//# sourceMappingURL=acorex-platform-module-auth-client-profile-page-component.provider-CVzX5u-Z.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-auth-client-profile-page-component.provider-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-auth-client-profile-page-component.provider-CVzX5u-Z.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/account/profile-page/profile-page-component.provider.ts"],"sourcesContent":["import {\n AXPPageComponentDefinition,\n AXPPageComponentProvider,\n} from '@acorex-platform/framework-client/layout/components';\nimport { Injectable } from '@angular/core';\nimport {\n PROFILE_ACTIVITY_CHART_COMPONENT_KEY,\n PROFILE_DELETE_ACCOUNT_DANGER_ZONE_COMPONENT_KEY,\n} from './profile-page.component-keys';\n\n//#region ---- Profile page component provider ----\n\n@Injectable()\nexport class AXMProfilePageComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: PROFILE_ACTIVITY_CHART_COMPONENT_KEY,\n loader: () =>\n import('./components/profile-activity-chart/profile-activity-chart.component').then(\n (module) => module.AXMProfileActivityChartComponent,\n ),\n },\n {\n key: PROFILE_DELETE_ACCOUNT_DANGER_ZONE_COMPONENT_KEY,\n loader: () =>\n import('./components/profile-delete-account-danger-zone/profile-delete-account-danger-zone.component').then(\n (module) => module.AXMProfileDeleteAccountDangerZoneComponent,\n ),\n },\n ];\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAUA;MAGa,+BAA+B,CAAA;AAC1C,IAAA,MAAM,UAAU,GAAA;QACd,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,oCAAoC;AACzC,gBAAA,MAAM,EAAE,MACN,OAAO,oFAAsE,CAAC,CAAC,IAAI,CACjF,CAAC,MAAM,KAAK,MAAM,CAAC,gCAAgC,CACpD;AACJ,aAAA;AACD,YAAA;AACE,gBAAA,GAAG,EAAE,gDAAgD;AACrD,gBAAA,MAAM,EAAE,MACN,OAAO,gGAA8F,CAAC,CAAC,IAAI,CACzG,CAAC,MAAM,KAAK,MAAM,CAAC,0CAA0C,CAC9D;AACJ,aAAA;SACF;IACH;8GAlBW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA/B,+BAA+B,EAAA,CAAA,CAAA;;2FAA/B,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C;;;"}
|
|
@@ -28,7 +28,7 @@ import { filter, distinctUntilChanged } from 'rxjs';
|
|
|
28
28
|
import { AXMAuthCommandKeys } from '@acorex-platform/module-auth-client/contracts';
|
|
29
29
|
import { AXPSessionService } from '@acorex-platform/framework-client/auth';
|
|
30
30
|
import { defaultTo, orderBy, uniqBy, first, isNil, get } from 'lodash';
|
|
31
|
-
import { P as PROFILE_PAGE_GROUPS_HOOK, a as PROFILE_PAGE_SECTIONS_HOOK, b as PROFILE_PAGE_HEADER_META_HOOK, v as visibleUserProfileSectionActions, r as resolveDefaultUserProfileSectionAction, c as resolveUserProfileSectionContent, d as PROFILE_SECTION_INSIGHTS_PATCH_METADATA_KEY } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-
|
|
31
|
+
import { P as PROFILE_PAGE_GROUPS_HOOK, a as PROFILE_PAGE_SECTIONS_HOOK, b as PROFILE_PAGE_HEADER_META_HOOK, v as visibleUserProfileSectionActions, r as resolveDefaultUserProfileSectionAction, c as resolveUserProfileSectionContent, d as PROFILE_SECTION_INSIGHTS_PATCH_METADATA_KEY } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-U7QbmK5T.mjs';
|
|
32
32
|
import { runtimeQueryPayloadData } from '@acorex-platform/framework-shared/core';
|
|
33
33
|
import { ENTITY_GET_BY_ID_DEFAULT } from '@acorex-platform/framework-shared/runtime';
|
|
34
34
|
|
|
@@ -653,4 +653,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
653
653
|
}] });
|
|
654
654
|
|
|
655
655
|
export { AXMUserProfilePageComponent };
|
|
656
|
-
//# sourceMappingURL=acorex-platform-module-auth-client-profile-page.component-
|
|
656
|
+
//# sourceMappingURL=acorex-platform-module-auth-client-profile-page.component-C378Zeib.mjs.map
|