@acorex-platform/module-auth-client 0.0.18 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/fesm2022/{acorex-platform-module-auth-client-acorex-platform-module-auth-client-mW7tx8C0.mjs → acorex-platform-module-auth-client-acorex-platform-module-auth-client-CYmUn-lw.mjs} +940 -608
  2. package/fesm2022/acorex-platform-module-auth-client-acorex-platform-module-auth-client-CYmUn-lw.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-auth-client-app-chooser.component-BVbu-f8h.mjs +75 -0
  4. package/fesm2022/acorex-platform-module-auth-client-app-chooser.component-BVbu-f8h.mjs.map +1 -0
  5. package/fesm2022/{acorex-platform-module-auth-client-blank.layout-BRGgntib.mjs → acorex-platform-module-auth-client-blank.layout-BCXNPgrp.mjs} +6 -6
  6. package/fesm2022/acorex-platform-module-auth-client-blank.layout-BCXNPgrp.mjs.map +1 -0
  7. package/fesm2022/{acorex-platform-module-auth-client-change-password.command-O8Mgxoqj.mjs → acorex-platform-module-auth-client-change-password.command-DIM_d7RO.mjs} +51 -41
  8. package/fesm2022/acorex-platform-module-auth-client-change-password.command-DIM_d7RO.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-auth-client-change-photo.command-CYGqrJV0.mjs +257 -0
  10. package/fesm2022/acorex-platform-module-auth-client-change-photo.command-CYGqrJV0.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-auth-client-contracts.mjs +46 -10
  12. package/fesm2022/acorex-platform-module-auth-client-contracts.mjs.map +1 -1
  13. package/fesm2022/{acorex-platform-module-auth-client-edit-account-info.command-B-mVlXxg.mjs → acorex-platform-module-auth-client-edit-account-info.command-CD9IrimO.mjs} +5 -5
  14. package/fesm2022/acorex-platform-module-auth-client-edit-account-info.command-CD9IrimO.mjs.map +1 -0
  15. package/fesm2022/{acorex-platform-module-auth-client-edit-signature.command-CcTJJwAX.mjs → acorex-platform-module-auth-client-edit-signature.command-TjOLhvKL.mjs} +5 -5
  16. package/fesm2022/acorex-platform-module-auth-client-edit-signature.command-TjOLhvKL.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-auth-client-get-user-activity.query-BTpibxe9.mjs +80 -0
  18. package/fesm2022/acorex-platform-module-auth-client-get-user-activity.query-BTpibxe9.mjs.map +1 -0
  19. package/fesm2022/{acorex-platform-module-auth-client-lock-screen.command-PMoJJxe7.mjs → acorex-platform-module-auth-client-lock-screen.command-Br9O4b5c.mjs} +6 -6
  20. package/fesm2022/acorex-platform-module-auth-client-lock-screen.command-Br9O4b5c.mjs.map +1 -0
  21. package/fesm2022/{acorex-platform-module-auth-client-login.module-C4S0RjM7.mjs → acorex-platform-module-auth-client-login.module-DJVL3bAF.mjs} +8 -21
  22. package/fesm2022/acorex-platform-module-auth-client-login.module-DJVL3bAF.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-auth-client-master.layout-DZUYm22p.mjs +39 -0
  24. package/fesm2022/acorex-platform-module-auth-client-master.layout-DZUYm22p.mjs.map +1 -0
  25. package/fesm2022/{acorex-platform-module-auth-client-oauth-callback.component-CEMvfjj4.mjs → acorex-platform-module-auth-client-oauth-callback.component-DnQzPUxF.mjs} +11 -15
  26. package/fesm2022/acorex-platform-module-auth-client-oauth-callback.component-DnQzPUxF.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-auth-client-open-sessions.command-LZKM9fgo.mjs +200 -0
  28. package/fesm2022/acorex-platform-module-auth-client-open-sessions.command-LZKM9fgo.mjs.map +1 -0
  29. package/fesm2022/{acorex-platform-module-auth-client-password.component-CIr6IBG6.mjs → acorex-platform-module-auth-client-password.component-CNKRWfuG.mjs} +86 -45
  30. package/fesm2022/acorex-platform-module-auth-client-password.component-CNKRWfuG.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-module-auth-client-password.component-CW0t9fEn.mjs +87 -0
  32. package/fesm2022/acorex-platform-module-auth-client-password.component-CW0t9fEn.mjs.map +1 -0
  33. package/fesm2022/acorex-platform-module-auth-client-platform-settings-unavailable.component-BEVkQ3jh.mjs +47 -0
  34. package/fesm2022/acorex-platform-module-auth-client-platform-settings-unavailable.component-BEVkQ3jh.mjs.map +1 -0
  35. package/fesm2022/{acorex-platform-module-auth-client-profile-activity-chart.component-DTY1eEI_.mjs → acorex-platform-module-auth-client-profile-activity-chart.component-CtSrYARX.mjs} +38 -46
  36. package/fesm2022/acorex-platform-module-auth-client-profile-activity-chart.component-CtSrYARX.mjs.map +1 -0
  37. package/fesm2022/{acorex-platform-module-auth-client-profile-coming-soon.command-DBbFbzAx.mjs → acorex-platform-module-auth-client-profile-coming-soon.command-Crh2GsRA.mjs} +5 -5
  38. package/fesm2022/acorex-platform-module-auth-client-profile-coming-soon.command-Crh2GsRA.mjs.map +1 -0
  39. package/fesm2022/{acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-C6u3AB4N.mjs → acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-D0QS8joQ.mjs} +18 -13
  40. package/fesm2022/{acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-C6u3AB4N.mjs.map → acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-D0QS8joQ.mjs.map} +1 -1
  41. package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-Dhmzo4ME.mjs → acorex-platform-module-auth-client-profile-page-component.provider-6lNx6bKI.mjs} +7 -7
  42. package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-Dhmzo4ME.mjs.map → acorex-platform-module-auth-client-profile-page-component.provider-6lNx6bKI.mjs.map} +1 -1
  43. package/fesm2022/acorex-platform-module-auth-client-profile-page.component-CdxseoJX.mjs +650 -0
  44. package/fesm2022/acorex-platform-module-auth-client-profile-page.component-CdxseoJX.mjs.map +1 -0
  45. package/fesm2022/{acorex-platform-module-auth-client-register-password.component-ia6tdvTc.mjs → acorex-platform-module-auth-client-register-password.component-D-tBrCJv.mjs} +15 -14
  46. package/fesm2022/acorex-platform-module-auth-client-register-password.component-D-tBrCJv.mjs.map +1 -0
  47. package/fesm2022/{acorex-platform-module-auth-client-register.module--DG9m8iC.mjs → acorex-platform-module-auth-client-register.module-BrXqva0B.mjs} +23 -23
  48. package/fesm2022/acorex-platform-module-auth-client-register.module-BrXqva0B.mjs.map +1 -0
  49. package/fesm2022/{acorex-platform-module-auth-client-remove-pin-code.command-qtswigkv.mjs → acorex-platform-module-auth-client-remove-pin-code.command-uK04-h15.mjs} +7 -7
  50. package/fesm2022/acorex-platform-module-auth-client-remove-pin-code.command-uK04-h15.mjs.map +1 -0
  51. package/fesm2022/acorex-platform-module-auth-client-reset-password.component-CcwDb6Wb.mjs +115 -0
  52. package/fesm2022/acorex-platform-module-auth-client-reset-password.component-CcwDb6Wb.mjs.map +1 -0
  53. package/fesm2022/{acorex-platform-module-auth-client-result.component-DYJaB-FD.mjs → acorex-platform-module-auth-client-result.component-DWv1hmQR.mjs} +6 -6
  54. package/fesm2022/acorex-platform-module-auth-client-result.component-DWv1hmQR.mjs.map +1 -0
  55. package/fesm2022/{acorex-platform-module-auth-client-routes-DVN2Y2Ps.mjs → acorex-platform-module-auth-client-routes-IX2qmeqU.mjs} +3 -3
  56. package/fesm2022/{acorex-platform-module-auth-client-routes-DVN2Y2Ps.mjs.map → acorex-platform-module-auth-client-routes-IX2qmeqU.mjs.map} +1 -1
  57. package/fesm2022/acorex-platform-module-auth-client-session-lock-overlay.component-BhsTAmVe.mjs +361 -0
  58. package/fesm2022/acorex-platform-module-auth-client-session-lock-overlay.component-BhsTAmVe.mjs.map +1 -0
  59. package/fesm2022/acorex-platform-module-auth-client-set-pin-code.command-BJT7F-xz.mjs +116 -0
  60. package/fesm2022/acorex-platform-module-auth-client-set-pin-code.command-BJT7F-xz.mjs.map +1 -0
  61. package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.component-BHVqbYFv.mjs → acorex-platform-module-auth-client-set-pin-code.component-Cq4skm_3.mjs} +29 -20
  62. package/fesm2022/acorex-platform-module-auth-client-set-pin-code.component-Cq4skm_3.mjs.map +1 -0
  63. package/fesm2022/{acorex-platform-module-auth-client-settings.provider-n1qbs6e1.mjs → acorex-platform-module-auth-client-settings.provider-Yaoz8yp3.mjs} +139 -11
  64. package/fesm2022/acorex-platform-module-auth-client-settings.provider-Yaoz8yp3.mjs.map +1 -0
  65. package/fesm2022/{acorex-platform-module-auth-client-show-profile-command-CxMz1yy-.mjs → acorex-platform-module-auth-client-show-profile-command-BWoDxIdx.mjs} +5 -6
  66. package/fesm2022/acorex-platform-module-auth-client-show-profile-command-BWoDxIdx.mjs.map +1 -0
  67. package/fesm2022/{acorex-platform-module-auth-client-signout-command-DqqrP5pk.mjs → acorex-platform-module-auth-client-signout-command-B7n_Fn4P.mjs} +5 -5
  68. package/fesm2022/acorex-platform-module-auth-client-signout-command-B7n_Fn4P.mjs.map +1 -0
  69. package/fesm2022/acorex-platform-module-auth-client-tenant-chooser.component-CHmg7D5H.mjs +67 -0
  70. package/fesm2022/acorex-platform-module-auth-client-tenant-chooser.component-CHmg7D5H.mjs.map +1 -0
  71. package/fesm2022/acorex-platform-module-auth-client-two-factor-code.component-nsB4v25Z.mjs +40 -0
  72. package/fesm2022/acorex-platform-module-auth-client-two-factor-code.component-nsB4v25Z.mjs.map +1 -0
  73. package/fesm2022/{acorex-platform-module-auth-client-two-factor.module-FAqKbmBb.mjs → acorex-platform-module-auth-client-two-factor.module-_jYo6xXr.mjs} +8 -11
  74. package/fesm2022/acorex-platform-module-auth-client-two-factor.module-_jYo6xXr.mjs.map +1 -0
  75. package/fesm2022/{acorex-platform-module-auth-client-view-login-history.command-B42BHIAL.mjs → acorex-platform-module-auth-client-view-login-history.command-ovj5rdHL.mjs} +13 -11
  76. package/fesm2022/acorex-platform-module-auth-client-view-login-history.command-ovj5rdHL.mjs.map +1 -0
  77. package/fesm2022/acorex-platform-module-auth-client.mjs +1 -1
  78. package/package.json +1 -1
  79. package/types/acorex-platform-module-auth-client-contracts.d.ts +43 -9
  80. package/types/acorex-platform-module-auth-client.d.ts +63 -56
  81. package/fesm2022/acorex-platform-module-auth-client-acorex-platform-module-auth-client-mW7tx8C0.mjs.map +0 -1
  82. package/fesm2022/acorex-platform-module-auth-client-app-chooser.component-IPLp1kVv.mjs +0 -67
  83. package/fesm2022/acorex-platform-module-auth-client-app-chooser.component-IPLp1kVv.mjs.map +0 -1
  84. package/fesm2022/acorex-platform-module-auth-client-blank.layout-BRGgntib.mjs.map +0 -1
  85. package/fesm2022/acorex-platform-module-auth-client-change-password.command-O8Mgxoqj.mjs.map +0 -1
  86. package/fesm2022/acorex-platform-module-auth-client-change-photo.command-BcNq9mTU.mjs +0 -192
  87. package/fesm2022/acorex-platform-module-auth-client-change-photo.command-BcNq9mTU.mjs.map +0 -1
  88. package/fesm2022/acorex-platform-module-auth-client-edit-account-info.command-B-mVlXxg.mjs.map +0 -1
  89. package/fesm2022/acorex-platform-module-auth-client-edit-signature.command-CcTJJwAX.mjs.map +0 -1
  90. package/fesm2022/acorex-platform-module-auth-client-lock-screen.command-PMoJJxe7.mjs.map +0 -1
  91. package/fesm2022/acorex-platform-module-auth-client-login.module-C4S0RjM7.mjs.map +0 -1
  92. package/fesm2022/acorex-platform-module-auth-client-master.layout-DXwb5VSr.mjs +0 -24
  93. package/fesm2022/acorex-platform-module-auth-client-master.layout-DXwb5VSr.mjs.map +0 -1
  94. package/fesm2022/acorex-platform-module-auth-client-oauth-callback.component-CEMvfjj4.mjs.map +0 -1
  95. package/fesm2022/acorex-platform-module-auth-client-open-sessions.command-BsS9b6Xk.mjs +0 -196
  96. package/fesm2022/acorex-platform-module-auth-client-open-sessions.command-BsS9b6Xk.mjs.map +0 -1
  97. package/fesm2022/acorex-platform-module-auth-client-password.component-CIr6IBG6.mjs.map +0 -1
  98. package/fesm2022/acorex-platform-module-auth-client-password.component-DnFItGdA.mjs +0 -88
  99. package/fesm2022/acorex-platform-module-auth-client-password.component-DnFItGdA.mjs.map +0 -1
  100. package/fesm2022/acorex-platform-module-auth-client-profile-activity-chart.component-DTY1eEI_.mjs.map +0 -1
  101. package/fesm2022/acorex-platform-module-auth-client-profile-coming-soon.command-DBbFbzAx.mjs.map +0 -1
  102. package/fesm2022/acorex-platform-module-auth-client-profile-page.component-CJ9AA3ZN.mjs +0 -446
  103. package/fesm2022/acorex-platform-module-auth-client-profile-page.component-CJ9AA3ZN.mjs.map +0 -1
  104. package/fesm2022/acorex-platform-module-auth-client-register-password.component-ia6tdvTc.mjs.map +0 -1
  105. package/fesm2022/acorex-platform-module-auth-client-register.module--DG9m8iC.mjs.map +0 -1
  106. package/fesm2022/acorex-platform-module-auth-client-remove-pin-code.command-qtswigkv.mjs.map +0 -1
  107. package/fesm2022/acorex-platform-module-auth-client-reset-password.component-CTlrt_18.mjs +0 -115
  108. package/fesm2022/acorex-platform-module-auth-client-reset-password.component-CTlrt_18.mjs.map +0 -1
  109. package/fesm2022/acorex-platform-module-auth-client-result.component-DYJaB-FD.mjs.map +0 -1
  110. package/fesm2022/acorex-platform-module-auth-client-session-lock-overlay.component-CN1JqPBW.mjs +0 -346
  111. package/fesm2022/acorex-platform-module-auth-client-session-lock-overlay.component-CN1JqPBW.mjs.map +0 -1
  112. package/fesm2022/acorex-platform-module-auth-client-set-pin-code.command-mBEdso1T.mjs +0 -33
  113. package/fesm2022/acorex-platform-module-auth-client-set-pin-code.command-mBEdso1T.mjs.map +0 -1
  114. package/fesm2022/acorex-platform-module-auth-client-set-pin-code.component-BHVqbYFv.mjs.map +0 -1
  115. package/fesm2022/acorex-platform-module-auth-client-settings.provider-n1qbs6e1.mjs.map +0 -1
  116. package/fesm2022/acorex-platform-module-auth-client-show-profile-command-CxMz1yy-.mjs.map +0 -1
  117. package/fesm2022/acorex-platform-module-auth-client-signout-command-DqqrP5pk.mjs.map +0 -1
  118. package/fesm2022/acorex-platform-module-auth-client-tenant-chooser.component-B_9s4F36.mjs +0 -59
  119. package/fesm2022/acorex-platform-module-auth-client-tenant-chooser.component-B_9s4F36.mjs.map +0 -1
  120. package/fesm2022/acorex-platform-module-auth-client-two-factor-code.component-DAxlYlhM.mjs +0 -40
  121. package/fesm2022/acorex-platform-module-auth-client-two-factor-code.component-DAxlYlhM.mjs.map +0 -1
  122. package/fesm2022/acorex-platform-module-auth-client-two-factor.module-FAqKbmBb.mjs.map +0 -1
  123. package/fesm2022/acorex-platform-module-auth-client-view-login-history.command-B42BHIAL.mjs.map +0 -1
