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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/fesm2022/acorex-platform-module-auth-client-accept-invitation.component-Ct28GG3a.mjs +179 -0
  2. package/fesm2022/acorex-platform-module-auth-client-accept-invitation.component-Ct28GG3a.mjs.map +1 -0
  3. package/fesm2022/{acorex-platform-module-auth-client-acorex-platform-module-auth-client-CRl74b8g.mjs → acorex-platform-module-auth-client-acorex-platform-module-auth-client-C1oSPf12.mjs} +1154 -107
  4. package/fesm2022/acorex-platform-module-auth-client-acorex-platform-module-auth-client-C1oSPf12.mjs.map +1 -0
  5. package/fesm2022/{acorex-platform-module-auth-client-app-chooser.component-CjWofUGR.mjs → acorex-platform-module-auth-client-app-chooser.component-CLKLwWW8.mjs} +4 -4
  6. package/fesm2022/{acorex-platform-module-auth-client-app-chooser.component-CjWofUGR.mjs.map → acorex-platform-module-auth-client-app-chooser.component-CLKLwWW8.mjs.map} +1 -1
  7. package/fesm2022/{acorex-platform-module-auth-client-blank.layout-BCXNPgrp.mjs → acorex-platform-module-auth-client-blank.layout-xSXPWxyw.mjs} +3 -3
  8. package/fesm2022/acorex-platform-module-auth-client-blank.layout-xSXPWxyw.mjs.map +1 -0
  9. package/fesm2022/{acorex-platform-module-auth-client-change-password.command-BqU3jYV9.mjs → acorex-platform-module-auth-client-change-password.command-CknYaMZD.mjs} +2 -2
  10. package/fesm2022/{acorex-platform-module-auth-client-change-password.command-BqU3jYV9.mjs.map → acorex-platform-module-auth-client-change-password.command-CknYaMZD.mjs.map} +1 -1
  11. package/fesm2022/{acorex-platform-module-auth-client-change-photo.command-CzO3A7OG.mjs → acorex-platform-module-auth-client-change-photo.command-CML784Lg.mjs} +71 -21
  12. package/fesm2022/acorex-platform-module-auth-client-change-photo.command-CML784Lg.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-auth-client-command-return-url.util-mBmtJ7T2.mjs +69 -0
  14. package/fesm2022/acorex-platform-module-auth-client-command-return-url.util-mBmtJ7T2.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-auth-client-contracts.mjs +12 -7
  16. package/fesm2022/acorex-platform-module-auth-client-contracts.mjs.map +1 -1
  17. package/fesm2022/{acorex-platform-module-auth-client-edit-account-info.command-CD9IrimO.mjs → acorex-platform-module-auth-client-edit-account-info.command-DulLUfWs.mjs} +25 -4
  18. package/fesm2022/acorex-platform-module-auth-client-edit-account-info.command-DulLUfWs.mjs.map +1 -0
  19. package/fesm2022/{acorex-platform-module-auth-client-get-user-activity.query-B1bKcSVQ.mjs → acorex-platform-module-auth-client-get-user-activity.query-CV9mdOBi.mjs} +2 -2
  20. package/fesm2022/{acorex-platform-module-auth-client-get-user-activity.query-B1bKcSVQ.mjs.map → acorex-platform-module-auth-client-get-user-activity.query-CV9mdOBi.mjs.map} +1 -1
  21. package/fesm2022/{acorex-platform-module-auth-client-lock-screen.command-DKtlBzS7.mjs → acorex-platform-module-auth-client-lock-screen.command-BH3Q6lJE.mjs} +2 -2
  22. package/fesm2022/{acorex-platform-module-auth-client-lock-screen.command-DKtlBzS7.mjs.map → acorex-platform-module-auth-client-lock-screen.command-BH3Q6lJE.mjs.map} +1 -1
  23. package/fesm2022/{acorex-platform-module-auth-client-login.module-CXl61yOu.mjs → acorex-platform-module-auth-client-login.module-DtvnPpBH.mjs} +3 -3
  24. package/fesm2022/{acorex-platform-module-auth-client-login.module-CXl61yOu.mjs.map → acorex-platform-module-auth-client-login.module-DtvnPpBH.mjs.map} +1 -1
  25. package/fesm2022/acorex-platform-module-auth-client-manage-two-factor.command-BAg2W20W.mjs +445 -0
  26. package/fesm2022/acorex-platform-module-auth-client-manage-two-factor.command-BAg2W20W.mjs.map +1 -0
  27. package/fesm2022/{acorex-platform-module-auth-client-master.layout-D7zUm7aL.mjs → acorex-platform-module-auth-client-master.layout-B3krDskY.mjs} +5 -5
  28. package/fesm2022/{acorex-platform-module-auth-client-master.layout-D7zUm7aL.mjs.map → acorex-platform-module-auth-client-master.layout-B3krDskY.mjs.map} +1 -1
  29. package/fesm2022/{acorex-platform-module-auth-client-oauth-callback.component-fdWC08nA.mjs → acorex-platform-module-auth-client-oauth-callback.component-DWnljN18.mjs} +3 -3
  30. package/fesm2022/{acorex-platform-module-auth-client-oauth-callback.component-fdWC08nA.mjs.map → acorex-platform-module-auth-client-oauth-callback.component-DWnljN18.mjs.map} +1 -1
  31. package/fesm2022/{acorex-platform-module-auth-client-open-sessions.command-DKvyMkhl.mjs → acorex-platform-module-auth-client-open-sessions.command-CEpu6c7D.mjs} +6 -6
  32. package/fesm2022/{acorex-platform-module-auth-client-open-sessions.command-DKvyMkhl.mjs.map → acorex-platform-module-auth-client-open-sessions.command-CEpu6c7D.mjs.map} +1 -1
  33. package/fesm2022/acorex-platform-module-auth-client-open-waiting-room.command-CR-_ppYd.mjs +28 -0
  34. package/fesm2022/acorex-platform-module-auth-client-open-waiting-room.command-CR-_ppYd.mjs.map +1 -0
  35. package/fesm2022/{acorex-platform-module-auth-client-password.component-BE2JkYm_.mjs → acorex-platform-module-auth-client-password.component-Ci5Wy3rO.mjs} +5 -5
  36. package/fesm2022/{acorex-platform-module-auth-client-password.component-BE2JkYm_.mjs.map → acorex-platform-module-auth-client-password.component-Ci5Wy3rO.mjs.map} +1 -1
  37. package/fesm2022/{acorex-platform-module-auth-client-password.component-BoWDVby5.mjs → acorex-platform-module-auth-client-password.component-ddh-_0k3.mjs} +39 -9
  38. package/fesm2022/acorex-platform-module-auth-client-password.component-ddh-_0k3.mjs.map +1 -0
  39. package/fesm2022/{acorex-platform-module-auth-client-platform-settings-unavailable.component-BJMtsa99.mjs → acorex-platform-module-auth-client-platform-settings-unavailable.component-LwuokJiZ.mjs} +4 -4
  40. package/fesm2022/{acorex-platform-module-auth-client-platform-settings-unavailable.component-BJMtsa99.mjs.map → acorex-platform-module-auth-client-platform-settings-unavailable.component-LwuokJiZ.mjs.map} +1 -1
  41. package/fesm2022/{acorex-platform-module-auth-client-profile-activity-chart.component-CFaRGMKu.mjs → acorex-platform-module-auth-client-profile-activity-chart.component-D4bqeKCd.mjs} +5 -5
  42. package/fesm2022/{acorex-platform-module-auth-client-profile-activity-chart.component-CFaRGMKu.mjs.map → acorex-platform-module-auth-client-profile-activity-chart.component-D4bqeKCd.mjs.map} +1 -1
  43. package/fesm2022/{acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-Dx2-o9XL.mjs → acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-DWNbDzDd.mjs} +4 -4
  44. package/fesm2022/{acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-Dx2-o9XL.mjs.map → acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-DWNbDzDd.mjs.map} +1 -1
  45. package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-1Spuexhb.mjs → acorex-platform-module-auth-client-profile-page-component.provider-DLTbTEe6.mjs} +4 -4
  46. package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-1Spuexhb.mjs.map → acorex-platform-module-auth-client-profile-page-component.provider-DLTbTEe6.mjs.map} +1 -1
  47. package/fesm2022/{acorex-platform-module-auth-client-profile-page.component-CGs24n0j.mjs → acorex-platform-module-auth-client-profile-page.component-BhmMsO3g.mjs} +9 -7
  48. package/fesm2022/acorex-platform-module-auth-client-profile-page.component-BhmMsO3g.mjs.map +1 -0
  49. package/fesm2022/acorex-platform-module-auth-client-pwa-install.component-BJOvT0hW.mjs +84 -0
  50. package/fesm2022/acorex-platform-module-auth-client-pwa-install.component-BJOvT0hW.mjs.map +1 -0
  51. package/fesm2022/{acorex-platform-module-auth-client-register-password.component-BlOn9609.mjs → acorex-platform-module-auth-client-register-password.component-M-ayP7oO.mjs} +7 -7
  52. package/fesm2022/{acorex-platform-module-auth-client-register-password.component-BlOn9609.mjs.map → acorex-platform-module-auth-client-register-password.component-M-ayP7oO.mjs.map} +1 -1
  53. package/fesm2022/{acorex-platform-module-auth-client-register.module-CpoYf5uG.mjs → acorex-platform-module-auth-client-register.module-Qa3ovje0.mjs} +4 -4
  54. package/fesm2022/{acorex-platform-module-auth-client-register.module-CpoYf5uG.mjs.map → acorex-platform-module-auth-client-register.module-Qa3ovje0.mjs.map} +1 -1
  55. package/fesm2022/{acorex-platform-module-auth-client-remove-pin-code.command-Da7ryul6.mjs → acorex-platform-module-auth-client-remove-pin-code.command-BenNCyt6.mjs} +2 -2
  56. package/fesm2022/{acorex-platform-module-auth-client-remove-pin-code.command-Da7ryul6.mjs.map → acorex-platform-module-auth-client-remove-pin-code.command-BenNCyt6.mjs.map} +1 -1
  57. package/fesm2022/{acorex-platform-module-auth-client-reset-password.component-D0nxlhJm.mjs → acorex-platform-module-auth-client-reset-password.component-BQfKSqpW.mjs} +6 -6
  58. package/fesm2022/{acorex-platform-module-auth-client-reset-password.component-D0nxlhJm.mjs.map → acorex-platform-module-auth-client-reset-password.component-BQfKSqpW.mjs.map} +1 -1
  59. package/fesm2022/{acorex-platform-module-auth-client-result.component-Bo1QkwMu.mjs → acorex-platform-module-auth-client-result.component-PhPaEAgh.mjs} +3 -3
  60. package/fesm2022/{acorex-platform-module-auth-client-result.component-Bo1QkwMu.mjs.map → acorex-platform-module-auth-client-result.component-PhPaEAgh.mjs.map} +1 -1
  61. package/fesm2022/acorex-platform-module-auth-client-routes-90eFjxx8.mjs +17 -0
  62. package/fesm2022/acorex-platform-module-auth-client-routes-90eFjxx8.mjs.map +1 -0
  63. package/fesm2022/{acorex-platform-module-auth-client-session-limit.component-DH58dRba.mjs → acorex-platform-module-auth-client-session-limit.component-Dc6TIn-2.mjs} +3 -3
  64. package/fesm2022/{acorex-platform-module-auth-client-session-limit.component-DH58dRba.mjs.map → acorex-platform-module-auth-client-session-limit.component-Dc6TIn-2.mjs.map} +1 -1
  65. package/fesm2022/{acorex-platform-module-auth-client-session-lock-overlay.component-cDCrwNRV.mjs → acorex-platform-module-auth-client-session-lock-overlay.component-ChigSAI-.mjs} +7 -7
  66. package/fesm2022/{acorex-platform-module-auth-client-session-lock-overlay.component-cDCrwNRV.mjs.map → acorex-platform-module-auth-client-session-lock-overlay.component-ChigSAI-.mjs.map} +1 -1
  67. package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.command-FjM1kzUj.mjs → acorex-platform-module-auth-client-set-pin-code.command-CefSbJz8.mjs} +3 -3
  68. package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.command-FjM1kzUj.mjs.map → acorex-platform-module-auth-client-set-pin-code.command-CefSbJz8.mjs.map} +1 -1
  69. package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.component-BgEgdFxQ.mjs → acorex-platform-module-auth-client-set-pin-code.component-DqFW_4rM.mjs} +6 -6
  70. package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.component-BgEgdFxQ.mjs.map → acorex-platform-module-auth-client-set-pin-code.component-DqFW_4rM.mjs.map} +1 -1
  71. package/fesm2022/{acorex-platform-module-auth-client-settings.provider-DGiK-MmW.mjs → acorex-platform-module-auth-client-settings.provider-DsKsZrOC.mjs} +18 -13
  72. package/fesm2022/acorex-platform-module-auth-client-settings.provider-DsKsZrOC.mjs.map +1 -0
  73. package/fesm2022/{acorex-platform-module-auth-client-signout-command-B7n_Fn4P.mjs → acorex-platform-module-auth-client-signout-command-D4Qgv7q2.mjs} +7 -1
  74. package/fesm2022/acorex-platform-module-auth-client-signout-command-D4Qgv7q2.mjs.map +1 -0
  75. package/fesm2022/{acorex-platform-module-auth-client-tenant-chooser.component-B8CNqHx5.mjs → acorex-platform-module-auth-client-tenant-chooser.component-DCdRCf1m.mjs} +5 -5
  76. package/fesm2022/{acorex-platform-module-auth-client-tenant-chooser.component-B8CNqHx5.mjs.map → acorex-platform-module-auth-client-tenant-chooser.component-DCdRCf1m.mjs.map} +1 -1
  77. package/fesm2022/acorex-platform-module-auth-client-two-factor-challenge.storage-mi0UD7Sc.mjs +48 -0
  78. package/fesm2022/acorex-platform-module-auth-client-two-factor-challenge.storage-mi0UD7Sc.mjs.map +1 -0
  79. package/fesm2022/acorex-platform-module-auth-client-two-factor-code.component-CtSv3MQu.mjs +200 -0
  80. package/fesm2022/acorex-platform-module-auth-client-two-factor-code.component-CtSv3MQu.mjs.map +1 -0
  81. package/fesm2022/{acorex-platform-module-auth-client-two-factor.module-CI8KC5M_.mjs → acorex-platform-module-auth-client-two-factor.module-B7tETPbq.mjs} +10 -5
  82. package/fesm2022/acorex-platform-module-auth-client-two-factor.module-B7tETPbq.mjs.map +1 -0
  83. package/fesm2022/{acorex-platform-module-auth-client-view-login-history.command-Cqb27L-l.mjs → acorex-platform-module-auth-client-view-login-history.command-CKPbyVWd.mjs} +2 -2
  84. package/fesm2022/{acorex-platform-module-auth-client-view-login-history.command-Cqb27L-l.mjs.map → acorex-platform-module-auth-client-view-login-history.command-CKPbyVWd.mjs.map} +1 -1
  85. package/fesm2022/acorex-platform-module-auth-client-waiting-room.component-IAVIt1fY.mjs +165 -0
  86. package/fesm2022/acorex-platform-module-auth-client-waiting-room.component-IAVIt1fY.mjs.map +1 -0
  87. package/fesm2022/acorex-platform-module-auth-client-welcome-onboarding-page.component-C2WYgv4l.mjs +813 -0
  88. package/fesm2022/acorex-platform-module-auth-client-welcome-onboarding-page.component-C2WYgv4l.mjs.map +1 -0
  89. package/fesm2022/acorex-platform-module-auth-client-welcome-onboarding.command-Ck1A26BI.mjs +59 -0
  90. package/fesm2022/acorex-platform-module-auth-client-welcome-onboarding.command-Ck1A26BI.mjs.map +1 -0
  91. package/fesm2022/acorex-platform-module-auth-client.mjs +1 -1
  92. package/package.json +2 -2
  93. package/types/acorex-platform-module-auth-client-contracts.d.ts +13 -3
  94. package/types/acorex-platform-module-auth-client.d.ts +60 -2
  95. package/fesm2022/acorex-platform-module-auth-client-acorex-platform-module-auth-client-CRl74b8g.mjs.map +0 -1
  96. package/fesm2022/acorex-platform-module-auth-client-blank.layout-BCXNPgrp.mjs.map +0 -1
  97. package/fesm2022/acorex-platform-module-auth-client-change-photo.command-CzO3A7OG.mjs.map +0 -1
  98. package/fesm2022/acorex-platform-module-auth-client-edit-account-info.command-CD9IrimO.mjs.map +0 -1
  99. package/fesm2022/acorex-platform-module-auth-client-password.component-BoWDVby5.mjs.map +0 -1
  100. package/fesm2022/acorex-platform-module-auth-client-profile-page.component-CGs24n0j.mjs.map +0 -1
  101. package/fesm2022/acorex-platform-module-auth-client-routes-B6iJHJ60.mjs +0 -13
  102. package/fesm2022/acorex-platform-module-auth-client-routes-B6iJHJ60.mjs.map +0 -1
  103. package/fesm2022/acorex-platform-module-auth-client-settings.provider-DGiK-MmW.mjs.map +0 -1
  104. package/fesm2022/acorex-platform-module-auth-client-signout-command-B7n_Fn4P.mjs.map +0 -1
  105. package/fesm2022/acorex-platform-module-auth-client-two-factor-code.component-BrqfaY8i.mjs +0 -40
  106. package/fesm2022/acorex-platform-module-auth-client-two-factor-code.component-BrqfaY8i.mjs.map +0 -1
  107. package/fesm2022/acorex-platform-module-auth-client-two-factor.module-CI8KC5M_.mjs.map +0 -1