@@ -1,196 +0,0 @@
1
- import { AXPopupService } from '@acorex/components/popup';
2
- import * as i7 from '@acorex/core/translation';
3
- import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
4
- import * as i0 from '@angular/core';
5
- import { signal, inject, ChangeDetectorRef, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, Injectable } from '@angular/core';
6
- import { AXButtonModule } from '@acorex/components/button';
7
- import { AXDataSource } from '@acorex/cdk/common';
8
- import * as i3 from '@acorex/components/decorators';
9
- import { AXDecoratorModule } from '@acorex/components/decorators';
10
- import { AXDropdownModule } from '@acorex/components/dropdown';
11
- import { AXPopoverModule } from '@acorex/components/popover';
12
- import * as i3$1 from '@acorex/components/select-box';
13
- import { AXSelectBoxModule } from '@acorex/components/select-box';
14
- import { AXBasePageComponent } from '@acorex/components/page';
15
- import * as i5 from '@acorex/core/format';
16
- import { AXFormatModule } from '@acorex/core/format';
17
- import { AXPSettingsService } from '@acorex-platform/framework-client/common';
18
- import * as i6 from '@angular/common';
19
- import { CommonModule } from '@angular/common';
20
- import * as i1 from '@angular/forms';
21
- import { FormsModule } from '@angular/forms';
22
- import { AXPAuthInactiveSessionTerminationOptions, AXPAuthSettings } from '@acorex-platform/module-auth-client/contracts';
23
- import { A as AXMUserDeviceSessionsService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-mW7tx8C0.mjs';
24
-
25
- //#endregion
26
- class AXMUserSessionsComponent extends AXBasePageComponent {
27
- //#endregion
28
- //#region ---- Lifecycle ----
29
- constructor() {
30
- super();
31
- //#region ---- State ----
32
- this.items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
33
- this.activeSession = signal(undefined, ...(ngDevMode ? [{ debugName: "activeSession" }] : /* istanbul ignore next */ []));
34
- this.expireTime = signal(null, ...(ngDevMode ? [{ debugName: "expireTime" }] : /* istanbul ignore next */ []));
35
- //#endregion
36
- //#region ---- Services & Dependencies ----
37
- this.userDeviceSessionsService = inject(AXMUserDeviceSessionsService);
38
- this.settingsService = inject(AXPSettingsService);
39
- this.translateService = inject(AXTranslationService);
40
- this.cdRef = inject(ChangeDetectorRef);
41
- //#endregion
42
- //#region ---- Data Sources ----
43
- this.terminationOptionDefinitions = [
44
- {
45
- id: AXPAuthInactiveSessionTerminationOptions.OneWeek,
46
- titleKey: '@auth:sessions.inactive-termination.options.one-week',
47
- },
48
- {
49
- id: AXPAuthInactiveSessionTerminationOptions.OneMonth,
50
- titleKey: '@auth:sessions.inactive-termination.options.one-month',
51
- },
52
- {
53
- id: AXPAuthInactiveSessionTerminationOptions.ThreeMonths,
54
- titleKey: '@auth:sessions.inactive-termination.options.three-months',
55
- },
56
- {
57
- id: AXPAuthInactiveSessionTerminationOptions.SixMonths,
58
- titleKey: '@auth:sessions.inactive-termination.options.six-months',
59
- },
60
- ];
61
- this.expirationItems = [];
62
- this.dataSource = new AXDataSource({
63
- pageSize: 10,
64
- key: 'id',
65
- load: async () => ({
66
- items: this.expirationItems,
67
- total: this.expirationItems.length,
68
- }),
69
- });
70
- //#endregion
71
- //#region ---- Computed Properties ----
72
- this.itemsWithIcons = computed(() => this.items().map((item) => ({
73
- ...item,
74
- icon: this.getDeviceIcon(item.deviceName),
75
- })), ...(ngDevMode ? [{ debugName: "itemsWithIcons" }] : /* istanbul ignore next */ []));
76
- void this.loadUserSessions();
77
- }
78
- //#endregion
79
- //#region ---- UI Handlers ----
80
- getDeviceIcon(deviceName) {
81
- if (!deviceName) {
82
- return 'fa-solid fa-question';
83
- }
84
- const lowerCaseName = deviceName.toLowerCase();
85
- if (lowerCaseName.includes('windows')) {
86
- return 'fa-brands fa-windows';
87
- }
88
- if (lowerCaseName.includes('macbook') || lowerCaseName.includes('mac')) {
89
- return 'fa-brands fa-apple';
90
- }
91
- if (lowerCaseName.includes('linux')) {
92
- return 'fa-brands fa-linux';
93
- }
94
- if (lowerCaseName.includes('android')) {
95
- return 'fa-brands fa-android';
96
- }
97
- if (lowerCaseName.includes('ios') || lowerCaseName.includes('iphone') || lowerCaseName.includes('ipad')) {
98
- return 'fa-brands fa-apple';
99
- }
100
- return 'fa-solid fa-desktop';
101
- }
102
- onChangeSessionExpireTime(e) {
103
- const selectedId = e.component.selectedItems[0]?.id;
104
- if (!selectedId) {
105
- return;
106
- }
107
- this.expireTime.set(selectedId);
108
- void this.userDeviceSessionsService.setInactiveSessionTermination(selectedId);
109
- }
110
- async onTerminate(sessionId) {
111
- if (!sessionId) {
112
- console.error('No item to terminate');
113
- return;
114
- }
115
- await this.userDeviceSessionsService.terminateSession(sessionId);
116
- await this.loadUserSessions();
117
- }
118
- async onTerminateAll() {
119
- await this.userDeviceSessionsService.terminateAllSession();
120
- await this.loadUserSessions();
121
- }
122
- //#endregion
123
- //#region ---- Private Methods ----
124
- async loadUserSessions() {
125
- try {
126
- this.expirationItems = await Promise.all(this.terminationOptionDefinitions.map(async (option) => ({
127
- id: option.id,
128
- name: await this.translateService.translateAsync(option.titleKey),
129
- })));
130
- const sessions = await this.userDeviceSessionsService.getSessions();
131
- this.items.set(sessions);
132
- try {
133
- const activeSession = await this.userDeviceSessionsService.getCurrentActiveSessions();
134
- this.activeSession.set(activeSession);
135
- }
136
- catch (error) {
137
- console.warn('No active session found:', error);
138
- this.activeSession.set(undefined);
139
- }
140
- const inactiveSessionTermination = await this.settingsService.get(AXPAuthSettings.InactiveSessionTermination);
141
- if (inactiveSessionTermination &&
142
- Object.values(AXPAuthInactiveSessionTerminationOptions).includes(inactiveSessionTermination)) {
143
- this.expireTime.set(inactiveSessionTermination);
144
- }
145
- await this.dataSource.refresh();
146
- this.cdRef.markForCheck();
147
- }
148
- catch (error) {
149
- console.error('Error loading user sessions', error);
150
- }
151
- }
152
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMUserSessionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
153
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMUserSessionsComponent, isStandalone: true, selector: "axm-user-sessions", usesInheritance: true, ngImport: i0, template: "<ax-content>\n <div class=\"axm-user-sessions__content flex flex-col gap-4 p-6 w-full min-w-0 box-border\">\n <p class=\"font-semibold text-base text-on-lightest text-start m-0\">\n {{ '@auth:sessions.this-device.title' | translate | async }}\n </p>\n <div\n class=\"axm-user-sessions__row flex w-full min-w-0 items-center gap-3 rounded-lg border border-lightest bg-lightest p-3 text-on-lightest\"\n >\n <div class=\"axm-user-sessions__icon axm-user-sessions__icon--primary shrink-0 rounded-lg border border-primary-200 bg-primary-50\">\n <i class=\"{{ getDeviceIcon(activeSession()?.deviceName) }} m-3 text-primary-500\"></i>\n </div>\n @if (activeSession()) {\n <div class=\"flex min-w-0 flex-1 flex-col text-start\">\n <div class=\"font-medium text-base\">{{ activeSession()?.deviceName }}</div>\n <div class=\"font-normal text-sm\">{{ activeSession()?.operatingSystem }}</div>\n <p class=\"axm-user-sessions__meta m-0 font-normal text-xs\">\n {{ activeSession()?.location }}\n @if (activeSession()?.lastLoginDate) {\n <span>{{ activeSession()?.lastLoginDate | format: 'datetime' : 'short' | async }}</span>\n }\n </p>\n </div>\n }\n </div>\n\n @if (itemsWithIcons().length > 0) {\n <div\n class=\"axm-user-sessions__row flex w-full min-w-0 cursor-pointer items-center gap-3 rounded-lg border border-lightest bg-lightest p-3 text-on-lightest\"\n (click)=\"onTerminateAll()\"\n >\n <div class=\"axm-user-sessions__icon axm-user-sessions__icon--danger shrink-0 rounded-lg border border-danger-200 bg-danger-50\">\n <i class=\"icon icon-clear m-3 text-danger-500\"></i>\n </div>\n <div class=\"flex min-w-0 flex-1 flex-col text-start\">\n <div class=\"font-medium text-base\">\n {{ '@auth:sessions.terminate-all.title' | translate | async }}\n </div>\n <p class=\"axm-user-sessions__meta m-0 font-normal text-sm\">\n {{ '@auth:sessions.terminate-all.description' | translate | async }}\n </p>\n </div>\n </div>\n\n <p class=\"font-semibold text-base text-on-lightest text-start m-0\">\n {{ '@auth:sessions.active-devices.title' | translate | async }}\n </p>\n @for (item of itemsWithIcons(); track item.id) {\n <div\n class=\"axm-user-sessions__row flex w-full min-w-0 items-center gap-3 rounded-lg border border-lightest bg-lightest p-3 text-on-lightest\"\n >\n <div class=\"axm-user-sessions__icon shrink-0 rounded-lg border\">\n <i class=\"{{ item.icon }} m-3\"></i>\n </div>\n <div class=\"flex min-w-0 flex-1 flex-col text-start\">\n <div class=\"font-medium text-base\">{{ item.deviceName }}</div>\n <div class=\"font-normal text-sm\">{{ item.operatingSystem }}</div>\n <p class=\"axm-user-sessions__meta m-0 font-normal text-xs\">\n {{ item.location }}\n @if (item.lastLoginDate) {\n <span>{{ item.lastLoginDate | format: 'datetime' : 'short' | async }}</span>\n }\n </p>\n </div>\n <button\n type=\"button\"\n class=\"axm-user-sessions__action shrink-0 border-0 bg-transparent p-1 cursor-pointer\"\n [attr.aria-label]=\"('@general:actions.remove.title' | translate | async) ?? ''\"\n (click)=\"onTerminate(item.id); $event.stopPropagation()\"\n >\n <i class=\"ax-icon ax-icon-close\"></i>\n </button>\n </div>\n }\n }\n </div>\n</ax-content>\n<ax-footer>\n <ax-suffix>\n <div class=\"axm-user-sessions__footer flex w-full min-w-0 flex-col gap-1 px-4 py-2 box-border\">\n <p class=\"m-0 text-start font-medium text-base text-danger-500\">\n {{ '@auth:sessions.terminate-old.title' | translate | async }}\n </p>\n <div class=\"axm-user-sessions__footer-setting w-full min-w-0\">\n <div class=\"axm-user-sessions__footer-label font-normal text-base text-on-lightest text-start\">\n {{ '@auth:sessions.terminate-old.inactive-for' | translate | async }}\n </div>\n <div class=\"axm-user-sessions__footer-select min-w-0\">\n <ax-select-box\n [ngModel]=\"expireTime()\"\n (onValueChanged)=\"onChangeSessionExpireTime($event)\"\n [dataSource]=\"dataSource\"\n textField=\"name\"\n valueField=\"id\"\n [placeholder]=\"('@auth:sessions.terminate-old.placeholder' | translate | async) ?? ''\"\n >\n </ax-select-box>\n </div>\n </div>\n </div>\n </ax-suffix>\n</ax-footer>\n", styles: [".axm-user-sessions .axm-user-sessions__content,.axm-user-sessions .axm-user-sessions__footer{box-sizing:border-box}.axm-user-sessions .axm-user-sessions__meta{color:rgb(var(--ax-sys-color-on-lighter-surface))}.axm-user-sessions .axm-user-sessions__action{color:rgb(var(--ax-sys-color-on-lightest-surface))}.axm-user-sessions .axm-user-sessions__footer-setting{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 3)}.axm-user-sessions .axm-user-sessions__footer-label{flex-shrink:0}.axm-user-sessions .axm-user-sessions__footer-select{margin-inline-start:auto;min-width:calc(var(--spacing, .25rem) * 48);flex:0 1 18rem}@media(max-width:640px){.axm-user-sessions .axm-user-sessions__footer-setting{flex-wrap:wrap}.axm-user-sessions .axm-user-sessions__footer-select{margin-inline-start:0;max-width:none;flex:1 1 100%}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i3$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXFormatPipe, name: "format" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
154
- }
155
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMUserSessionsComponent, decorators: [{
156
- type: Component,
157
- args: [{ selector: 'axm-user-sessions', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
158
- AXButtonModule,
159
- AXDecoratorModule,
160
- CommonModule,
161
- FormsModule,
162
- AXFormatModule,
163
- AXSelectBoxModule,
164
- AXDropdownModule,
165
- AXPopoverModule,
166
- AXTranslationModule,
167
- ], template: "<ax-content>\n <div class=\"axm-user-sessions__content flex flex-col gap-4 p-6 w-full min-w-0 box-border\">\n <p class=\"font-semibold text-base text-on-lightest text-start m-0\">\n {{ '@auth:sessions.this-device.title' | translate | async }}\n </p>\n <div\n class=\"axm-user-sessions__row flex w-full min-w-0 items-center gap-3 rounded-lg border border-lightest bg-lightest p-3 text-on-lightest\"\n >\n <div class=\"axm-user-sessions__icon axm-user-sessions__icon--primary shrink-0 rounded-lg border border-primary-200 bg-primary-50\">\n <i class=\"{{ getDeviceIcon(activeSession()?.deviceName) }} m-3 text-primary-500\"></i>\n </div>\n @if (activeSession()) {\n <div class=\"flex min-w-0 flex-1 flex-col text-start\">\n <div class=\"font-medium text-base\">{{ activeSession()?.deviceName }}</div>\n <div class=\"font-normal text-sm\">{{ activeSession()?.operatingSystem }}</div>\n <p class=\"axm-user-sessions__meta m-0 font-normal text-xs\">\n {{ activeSession()?.location }}\n @if (activeSession()?.lastLoginDate) {\n <span>{{ activeSession()?.lastLoginDate | format: 'datetime' : 'short' | async }}</span>\n }\n </p>\n </div>\n }\n </div>\n\n @if (itemsWithIcons().length > 0) {\n <div\n class=\"axm-user-sessions__row flex w-full min-w-0 cursor-pointer items-center gap-3 rounded-lg border border-lightest bg-lightest p-3 text-on-lightest\"\n (click)=\"onTerminateAll()\"\n >\n <div class=\"axm-user-sessions__icon axm-user-sessions__icon--danger shrink-0 rounded-lg border border-danger-200 bg-danger-50\">\n <i class=\"icon icon-clear m-3 text-danger-500\"></i>\n </div>\n <div class=\"flex min-w-0 flex-1 flex-col text-start\">\n <div class=\"font-medium text-base\">\n {{ '@auth:sessions.terminate-all.title' | translate | async }}\n </div>\n <p class=\"axm-user-sessions__meta m-0 font-normal text-sm\">\n {{ '@auth:sessions.terminate-all.description' | translate | async }}\n </p>\n </div>\n </div>\n\n <p class=\"font-semibold text-base text-on-lightest text-start m-0\">\n {{ '@auth:sessions.active-devices.title' | translate | async }}\n </p>\n @for (item of itemsWithIcons(); track item.id) {\n <div\n class=\"axm-user-sessions__row flex w-full min-w-0 items-center gap-3 rounded-lg border border-lightest bg-lightest p-3 text-on-lightest\"\n >\n <div class=\"axm-user-sessions__icon shrink-0 rounded-lg border\">\n <i class=\"{{ item.icon }} m-3\"></i>\n </div>\n <div class=\"flex min-w-0 flex-1 flex-col text-start\">\n <div class=\"font-medium text-base\">{{ item.deviceName }}</div>\n <div class=\"font-normal text-sm\">{{ item.operatingSystem }}</div>\n <p class=\"axm-user-sessions__meta m-0 font-normal text-xs\">\n {{ item.location }}\n @if (item.lastLoginDate) {\n <span>{{ item.lastLoginDate | format: 'datetime' : 'short' | async }}</span>\n }\n </p>\n </div>\n <button\n type=\"button\"\n class=\"axm-user-sessions__action shrink-0 border-0 bg-transparent p-1 cursor-pointer\"\n [attr.aria-label]=\"('@general:actions.remove.title' | translate | async) ?? ''\"\n (click)=\"onTerminate(item.id); $event.stopPropagation()\"\n >\n <i class=\"ax-icon ax-icon-close\"></i>\n </button>\n </div>\n }\n }\n </div>\n</ax-content>\n<ax-footer>\n <ax-suffix>\n <div class=\"axm-user-sessions__footer flex w-full min-w-0 flex-col gap-1 px-4 py-2 box-border\">\n <p class=\"m-0 text-start font-medium text-base text-danger-500\">\n {{ '@auth:sessions.terminate-old.title' | translate | async }}\n </p>\n <div class=\"axm-user-sessions__footer-setting w-full min-w-0\">\n <div class=\"axm-user-sessions__footer-label font-normal text-base text-on-lightest text-start\">\n {{ '@auth:sessions.terminate-old.inactive-for' | translate | async }}\n </div>\n <div class=\"axm-user-sessions__footer-select min-w-0\">\n <ax-select-box\n [ngModel]=\"expireTime()\"\n (onValueChanged)=\"onChangeSessionExpireTime($event)\"\n [dataSource]=\"dataSource\"\n textField=\"name\"\n valueField=\"id\"\n [placeholder]=\"('@auth:sessions.terminate-old.placeholder' | translate | async) ?? ''\"\n >\n </ax-select-box>\n </div>\n </div>\n </div>\n </ax-suffix>\n</ax-footer>\n", styles: [".axm-user-sessions .axm-user-sessions__content,.axm-user-sessions .axm-user-sessions__footer{box-sizing:border-box}.axm-user-sessions .axm-user-sessions__meta{color:rgb(var(--ax-sys-color-on-lighter-surface))}.axm-user-sessions .axm-user-sessions__action{color:rgb(var(--ax-sys-color-on-lightest-surface))}.axm-user-sessions .axm-user-sessions__footer-setting{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 3)}.axm-user-sessions .axm-user-sessions__footer-label{flex-shrink:0}.axm-user-sessions .axm-user-sessions__footer-select{margin-inline-start:auto;min-width:calc(var(--spacing, .25rem) * 48);flex:0 1 18rem}@media(max-width:640px){.axm-user-sessions .axm-user-sessions__footer-setting{flex-wrap:wrap}.axm-user-sessions .axm-user-sessions__footer-select{margin-inline-start:0;max-width:none;flex:1 1 100%}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"] }]
168
- }], ctorParameters: () => [] });
169
-
170
- //#region ---- Open sessions command ----
171
- /** Opens the active sessions popup for the current user. */
172
- class AXPOpenSessionsCommand {
173
- constructor() {
174
- //#region ---- Services & Dependencies ----
175
- this.popupService = inject(AXPopupService);
176
- this.translateService = inject(AXTranslationService);
177
- }
178
- //#endregion
179
- //#region ---- Command ----
180
- async execute() {
181
- await this.popupService.open(AXMUserSessionsComponent, {
182
- title: await this.translateService.translateAsync('@auth:profile.sessions'),
183
- size: 'md',
184
- });
185
- return { success: true };
186
- }
187
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPOpenSessionsCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
188
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPOpenSessionsCommand, providedIn: 'root' }); }
189
- }
190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPOpenSessionsCommand, decorators: [{
191
- type: Injectable,
192
- args: [{ providedIn: 'root' }]
193
- }] });
194
-
195
- export { AXPOpenSessionsCommand };
196
- //# sourceMappingURL=acorex-platform-module-auth-client-open-sessions.command-BsS9b6Xk.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-auth-client-open-sessions.command-BsS9b6Xk.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/account/user-sessions/user-sessions.component.ts","../../../../libs/modules/auth/client/src/lib/pages/account/user-sessions/user-sessions.component.html","../../../../libs/modules/auth/client/src/lib/commands/open-sessions.command.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDataSource, AXValueChangedEvent } from '@acorex/cdk/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXPopoverModule } from '@acorex/components/popover';\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXFormatModule } from '@acorex/core/format';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, computed, inject, signal, ViewEncapsulation } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n AXPAuthInactiveSessionTerminationOptions,\n AXPAuthInactiveSessionTerminationValue,\n AXPAuthSettings,\n} from '@acorex-platform/module-auth-client/contracts';\nimport { AXMSecurityManagementDeviceSessionsEntityModel } from '@acorex-platform/module-security-management-client/contracts';\nimport { AXMUserDeviceSessionsService } from './user-sessions.service';\n\n//#region ---- Types ----\n\ninterface InactiveSessionTerminationOption {\n id: AXPAuthInactiveSessionTerminationValue;\n titleKey: string;\n}\n\ninterface TranslatedInactiveSessionTerminationOption {\n id: AXPAuthInactiveSessionTerminationValue;\n name: string;\n}\n\n//#endregion\n\n@Component({\n selector: 'axm-user-sessions',\n templateUrl: './user-sessions.component.html',\n styleUrl: './user-sessions.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n AXButtonModule,\n AXDecoratorModule,\n CommonModule,\n FormsModule,\n AXFormatModule,\n AXSelectBoxModule,\n AXDropdownModule,\n AXPopoverModule,\n AXTranslationModule,\n ],\n})\nexport class AXMUserSessionsComponent extends AXBasePageComponent {\n //#region ---- State ----\n\n items = signal<AXMSecurityManagementDeviceSessionsEntityModel[]>([]);\n activeSession = signal<AXMSecurityManagementDeviceSessionsEntityModel | undefined>(undefined);\n expireTime = signal<AXPAuthInactiveSessionTerminationValue | null>(null);\n\n //#endregion\n\n //#region ---- Services & Dependencies ----\n\n private readonly userDeviceSessionsService = inject(AXMUserDeviceSessionsService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly translateService = inject(AXTranslationService);\n private readonly cdRef = inject(ChangeDetectorRef);\n\n //#endregion\n\n //#region ---- Data Sources ----\n\n private readonly terminationOptionDefinitions: InactiveSessionTerminationOption[] = [\n {\n id: AXPAuthInactiveSessionTerminationOptions.OneWeek,\n titleKey: '@auth:sessions.inactive-termination.options.one-week',\n },\n {\n id: AXPAuthInactiveSessionTerminationOptions.OneMonth,\n titleKey: '@auth:sessions.inactive-termination.options.one-month',\n },\n {\n id: AXPAuthInactiveSessionTerminationOptions.ThreeMonths,\n titleKey: '@auth:sessions.inactive-termination.options.three-months',\n },\n {\n id: AXPAuthInactiveSessionTerminationOptions.SixMonths,\n titleKey: '@auth:sessions.inactive-termination.options.six-months',\n },\n ];\n\n protected expirationItems: TranslatedInactiveSessionTerminationOption[] = [];\n\n protected dataSource = new AXDataSource<TranslatedInactiveSessionTerminationOption>({\n pageSize: 10,\n key: 'id',\n load: async () => ({\n items: this.expirationItems,\n total: this.expirationItems.length,\n }),\n });\n\n //#endregion\n\n //#region ---- Computed Properties ----\n\n itemsWithIcons = computed(() =>\n this.items().map((item) => ({\n ...item,\n icon: this.getDeviceIcon(item.deviceName),\n })),\n );\n\n //#endregion\n\n //#region ---- Lifecycle ----\n\n constructor() {\n super();\n void this.loadUserSessions();\n }\n\n //#endregion\n\n //#region ---- UI Handlers ----\n\n getDeviceIcon(deviceName: string | undefined): string {\n if (!deviceName) {\n return 'fa-solid fa-question';\n }\n\n const lowerCaseName = deviceName.toLowerCase();\n\n if (lowerCaseName.includes('windows')) {\n return 'fa-brands fa-windows';\n }\n if (lowerCaseName.includes('macbook') || lowerCaseName.includes('mac')) {\n return 'fa-brands fa-apple';\n }\n if (lowerCaseName.includes('linux')) {\n return 'fa-brands fa-linux';\n }\n if (lowerCaseName.includes('android')) {\n return 'fa-brands fa-android';\n }\n if (lowerCaseName.includes('ios') || lowerCaseName.includes('iphone') || lowerCaseName.includes('ipad')) {\n return 'fa-brands fa-apple';\n }\n\n return 'fa-solid fa-desktop';\n }\n\n protected onChangeSessionExpireTime(e: AXValueChangedEvent): void {\n const selectedId = e.component.selectedItems[0]?.id as AXPAuthInactiveSessionTerminationValue | undefined;\n if (!selectedId) {\n return;\n }\n\n this.expireTime.set(selectedId);\n void this.userDeviceSessionsService.setInactiveSessionTermination(selectedId);\n }\n\n async onTerminate(sessionId: string | undefined): Promise<void> {\n if (!sessionId) {\n console.error('No item to terminate');\n return;\n }\n\n await this.userDeviceSessionsService.terminateSession(sessionId);\n await this.loadUserSessions();\n }\n\n async onTerminateAll(): Promise<void> {\n await this.userDeviceSessionsService.terminateAllSession();\n await this.loadUserSessions();\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private async loadUserSessions(): Promise<void> {\n try {\n this.expirationItems = await Promise.all(\n this.terminationOptionDefinitions.map(async (option) => ({\n id: option.id,\n name: await this.translateService.translateAsync(option.titleKey),\n })),\n );\n\n const sessions = await this.userDeviceSessionsService.getSessions();\n this.items.set(sessions);\n\n try {\n const activeSession = await this.userDeviceSessionsService.getCurrentActiveSessions();\n this.activeSession.set(activeSession);\n } catch (error) {\n console.warn('No active session found:', error);\n this.activeSession.set(undefined);\n }\n\n const inactiveSessionTermination = await this.settingsService.get<AXPAuthInactiveSessionTerminationValue>(\n AXPAuthSettings.InactiveSessionTermination,\n );\n\n if (\n inactiveSessionTermination &&\n Object.values(AXPAuthInactiveSessionTerminationOptions).includes(inactiveSessionTermination)\n ) {\n this.expireTime.set(inactiveSessionTermination);\n }\n\n await this.dataSource.refresh();\n this.cdRef.markForCheck();\n } catch (error) {\n console.error('Error loading user sessions', error);\n }\n }\n\n //#endregion\n}\n","<ax-content>\n <div class=\"axm-user-sessions__content flex flex-col gap-4 p-6 w-full min-w-0 box-border\">\n <p class=\"font-semibold text-base text-on-lightest text-start m-0\">\n {{ '@auth:sessions.this-device.title' | translate | async }}\n </p>\n <div\n class=\"axm-user-sessions__row flex w-full min-w-0 items-center gap-3 rounded-lg border border-lightest bg-lightest p-3 text-on-lightest\"\n >\n <div class=\"axm-user-sessions__icon axm-user-sessions__icon--primary shrink-0 rounded-lg border border-primary-200 bg-primary-50\">\n <i class=\"{{ getDeviceIcon(activeSession()?.deviceName) }} m-3 text-primary-500\"></i>\n </div>\n @if (activeSession()) {\n <div class=\"flex min-w-0 flex-1 flex-col text-start\">\n <div class=\"font-medium text-base\">{{ activeSession()?.deviceName }}</div>\n <div class=\"font-normal text-sm\">{{ activeSession()?.operatingSystem }}</div>\n <p class=\"axm-user-sessions__meta m-0 font-normal text-xs\">\n {{ activeSession()?.location }}\n @if (activeSession()?.lastLoginDate) {\n <span>{{ activeSession()?.lastLoginDate | format: 'datetime' : 'short' | async }}</span>\n }\n </p>\n </div>\n }\n </div>\n\n @if (itemsWithIcons().length > 0) {\n <div\n class=\"axm-user-sessions__row flex w-full min-w-0 cursor-pointer items-center gap-3 rounded-lg border border-lightest bg-lightest p-3 text-on-lightest\"\n (click)=\"onTerminateAll()\"\n >\n <div class=\"axm-user-sessions__icon axm-user-sessions__icon--danger shrink-0 rounded-lg border border-danger-200 bg-danger-50\">\n <i class=\"icon icon-clear m-3 text-danger-500\"></i>\n </div>\n <div class=\"flex min-w-0 flex-1 flex-col text-start\">\n <div class=\"font-medium text-base\">\n {{ '@auth:sessions.terminate-all.title' | translate | async }}\n </div>\n <p class=\"axm-user-sessions__meta m-0 font-normal text-sm\">\n {{ '@auth:sessions.terminate-all.description' | translate | async }}\n </p>\n </div>\n </div>\n\n <p class=\"font-semibold text-base text-on-lightest text-start m-0\">\n {{ '@auth:sessions.active-devices.title' | translate | async }}\n </p>\n @for (item of itemsWithIcons(); track item.id) {\n <div\n class=\"axm-user-sessions__row flex w-full min-w-0 items-center gap-3 rounded-lg border border-lightest bg-lightest p-3 text-on-lightest\"\n >\n <div class=\"axm-user-sessions__icon shrink-0 rounded-lg border\">\n <i class=\"{{ item.icon }} m-3\"></i>\n </div>\n <div class=\"flex min-w-0 flex-1 flex-col text-start\">\n <div class=\"font-medium text-base\">{{ item.deviceName }}</div>\n <div class=\"font-normal text-sm\">{{ item.operatingSystem }}</div>\n <p class=\"axm-user-sessions__meta m-0 font-normal text-xs\">\n {{ item.location }}\n @if (item.lastLoginDate) {\n <span>{{ item.lastLoginDate | format: 'datetime' : 'short' | async }}</span>\n }\n </p>\n </div>\n <button\n type=\"button\"\n class=\"axm-user-sessions__action shrink-0 border-0 bg-transparent p-1 cursor-pointer\"\n [attr.aria-label]=\"('@general:actions.remove.title' | translate | async) ?? ''\"\n (click)=\"onTerminate(item.id); $event.stopPropagation()\"\n >\n <i class=\"ax-icon ax-icon-close\"></i>\n </button>\n </div>\n }\n }\n </div>\n</ax-content>\n<ax-footer>\n <ax-suffix>\n <div class=\"axm-user-sessions__footer flex w-full min-w-0 flex-col gap-1 px-4 py-2 box-border\">\n <p class=\"m-0 text-start font-medium text-base text-danger-500\">\n {{ '@auth:sessions.terminate-old.title' | translate | async }}\n </p>\n <div class=\"axm-user-sessions__footer-setting w-full min-w-0\">\n <div class=\"axm-user-sessions__footer-label font-normal text-base text-on-lightest text-start\">\n {{ '@auth:sessions.terminate-old.inactive-for' | translate | async }}\n </div>\n <div class=\"axm-user-sessions__footer-select min-w-0\">\n <ax-select-box\n [ngModel]=\"expireTime()\"\n (onValueChanged)=\"onChangeSessionExpireTime($event)\"\n [dataSource]=\"dataSource\"\n textField=\"name\"\n valueField=\"id\"\n [placeholder]=\"('@auth:sessions.terminate-old.placeholder' | translate | async) ?? ''\"\n >\n </ax-select-box>\n </div>\n </div>\n </div>\n </ax-suffix>\n</ax-footer>\n","import { AXPCommand } from '@acorex-platform/framework-shared/runtime';\nimport { AXPopupService } from '@acorex/components/popup';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult } from '@acorex-platform/framework-shared/core';\n\nimport { inject, Injectable } from '@angular/core';\nimport { AXMUserSessionsComponent } from '../pages/account/user-sessions/user-sessions.component';\n\n//#region ---- Open sessions command ----\n\n/** Opens the active sessions popup for the current user. */\n@Injectable({ providedIn: 'root' })\nexport class AXPOpenSessionsCommand implements AXPCommand {\n //#region ---- Services & Dependencies ----\n\n private readonly popupService = inject(AXPopupService);\n private readonly translateService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Command ----\n\n async execute(): Promise<AXPExecuteCommandResult<void>> {\n await this.popupService.open(AXMUserSessionsComponent, {\n title: await this.translateService.translateAsync('@auth:profile.sessions'),\n size: 'md',\n });\n\n return { success: true };\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":["i2","i3","i4","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiCA;AAoBM,MAAO,wBAAyB,SAAQ,mBAAmB,CAAA;;;AAiE/D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AA/DT,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAmD,EAAE,4EAAC;AACpE,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAA6D,SAAS,oFAAC;AAC7F,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAgD,IAAI,iFAAC;;;AAMvD,QAAA,IAAA,CAAA,yBAAyB,GAAG,MAAM,CAAC,4BAA4B,CAAC;AAChE,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAC/C,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC;;;AAMjC,QAAA,IAAA,CAAA,4BAA4B,GAAuC;AAClF,YAAA;gBACE,EAAE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AAA,MAAA,EAAA,CAAA,q4BAAA,CAAA,EAAA;;;AE3CH;AAEA;MAEa,sBAAsB,CAAA;AADnC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAgBjE,IAAA;;;AAVC,IAAA,MAAM,OAAO,GAAA;AACX,QAAA,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,wBAAwB,EAAE;YACrD,KAAK,EAAE,MAAM,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,wBAAwB,CAAC;AAC3E,YAAA,IAAI,EAAE,IAAI;AACX,SAAA,CAAC;AAEF,QAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;IAC1B;8GAjBW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cADT,MAAM,EAAA,CAAA,CAAA;;2FACnB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-auth-client-password.component-CIr6IBG6.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 } 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 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 { AXDialogService } from '@acorex/components/dialog';\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} from '@angular/core';\nimport { ActivatedRoute, Router, RouterModule } from '@angular/router';\n\nimport { AXToastService } from '@acorex/components/toast';\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 } from '@acorex-platform/framework-client/common';\nimport { FormsModule } from '@angular/forms';\nimport { BehaviorSubject, firstValueFrom } from 'rxjs';\nimport { AXMAuthConfigs, AXMAuthenticationTypes, AXM_AUTH_CONFIG_TOKEN } from '../../../auth.config';\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 imports: [...MODULES],\n})\nexport class AXPLoginPasswordComponent implements OnInit {\n //#region ---- Services & Dependencies ----\n\n protected configs: AXMAuthConfigs = inject<AXMAuthConfigs>(AXM_AUTH_CONFIG_TOKEN);\n private dialogService = inject(AXDialogService);\n private sessionService = inject(AXPSessionService);\n private activateRoute = inject(ActivatedRoute);\n private homePageService = inject(AXPHomePageService);\n private toastService = inject(AXToastService);\n private router = inject(Router);\n protected injector = inject(Injector);\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.configs.type) {\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.configs.signup?.url || '/auth/register']);\n }\n\n //#endregion\n\n //#region ---- Login Handlers ----\n\n protected handleLoginClick(): void {\n this.sessionService.setStrategy(this.configs.defaultStrategyName || 'user-pass');\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 const strategy = this.sessionService.getSessionData()?.strategy;\n if (!strategy) {\n throw new Error('Strategy not found');\n }\n\n // Build credentials object with challenge data if active\n const currentChallenge = this.challengeData();\n const credentials = {\n strategy: strategy,\n username: this.v1,\n password: this.v2!,\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 }\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 // 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 } else if (apiError?.['requiresCaptcha'] === true) {\n this.toastService.show({\n color: 'warning',\n content: 'Too many failed attempts. Additional verification may be required on your next try.',\n timeOut: 5000,\n });\n }\n\n // Default error handling\n this.showLoginError(error, apiError);\n }\n\n /**\n * Displays the login error message to the user\n */\n private showLoginError(error: unknown, apiError?: Record<string, unknown> | null): void {\n let errorMsg = 'An error occurred during sign in.';\n const resolvedApiError = apiError ?? this.extractApiError(error);\n\n 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 && resolvedApiError?.['error'] !== '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 if (err['error'] && typeof err['error'] === 'object') {\n return err['error'] as Record<string, unknown>;\n }\n\n return null;\n }\n\n //#endregion\n\n //#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=\"text-center mb-4\">\n <h1 class=\"font-bold text-xl 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 <div class=\"w-80 lg:w-96\">\n <ax-form>\n <div class=\"flex flex-col gap-6\">\n <ax-form-field>\n <ax-label>{{ '@auth:username-email' | 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-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() || configs.signup?.enable) {\n <div class=\"heading heading-center !my-8\">\n <span>{{ '@auth:signin.or' | translate | async }}</span>\n </div>\n }\n <axm-login-external-providers\n #externalProviders\n ></axm-login-external-providers>\n </ax-form>\n @if (configs.signup?.enable) {\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","i8","i1","i2","i3","i7","i9","i10"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA;AAEA;;;AAGG;AAmEG,MAAO,4BAA6B,SAAQ,8BAA8B,CAAA;AAlEhF,IAAA,WAAA,GAAA;;;;AAsEY,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAS,EAAE,+EAAC;AAsBxC,IAAA;;;AAhBC;;AAEG;AACO,IAAA,gBAAgB,CAAC,KAAa,EAAA;AACtC,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;AACxB,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;IACjC;AAEA;;AAEG;IACO,cAAc,GAAA;AACtB,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE;IAC5B;8GAvBW,4BAA4B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA5B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EApD7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,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A,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FASvB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAJrC,SAAS;8BAEC,CAAC,GAAG,OAAO,CAAC,EAAA,QAAA,EAAA,q+FAAA,EAAA;;sBAqBpB,SAAS;uBAAC,eAAe;;sBA2BzB,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,oBAAoB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;;;;;"}
@@ -1,88 +0,0 @@
1
- import * as i1$1 from '@acorex/components/button';
2
- import { AXButtonModule } from '@acorex/components/button';
3
- import * as i1 from '@acorex/components/form';
4
- import { AXFormModule } from '@acorex/components/form';
5
- import * as i3 from '@acorex/components/label';
6
- import { AXLabelModule } from '@acorex/components/label';
7
- import * as i2 from '@acorex/components/text-box';
8
- import { AXTextBoxModule } from '@acorex/components/text-box';
9
- import { AXToastService } from '@acorex/components/toast';
10
- import * as i7 from '@acorex/core/translation';
11
- import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
12
- import * as i6 from '@angular/common';
13
- import { CommonModule } from '@angular/common';
14
- import { HttpClient } from '@angular/common/http';
15
- import * as i0 from '@angular/core';
16
- import { inject, Component } from '@angular/core';
17
- import * as i1$2 from '@angular/router';
18
- import { RouterModule } from '@angular/router';
19
- import { firstValueFrom } from 'rxjs';
20
- import { n as AXM_AUTH_CONFIG_TOKEN } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-mW7tx8C0.mjs';
21
-
22
- class AXPForgetPasswordComponent {
23
- constructor() {
24
- this.configs = inject(AXM_AUTH_CONFIG_TOKEN);
25
- this.http = inject(HttpClient);
26
- this.toast = inject(AXToastService);
27
- this.translation = inject(AXTranslationService);
28
- this.login = '';
29
- this.submitting = false;
30
- this.submitted = false;
31
- }
32
- async submit() {
33
- const login = this.login.trim();
34
- if (!login || this.submitting) {
35
- return;
36
- }
37
- this.submitting = true;
38
- try {
39
- const baseUrl = (this.configs.baseUrl ?? '').replace(/\/$/, '');
40
- const result = await firstValueFrom(this.http.post(`${baseUrl}/v1/auth/password-reset/request`, {
41
- login,
42
- webOrigin: typeof window !== 'undefined' ? window.location.origin : undefined,
43
- }));
44
- if (!result?.success) {
45
- throw new Error('request failed');
46
- }
47
- this.submitted = true;
48
- const [title, content] = await Promise.all([
49
- this.translation
50
- .translateAsync('@auth:forgot.success.title')
51
- .catch(() => 'Check Your Email'),
52
- this.translation
53
- .translateAsync('@auth:forgot.success.description')
54
- .catch(() => 'If an account exists, a password reset email has been sent.'),
55
- ]);
56
- this.toast.show({ color: 'success', title, content, timeOut: 4000 });
57
- }
58
- catch {
59
- const [title, content] = await Promise.all([
60
- this.translation.translateAsync('@auth:forgot.error.title').catch(() => 'Request Failed'),
61
- this.translation
62
- .translateAsync('@auth:forgot.error.description')
63
- .catch(() => 'Unable to send password reset email. Please try again later.'),
64
- ]);
65
- this.toast.show({ color: 'danger', title, content, timeOut: 4000 });
66
- }
67
- finally {
68
- this.submitting = false;
69
- }
70
- }
71
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPForgetPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
72
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPForgetPasswordComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<div class=\"text-center mb-4\">\n <h1 class=\"font-bold text-xl mb-2\">{{ '@auth:forgot.password' | translate | async }}</h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:forgot.hint' | translate | async }}\n </p>\n</div>\n<div class=\"w-80 lg:w-96\">\n <ax-form>\n <div class=\"flex flex-col gap-6\">\n <ax-form-field>\n <ax-label>{{ '@auth:username-email' | translate | async }}</ax-label>\n <ax-text-box\n name=\"login\"\n [(value)]=\"login\"\n [disabled]=\"submitting || submitted\"\n ></ax-text-box>\n </ax-form-field>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-6 w-full\"\n [text]=\"'@auth:forgot.submit' | translate | async\"\n [disabled]=\"submitting || submitted || !login.trim()\"\n (onClick)=\"submit()\"\n ></ax-button>\n <div class=\"text-center mt-6 text-sm font-normal\">\n <span>{{ '@auth:forgot.remember' | translate | async }}</span>\n <a [routerLink]=\"['/auth/login']\" class=\"links font-semibold\">{{\n '@auth:signin.title' | translate | async\n }}</a>\n </div>\n </ax-form>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i1.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i1.AXFormComponent, selector: "ax-form", inputs: ["disabled", "readonly", "labelMode", "look", "messageStyle", "updateOn", "inUserInteractionActive"], outputs: ["onValidate", "updateOnChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i2.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "maskPattern", "customTokens", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onMaskChanged"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }] }); }
73
- }
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPForgetPasswordComponent, decorators: [{
75
- type: Component,
76
- args: [{ imports: [
77
- CommonModule,
78
- AXFormModule,
79
- AXTextBoxModule,
80
- AXButtonModule,
81
- AXLabelModule,
82
- AXTranslationModule,
83
- RouterModule,
84
- ], template: "<div class=\"text-center mb-4\">\n <h1 class=\"font-bold text-xl mb-2\">{{ '@auth:forgot.password' | translate | async }}</h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:forgot.hint' | translate | async }}\n </p>\n</div>\n<div class=\"w-80 lg:w-96\">\n <ax-form>\n <div class=\"flex flex-col gap-6\">\n <ax-form-field>\n <ax-label>{{ '@auth:username-email' | translate | async }}</ax-label>\n <ax-text-box\n name=\"login\"\n [(value)]=\"login\"\n [disabled]=\"submitting || submitted\"\n ></ax-text-box>\n </ax-form-field>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-6 w-full\"\n [text]=\"'@auth:forgot.submit' | translate | async\"\n [disabled]=\"submitting || submitted || !login.trim()\"\n (onClick)=\"submit()\"\n ></ax-button>\n <div class=\"text-center mt-6 text-sm font-normal\">\n <span>{{ '@auth:forgot.remember' | translate | async }}</span>\n <a [routerLink]=\"['/auth/login']\" class=\"links font-semibold\">{{\n '@auth:signin.title' | translate | async\n }}</a>\n </div>\n </ax-form>\n</div>\n" }]
85
- }] });
86
-
87
- export { AXPForgetPasswordComponent };
88
- //# sourceMappingURL=acorex-platform-module-auth-client-password.component-DnFItGdA.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-auth-client-password.component-DnFItGdA.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/forgot/password/password.component.ts","../../../../libs/modules/auth/client/src/lib/pages/forgot/password/password.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { HttpClient } from '@angular/common/http';\nimport { Component, inject } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { firstValueFrom } from 'rxjs';\nimport { AXMAuthConfigs, AXM_AUTH_CONFIG_TOKEN } from '../../../auth.config';\n\n@Component({\n templateUrl: './password.component.html',\n imports: [\n CommonModule,\n AXFormModule,\n AXTextBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXTranslationModule,\n RouterModule,\n ],\n})\nexport class AXPForgetPasswordComponent {\n private readonly configs = inject<AXMAuthConfigs>(AXM_AUTH_CONFIG_TOKEN);\n private readonly http = inject(HttpClient);\n private readonly toast = inject(AXToastService);\n private readonly translation = inject(AXTranslationService);\n\n protected login = '';\n protected submitting = false;\n protected submitted = false;\n\n protected async submit(): Promise<void> {\n const login = this.login.trim();\n if (!login || this.submitting) {\n return;\n }\n\n this.submitting = true;\n try {\n const baseUrl = (this.configs.baseUrl ?? '').replace(/\\/$/, '');\n const result = await firstValueFrom(\n this.http.post<{ success: boolean }>(`${baseUrl}/v1/auth/password-reset/request`, {\n login,\n webOrigin: typeof window !== 'undefined' ? window.location.origin : undefined,\n }),\n );\n if (!result?.success) {\n throw new Error('request failed');\n }\n this.submitted = true;\n const [title, content] = await Promise.all([\n this.translation\n .translateAsync('@auth:forgot.success.title')\n .catch(() => 'Check Your Email'),\n this.translation\n .translateAsync('@auth:forgot.success.description')\n .catch(() => 'If an account exists, a password reset email has been sent.'),\n ]);\n this.toast.show({ color: 'success', title, content, timeOut: 4000 });\n } catch {\n const [title, content] = await Promise.all([\n this.translation.translateAsync('@auth:forgot.error.title').catch(() => 'Request Failed'),\n this.translation\n .translateAsync('@auth:forgot.error.description')\n .catch(() => 'Unable to send password reset email. Please try again later.'),\n ]);\n this.toast.show({ color: 'danger', title, content, timeOut: 4000 });\n } finally {\n this.submitting = false;\n }\n }\n}\n","<div class=\"text-center mb-4\">\n <h1 class=\"font-bold text-xl mb-2\">{{ '@auth:forgot.password' | translate | async }}</h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:forgot.hint' | translate | async }}\n </p>\n</div>\n<div class=\"w-80 lg:w-96\">\n <ax-form>\n <div class=\"flex flex-col gap-6\">\n <ax-form-field>\n <ax-label>{{ '@auth:username-email' | translate | async }}</ax-label>\n <ax-text-box\n name=\"login\"\n [(value)]=\"login\"\n [disabled]=\"submitting || submitted\"\n ></ax-text-box>\n </ax-form-field>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-6 w-full\"\n [text]=\"'@auth:forgot.submit' | translate | async\"\n [disabled]=\"submitting || submitted || !login.trim()\"\n (onClick)=\"submit()\"\n ></ax-button>\n <div class=\"text-center mt-6 text-sm font-normal\">\n <span>{{ '@auth:forgot.remember' | translate | async }}</span>\n <a [routerLink]=\"['/auth/login']\" class=\"links font-semibold\">{{\n '@auth:signin.title' | translate | async\n }}</a>\n </div>\n </ax-form>\n</div>\n"],"names":["i3","i4","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;MAyBa,0BAA0B,CAAA;AAZvC,IAAA,WAAA,GAAA;AAamB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAiB,qBAAqB,CAAC;AACvD,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AACzB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,oBAAoB,CAAC;QAEjD,IAAA,CAAA,KAAK,GAAG,EAAE;QACV,IAAA,CAAA,UAAU,GAAG,KAAK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,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,KAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACb,mBAAmB,8BACnB,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAGH,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAZtC,SAAS;AAEC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA;wBACP,YAAY;wBACZ,YAAY;wBACZ,eAAe;wBACf,cAAc;wBACd,aAAa;wBACb,mBAAmB;wBACnB,YAAY;AACb,qBAAA,EAAA,QAAA,EAAA,0oCAAA,EAAA;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-auth-client-profile-activity-chart.component-DTY1eEI_.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 { AXDataSourceFilterOption } from '@acorex/cdk/common';\nimport { AXPDataSourceDefinitionProviderService } from '@acorex-platform/framework-client/core';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\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 { AXMAuthDataSourceKeys } from '@acorex-platform/module-auth-client/contracts';\nimport {\n AXPUserActivityLevel,\n AXPUserActivityStats,\n AXPUserActivityWeek,\n formatCompactActivityCount,\n resolveDefaultUserActivityDateRange,\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\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, 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 dataSourceDefinitionService = inject(AXPDataSourceDefinitionProviderService);\n\n //#endregion\n\n //#region ---- State ----\n\n protected readonly weeks = signal<ActivityWeek[]>([]);\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\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 dataSourceName = computed(\n () => (this.options()['dataSource'] as string | undefined) ?? AXMAuthDataSourceKeys.UserActivity,\n );\n\n protected readonly monthLabels = computed(() => {\n const labels: { key: string; label: string; weekIndex: number }[] = [];\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 label: firstDay.date.toLocaleString('en-US', { month: 'short' }),\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 dataSourceName = this.dataSourceName();\n void this.loadActivity(userId, dataSourceName);\n });\n\n //#endregion\n\n //#region ---- Data loading ----\n\n private async loadActivity(userId: string | undefined, dataSourceName: string): Promise<void> {\n this.isLoading.set(true);\n\n try {\n if (isEmpty(userId)) {\n this.weeks.set([]);\n this.stats.set({ longestStreak: 0, avgPerDay: 0, avgPerWeek: 0, total: 0 });\n return;\n }\n\n const definition = await this.dataSourceDefinitionService.get(dataSourceName);\n if (!definition) {\n this.weeks.set([]);\n this.stats.set({ longestStreak: 0, avgPerDay: 0, avgPerWeek: 0, total: 0 });\n return;\n }\n\n const { startDate, endDate } = resolveDefaultUserActivityDateRange();\n const sourceResult = definition.source();\n const dataSource = sourceResult instanceof Promise ? await sourceResult : sourceResult;\n const page = await dataSource.config.load({\n take: 1,\n skip: 0,\n sort: [],\n filter: {\n logic: 'and',\n filters: [\n { field: 'userId', operator: { type: 'equal' }, value: userId },\n { field: 'startDate', operator: { type: 'gte' }, value: startDate },\n { field: 'endDate', operator: { type: 'lte' }, value: endDate },\n ],\n } as AXDataSourceFilterOption,\n });\n\n const item = page.items?.[0];\n if (!item) {\n this.weeks.set([]);\n this.stats.set({ longestStreak: 0, avgPerDay: 0, avgPerWeek: 0, total: 0 });\n return;\n }\n\n this.weeks.set(\n item.weeks.map((week: AXPUserActivityWeek) => ({\n days: week.days.map((day) => ({\n date: new Date(day.date),\n count: day.count,\n level: day.level,\n })),\n })),\n );\n this.stats.set(item.stats);\n } finally {\n this.isLoading.set(false);\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 cellTitle(day: ActivityDay): string {\n return `${day.date.toLocaleDateString()} — ${day.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 <span class=\"__context\">{{ '@auth:profile-page.components.activity-chart.context' | translate | async }}</span>\n </header>\n\n <dl class=\"__stats\">\n <div class=\"__stat\">\n <dt>{{ '@auth:profile-page.components.activity-chart.stats.longest-streak' | translate | async }}</dt>\n <dd>\n <strong>{{ stats().longestStreak }}</strong>\n {{ '@auth:profile-page.components.activity-chart.stats.days' | translate | async }}\n </dd>\n </div>\n <div class=\"__stat\">\n <dt>{{ '@auth:profile-page.components.activity-chart.stats.avg-day' | translate | async }}</dt>\n <dd>{{ formatCount(stats().avgPerDay) }}</dd>\n </div>\n <div class=\"__stat\">\n <dt>{{ '@auth:profile-page.components.activity-chart.stats.avg-week' | translate | async }}</dt>\n <dd>{{ formatCount(stats().avgPerWeek) }}</dd>\n </div>\n <div class=\"__stat\">\n <dt>{{ '@auth:profile-page.components.activity-chart.stats.total' | translate | async }}</dt>\n <dd>{{ formatCount(stats().total) }}</dd>\n </div>\n </dl>\n\n <div class=\"__heatmap-wrap\">\n <div class=\"__month-labels\" aria-hidden=\"true\">\n @for (month of monthLabels(); track month.key) {\n <span class=\"__month-label\" [style.grid-column-start]=\"month.weekIndex + 2\">{{ month.label }}</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 class=\"__grid\" role=\"img\" [attr.aria-label]=\"'@auth:profile-page.components.activity-chart.aria-label' | translate | async\">\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 <footer 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 </footer>\n</div>\n"],"names":["i2","i3"],"mappings":";;;;;;;;;;;;;;AAsCA;AAEA;AAEA;AAgBM,MAAO,gCAAiC,SAAQ,0BAA0B,CAAA;AAfhF,IAAA,WAAA,GAAA;;;AAkBE,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAA0B,EAAE,kFAAC;QAChD,IAAA,CAAA,UAAU,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAA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AAAC,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAD,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAa9D,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAf5C,SAAS;+BACE,4BAA4B,EAAA,OAAA,EAC7B,CAAC,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,EAAA,eAAA,EAGzD,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,ojGAAA,EAAA,MAAA,EAAA,CAAA,2uOAAA,CAAA,EAAA;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-auth-client-profile-coming-soon.command-DBbFbzAx.mjs","sources":["../../../../libs/modules/auth/client/src/lib/commands/profile-coming-soon.command.ts"],"sourcesContent":["import { AXPCommand } from '@acorex-platform/framework-shared/runtime';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult } from '@acorex-platform/framework-shared/core';\n\nimport { inject, Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport interface AXPProfileComingSoonInput {\n messageKey: string;\n}\n\n//#endregion\n\n//#region ---- Profile coming-soon command ----\n\n/** Shows a translated toast for profile actions that are not implemented yet. */\n@Injectable({ providedIn: 'root' })\nexport class AXPProfileComingSoonCommand implements AXPCommand<AXPProfileComingSoonInput, void> {\n //#region ---- Services & Dependencies ----\n\n private readonly toastService = inject(AXToastService);\n private readonly translateService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Command ----\n\n async execute(input: AXPProfileComingSoonInput): Promise<AXPExecuteCommandResult<void>> {\n const text = await this.translateService.translateAsync(input.messageKey);\n this.toastService.show({ color: 'primary', title: text });\n return { success: true };\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAaA;AAEA;AAEA;MAEa,2BAA2B,CAAA;AADxC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAajE,IAAA;;;IAPC,MAAM,OAAO,CAAC,KAAgC,EAAA;AAC5C,QAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC;AACzE,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACzD,QAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;IAC1B;8GAdW,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,cADd,MAAM,EAAA,CAAA,CAAA;;2FACnB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}