@@ -0,0 +1,179 @@
1
+ import { commandMessageTextForError } from '@acorex-platform/framework-client/common';
2
+ import { AXPCommandService } from '@acorex-platform/framework-client/runtime';
3
+ import { AXMSecurityManagementServerCommands, AXM_ACCEPT_INVITATION_ERROR_CODES } from '@acorex-platform/module-security-management-client/contracts';
4
+ import * as i1$1 from '@acorex/components/button';
5
+ import { AXButtonModule } from '@acorex/components/button';
6
+ import * as i1 from '@acorex/components/form';
7
+ import { AXFormModule } from '@acorex/components/form';
8
+ import * as i4 from '@acorex/components/label';
9
+ import { AXLabelModule } from '@acorex/components/label';
10
+ import * as i2 from '@acorex/components/password-box';
11
+ import { AXPasswordBoxModule } from '@acorex/components/password-box';
12
+ import { AXToastService } from '@acorex/components/toast';
13
+ import * as i5 from '@acorex/core/translation';
14
+ import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
15
+ import * as i3 from '@angular/common';
16
+ import { CommonModule } from '@angular/common';
17
+ import * as i0 from '@angular/core';
18
+ import { inject, signal, ChangeDetectionStrategy, Component } from '@angular/core';
19
+ import * as i6 from '@angular/router';
20
+ import { ActivatedRoute, Router, RouterModule } from '@angular/router';
21
+
22
+ //#endregion
23
+ //#region ----- Component -----
24
+ class AXPAcceptInvitationComponent {
25
+ constructor() {
26
+ //#region ----- Services & Dependencies -----
27
+ this.route = inject(ActivatedRoute);
28
+ this.router = inject(Router);
29
+ this.commandService = inject(AXPCommandService);
30
+ this.toast = inject(AXToastService);
31
+ this.translation = inject(AXTranslationService);
32
+ //#endregion
33
+ //#region ----- State Signals -----
34
+ /** `unusable` hides the password form and shows the used/invalid message. */
35
+ this.phase = signal('checking', /* @ts-ignore */
36
+ ...(ngDevMode ? [{ debugName: "phase" }] : /* istanbul ignore next */ []));
37
+ //#endregion
38
+ //#region ----- Form State -----
39
+ this.token = '';
40
+ this.newPassword = '';
41
+ this.confirmPassword = '';
42
+ this.submitting = false;
43
+ }
44
+ //#endregion
45
+ //#region ----- Lifecycle -----
46
+ ngOnInit() {
47
+ this.token = this.route.snapshot.queryParamMap.get('token') ?? '';
48
+ void this.loadPreview();
49
+ }
50
+ //#endregion
51
+ //#region ----- Event Handlers -----
52
+ goToLogin() {
53
+ void this.router.navigate(['/auth/login']);
54
+ }
55
+ async submit() {
56
+ if (this.submitting || this.phase() !== 'form') {
57
+ return;
58
+ }
59
+ const token = this.token.trim();
60
+ if (!token) {
61
+ this.phase.set('unusable');
62
+ return;
63
+ }
64
+ if (this.newPassword && this.newPassword.length < 6) {
65
+ const msg = await this.translation
66
+ .translateAsync('@auth:accept-invitation.password-too-short')
67
+ .catch(() => 'Password must be at least 6 characters.');
68
+ this.toast.show({ color: 'warning', title: msg, content: msg });
69
+ return;
70
+ }
71
+ if (this.newPassword !== this.confirmPassword) {
72
+ const msg = await this.translation
73
+ .translateAsync('@auth:accept-invitation.password-mismatch')
74
+ .catch(() => 'Passwords do not match.');
75
+ this.toast.show({ color: 'warning', title: msg, content: msg });
76
+ return;
77
+ }
78
+ this.submitting = true;
79
+ try {
80
+ const result = await this.commandService.executeRemote(AXMSecurityManagementServerCommands.AcceptInvitation, {
81
+ token,
82
+ newPassword: this.newPassword || undefined,
83
+ });
84
+ if (!result?.success) {
85
+ const messageText = commandMessageTextForError(result?.message?.text);
86
+ if (isInvitationLinkUnusable(result?.message?.code, messageText)) {
87
+ this.phase.set('unusable');
88
+ return;
89
+ }
90
+ throw new Error(messageText || 'Accept failed');
91
+ }
92
+ const [title, content] = await Promise.all([
93
+ this.translation
94
+ .translateAsync('@auth:accept-invitation.success.title')
95
+ .catch(() => 'Invitation Accepted'),
96
+ this.translation
97
+ .translateAsync('@auth:accept-invitation.success.description')
98
+ .catch(() => 'Your invitation was accepted. You can sign in now.'),
99
+ ]);
100
+ this.toast.show({ color: 'success', title, content, timeOut: 4000 });
101
+ await this.router.navigate(['/auth/login']);
102
+ }
103
+ catch (error) {
104
+ const [title, fallbackContent] = await Promise.all([
105
+ this.translation
106
+ .translateAsync('@auth:accept-invitation.error.title')
107
+ .catch(() => 'Accept Failed'),
108
+ this.translation
109
+ .translateAsync('@auth:accept-invitation.error.description')
110
+ .catch(() => 'Unable to accept the invitation. The link may have expired.'),
111
+ ]);
112
+ const content = error instanceof Error && error.message ? error.message : fallbackContent;
113
+ this.toast.show({ color: 'danger', title, content, timeOut: 5000 });
114
+ }
115
+ finally {
116
+ this.submitting = false;
117
+ }
118
+ }
119
+ //#endregion
120
+ //#region ----- Preview -----
121
+ async loadPreview() {
122
+ const token = this.token.trim();
123
+ if (!token) {
124
+ this.phase.set('unusable');
125
+ return;
126
+ }
127
+ try {
128
+ const result = await this.commandService.executeRemote(AXMSecurityManagementServerCommands.AcceptInvitation, { token, preview: true });
129
+ if (!result?.success) {
130
+ // Older API ignores `preview` and rejects a missing password — still show the form.
131
+ const messageText = commandMessageTextForError(result?.message?.text);
132
+ if (isPasswordRequired(result?.message?.code, messageText)) {
133
+ this.phase.set('form');
134
+ return;
135
+ }
136
+ this.phase.set('unusable');
137
+ return;
138
+ }
139
+ const preview = result.data;
140
+ this.phase.set(preview?.usable === false ? 'unusable' : 'form');
141
+ }
142
+ catch {
143
+ this.phase.set('unusable');
144
+ }
145
+ }
146
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPAcceptInvitationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
147
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPAcceptInvitationComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<ng-container *translate=\"let t\">\n <div class=\"axp-auth-form\">\n <!-- ----- Checking the token before any password fields are shown ----- -->\n @if (phase() === 'checking') {\n <div class=\"text-center mb-3 lg:mb-5\">\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:accept-invitation.checking' | translate | async }}\n </p>\n </div>\n }\n <!-- ----- Used, unknown, or expired link: message and login, no password form ----- -->\n @else if (phase() === 'unusable') {\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:accept-invitation.unavailable.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:accept-invitation.unavailable.description' | translate | async }}\n </p>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:accept-invitation.unavailable.go-to-login' | translate | async\"\n (onClick)=\"goToLogin()\"\n ></ax-button>\n }\n <!-- ----- Open invitation: set a password ----- -->\n @else {\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:accept-invitation.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:accept-invitation.hint' | translate | async }}\n </p>\n </div>\n <ax-form>\n <div class=\"flex flex-col gap-4 lg:gap-6\">\n <ax-form-field>\n <ax-label>{{\n '@auth:accept-invitation.new-password' | translate | async\n }}</ax-label>\n <ax-password-box\n name=\"newPassword\"\n [(value)]=\"newPassword\"\n [disabled]=\"submitting\"\n ></ax-password-box>\n </ax-form-field>\n <ax-form-field>\n <ax-label>{{\n '@auth:accept-invitation.confirm-password' | translate | async\n }}</ax-label>\n <ax-password-box\n name=\"confirmPassword\"\n [(value)]=\"confirmPassword\"\n [disabled]=\"submitting\"\n ></ax-password-box>\n </ax-form-field>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:accept-invitation.submit' | translate | async\"\n [disabled]=\"submitting\"\n (onClick)=\"submit()\"\n ></ax-button>\n <p class=\"text-center mt-6 text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a\n [routerLink]=\"['/auth/login']\"\n class=\"text-primary font-medium cursor-pointer hover:underline\"\n >\n {{ '@auth:backLogin' | translate | async }}\n </a>\n </p>\n </ax-form>\n }\n </div>\n</ng-container>\n", styles: [":host{display:block;width:100%}.axp-auth-form{width:100%;margin-inline:auto}@media(min-width:768px){.axp-auth-form{width:24rem;max-width:100%}}.axp-auth-form ax-form,.axp-auth-form ax-form-field,.axp-auth-form ax-password-box{display:block;width:100%}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\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: AXPasswordBoxModule }, { kind: "component", type: i2.AXPasswordBoxComponent, selector: "ax-password-box", inputs: ["readonly", "disabled", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "autoComplete", "showToggleButton", "class"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i4.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
148
+ }
149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPAcceptInvitationComponent, decorators: [{
150
+ type: Component,
151
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [
152
+ CommonModule,
153
+ AXFormModule,
154
+ AXPasswordBoxModule,
155
+ AXButtonModule,
156
+ AXLabelModule,
157
+ AXTranslationModule,
158
+ RouterModule,
159
+ ], template: "<ng-container *translate=\"let t\">\n <div class=\"axp-auth-form\">\n <!-- ----- Checking the token before any password fields are shown ----- -->\n @if (phase() === 'checking') {\n <div class=\"text-center mb-3 lg:mb-5\">\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:accept-invitation.checking' | translate | async }}\n </p>\n </div>\n }\n <!-- ----- Used, unknown, or expired link: message and login, no password form ----- -->\n @else if (phase() === 'unusable') {\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:accept-invitation.unavailable.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:accept-invitation.unavailable.description' | translate | async }}\n </p>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:accept-invitation.unavailable.go-to-login' | translate | async\"\n (onClick)=\"goToLogin()\"\n ></ax-button>\n }\n <!-- ----- Open invitation: set a password ----- -->\n @else {\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:accept-invitation.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:accept-invitation.hint' | translate | async }}\n </p>\n </div>\n <ax-form>\n <div class=\"flex flex-col gap-4 lg:gap-6\">\n <ax-form-field>\n <ax-label>{{\n '@auth:accept-invitation.new-password' | translate | async\n }}</ax-label>\n <ax-password-box\n name=\"newPassword\"\n [(value)]=\"newPassword\"\n [disabled]=\"submitting\"\n ></ax-password-box>\n </ax-form-field>\n <ax-form-field>\n <ax-label>{{\n '@auth:accept-invitation.confirm-password' | translate | async\n }}</ax-label>\n <ax-password-box\n name=\"confirmPassword\"\n [(value)]=\"confirmPassword\"\n [disabled]=\"submitting\"\n ></ax-password-box>\n </ax-form-field>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:accept-invitation.submit' | translate | async\"\n [disabled]=\"submitting\"\n (onClick)=\"submit()\"\n ></ax-button>\n <p class=\"text-center mt-6 text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a\n [routerLink]=\"['/auth/login']\"\n class=\"text-primary font-medium cursor-pointer hover:underline\"\n >\n {{ '@auth:backLogin' | translate | async }}\n </a>\n </p>\n </ax-form>\n }\n </div>\n</ng-container>\n", styles: [":host{display:block;width:100%}.axp-auth-form{width:100%;margin-inline:auto}@media(min-width:768px){.axp-auth-form{width:24rem;max-width:100%}}.axp-auth-form ax-form,.axp-auth-form ax-form-field,.axp-auth-form ax-password-box{display:block;width:100%}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
160
+ }] });
161
+ //#endregion
162
+ //#region ----- Helpers -----
163
+ function isInvitationLinkUnusable(code, text) {
164
+ if (code === AXM_ACCEPT_INVITATION_ERROR_CODES.Invalid ||
165
+ code === AXM_ACCEPT_INVITATION_ERROR_CODES.Expired) {
166
+ return true;
167
+ }
168
+ const normalized = (text ?? '').toLowerCase();
169
+ return normalized.includes('invalid') || normalized.includes('expired') || normalized.includes('token is required');
170
+ }
171
+ function isPasswordRequired(code, text) {
172
+ if (code === AXM_ACCEPT_INVITATION_ERROR_CODES.PasswordRequired) {
173
+ return true;
174
+ }
175
+ return (text ?? '').toLowerCase().includes('password');
176
+ }
177
+
178
+ export { AXPAcceptInvitationComponent };
179
+ //# sourceMappingURL=acorex-platform-module-auth-client-accept-invitation.component-Ct28GG3a.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-auth-client-accept-invitation.component-Ct28GG3a.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/accept-invitation/accept-invitation.component.ts","../../../../libs/modules/auth/client/src/lib/pages/accept-invitation/accept-invitation.component.html"],"sourcesContent":["import { commandMessageTextForError } from '@acorex-platform/framework-client/common';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport {\n AXM_ACCEPT_INVITATION_ERROR_CODES,\n AXMSecurityManagementServerCommands,\n type AXMAcceptInvitationPreviewResult,\n} from '@acorex-platform/module-security-management-client/contracts';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXPasswordBoxModule } from '@acorex/components/password-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, OnInit, inject, signal } from '@angular/core';\nimport { ActivatedRoute, Router, RouterModule } from '@angular/router';\n\n//#region ----- Types -----\n\ntype AcceptInvitationPhase = 'checking' | 'form' | 'unusable';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n templateUrl: './accept-invitation.component.html',\n styleUrls: ['./accept-invitation.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n AXFormModule,\n AXPasswordBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXTranslationModule,\n RouterModule,\n ],\n})\nexport class AXPAcceptInvitationComponent implements OnInit {\n //#region ----- Services & Dependencies -----\n\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n private readonly commandService = inject(AXPCommandService);\n private readonly toast = inject(AXToastService);\n private readonly translation = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n /** `unusable` hides the password form and shows the used/invalid message. */\n protected readonly phase = signal<AcceptInvitationPhase>('checking');\n\n //#endregion\n\n //#region ----- Form State -----\n\n protected token = '';\n protected newPassword = '';\n protected confirmPassword = '';\n protected submitting = false;\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n ngOnInit(): void {\n this.token = this.route.snapshot.queryParamMap.get('token') ?? '';\n void this.loadPreview();\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected goToLogin(): void {\n void this.router.navigate(['/auth/login']);\n }\n\n protected async submit(): Promise<void> {\n if (this.submitting || this.phase() !== 'form') {\n return;\n }\n\n const token = this.token.trim();\n if (!token) {\n this.phase.set('unusable');\n return;\n }\n\n if (this.newPassword && this.newPassword.length < 6) {\n const msg = await this.translation\n .translateAsync('@auth:accept-invitation.password-too-short')\n .catch(() => 'Password must be at least 6 characters.');\n this.toast.show({ color: 'warning', title: msg, content: msg });\n return;\n }\n\n if (this.newPassword !== this.confirmPassword) {\n const msg = await this.translation\n .translateAsync('@auth:accept-invitation.password-mismatch')\n .catch(() => 'Passwords do not match.');\n this.toast.show({ color: 'warning', title: msg, content: msg });\n return;\n }\n\n this.submitting = true;\n try {\n const result = await this.commandService.executeRemote(\n AXMSecurityManagementServerCommands.AcceptInvitation,\n {\n token,\n newPassword: this.newPassword || undefined,\n },\n );\n\n if (!result?.success) {\n const messageText = commandMessageTextForError(result?.message?.text);\n if (isInvitationLinkUnusable(result?.message?.code, messageText)) {\n this.phase.set('unusable');\n return;\n }\n throw new Error(messageText || 'Accept failed');\n }\n\n const [title, content] = await Promise.all([\n this.translation\n .translateAsync('@auth:accept-invitation.success.title')\n .catch(() => 'Invitation Accepted'),\n this.translation\n .translateAsync('@auth:accept-invitation.success.description')\n .catch(() => 'Your invitation was accepted. You can sign in now.'),\n ]);\n this.toast.show({ color: 'success', title, content, timeOut: 4000 });\n await this.router.navigate(['/auth/login']);\n } catch (error) {\n const [title, fallbackContent] = await Promise.all([\n this.translation\n .translateAsync('@auth:accept-invitation.error.title')\n .catch(() => 'Accept Failed'),\n this.translation\n .translateAsync('@auth:accept-invitation.error.description')\n .catch(() => 'Unable to accept the invitation. The link may have expired.'),\n ]);\n const content =\n error instanceof Error && error.message ? error.message : fallbackContent;\n this.toast.show({ color: 'danger', title, content, timeOut: 5000 });\n } finally {\n this.submitting = false;\n }\n }\n\n //#endregion\n\n //#region ----- Preview -----\n\n private async loadPreview(): Promise<void> {\n const token = this.token.trim();\n if (!token) {\n this.phase.set('unusable');\n return;\n }\n\n try {\n const result = await this.commandService.executeRemote(\n AXMSecurityManagementServerCommands.AcceptInvitation,\n { token, preview: true },\n );\n\n if (!result?.success) {\n // Older API ignores `preview` and rejects a missing password — still show the form.\n const messageText = commandMessageTextForError(result?.message?.text);\n if (isPasswordRequired(result?.message?.code, messageText)) {\n this.phase.set('form');\n return;\n }\n this.phase.set('unusable');\n return;\n }\n\n const preview = result.data as AXMAcceptInvitationPreviewResult | undefined;\n this.phase.set(preview?.usable === false ? 'unusable' : 'form');\n } catch {\n this.phase.set('unusable');\n }\n }\n\n //#endregion\n}\n\n//#endregion\n\n//#region ----- Helpers -----\n\nfunction isInvitationLinkUnusable(code: string | undefined, text: string | undefined): boolean {\n if (\n code === AXM_ACCEPT_INVITATION_ERROR_CODES.Invalid ||\n code === AXM_ACCEPT_INVITATION_ERROR_CODES.Expired\n ) {\n return true;\n }\n const normalized = (text ?? '').toLowerCase();\n return normalized.includes('invalid') || normalized.includes('expired') || normalized.includes('token is required');\n}\n\nfunction isPasswordRequired(code: string | undefined, text: string | undefined): boolean {\n if (code === AXM_ACCEPT_INVITATION_ERROR_CODES.PasswordRequired) {\n return true;\n }\n return (text ?? '').toLowerCase().includes('password');\n}\n\n//#endregion\n","<ng-container *translate=\"let t\">\n <div class=\"axp-auth-form\">\n <!-- ----- Checking the token before any password fields are shown ----- -->\n @if (phase() === 'checking') {\n <div class=\"text-center mb-3 lg:mb-5\">\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:accept-invitation.checking' | translate | async }}\n </p>\n </div>\n }\n <!-- ----- Used, unknown, or expired link: message and login, no password form ----- -->\n @else if (phase() === 'unusable') {\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:accept-invitation.unavailable.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:accept-invitation.unavailable.description' | translate | async }}\n </p>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:accept-invitation.unavailable.go-to-login' | translate | async\"\n (onClick)=\"goToLogin()\"\n ></ax-button>\n }\n <!-- ----- Open invitation: set a password ----- -->\n @else {\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:accept-invitation.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:accept-invitation.hint' | translate | async }}\n </p>\n </div>\n <ax-form>\n <div class=\"flex flex-col gap-4 lg:gap-6\">\n <ax-form-field>\n <ax-label>{{\n '@auth:accept-invitation.new-password' | translate | async\n }}</ax-label>\n <ax-password-box\n name=\"newPassword\"\n [(value)]=\"newPassword\"\n [disabled]=\"submitting\"\n ></ax-password-box>\n </ax-form-field>\n <ax-form-field>\n <ax-label>{{\n '@auth:accept-invitation.confirm-password' | translate | async\n }}</ax-label>\n <ax-password-box\n name=\"confirmPassword\"\n [(value)]=\"confirmPassword\"\n [disabled]=\"submitting\"\n ></ax-password-box>\n </ax-form-field>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:accept-invitation.submit' | translate | async\"\n [disabled]=\"submitting\"\n (onClick)=\"submit()\"\n ></ax-button>\n <p class=\"text-center mt-6 text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a\n [routerLink]=\"['/auth/login']\"\n class=\"text-primary font-medium cursor-pointer hover:underline\"\n >\n {{ '@auth:backLogin' | translate | async }}\n </a>\n </p>\n </ax-form>\n }\n </div>\n</ng-container>\n"],"names":["i3","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA;AAEA;MAgBa,4BAA4B,CAAA;AAdzC,IAAA,WAAA,GAAA;;AAiBmB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,oBAAoB,CAAC;;;;QAOxC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAwB,UAAU;kFAAC;;;QAM1D,IAAA,CAAA,KAAK,GAAG,EAAE;QACV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