@acorex-platform/module-auth-client 0.0.15 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{acorex-platform-module-auth-client-acorex-platform-module-auth-client-B7tIKOw6.mjs → acorex-platform-module-auth-client-acorex-platform-module-auth-client-mW7tx8C0.mjs} +41 -41
- package/fesm2022/acorex-platform-module-auth-client-acorex-platform-module-auth-client-mW7tx8C0.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-auth-client-app-chooser.component-Cm2ZagaI.mjs → acorex-platform-module-auth-client-app-chooser.component-IPLp1kVv.mjs} +5 -5
- package/fesm2022/{acorex-platform-module-auth-client-app-chooser.component-Cm2ZagaI.mjs.map → acorex-platform-module-auth-client-app-chooser.component-IPLp1kVv.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-change-password.command-ZyXAjUKw.mjs → acorex-platform-module-auth-client-change-password.command-O8Mgxoqj.mjs} +3 -2
- package/fesm2022/{acorex-platform-module-auth-client-change-password.command-ZyXAjUKw.mjs.map → acorex-platform-module-auth-client-change-password.command-O8Mgxoqj.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-change-photo.command-BC8lw--F.mjs → acorex-platform-module-auth-client-change-photo.command-BcNq9mTU.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-change-photo.command-BC8lw--F.mjs.map → acorex-platform-module-auth-client-change-photo.command-BcNq9mTU.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-lock-screen.command-41QnG1TQ.mjs → acorex-platform-module-auth-client-lock-screen.command-PMoJJxe7.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-lock-screen.command-41QnG1TQ.mjs.map → acorex-platform-module-auth-client-lock-screen.command-PMoJJxe7.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-login.module-DYtNYzF6.mjs → acorex-platform-module-auth-client-login.module-C4S0RjM7.mjs} +4 -4
- package/fesm2022/{acorex-platform-module-auth-client-login.module-DYtNYzF6.mjs.map → acorex-platform-module-auth-client-login.module-C4S0RjM7.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-master.layout-DpdD9kgk.mjs → acorex-platform-module-auth-client-master.layout-DXwb5VSr.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-master.layout-DpdD9kgk.mjs.map → acorex-platform-module-auth-client-master.layout-DXwb5VSr.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-oauth-callback.component-BspBH4Ul.mjs → acorex-platform-module-auth-client-oauth-callback.component-CEMvfjj4.mjs} +5 -5
- package/fesm2022/{acorex-platform-module-auth-client-oauth-callback.component-BspBH4Ul.mjs.map → acorex-platform-module-auth-client-oauth-callback.component-CEMvfjj4.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-open-sessions.command-CXSGuqYp.mjs → acorex-platform-module-auth-client-open-sessions.command-BsS9b6Xk.mjs} +6 -6
- package/fesm2022/{acorex-platform-module-auth-client-open-sessions.command-CXSGuqYp.mjs.map → acorex-platform-module-auth-client-open-sessions.command-BsS9b6Xk.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-password.component-Cihg82vM.mjs → acorex-platform-module-auth-client-password.component-CIr6IBG6.mjs} +8 -8
- package/fesm2022/{acorex-platform-module-auth-client-password.component-Cihg82vM.mjs.map → acorex-platform-module-auth-client-password.component-CIr6IBG6.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-auth-client-password.component-DnFItGdA.mjs +88 -0
- package/fesm2022/acorex-platform-module-auth-client-password.component-DnFItGdA.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-auth-client-profile-activity-chart.component-B8lBvZsA.mjs → acorex-platform-module-auth-client-profile-activity-chart.component-DTY1eEI_.mjs} +6 -6
- package/fesm2022/{acorex-platform-module-auth-client-profile-activity-chart.component-B8lBvZsA.mjs.map → acorex-platform-module-auth-client-profile-activity-chart.component-DTY1eEI_.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-CtJho4ab.mjs → acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-C6u3AB4N.mjs} +4 -4
- package/fesm2022/{acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-CtJho4ab.mjs.map → acorex-platform-module-auth-client-profile-delete-account-danger-zone.component-C6u3AB4N.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-B-Qtd4_j.mjs → acorex-platform-module-auth-client-profile-page-component.provider-Dhmzo4ME.mjs} +4 -4
- package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-B-Qtd4_j.mjs.map → acorex-platform-module-auth-client-profile-page-component.provider-Dhmzo4ME.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-profile-page.component-tbhf7K0V.mjs → acorex-platform-module-auth-client-profile-page.component-CJ9AA3ZN.mjs} +8 -8
- package/fesm2022/{acorex-platform-module-auth-client-profile-page.component-tbhf7K0V.mjs.map → acorex-platform-module-auth-client-profile-page.component-CJ9AA3ZN.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-register-password.component-hSJyEA6Q.mjs → acorex-platform-module-auth-client-register-password.component-ia6tdvTc.mjs} +5 -5
- package/fesm2022/{acorex-platform-module-auth-client-register-password.component-hSJyEA6Q.mjs.map → acorex-platform-module-auth-client-register-password.component-ia6tdvTc.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-register.module-DXm6AQpo.mjs → acorex-platform-module-auth-client-register.module--DG9m8iC.mjs} +4 -4
- package/fesm2022/{acorex-platform-module-auth-client-register.module-DXm6AQpo.mjs.map → acorex-platform-module-auth-client-register.module--DG9m8iC.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-remove-pin-code.command-zUZooOtv.mjs → acorex-platform-module-auth-client-remove-pin-code.command-qtswigkv.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-remove-pin-code.command-zUZooOtv.mjs.map → acorex-platform-module-auth-client-remove-pin-code.command-qtswigkv.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-auth-client-reset-password.component-CTlrt_18.mjs +115 -0
- package/fesm2022/acorex-platform-module-auth-client-reset-password.component-CTlrt_18.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-auth-client-routes-DVN2Y2Ps.mjs +13 -0
- package/fesm2022/acorex-platform-module-auth-client-routes-DVN2Y2Ps.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-auth-client-session-lock-overlay.component-CN1JqPBW.mjs +346 -0
- package/fesm2022/{acorex-platform-module-auth-client-session-lock-overlay.component-DqXGuIgN.mjs.map → acorex-platform-module-auth-client-session-lock-overlay.component-CN1JqPBW.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.command-DXTVbrS0.mjs → acorex-platform-module-auth-client-set-pin-code.command-mBEdso1T.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.command-DXTVbrS0.mjs.map → acorex-platform-module-auth-client-set-pin-code.command-mBEdso1T.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.component-5TxB6aFi.mjs → acorex-platform-module-auth-client-set-pin-code.component-BHVqbYFv.mjs} +6 -6
- package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.component-5TxB6aFi.mjs.map → acorex-platform-module-auth-client-set-pin-code.component-BHVqbYFv.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-tenant-chooser.component-ihsqCJKN.mjs → acorex-platform-module-auth-client-tenant-chooser.component-B_9s4F36.mjs} +5 -5
- package/fesm2022/{acorex-platform-module-auth-client-tenant-chooser.component-ihsqCJKN.mjs.map → acorex-platform-module-auth-client-tenant-chooser.component-B_9s4F36.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-two-factor-code.component-CiENsIEh.mjs → acorex-platform-module-auth-client-two-factor-code.component-DAxlYlhM.mjs} +4 -4
- package/fesm2022/{acorex-platform-module-auth-client-two-factor-code.component-CiENsIEh.mjs.map → acorex-platform-module-auth-client-two-factor-code.component-DAxlYlhM.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-two-factor.module-BJqdeuAz.mjs → acorex-platform-module-auth-client-two-factor.module-FAqKbmBb.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-two-factor.module-BJqdeuAz.mjs.map → acorex-platform-module-auth-client-two-factor.module-FAqKbmBb.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-view-login-history.command-Dl0os5lD.mjs → acorex-platform-module-auth-client-view-login-history.command-B42BHIAL.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-view-login-history.command-Dl0os5lD.mjs.map → acorex-platform-module-auth-client-view-login-history.command-B42BHIAL.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-auth-client.mjs +1 -1
- package/package.json +1 -1
- package/fesm2022/acorex-platform-module-auth-client-acorex-platform-module-auth-client-B7tIKOw6.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-auth-client-password.component-BuqUhET7.mjs +0 -59
- package/fesm2022/acorex-platform-module-auth-client-password.component-BuqUhET7.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-auth-client-routes-REjaWcqY.mjs +0 -9
- package/fesm2022/acorex-platform-module-auth-client-routes-REjaWcqY.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-auth-client-session-lock-overlay.component-DqXGuIgN.mjs +0 -346
package/fesm2022/acorex-platform-module-auth-client-session-lock-overlay.component-CN1JqPBW.mjs
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { AXFocusTrapDirective } from '@acorex/cdk/focus-trap';
|
|
2
|
+
import * as i1$1 from '@acorex/components/button';
|
|
3
|
+
import { AXButtonModule } from '@acorex/components/button';
|
|
4
|
+
import * as i3 from '@acorex/components/decorators';
|
|
5
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
6
|
+
import * as i4 from '@acorex/components/otp';
|
|
7
|
+
import { AXOtpComponent, AXOtpModule } from '@acorex/components/otp';
|
|
8
|
+
import * as i4$1 from '@acorex/components/password-box';
|
|
9
|
+
import { AXPasswordBoxComponent, AXPasswordBoxModule } from '@acorex/components/password-box';
|
|
10
|
+
import { AXToastService } from '@acorex/components/toast';
|
|
11
|
+
import * as i7 from '@acorex/core/translation';
|
|
12
|
+
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
|
13
|
+
import { AXPSessionService } from '@acorex-platform/framework-client/auth';
|
|
14
|
+
import { AXPDeviceService } from '@acorex-platform/framework-client/core';
|
|
15
|
+
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
16
|
+
import { AXPUserAvatarComponent, AXPVirtualKeypadComponent } from '@acorex-platform/framework-client/layout/components';
|
|
17
|
+
import * as i6 from '@angular/common';
|
|
18
|
+
import { CommonModule } from '@angular/common';
|
|
19
|
+
import * as i0 from '@angular/core';
|
|
20
|
+
import { signal, computed, viewChild, inject, Injector, DestroyRef, afterNextRender, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
21
|
+
import * as i1 from '@angular/forms';
|
|
22
|
+
import { FormsModule } from '@angular/forms';
|
|
23
|
+
import { defaultTo, get, first } from 'lodash';
|
|
24
|
+
import { A as AXP_AUTH_PIN_CODE_LENGTH, a as AXP_AUTH_PIN_CODE_PATTERN } from './acorex-platform-module-auth-client-pin-code.constants-CRsFG7fg.mjs';
|
|
25
|
+
import { AXPCommandService } from '@acorex-platform/framework-client/runtime';
|
|
26
|
+
import { AXMAuthCommandKeys } from '@acorex-platform/module-auth-client/contracts';
|
|
27
|
+
import { f as AXPIdleLockService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-mW7tx8C0.mjs';
|
|
28
|
+
|
|
29
|
+
const SECURITY_MANAGEMENT_MODULE = 'SecurityManagement';
|
|
30
|
+
const SECURITY_MANAGEMENT_USER_ENTITY = 'User';
|
|
31
|
+
class AXMSessionLockOverlayComponent {
|
|
32
|
+
constructor() {
|
|
33
|
+
//#region ---- Constants ----
|
|
34
|
+
this.pinLength = AXP_AUTH_PIN_CODE_LENGTH;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region ---- State ----
|
|
37
|
+
this.pinInput = signal('', ...(ngDevMode ? [{ debugName: "pinInput" }] : /* istanbul ignore next */ []));
|
|
38
|
+
this.passwordInput = signal('', ...(ngDevMode ? [{ debugName: "passwordInput" }] : /* istanbul ignore next */ []));
|
|
39
|
+
this.pinError = signal(false, ...(ngDevMode ? [{ debugName: "pinError" }] : /* istanbul ignore next */ []));
|
|
40
|
+
this.passwordError = signal(false, ...(ngDevMode ? [{ debugName: "passwordError" }] : /* istanbul ignore next */ []));
|
|
41
|
+
this.isVerifying = signal(false, ...(ngDevMode ? [{ debugName: "isVerifying" }] : /* istanbul ignore next */ []));
|
|
42
|
+
this.unlockMode = signal('pin', ...(ngDevMode ? [{ debugName: "unlockMode" }] : /* istanbul ignore next */ []));
|
|
43
|
+
this.userRoleTitle = signal('', ...(ngDevMode ? [{ debugName: "userRoleTitle" }] : /* istanbul ignore next */ []));
|
|
44
|
+
this.hasPinCode = computed(() => this.idleLockService.hasPinCode(), ...(ngDevMode ? [{ debugName: "hasPinCode" }] : /* istanbul ignore next */ []));
|
|
45
|
+
this.useDeviceKeyboard = computed(() => !this.deviceService.isDesktopDevice(), ...(ngDevMode ? [{ debugName: "useDeviceKeyboard" }] : /* istanbul ignore next */ []));
|
|
46
|
+
this.displayName = computed(() => defaultTo(this.sessionService.user?.title, ''), ...(ngDevMode ? [{ debugName: "displayName" }] : /* istanbul ignore next */ []));
|
|
47
|
+
this.userId = computed(() => this.sessionService.user?.id ?? '', ...(ngDevMode ? [{ debugName: "userId" }] : /* istanbul ignore next */ []));
|
|
48
|
+
this.applicationBadge = computed(() => {
|
|
49
|
+
const application = this.sessionService.application;
|
|
50
|
+
return defaultTo(application?.title, defaultTo(application?.name, ''));
|
|
51
|
+
}, ...(ngDevMode ? [{ debugName: "applicationBadge" }] : /* istanbul ignore next */ []));
|
|
52
|
+
this.otpState = computed(() => (this.pinError() ? 'error' : 'clear'), ...(ngDevMode ? [{ debugName: "otpState" }] : /* istanbul ignore next */ []));
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region ---- View children ----
|
|
55
|
+
this.otpInput = viewChild(AXOtpComponent, ...(ngDevMode ? [{ debugName: "otpInput" }] : /* istanbul ignore next */ []));
|
|
56
|
+
this.passwordBox = viewChild(AXPasswordBoxComponent, ...(ngDevMode ? [{ debugName: "passwordBox" }] : /* istanbul ignore next */ []));
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region ---- Services & Dependencies ----
|
|
59
|
+
this.idleLockService = inject(AXPIdleLockService);
|
|
60
|
+
this.sessionService = inject(AXPSessionService);
|
|
61
|
+
this.deviceService = inject(AXPDeviceService);
|
|
62
|
+
this.entityService = inject(AXPEntityService);
|
|
63
|
+
this.toastService = inject(AXToastService);
|
|
64
|
+
this.translateService = inject(AXTranslationService);
|
|
65
|
+
this.commandService = inject(AXPCommandService);
|
|
66
|
+
this.injector = inject(Injector);
|
|
67
|
+
this.destroyRef = inject(DestroyRef);
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region ---- Lifecycle Methods ----
|
|
71
|
+
ngOnInit() {
|
|
72
|
+
void this.initializeUnlockMode();
|
|
73
|
+
void this.loadUserRoleTitle();
|
|
74
|
+
this.bindRefocusOnInteraction();
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region ---- UI Handlers ----
|
|
78
|
+
onOverlayClick() {
|
|
79
|
+
if (!this.isUnlockEntryFocused()) {
|
|
80
|
+
this.focusUnlockEntry();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
onDesktopPinChange(value) {
|
|
84
|
+
const normalized = defaultTo(value, '');
|
|
85
|
+
if (this.pinError() && normalized.length > 0) {
|
|
86
|
+
this.pinError.set(false);
|
|
87
|
+
}
|
|
88
|
+
this.pinInput.set(normalized);
|
|
89
|
+
}
|
|
90
|
+
onDesktopPinCompleted(event) {
|
|
91
|
+
if (!event.isCompleted || this.isVerifying()) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
this.pinInput.set(defaultTo(event.value, ''));
|
|
95
|
+
void this.submitPin();
|
|
96
|
+
}
|
|
97
|
+
onMobilePinDigit(digit) {
|
|
98
|
+
if (this.isVerifying()) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const current = this.pinInput();
|
|
102
|
+
if (current.length >= AXP_AUTH_PIN_CODE_LENGTH) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const next = `${current}${digit}`;
|
|
106
|
+
if (this.pinError() && next.length > 0) {
|
|
107
|
+
this.pinError.set(false);
|
|
108
|
+
}
|
|
109
|
+
this.pinInput.set(next);
|
|
110
|
+
if (next.length === AXP_AUTH_PIN_CODE_LENGTH) {
|
|
111
|
+
void this.submitPin();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
onMobilePinBackspace() {
|
|
115
|
+
if (this.isVerifying()) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const current = this.pinInput();
|
|
119
|
+
if (!current.length) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const next = current.slice(0, -1);
|
|
123
|
+
if (this.pinError() && next.length > 0) {
|
|
124
|
+
this.pinError.set(false);
|
|
125
|
+
}
|
|
126
|
+
this.pinInput.set(next);
|
|
127
|
+
}
|
|
128
|
+
onPasswordChange(value) {
|
|
129
|
+
this.passwordInput.set(defaultTo(value, ''));
|
|
130
|
+
this.passwordError.set(false);
|
|
131
|
+
}
|
|
132
|
+
showPasswordUnlock(event) {
|
|
133
|
+
event?.nativeEvent.stopPropagation();
|
|
134
|
+
this.unlockMode.set('password');
|
|
135
|
+
this.resetPinInput();
|
|
136
|
+
this.focusUnlockEntry();
|
|
137
|
+
}
|
|
138
|
+
showPinUnlock(event) {
|
|
139
|
+
event?.nativeEvent.stopPropagation();
|
|
140
|
+
if (!this.hasPinCode()) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
this.unlockMode.set('pin');
|
|
144
|
+
this.passwordInput.set('');
|
|
145
|
+
this.passwordError.set(false);
|
|
146
|
+
this.focusUnlockEntry();
|
|
147
|
+
}
|
|
148
|
+
submitPassword() {
|
|
149
|
+
void this.verifyPasswordAndUnlock();
|
|
150
|
+
}
|
|
151
|
+
signOut(event) {
|
|
152
|
+
event?.nativeEvent.stopPropagation();
|
|
153
|
+
void this.commandService.execute(AXMAuthCommandKeys.Session.Signout, {});
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region ---- Private Methods ----
|
|
157
|
+
async initializeUnlockMode() {
|
|
158
|
+
await this.idleLockService.refreshPinState();
|
|
159
|
+
this.resetUnlockState();
|
|
160
|
+
this.focusUnlockEntry();
|
|
161
|
+
}
|
|
162
|
+
getDefaultUnlockMode() {
|
|
163
|
+
return this.idleLockService.hasPinCode() ? 'pin' : 'password';
|
|
164
|
+
}
|
|
165
|
+
async loadUserRoleTitle() {
|
|
166
|
+
const userId = this.sessionService.user?.id;
|
|
167
|
+
if (!userId) {
|
|
168
|
+
this.userRoleTitle.set('');
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
try {
|
|
172
|
+
const user = await this.entityService
|
|
173
|
+
.withEntity(SECURITY_MANAGEMENT_MODULE, SECURITY_MANAGEMENT_USER_ENTITY)
|
|
174
|
+
.data()
|
|
175
|
+
.byKey(userId);
|
|
176
|
+
const roleTitle = defaultTo(get(first(get(user, 'roles', [])), 'title'), '');
|
|
177
|
+
this.userRoleTitle.set(roleTitle);
|
|
178
|
+
}
|
|
179
|
+
catch (error) {
|
|
180
|
+
console.error('Failed to load user role for session lock overlay', error);
|
|
181
|
+
this.userRoleTitle.set('');
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
async submitPin() {
|
|
185
|
+
if (this.isVerifying()) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
const pin = this.pinInput();
|
|
189
|
+
if (!AXP_AUTH_PIN_CODE_PATTERN.test(pin)) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
this.isVerifying.set(true);
|
|
193
|
+
try {
|
|
194
|
+
if (this.idleLockService.verifyPin(pin)) {
|
|
195
|
+
this.idleLockService.unlock();
|
|
196
|
+
this.resetUnlockState();
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
await this.showIncorrectPinError();
|
|
200
|
+
this.applyPinValidationError();
|
|
201
|
+
}
|
|
202
|
+
finally {
|
|
203
|
+
this.isVerifying.set(false);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
async verifyPasswordAndUnlock() {
|
|
207
|
+
if (this.isVerifying() || !this.passwordInput()) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
this.isVerifying.set(true);
|
|
211
|
+
try {
|
|
212
|
+
if (await this.idleLockService.verifyPassword(this.passwordInput())) {
|
|
213
|
+
this.idleLockService.unlock();
|
|
214
|
+
this.resetUnlockState();
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
await this.showIncorrectPasswordError();
|
|
218
|
+
this.triggerPasswordError();
|
|
219
|
+
this.passwordInput.set('');
|
|
220
|
+
this.focusUnlockEntry();
|
|
221
|
+
}
|
|
222
|
+
finally {
|
|
223
|
+
this.isVerifying.set(false);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
resetUnlockState() {
|
|
227
|
+
this.unlockMode.set(this.getDefaultUnlockMode());
|
|
228
|
+
this.resetPinInput();
|
|
229
|
+
this.passwordInput.set('');
|
|
230
|
+
this.passwordError.set(false);
|
|
231
|
+
this.pinError.set(false);
|
|
232
|
+
}
|
|
233
|
+
resetPinInput(clearError = true) {
|
|
234
|
+
if (clearError) {
|
|
235
|
+
this.pinError.set(false);
|
|
236
|
+
}
|
|
237
|
+
this.pinInput.set('');
|
|
238
|
+
this.otpInput()?.reset();
|
|
239
|
+
}
|
|
240
|
+
applyPinValidationError() {
|
|
241
|
+
this.resetPinInput(false);
|
|
242
|
+
afterNextRender(() => {
|
|
243
|
+
this.pinError.set(true);
|
|
244
|
+
this.syncOtpErrorState();
|
|
245
|
+
if (!this.useDeviceKeyboard()) {
|
|
246
|
+
this.otpInput()?.focus();
|
|
247
|
+
}
|
|
248
|
+
}, { injector: this.injector });
|
|
249
|
+
}
|
|
250
|
+
syncOtpErrorState() {
|
|
251
|
+
const otp = this.otpInput();
|
|
252
|
+
if (otp) {
|
|
253
|
+
otp.state = 'error';
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
focusUnlockEntry() {
|
|
257
|
+
afterNextRender(() => {
|
|
258
|
+
if (this.unlockMode() === 'password') {
|
|
259
|
+
this.focusPasswordInput();
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
if (!this.useDeviceKeyboard()) {
|
|
263
|
+
this.otpInput()?.focus();
|
|
264
|
+
}
|
|
265
|
+
}, { injector: this.injector });
|
|
266
|
+
}
|
|
267
|
+
focusPasswordInput() {
|
|
268
|
+
const attemptFocus = () => {
|
|
269
|
+
const passwordBox = this.passwordBox();
|
|
270
|
+
if (!passwordBox) {
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
passwordBox.focus();
|
|
274
|
+
requestAnimationFrame(() => {
|
|
275
|
+
if (!this.isUnlockEntryFocused()) {
|
|
276
|
+
passwordBox.focus();
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
return true;
|
|
280
|
+
};
|
|
281
|
+
if (!attemptFocus()) {
|
|
282
|
+
afterNextRender(() => attemptFocus(), { injector: this.injector });
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
bindRefocusOnInteraction() {
|
|
286
|
+
const onKeydown = (event) => {
|
|
287
|
+
if (this.isUnlockEntryFocused() || event.defaultPrevented) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
this.focusUnlockEntry();
|
|
291
|
+
};
|
|
292
|
+
document.addEventListener('keydown', onKeydown, true);
|
|
293
|
+
this.destroyRef.onDestroy(() => {
|
|
294
|
+
document.removeEventListener('keydown', onKeydown, true);
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
isUnlockEntryFocused() {
|
|
298
|
+
const active = document.activeElement;
|
|
299
|
+
if (!(active instanceof HTMLElement)) {
|
|
300
|
+
return false;
|
|
301
|
+
}
|
|
302
|
+
if (this.unlockMode() === 'password') {
|
|
303
|
+
return active.closest('ax-password-box') !== null;
|
|
304
|
+
}
|
|
305
|
+
if (this.useDeviceKeyboard()) {
|
|
306
|
+
return active.closest('axp-virtual-keypad') !== null;
|
|
307
|
+
}
|
|
308
|
+
return active.closest('ax-otp') !== null;
|
|
309
|
+
}
|
|
310
|
+
triggerPasswordError() {
|
|
311
|
+
this.passwordError.set(true);
|
|
312
|
+
setTimeout(() => this.passwordError.set(false), 450);
|
|
313
|
+
}
|
|
314
|
+
async showIncorrectPinError() {
|
|
315
|
+
const content = await this.translateService.translateAsync('@auth:session-lock.messages.incorrect-pin');
|
|
316
|
+
const title = await this.translateService.translateAsync('@general:messages.generic.error.title');
|
|
317
|
+
this.toastService.show({ color: 'danger', title, content, closeButton: true });
|
|
318
|
+
}
|
|
319
|
+
async showIncorrectPasswordError() {
|
|
320
|
+
const content = await this.translateService.translateAsync('@auth:session-lock.messages.incorrect-password');
|
|
321
|
+
const title = await this.translateService.translateAsync('@general:messages.generic.error.title');
|
|
322
|
+
this.toastService.show({ color: 'danger', title, content, closeButton: true });
|
|
323
|
+
}
|
|
324
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMSessionLockOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
325
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMSessionLockOverlayComponent, isStandalone: true, selector: "axm-session-lock-overlay", host: { classAttribute: "axm-session-lock-overlay-host" }, viewQueries: [{ propertyName: "otpInput", first: true, predicate: AXOtpComponent, descendants: true, isSignal: true }, { propertyName: "passwordBox", first: true, predicate: AXPasswordBoxComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"axm-session-lock-overlay\" [class.axm-session-lock-overlay--desktop]=\"!useDeviceKeyboard()\"\n [class.axm-session-lock-overlay--mobile]=\"useDeviceKeyboard()\" (click)=\"onOverlayClick()\">\n <div class=\"axm-session-lock-overlay__panel\" axFocusTrap tabindex=\"-1\" (click)=\"$event.stopPropagation()\">\n <div class=\"axm-session-lock-overlay__profile\">\n <div class=\"axm-session-lock-overlay__avatar-wrap\">\n @if (userId(); as resolvedUserId) {\n <axp-user-avatar [size]=\"useDeviceKeyboard() ? 64 : 80\" [userId]=\"resolvedUserId\"></axp-user-avatar>\n }\n </div>\n\n @if (displayName()) {\n <p class=\"axm-session-lock-overlay__name m-0\">\n {{ displayName() }}\n </p>\n }\n\n <!-- @if (userRoleTitle()) {\n <p class=\"axm-session-lock-overlay__role m-0\">\n {{ userRoleTitle() }}\n </p>\n } -->\n\n @if (applicationBadge()) {\n <div class=\"axm-session-lock-overlay__user-badge\">\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n <span>{{ applicationBadge() }}</span>\n </div>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__divider\" aria-hidden=\"true\"></div>\n\n <div class=\"axm-session-lock-overlay__body\">\n <div class=\"axm-session-lock-overlay__body-main\">\n <div class=\"axm-session-lock-overlay__lock-badge\" aria-hidden=\"true\">\n <i class=\"fa-light fa-lock\"></i>\n </div>\n\n <h2 class=\"axm-session-lock-overlay__title m-0\">\n {{ '@auth:session-lock.title' | translate | async }}\n </h2>\n\n @if (unlockMode() === 'pin' && hasPinCode()) {\n <p class=\"axm-session-lock-overlay__instruction m-0\">\n {{ '@auth:session-lock.pin-instruction' | translate | async }}\n </p>\n\n <div class=\"axm-session-lock-overlay__otp\" [class.axm-session-lock-overlay__otp--error]=\"pinError()\">\n <ax-otp class=\"w-full block\" [type]=\"'number'\" [mode]=\"'star'\" [length]=\"pinLength\" [state]=\"otpState()\"\n [readonly]=\"useDeviceKeyboard()\" [disabled]=\"isVerifying()\" [ngModel]=\"pinInput()\"\n (ngModelChange)=\"onDesktopPinChange($event)\" (onCompleted)=\"onDesktopPinCompleted($event)\"></ax-otp>\n </div>\n } @else {\n <p class=\"axm-session-lock-overlay__instruction m-0\">\n {{ '@auth:session-lock.password-instruction' | translate | async }}\n </p>\n\n <div class=\"axm-session-lock-overlay__password\"\n [class.axm-session-lock-overlay__password--error]=\"passwordError()\">\n <ax-password-box class=\"axm-session-lock-overlay__password-input w-full\" look=\"outline\"\n [disabled]=\"isVerifying()\" [ngModel]=\"passwordInput()\" (ngModelChange)=\"onPasswordChange($event)\"\n (keydown.enter)=\"submitPassword()\" [placeholder]=\"'@auth:password' | translate | async\"></ax-password-box>\n </div>\n\n <div class=\"axm-session-lock-overlay__actions\">\n <ax-button class=\"axm-session-lock-overlay__action w-full rounded-lg\" look=\"solid\" color=\"primary\"\n [disabled]=\"isVerifying() || !passwordInput()\" [text]=\"'@auth:session-lock.unlock' | translate | async\"\n (onClick)=\"submitPassword()\"></ax-button>\n </div>\n }\n </div>\n\n @if (useDeviceKeyboard() && unlockMode() === 'pin' && hasPinCode()) {\n <axp-virtual-keypad class=\"axm-session-lock-overlay__keypad\" look=\"solid\" [disabled]=\"isVerifying()\"\n (digitPress)=\"onMobilePinDigit($event)\" (backspace)=\"onMobilePinBackspace()\">\n </axp-virtual-keypad>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__footer\">\n <div class=\"axm-session-lock-overlay__footer-actions\">\n @if (hasPinCode()) {\n <div class=\"axm-session-lock-overlay__footer-action\">\n @if (unlockMode() === 'pin') {\n <ax-button class=\"w-full\" look=\"blank\" color=\"primary\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.use-password-instead' | translate | async\"\n (onClick)=\"showPasswordUnlock($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n } @else {\n <ax-button class=\"w-full\" look=\"blank\" color=\"primary\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.use-pin-instead' | translate | async\" (onClick)=\"showPinUnlock($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__footer-divider\" aria-hidden=\"true\"></div>\n }\n\n <div class=\"axm-session-lock-overlay__footer-action\">\n <ax-button class=\"w-full\" look=\"blank\" color=\"danger\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.sign-out' | translate | async\" (onClick)=\"signOut($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-arrow-right-from-bracket\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: ["@layer properties;.axm-session-lock-overlay-host{display:contents}.axm-session-lock-overlay-shell{pointer-events:auto;position:fixed;box-sizing:border-box;inset:0;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}.axm-session-lock-overlay-shell .overlay-pane{--tw-border-style: none;border-style:none;background-color:transparent;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}.axm-session-lock-overlay{position:fixed;inset:0;box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:calc(var(--spacing, .25rem) * 6);--axm-lock-divider-color: rgb(var(--ax-sys-color-border-lightest-surface))}.axm-session-lock-overlay .axm-session-lock-overlay__panel{display:flex;width:100%;max-width:30rem;flex-direction:column;overflow:hidden;text-align:center;--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style: none;outline-style:none;border-radius:1.5rem;border-style:var(--tw-border-style);border-width:1px;background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest);animation:axm-axm-session-lock-overlay-enter .28s cubic-bezier(.22,1,.36,1)}.axm-session-lock-overlay .axm-session-lock-overlay__profile{display:flex;flex-direction:column;align-items:center;padding-inline:calc(var(--spacing, .25rem) * 8);padding-top:calc(var(--spacing, .25rem) * 9);padding-bottom:calc(var(--spacing, .25rem) * 5)}.axm-session-lock-overlay .axm-session-lock-overlay__avatar-wrap{margin-bottom:calc(var(--spacing, .25rem) * 3);display:flex;align-items:center;justify-content:center}.axm-session-lock-overlay .axm-session-lock-overlay__user-badge{margin-bottom:calc(var(--spacing, .25rem) * 4);display:inline-flex;align-items:center;gap:calc(var(--spacing, .25rem) * 1.5);border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:0px;padding-inline:calc(var(--spacing, .25rem) * 3.5);padding-block:calc(var(--spacing, .25rem) * 1.5);background-color:var(--color-primary-lighter);color:var(--color-on-primary-lighter);border-color:var(--color-border-primary-lighter);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.axm-session-lock-overlay .axm-session-lock-overlay__name{margin-bottom:calc(var(--spacing, .25rem) * 4);font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));--tw-leading: calc(var(--spacing, .25rem) * 6);line-height:calc(var(--spacing, .25rem) * 6);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-tracking: var(--tracking-tight, -.025em);letter-spacing:var(--tracking-tight, -.025em);color:rgba(var(--ax-sys-color-on-lightest-surface))}.axm-session-lock-overlay .axm-session-lock-overlay__divider{margin-inline:calc(var(--spacing, .25rem) * 8);border:none;border-top:1px solid var(--axm-lock-divider-color)}.axm-session-lock-overlay .axm-session-lock-overlay__body{display:flex;flex-direction:column;align-items:center;padding-inline:calc(var(--spacing, .25rem) * 8);padding-top:calc(var(--spacing, .25rem) * 6);padding-bottom:calc(var(--spacing, .25rem) * 8)}.axm-session-lock-overlay .axm-session-lock-overlay__body-main{display:flex;width:100%;flex-direction:column;align-items:center}.axm-session-lock-overlay .axm-session-lock-overlay__lock-badge{margin-bottom:calc(var(--spacing, .25rem) * 3);display:flex;width:calc(var(--spacing, .25rem) * 9);height:calc(var(--spacing, .25rem) * 9);align-items:center;justify-content:center;border-radius:calc(infinity * 1px);background-color:rgba(var(--ax-sys-color-primary-600));font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-primary-dark-surface))}.axm-session-lock-overlay .axm-session-lock-overlay__title{margin-bottom:calc(var(--spacing, .25rem) * 1.5);font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-leading: calc(var(--spacing, .25rem) * 6);line-height:calc(var(--spacing, .25rem) * 6);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:rgba(var(--ax-sys-color-on-lightest-surface))}.axm-session-lock-overlay .axm-session-lock-overlay__instruction{margin-bottom:calc(var(--spacing, .25rem) * 6);max-width:19rem;--tw-leading: var(--leading-snug, 1.375);line-height:var(--leading-snug, 1.375);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: calc(var(--spacing, .25rem) * 5);line-height:calc(var(--spacing, .25rem) * 5);color:rgba(var(--ax-sys-color-on-lighter-surface));opacity:70%}.axm-session-lock-overlay .axm-session-lock-overlay__keypad{margin-bottom:calc(var(--spacing, .25rem) * 2);width:100%}.axm-session-lock-overlay .axm-session-lock-overlay__otp{margin-bottom:calc(var(--spacing, .25rem) * 6);width:100%;max-width:15rem}.axm-session-lock-overlay .axm-session-lock-overlay__otp .input{border-color:rgb(var(--ax-sys-color-border-light-surface));background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface))}.axm-session-lock-overlay .axm-session-lock-overlay__otp .input:focus{border-color:rgb(var(--ax-sys-color-primary-600));box-shadow:none;outline:none}.axm-session-lock-overlay .axm-session-lock-overlay__otp--error{animation:axm-axm-session-lock-overlay-shake .42s ease}.axm-session-lock-overlay .axm-session-lock-overlay__otp--error .input{border-color:rgba(var(--ax-sys-color-danger-500))!important}.axm-session-lock-overlay .axm-session-lock-overlay__password{margin-bottom:calc(var(--spacing, .25rem) * 3);width:100%}.axm-session-lock-overlay .axm-session-lock-overlay__password--error{animation:axm-axm-session-lock-overlay-shake .42s ease}.axm-session-lock-overlay .axm-session-lock-overlay__password-input .input,.axm-session-lock-overlay .axm-session-lock-overlay__password-input input{min-height:2.75rem;border-radius:var(--radius-lg, .5rem);background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest);color:rgba(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:is(.axm-session-lock-overlay .axm-session-lock-overlay__password-input .input,.axm-session-lock-overlay .axm-session-lock-overlay__password-input input):focus{border-color:rgb(var(--ax-sys-color-primary-600));box-shadow:none;outline:none}.axm-session-lock-overlay .axm-session-lock-overlay__actions{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 3)}.axm-session-lock-overlay .axm-session-lock-overlay__action{position:relative;z-index:1;margin-top:calc(var(--spacing, .25rem) * 3)}.axm-session-lock-overlay .axm-session-lock-overlay__footer{background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest);padding-inline:calc(var(--spacing, .25rem) * 8);padding-block:calc(var(--spacing, .25rem) * 4);border:none;border-top:1px solid var(--axm-lock-divider-color)}.axm-session-lock-overlay .axm-session-lock-overlay__footer-actions{display:flex;width:100%;align-items:center;justify-content:center;gap:var(--spacing, .25rem)}.axm-session-lock-overlay .axm-session-lock-overlay__footer-action{display:flex;min-width:0;flex:1;align-items:center;justify-content:center;padding-inline:calc(var(--spacing, .25rem) * 2)}.axm-session-lock-overlay .axm-session-lock-overlay__footer-action ax-button{justify-content:center}.axm-session-lock-overlay .axm-session-lock-overlay__footer-divider{margin-inline:calc(var(--spacing, .25rem) * 2);height:calc(var(--spacing, .25rem) * 4);width:1px;flex-shrink:0;background-color:var(--axm-lock-divider-color)}.axm-session-lock-overlay.axm-session-lock-overlay--desktop{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);background-color:rgb(var(--ax-sys-color-darkest-surface) / .14);backdrop-filter:blur(10px) saturate(1.02)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile{align-items:stretch;justify-content:stretch;padding:0;background-color:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;--axm-lock-divider-color: rgb(var(--ax-sys-color-primary-lightest-surface));--axm-lock-panel-gradient-start: var(--ax-sys-color-lightest-surface);--axm-lock-panel-gradient-mid: var(--ax-sys-color-primary-50);--axm-lock-panel-gradient-end: var(--ax-sys-color-primary-50);--axm-lock-mobile-inline-padding: clamp(1rem, 4vw, 1.5rem);--axm-lock-mobile-divider-gap: clamp(1rem, 2.5vh, 1.5rem);--axm-lock-mobile-key-gap: clamp(.375rem, 1.2vh, .75rem);--axm-lock-mobile-key-size: min( 4.75rem, calc( ( 100vw - (var(--axm-lock-mobile-inline-padding) * 2) - (var(--axm-lock-mobile-key-gap) * 2) ) / 3 ) )}@supports (color: color-mix(in lab,red,red)){.axm-session-lock-overlay.axm-session-lock-overlay--mobile{--axm-lock-divider-color: color-mix( in srgb, rgb(var(--ax-sys-color-primary-lightest-surface)) 90%, rgb(var(--ax-sys-color-lightest-surface)) )}}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__panel{display:flex;height:100dvh;min-height:100dvh;max-width:none;flex-direction:column;border-radius:0;border-style:var(--tw-border-style);border-width:0px;--tw-shadow: 0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background:linear-gradient(180deg,rgb(var(--axm-lock-panel-gradient-start)),rgb(var(--axm-lock-panel-gradient-mid)) 65%,rgb(var(--axm-lock-panel-gradient-end)))}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__profile{flex-shrink:0;padding:clamp(1rem,3.5vh,1.5rem) var(--axm-lock-mobile-inline-padding) var(--axm-lock-mobile-divider-gap)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__avatar-wrap{margin-bottom:calc(var(--spacing, .25rem) * 2)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__name{margin-bottom:calc(var(--spacing, .25rem) * 2);font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-leading: calc(var(--spacing, .25rem) * 5);line-height:calc(var(--spacing, .25rem) * 5)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__user-badge{margin-bottom:0}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__divider{margin:0;flex-shrink:0;margin-inline:var(--axm-lock-mobile-inline-padding);border:none;border-top:1px solid var(--axm-lock-divider-color)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__body{display:flex;min-height:0;flex:1;flex-direction:column;justify-content:space-between;padding:var(--axm-lock-mobile-divider-gap) var(--axm-lock-mobile-inline-padding) var(--axm-lock-mobile-divider-gap)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__body:not(:has(.axm-session-lock-overlay__keypad)){justify-content:center}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__body-main{display:flex;width:100%;flex-shrink:0;flex-direction:column;align-items:center;gap:calc(var(--spacing, .25rem) * 4);padding-inline:clamp(.75rem,3vw,1.25rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__lock-badge{margin-bottom:0;width:clamp(2.25rem,6vh,2.75rem);height:clamp(2.25rem,6vh,2.75rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__title{margin-bottom:0}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__instruction{margin-bottom:0;max-width:20rem;padding-inline:clamp(.5rem,2vw,1rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__otp{margin-bottom:0;min-height:0;max-width:min(15rem,100%);padding-top:clamp(.25rem,1vh,.75rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__keypad{display:flex;width:100%;flex-shrink:0;align-items:center;justify-content:center;--axp-keypad-key-size: var(--axm-lock-mobile-key-size);--axp-keypad-gap: var(--axm-lock-mobile-key-gap)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__keypad .axp-virtual-keypad .__digit{font-size:clamp(1.625rem,5.5vw,2rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__keypad .axp-virtual-keypad .__letters{font-size:clamp(.625rem,2vw,.75rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__keypad .axp-virtual-keypad .__key--action i{font-size:clamp(1.375rem,4.5vw,1.625rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__footer{margin-top:0;flex-shrink:0;background-color:transparent;border:none;border-top:1px solid var(--axm-lock-divider-color);padding:var(--axm-lock-mobile-divider-gap) var(--axm-lock-mobile-inline-padding) max(var(--axm-lock-mobile-divider-gap),env(safe-area-inset-bottom,0px))}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__footer-divider{background-color:var(--axm-lock-divider-color)}.dark .axm-session-lock-overlay--desktop{--axm-lock-divider-color: rgb(var(--ax-sys-color-border-light-surface));background-color:rgb(var(--ax-sys-color-darkest-surface) / .55)}.dark .axm-session-lock-overlay--mobile{--axm-lock-divider-color: rgb(var(--ax-sys-color-border-primary-lightest-surface));--axm-lock-panel-gradient-end: var(--ax-sys-color-lighter-surface);--axm-lock-panel-gradient-mid: var(--ax-sys-color-darkest-surface);--axm-lock-panel-gradient-start: var(--ax-sys-color-primary-darker-surface)}@supports (color: color-mix(in lab,red,red)){.dark .axm-session-lock-overlay--mobile{--axm-lock-divider-color: color-mix( in srgb, rgb(var(--ax-sys-color-border-primary-lightest-surface)) 28%, rgb(var(--ax-sys-color-lighter-surface)) )}}.dark .axm-session-lock-overlay__otp .input{border-color:rgb(var(--ax-sys-color-border-light-surface));background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface))}.dark .axm-session-lock-overlay__otp .input:focus{border-color:rgb(var(--ax-sys-color-primary-400))}.dark .axm-session-lock-overlay__password-input .input,.dark .axm-session-lock-overlay__password-input input{border-color:rgb(var(--ax-sys-color-border-light-surface));background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface))}:is(.dark .axm-session-lock-overlay__password-input .input,.dark .axm-session-lock-overlay__password-input input):focus{border-color:rgb(var(--ax-sys-color-primary-400))}.dark .axm-session-lock-overlay__panel{border-style:var(--tw-border-style);border-width:1px;background-color:var(--color-darker);color:var(--color-on-darker);border-color:var(--color-border-darker);--tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / .25));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.dark .axm-session-lock-overlay__footer{border-style:var(--tw-border-style);border-width:1px;background-color:var(--color-darker);color:var(--color-on-darker);border-color:var(--color-border-darker)}@keyframes axm-axm-session-lock-overlay-enter{0%{opacity:0;transform:translateY(.75rem) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes axm-axm-session-lock-overlay-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-.35rem)}40%,80%{transform:translate(.35rem)}}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-tracking{syntax: \"*\"; inherits: false;}@property --tw-backdrop-blur{syntax: \"*\"; inherits: false;}@property --tw-backdrop-brightness{syntax: \"*\"; inherits: false;}@property --tw-backdrop-contrast{syntax: \"*\"; inherits: false;}@property --tw-backdrop-grayscale{syntax: \"*\"; inherits: false;}@property --tw-backdrop-hue-rotate{syntax: \"*\"; inherits: false;}@property --tw-backdrop-invert{syntax: \"*\"; inherits: false;}@property --tw-backdrop-opacity{syntax: \"*\"; inherits: false;}@property --tw-backdrop-saturate{syntax: \"*\"; inherits: false;}@property --tw-backdrop-sepia{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-border-style: solid;--tw-leading: initial;--tw-font-weight: initial;--tw-tracking: initial;--tw-backdrop-blur: initial;--tw-backdrop-brightness: initial;--tw-backdrop-contrast: initial;--tw-backdrop-grayscale: initial;--tw-backdrop-hue-rotate: initial;--tw-backdrop-invert: initial;--tw-backdrop-opacity: initial;--tw-backdrop-saturate: initial;--tw-backdrop-sepia: initial}}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ 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: 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: 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: AXOtpModule }, { kind: "component", type: i4.AXOtpComponent, selector: "ax-otp", inputs: ["state", "disabled", "readonly", "look", "name", "type", "mode", "length"], outputs: ["stateChange", "disabledChange", "lengthChange", "onCompleted"] }, { kind: "ngmodule", type: AXPasswordBoxModule }, { kind: "component", type: i4$1.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: AXTranslationModule }, { kind: "component", type: AXPUserAvatarComponent, selector: "axp-user-avatar", inputs: ["size", "userId"] }, { kind: "component", type: AXPVirtualKeypadComponent, selector: "axp-virtual-keypad", inputs: ["disabled", "showLetterHints", "look"], outputs: ["digitPress", "backspace", "keyPress"] }, { kind: "directive", type: AXFocusTrapDirective, selector: "[axFocusTrap]", inputs: ["axFocusTrapArrowNavigation"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
326
|
+
}
|
|
327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMSessionLockOverlayComponent, decorators: [{
|
|
328
|
+
type: Component,
|
|
329
|
+
args: [{ selector: 'axm-session-lock-overlay', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
|
|
330
|
+
CommonModule,
|
|
331
|
+
FormsModule,
|
|
332
|
+
AXButtonModule,
|
|
333
|
+
AXDecoratorModule,
|
|
334
|
+
AXOtpModule,
|
|
335
|
+
AXPasswordBoxModule,
|
|
336
|
+
AXTranslationModule,
|
|
337
|
+
AXPUserAvatarComponent,
|
|
338
|
+
AXPVirtualKeypadComponent,
|
|
339
|
+
AXFocusTrapDirective,
|
|
340
|
+
], host: {
|
|
341
|
+
class: 'axm-session-lock-overlay-host',
|
|
342
|
+
}, template: "<div class=\"axm-session-lock-overlay\" [class.axm-session-lock-overlay--desktop]=\"!useDeviceKeyboard()\"\n [class.axm-session-lock-overlay--mobile]=\"useDeviceKeyboard()\" (click)=\"onOverlayClick()\">\n <div class=\"axm-session-lock-overlay__panel\" axFocusTrap tabindex=\"-1\" (click)=\"$event.stopPropagation()\">\n <div class=\"axm-session-lock-overlay__profile\">\n <div class=\"axm-session-lock-overlay__avatar-wrap\">\n @if (userId(); as resolvedUserId) {\n <axp-user-avatar [size]=\"useDeviceKeyboard() ? 64 : 80\" [userId]=\"resolvedUserId\"></axp-user-avatar>\n }\n </div>\n\n @if (displayName()) {\n <p class=\"axm-session-lock-overlay__name m-0\">\n {{ displayName() }}\n </p>\n }\n\n <!-- @if (userRoleTitle()) {\n <p class=\"axm-session-lock-overlay__role m-0\">\n {{ userRoleTitle() }}\n </p>\n } -->\n\n @if (applicationBadge()) {\n <div class=\"axm-session-lock-overlay__user-badge\">\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n <span>{{ applicationBadge() }}</span>\n </div>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__divider\" aria-hidden=\"true\"></div>\n\n <div class=\"axm-session-lock-overlay__body\">\n <div class=\"axm-session-lock-overlay__body-main\">\n <div class=\"axm-session-lock-overlay__lock-badge\" aria-hidden=\"true\">\n <i class=\"fa-light fa-lock\"></i>\n </div>\n\n <h2 class=\"axm-session-lock-overlay__title m-0\">\n {{ '@auth:session-lock.title' | translate | async }}\n </h2>\n\n @if (unlockMode() === 'pin' && hasPinCode()) {\n <p class=\"axm-session-lock-overlay__instruction m-0\">\n {{ '@auth:session-lock.pin-instruction' | translate | async }}\n </p>\n\n <div class=\"axm-session-lock-overlay__otp\" [class.axm-session-lock-overlay__otp--error]=\"pinError()\">\n <ax-otp class=\"w-full block\" [type]=\"'number'\" [mode]=\"'star'\" [length]=\"pinLength\" [state]=\"otpState()\"\n [readonly]=\"useDeviceKeyboard()\" [disabled]=\"isVerifying()\" [ngModel]=\"pinInput()\"\n (ngModelChange)=\"onDesktopPinChange($event)\" (onCompleted)=\"onDesktopPinCompleted($event)\"></ax-otp>\n </div>\n } @else {\n <p class=\"axm-session-lock-overlay__instruction m-0\">\n {{ '@auth:session-lock.password-instruction' | translate | async }}\n </p>\n\n <div class=\"axm-session-lock-overlay__password\"\n [class.axm-session-lock-overlay__password--error]=\"passwordError()\">\n <ax-password-box class=\"axm-session-lock-overlay__password-input w-full\" look=\"outline\"\n [disabled]=\"isVerifying()\" [ngModel]=\"passwordInput()\" (ngModelChange)=\"onPasswordChange($event)\"\n (keydown.enter)=\"submitPassword()\" [placeholder]=\"'@auth:password' | translate | async\"></ax-password-box>\n </div>\n\n <div class=\"axm-session-lock-overlay__actions\">\n <ax-button class=\"axm-session-lock-overlay__action w-full rounded-lg\" look=\"solid\" color=\"primary\"\n [disabled]=\"isVerifying() || !passwordInput()\" [text]=\"'@auth:session-lock.unlock' | translate | async\"\n (onClick)=\"submitPassword()\"></ax-button>\n </div>\n }\n </div>\n\n @if (useDeviceKeyboard() && unlockMode() === 'pin' && hasPinCode()) {\n <axp-virtual-keypad class=\"axm-session-lock-overlay__keypad\" look=\"solid\" [disabled]=\"isVerifying()\"\n (digitPress)=\"onMobilePinDigit($event)\" (backspace)=\"onMobilePinBackspace()\">\n </axp-virtual-keypad>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__footer\">\n <div class=\"axm-session-lock-overlay__footer-actions\">\n @if (hasPinCode()) {\n <div class=\"axm-session-lock-overlay__footer-action\">\n @if (unlockMode() === 'pin') {\n <ax-button class=\"w-full\" look=\"blank\" color=\"primary\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.use-password-instead' | translate | async\"\n (onClick)=\"showPasswordUnlock($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n } @else {\n <ax-button class=\"w-full\" look=\"blank\" color=\"primary\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.use-pin-instead' | translate | async\" (onClick)=\"showPinUnlock($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__footer-divider\" aria-hidden=\"true\"></div>\n }\n\n <div class=\"axm-session-lock-overlay__footer-action\">\n <ax-button class=\"w-full\" look=\"blank\" color=\"danger\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.sign-out' | translate | async\" (onClick)=\"signOut($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-arrow-right-from-bracket\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: ["@layer properties;.axm-session-lock-overlay-host{display:contents}.axm-session-lock-overlay-shell{pointer-events:auto;position:fixed;box-sizing:border-box;inset:0;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}.axm-session-lock-overlay-shell .overlay-pane{--tw-border-style: none;border-style:none;background-color:transparent;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}.axm-session-lock-overlay{position:fixed;inset:0;box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:calc(var(--spacing, .25rem) * 6);--axm-lock-divider-color: rgb(var(--ax-sys-color-border-lightest-surface))}.axm-session-lock-overlay .axm-session-lock-overlay__panel{display:flex;width:100%;max-width:30rem;flex-direction:column;overflow:hidden;text-align:center;--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style: none;outline-style:none;border-radius:1.5rem;border-style:var(--tw-border-style);border-width:1px;background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest);animation:axm-axm-session-lock-overlay-enter .28s cubic-bezier(.22,1,.36,1)}.axm-session-lock-overlay .axm-session-lock-overlay__profile{display:flex;flex-direction:column;align-items:center;padding-inline:calc(var(--spacing, .25rem) * 8);padding-top:calc(var(--spacing, .25rem) * 9);padding-bottom:calc(var(--spacing, .25rem) * 5)}.axm-session-lock-overlay .axm-session-lock-overlay__avatar-wrap{margin-bottom:calc(var(--spacing, .25rem) * 3);display:flex;align-items:center;justify-content:center}.axm-session-lock-overlay .axm-session-lock-overlay__user-badge{margin-bottom:calc(var(--spacing, .25rem) * 4);display:inline-flex;align-items:center;gap:calc(var(--spacing, .25rem) * 1.5);border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:0px;padding-inline:calc(var(--spacing, .25rem) * 3.5);padding-block:calc(var(--spacing, .25rem) * 1.5);background-color:var(--color-primary-lighter);color:var(--color-on-primary-lighter);border-color:var(--color-border-primary-lighter);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: calc(var(--spacing, .25rem) * 4);line-height:calc(var(--spacing, .25rem) * 4);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.axm-session-lock-overlay .axm-session-lock-overlay__name{margin-bottom:calc(var(--spacing, .25rem) * 4);font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));--tw-leading: calc(var(--spacing, .25rem) * 6);line-height:calc(var(--spacing, .25rem) * 6);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-tracking: var(--tracking-tight, -.025em);letter-spacing:var(--tracking-tight, -.025em);color:rgba(var(--ax-sys-color-on-lightest-surface))}.axm-session-lock-overlay .axm-session-lock-overlay__divider{margin-inline:calc(var(--spacing, .25rem) * 8);border:none;border-top:1px solid var(--axm-lock-divider-color)}.axm-session-lock-overlay .axm-session-lock-overlay__body{display:flex;flex-direction:column;align-items:center;padding-inline:calc(var(--spacing, .25rem) * 8);padding-top:calc(var(--spacing, .25rem) * 6);padding-bottom:calc(var(--spacing, .25rem) * 8)}.axm-session-lock-overlay .axm-session-lock-overlay__body-main{display:flex;width:100%;flex-direction:column;align-items:center}.axm-session-lock-overlay .axm-session-lock-overlay__lock-badge{margin-bottom:calc(var(--spacing, .25rem) * 3);display:flex;width:calc(var(--spacing, .25rem) * 9);height:calc(var(--spacing, .25rem) * 9);align-items:center;justify-content:center;border-radius:calc(infinity * 1px);background-color:rgba(var(--ax-sys-color-primary-600));font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-primary-dark-surface))}.axm-session-lock-overlay .axm-session-lock-overlay__title{margin-bottom:calc(var(--spacing, .25rem) * 1.5);font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-leading: calc(var(--spacing, .25rem) * 6);line-height:calc(var(--spacing, .25rem) * 6);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:rgba(var(--ax-sys-color-on-lightest-surface))}.axm-session-lock-overlay .axm-session-lock-overlay__instruction{margin-bottom:calc(var(--spacing, .25rem) * 6);max-width:19rem;--tw-leading: var(--leading-snug, 1.375);line-height:var(--leading-snug, 1.375);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: calc(var(--spacing, .25rem) * 5);line-height:calc(var(--spacing, .25rem) * 5);color:rgba(var(--ax-sys-color-on-lighter-surface));opacity:70%}.axm-session-lock-overlay .axm-session-lock-overlay__keypad{margin-bottom:calc(var(--spacing, .25rem) * 2);width:100%}.axm-session-lock-overlay .axm-session-lock-overlay__otp{margin-bottom:calc(var(--spacing, .25rem) * 6);width:100%;max-width:15rem}.axm-session-lock-overlay .axm-session-lock-overlay__otp .input{border-color:rgb(var(--ax-sys-color-border-light-surface));background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface))}.axm-session-lock-overlay .axm-session-lock-overlay__otp .input:focus{border-color:rgb(var(--ax-sys-color-primary-600));box-shadow:none;outline:none}.axm-session-lock-overlay .axm-session-lock-overlay__otp--error{animation:axm-axm-session-lock-overlay-shake .42s ease}.axm-session-lock-overlay .axm-session-lock-overlay__otp--error .input{border-color:rgba(var(--ax-sys-color-danger-500))!important}.axm-session-lock-overlay .axm-session-lock-overlay__password{margin-bottom:calc(var(--spacing, .25rem) * 3);width:100%}.axm-session-lock-overlay .axm-session-lock-overlay__password--error{animation:axm-axm-session-lock-overlay-shake .42s ease}.axm-session-lock-overlay .axm-session-lock-overlay__password-input .input,.axm-session-lock-overlay .axm-session-lock-overlay__password-input input{min-height:2.75rem;border-radius:var(--radius-lg, .5rem);background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest);color:rgba(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:is(.axm-session-lock-overlay .axm-session-lock-overlay__password-input .input,.axm-session-lock-overlay .axm-session-lock-overlay__password-input input):focus{border-color:rgb(var(--ax-sys-color-primary-600));box-shadow:none;outline:none}.axm-session-lock-overlay .axm-session-lock-overlay__actions{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 3)}.axm-session-lock-overlay .axm-session-lock-overlay__action{position:relative;z-index:1;margin-top:calc(var(--spacing, .25rem) * 3)}.axm-session-lock-overlay .axm-session-lock-overlay__footer{background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest);padding-inline:calc(var(--spacing, .25rem) * 8);padding-block:calc(var(--spacing, .25rem) * 4);border:none;border-top:1px solid var(--axm-lock-divider-color)}.axm-session-lock-overlay .axm-session-lock-overlay__footer-actions{display:flex;width:100%;align-items:center;justify-content:center;gap:var(--spacing, .25rem)}.axm-session-lock-overlay .axm-session-lock-overlay__footer-action{display:flex;min-width:0;flex:1;align-items:center;justify-content:center;padding-inline:calc(var(--spacing, .25rem) * 2)}.axm-session-lock-overlay .axm-session-lock-overlay__footer-action ax-button{justify-content:center}.axm-session-lock-overlay .axm-session-lock-overlay__footer-divider{margin-inline:calc(var(--spacing, .25rem) * 2);height:calc(var(--spacing, .25rem) * 4);width:1px;flex-shrink:0;background-color:var(--axm-lock-divider-color)}.axm-session-lock-overlay.axm-session-lock-overlay--desktop{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);background-color:rgb(var(--ax-sys-color-darkest-surface) / .14);backdrop-filter:blur(10px) saturate(1.02)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile{align-items:stretch;justify-content:stretch;padding:0;background-color:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;--axm-lock-divider-color: rgb(var(--ax-sys-color-primary-lightest-surface));--axm-lock-panel-gradient-start: var(--ax-sys-color-lightest-surface);--axm-lock-panel-gradient-mid: var(--ax-sys-color-primary-50);--axm-lock-panel-gradient-end: var(--ax-sys-color-primary-50);--axm-lock-mobile-inline-padding: clamp(1rem, 4vw, 1.5rem);--axm-lock-mobile-divider-gap: clamp(1rem, 2.5vh, 1.5rem);--axm-lock-mobile-key-gap: clamp(.375rem, 1.2vh, .75rem);--axm-lock-mobile-key-size: min( 4.75rem, calc( ( 100vw - (var(--axm-lock-mobile-inline-padding) * 2) - (var(--axm-lock-mobile-key-gap) * 2) ) / 3 ) )}@supports (color: color-mix(in lab,red,red)){.axm-session-lock-overlay.axm-session-lock-overlay--mobile{--axm-lock-divider-color: color-mix( in srgb, rgb(var(--ax-sys-color-primary-lightest-surface)) 90%, rgb(var(--ax-sys-color-lightest-surface)) )}}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__panel{display:flex;height:100dvh;min-height:100dvh;max-width:none;flex-direction:column;border-radius:0;border-style:var(--tw-border-style);border-width:0px;--tw-shadow: 0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background:linear-gradient(180deg,rgb(var(--axm-lock-panel-gradient-start)),rgb(var(--axm-lock-panel-gradient-mid)) 65%,rgb(var(--axm-lock-panel-gradient-end)))}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__profile{flex-shrink:0;padding:clamp(1rem,3.5vh,1.5rem) var(--axm-lock-mobile-inline-padding) var(--axm-lock-mobile-divider-gap)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__avatar-wrap{margin-bottom:calc(var(--spacing, .25rem) * 2)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__name{margin-bottom:calc(var(--spacing, .25rem) * 2);font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-leading: calc(var(--spacing, .25rem) * 5);line-height:calc(var(--spacing, .25rem) * 5)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__user-badge{margin-bottom:0}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__divider{margin:0;flex-shrink:0;margin-inline:var(--axm-lock-mobile-inline-padding);border:none;border-top:1px solid var(--axm-lock-divider-color)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__body{display:flex;min-height:0;flex:1;flex-direction:column;justify-content:space-between;padding:var(--axm-lock-mobile-divider-gap) var(--axm-lock-mobile-inline-padding) var(--axm-lock-mobile-divider-gap)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__body:not(:has(.axm-session-lock-overlay__keypad)){justify-content:center}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__body-main{display:flex;width:100%;flex-shrink:0;flex-direction:column;align-items:center;gap:calc(var(--spacing, .25rem) * 4);padding-inline:clamp(.75rem,3vw,1.25rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__lock-badge{margin-bottom:0;width:clamp(2.25rem,6vh,2.75rem);height:clamp(2.25rem,6vh,2.75rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__title{margin-bottom:0}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__instruction{margin-bottom:0;max-width:20rem;padding-inline:clamp(.5rem,2vw,1rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__otp{margin-bottom:0;min-height:0;max-width:min(15rem,100%);padding-top:clamp(.25rem,1vh,.75rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__keypad{display:flex;width:100%;flex-shrink:0;align-items:center;justify-content:center;--axp-keypad-key-size: var(--axm-lock-mobile-key-size);--axp-keypad-gap: var(--axm-lock-mobile-key-gap)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__keypad .axp-virtual-keypad .__digit{font-size:clamp(1.625rem,5.5vw,2rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__keypad .axp-virtual-keypad .__letters{font-size:clamp(.625rem,2vw,.75rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__keypad .axp-virtual-keypad .__key--action i{font-size:clamp(1.375rem,4.5vw,1.625rem)}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__footer{margin-top:0;flex-shrink:0;background-color:transparent;border:none;border-top:1px solid var(--axm-lock-divider-color);padding:var(--axm-lock-mobile-divider-gap) var(--axm-lock-mobile-inline-padding) max(var(--axm-lock-mobile-divider-gap),env(safe-area-inset-bottom,0px))}.axm-session-lock-overlay.axm-session-lock-overlay--mobile .axm-session-lock-overlay__footer-divider{background-color:var(--axm-lock-divider-color)}.dark .axm-session-lock-overlay--desktop{--axm-lock-divider-color: rgb(var(--ax-sys-color-border-light-surface));background-color:rgb(var(--ax-sys-color-darkest-surface) / .55)}.dark .axm-session-lock-overlay--mobile{--axm-lock-divider-color: rgb(var(--ax-sys-color-border-primary-lightest-surface));--axm-lock-panel-gradient-end: var(--ax-sys-color-lighter-surface);--axm-lock-panel-gradient-mid: var(--ax-sys-color-darkest-surface);--axm-lock-panel-gradient-start: var(--ax-sys-color-primary-darker-surface)}@supports (color: color-mix(in lab,red,red)){.dark .axm-session-lock-overlay--mobile{--axm-lock-divider-color: color-mix( in srgb, rgb(var(--ax-sys-color-border-primary-lightest-surface)) 28%, rgb(var(--ax-sys-color-lighter-surface)) )}}.dark .axm-session-lock-overlay__otp .input{border-color:rgb(var(--ax-sys-color-border-light-surface));background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface))}.dark .axm-session-lock-overlay__otp .input:focus{border-color:rgb(var(--ax-sys-color-primary-400))}.dark .axm-session-lock-overlay__password-input .input,.dark .axm-session-lock-overlay__password-input input{border-color:rgb(var(--ax-sys-color-border-light-surface));background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface))}:is(.dark .axm-session-lock-overlay__password-input .input,.dark .axm-session-lock-overlay__password-input input):focus{border-color:rgb(var(--ax-sys-color-primary-400))}.dark .axm-session-lock-overlay__panel{border-style:var(--tw-border-style);border-width:1px;background-color:var(--color-darker);color:var(--color-on-darker);border-color:var(--color-border-darker);--tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / .25));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.dark .axm-session-lock-overlay__footer{border-style:var(--tw-border-style);border-width:1px;background-color:var(--color-darker);color:var(--color-on-darker);border-color:var(--color-border-darker)}@keyframes axm-axm-session-lock-overlay-enter{0%{opacity:0;transform:translateY(.75rem) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes axm-axm-session-lock-overlay-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-.35rem)}40%,80%{transform:translate(.35rem)}}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-tracking{syntax: \"*\"; inherits: false;}@property --tw-backdrop-blur{syntax: \"*\"; inherits: false;}@property --tw-backdrop-brightness{syntax: \"*\"; inherits: false;}@property --tw-backdrop-contrast{syntax: \"*\"; inherits: false;}@property --tw-backdrop-grayscale{syntax: \"*\"; inherits: false;}@property --tw-backdrop-hue-rotate{syntax: \"*\"; inherits: false;}@property --tw-backdrop-invert{syntax: \"*\"; inherits: false;}@property --tw-backdrop-opacity{syntax: \"*\"; inherits: false;}@property --tw-backdrop-saturate{syntax: \"*\"; inherits: false;}@property --tw-backdrop-sepia{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-border-style: solid;--tw-leading: initial;--tw-font-weight: initial;--tw-tracking: initial;--tw-backdrop-blur: initial;--tw-backdrop-brightness: initial;--tw-backdrop-contrast: initial;--tw-backdrop-grayscale: initial;--tw-backdrop-hue-rotate: initial;--tw-backdrop-invert: initial;--tw-backdrop-opacity: initial;--tw-backdrop-saturate: initial;--tw-backdrop-sepia: initial}}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
343
|
+
}], propDecorators: { otpInput: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXOtpComponent), { isSignal: true }] }], passwordBox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPasswordBoxComponent), { isSignal: true }] }] } });
|
|
344
|
+
|
|
345
|
+
export { AXMSessionLockOverlayComponent };
|
|
346
|
+
//# sourceMappingURL=acorex-platform-module-auth-client-session-lock-overlay.component-CN1JqPBW.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-auth-client-session-lock-overlay.component-DqXGuIgN.mjs","sources":["../../../../libs/modules/auth/client/src/lib/features/session-lock/session-lock-overlay.component.ts","../../../../libs/modules/auth/client/src/lib/features/session-lock/session-lock-overlay.component.html"],"sourcesContent":["import { AXFocusTrapDirective } from '@acorex/cdk/focus-trap';\nimport { AXClickEvent, AXComponentState } from '@acorex/cdk/common';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXOtpCompletedEvent, AXOtpComponent, AXOtpModule } from '@acorex/components/otp';\nimport { AXPasswordBoxComponent, AXPasswordBoxModule } from '@acorex/components/password-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPDeviceService } from '@acorex-platform/framework-client/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPUserAvatarComponent, AXPVirtualKeypadComponent } from '@acorex-platform/framework-client/layout/components';\nimport { CommonModule } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n inject,\n Injector,\n OnInit,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { defaultTo, first, get } from 'lodash';\nimport { AXP_AUTH_PIN_CODE_LENGTH, AXP_AUTH_PIN_CODE_PATTERN } from '../../shared/constants/pin-code.constants';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { AXMAuthCommandKeys } from '@acorex-platform/module-auth-client/contracts';\nimport { AXPIdleLockService } from '../../shared/services/idle-lock.service';\n\n//#region ---- Session lock overlay ----\n\ntype AXMSessionLockUnlockMode = 'pin' | 'password';\n\nconst SECURITY_MANAGEMENT_MODULE = 'SecurityManagement';\nconst SECURITY_MANAGEMENT_USER_ENTITY = 'User';\n\n@Component({\n selector: 'axm-session-lock-overlay',\n templateUrl: './session-lock-overlay.component.html',\n styleUrl: './session-lock-overlay.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n CommonModule,\n FormsModule,\n AXButtonModule,\n AXDecoratorModule,\n AXOtpModule,\n AXPasswordBoxModule,\n AXTranslationModule,\n AXPUserAvatarComponent,\n AXPVirtualKeypadComponent,\n AXFocusTrapDirective,\n ],\n host: {\n class: 'axm-session-lock-overlay-host',\n },\n})\nexport class AXMSessionLockOverlayComponent implements OnInit {\n //#region ---- Constants ----\n\n protected readonly pinLength = AXP_AUTH_PIN_CODE_LENGTH;\n\n //#endregion\n\n //#region ---- State ----\n\n protected readonly pinInput = signal('');\n protected readonly passwordInput = signal('');\n protected readonly pinError = signal(false);\n protected readonly passwordError = signal(false);\n protected readonly isVerifying = signal(false);\n protected readonly unlockMode = signal<AXMSessionLockUnlockMode>('pin');\n protected readonly userRoleTitle = signal('');\n\n protected readonly hasPinCode = computed(() => this.idleLockService.hasPinCode());\n\n protected readonly useDeviceKeyboard = computed(() => !this.deviceService.isDesktopDevice());\n protected readonly displayName = computed(() => defaultTo(this.sessionService.user?.title, ''));\n protected readonly userId = computed(() => this.sessionService.user?.id ?? '');\n protected readonly applicationBadge = computed(() => {\n const application = this.sessionService.application;\n return defaultTo(application?.title, defaultTo(application?.name, ''));\n });\n protected readonly otpState = computed((): AXComponentState => (this.pinError() ? 'error' : 'clear'));\n\n //#endregion\n\n //#region ---- View children ----\n\n private readonly otpInput = viewChild(AXOtpComponent);\n private readonly passwordBox = viewChild(AXPasswordBoxComponent);\n\n //#endregion\n\n //#region ---- Services & Dependencies ----\n\n protected readonly idleLockService = inject(AXPIdleLockService);\n protected readonly sessionService = inject(AXPSessionService);\n private readonly deviceService = inject(AXPDeviceService);\n private readonly entityService = inject(AXPEntityService);\n private readonly toastService = inject(AXToastService);\n private readonly translateService = inject(AXTranslationService);\n private readonly commandService = inject(AXPCommandService);\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n //#endregion\n\n //#region ---- Lifecycle Methods ----\n\n ngOnInit(): void {\n void this.initializeUnlockMode();\n void this.loadUserRoleTitle();\n this.bindRefocusOnInteraction();\n }\n\n //#endregion\n\n //#region ---- UI Handlers ----\n\n protected onOverlayClick(): void {\n if (!this.isUnlockEntryFocused()) {\n this.focusUnlockEntry();\n }\n }\n\n protected onDesktopPinChange(value: string): void {\n const normalized = defaultTo(value, '');\n\n if (this.pinError() && normalized.length > 0) {\n this.pinError.set(false);\n }\n\n this.pinInput.set(normalized);\n }\n\n protected onDesktopPinCompleted(event: AXOtpCompletedEvent): void {\n if (!event.isCompleted || this.isVerifying()) {\n return;\n }\n\n this.pinInput.set(defaultTo(event.value, ''));\n void this.submitPin();\n }\n\n protected onMobilePinDigit(digit: number): void {\n if (this.isVerifying()) {\n return;\n }\n\n const current = this.pinInput();\n if (current.length >= AXP_AUTH_PIN_CODE_LENGTH) {\n return;\n }\n\n const next = `${current}${digit}`;\n\n if (this.pinError() && next.length > 0) {\n this.pinError.set(false);\n }\n\n this.pinInput.set(next);\n\n if (next.length === AXP_AUTH_PIN_CODE_LENGTH) {\n void this.submitPin();\n }\n }\n\n protected onMobilePinBackspace(): void {\n if (this.isVerifying()) {\n return;\n }\n\n const current = this.pinInput();\n if (!current.length) {\n return;\n }\n\n const next = current.slice(0, -1);\n\n if (this.pinError() && next.length > 0) {\n this.pinError.set(false);\n }\n\n this.pinInput.set(next);\n }\n\n protected onPasswordChange(value: string): void {\n this.passwordInput.set(defaultTo(value, ''));\n this.passwordError.set(false);\n }\n\n protected showPasswordUnlock(event?: AXClickEvent): void {\n event?.nativeEvent.stopPropagation();\n this.unlockMode.set('password');\n this.resetPinInput();\n this.focusUnlockEntry();\n }\n\n protected showPinUnlock(event?: AXClickEvent): void {\n event?.nativeEvent.stopPropagation();\n\n if (!this.hasPinCode()) {\n return;\n }\n\n this.unlockMode.set('pin');\n this.passwordInput.set('');\n this.passwordError.set(false);\n this.focusUnlockEntry();\n }\n\n protected submitPassword(): void {\n void this.verifyPasswordAndUnlock();\n }\n\n protected signOut(event?: AXClickEvent): void {\n event?.nativeEvent.stopPropagation();\n void this.commandService.execute(AXMAuthCommandKeys.Session.Signout, {});\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private async initializeUnlockMode(): Promise<void> {\n await this.idleLockService.refreshPinState();\n this.resetUnlockState();\n this.focusUnlockEntry();\n }\n\n private getDefaultUnlockMode(): AXMSessionLockUnlockMode {\n return this.idleLockService.hasPinCode() ? 'pin' : 'password';\n }\n\n private async loadUserRoleTitle(): Promise<void> {\n const userId = this.sessionService.user?.id;\n if (!userId) {\n this.userRoleTitle.set('');\n return;\n }\n\n try {\n const user = await this.entityService\n .withEntity(SECURITY_MANAGEMENT_MODULE, SECURITY_MANAGEMENT_USER_ENTITY)\n .data<string>()\n .byKey(userId);\n\n const roleTitle = defaultTo(get(first(get(user, 'roles', [])), 'title'), '');\n this.userRoleTitle.set(roleTitle);\n } catch (error) {\n console.error('Failed to load user role for session lock overlay', error);\n this.userRoleTitle.set('');\n }\n }\n\n private async submitPin(): Promise<void> {\n if (this.isVerifying()) {\n return;\n }\n\n const pin = this.pinInput();\n if (!AXP_AUTH_PIN_CODE_PATTERN.test(pin)) {\n return;\n }\n\n this.isVerifying.set(true);\n try {\n if (this.idleLockService.verifyPin(pin)) {\n this.idleLockService.unlock();\n this.resetUnlockState();\n return;\n }\n\n await this.showIncorrectPinError();\n this.applyPinValidationError();\n } finally {\n this.isVerifying.set(false);\n }\n }\n\n private async verifyPasswordAndUnlock(): Promise<void> {\n if (this.isVerifying() || !this.passwordInput()) {\n return;\n }\n\n this.isVerifying.set(true);\n try {\n if (await this.idleLockService.verifyPassword(this.passwordInput())) {\n this.idleLockService.unlock();\n this.resetUnlockState();\n return;\n }\n\n await this.showIncorrectPasswordError();\n this.triggerPasswordError();\n this.passwordInput.set('');\n this.focusUnlockEntry();\n } finally {\n this.isVerifying.set(false);\n }\n }\n\n private resetUnlockState(): void {\n this.unlockMode.set(this.getDefaultUnlockMode());\n this.resetPinInput();\n this.passwordInput.set('');\n this.passwordError.set(false);\n this.pinError.set(false);\n }\n\n private resetPinInput(clearError = true): void {\n if (clearError) {\n this.pinError.set(false);\n }\n\n this.pinInput.set('');\n this.otpInput()?.reset();\n }\n\n private applyPinValidationError(): void {\n this.resetPinInput(false);\n\n afterNextRender(\n () => {\n this.pinError.set(true);\n this.syncOtpErrorState();\n\n if (!this.useDeviceKeyboard()) {\n this.otpInput()?.focus();\n }\n },\n { injector: this.injector },\n );\n }\n\n private syncOtpErrorState(): void {\n const otp = this.otpInput();\n if (otp) {\n otp.state = 'error';\n }\n }\n\n private focusUnlockEntry(): void {\n afterNextRender(\n () => {\n if (this.unlockMode() === 'password') {\n this.focusPasswordInput();\n return;\n }\n\n if (!this.useDeviceKeyboard()) {\n this.otpInput()?.focus();\n }\n },\n { injector: this.injector },\n );\n }\n\n private focusPasswordInput(): void {\n const attemptFocus = (): boolean => {\n const passwordBox = this.passwordBox();\n if (!passwordBox) {\n return false;\n }\n\n passwordBox.focus();\n\n requestAnimationFrame(() => {\n if (!this.isUnlockEntryFocused()) {\n passwordBox.focus();\n }\n });\n\n return true;\n };\n\n if (!attemptFocus()) {\n afterNextRender(() => attemptFocus(), { injector: this.injector });\n }\n }\n\n private bindRefocusOnInteraction(): void {\n const onKeydown = (event: KeyboardEvent): void => {\n if (this.isUnlockEntryFocused() || event.defaultPrevented) {\n return;\n }\n\n this.focusUnlockEntry();\n };\n\n document.addEventListener('keydown', onKeydown, true);\n this.destroyRef.onDestroy(() => {\n document.removeEventListener('keydown', onKeydown, true);\n });\n }\n\n private isUnlockEntryFocused(): boolean {\n const active = document.activeElement;\n if (!(active instanceof HTMLElement)) {\n return false;\n }\n\n if (this.unlockMode() === 'password') {\n return active.closest('ax-password-box') !== null;\n }\n\n if (this.useDeviceKeyboard()) {\n return active.closest('axp-virtual-keypad') !== null;\n }\n\n return active.closest('ax-otp') !== null;\n }\n\n private triggerPasswordError(): void {\n this.passwordError.set(true);\n setTimeout(() => this.passwordError.set(false), 450);\n }\n\n private async showIncorrectPinError(): Promise<void> {\n const content = await this.translateService.translateAsync('@auth:session-lock.messages.incorrect-pin');\n const title = await this.translateService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'danger', title, content, closeButton: true });\n }\n\n private async showIncorrectPasswordError(): Promise<void> {\n const content = await this.translateService.translateAsync('@auth:session-lock.messages.incorrect-password');\n const title = await this.translateService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'danger', title, content, closeButton: true });\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-session-lock-overlay\" [class.axm-session-lock-overlay--desktop]=\"!useDeviceKeyboard()\"\n [class.axm-session-lock-overlay--mobile]=\"useDeviceKeyboard()\" (click)=\"onOverlayClick()\">\n <div class=\"axm-session-lock-overlay__panel\" axFocusTrap tabindex=\"-1\" (click)=\"$event.stopPropagation()\">\n <div class=\"axm-session-lock-overlay__profile\">\n <div class=\"axm-session-lock-overlay__avatar-wrap\">\n @if (userId(); as resolvedUserId) {\n <axp-user-avatar [size]=\"useDeviceKeyboard() ? 64 : 80\" [userId]=\"resolvedUserId\"></axp-user-avatar>\n }\n </div>\n\n @if (displayName()) {\n <p class=\"axm-session-lock-overlay__name m-0\">\n {{ displayName() }}\n </p>\n }\n\n <!-- @if (userRoleTitle()) {\n <p class=\"axm-session-lock-overlay__role m-0\">\n {{ userRoleTitle() }}\n </p>\n } -->\n\n @if (applicationBadge()) {\n <div class=\"axm-session-lock-overlay__user-badge\">\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n <span>{{ applicationBadge() }}</span>\n </div>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__divider\" aria-hidden=\"true\"></div>\n\n <div class=\"axm-session-lock-overlay__body\">\n <div class=\"axm-session-lock-overlay__body-main\">\n <div class=\"axm-session-lock-overlay__lock-badge\" aria-hidden=\"true\">\n <i class=\"fa-light fa-lock\"></i>\n </div>\n\n <h2 class=\"axm-session-lock-overlay__title m-0\">\n {{ '@auth:session-lock.title' | translate | async }}\n </h2>\n\n @if (unlockMode() === 'pin' && hasPinCode()) {\n <p class=\"axm-session-lock-overlay__instruction m-0\">\n {{ '@auth:session-lock.pin-instruction' | translate | async }}\n </p>\n\n <div class=\"axm-session-lock-overlay__otp\" [class.axm-session-lock-overlay__otp--error]=\"pinError()\">\n <ax-otp class=\"w-full block\" [type]=\"'number'\" [mode]=\"'star'\" [length]=\"pinLength\" [state]=\"otpState()\"\n [readonly]=\"useDeviceKeyboard()\" [disabled]=\"isVerifying()\" [ngModel]=\"pinInput()\"\n (ngModelChange)=\"onDesktopPinChange($event)\" (onCompleted)=\"onDesktopPinCompleted($event)\"></ax-otp>\n </div>\n } @else {\n <p class=\"axm-session-lock-overlay__instruction m-0\">\n {{ '@auth:session-lock.password-instruction' | translate | async }}\n </p>\n\n <div class=\"axm-session-lock-overlay__password\"\n [class.axm-session-lock-overlay__password--error]=\"passwordError()\">\n <ax-password-box class=\"axm-session-lock-overlay__password-input w-full\" look=\"outline\"\n [disabled]=\"isVerifying()\" [ngModel]=\"passwordInput()\" (ngModelChange)=\"onPasswordChange($event)\"\n (keydown.enter)=\"submitPassword()\" [placeholder]=\"'@auth:password' | translate | async\"></ax-password-box>\n </div>\n\n <div class=\"axm-session-lock-overlay__actions\">\n <ax-button class=\"axm-session-lock-overlay__action w-full rounded-lg\" look=\"solid\" color=\"primary\"\n [disabled]=\"isVerifying() || !passwordInput()\" [text]=\"'@auth:session-lock.unlock' | translate | async\"\n (onClick)=\"submitPassword()\"></ax-button>\n </div>\n }\n </div>\n\n @if (useDeviceKeyboard() && unlockMode() === 'pin' && hasPinCode()) {\n <axp-virtual-keypad class=\"axm-session-lock-overlay__keypad\" look=\"solid\" [disabled]=\"isVerifying()\"\n (digitPress)=\"onMobilePinDigit($event)\" (backspace)=\"onMobilePinBackspace()\">\n </axp-virtual-keypad>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__footer\">\n <div class=\"axm-session-lock-overlay__footer-actions\">\n @if (hasPinCode()) {\n <div class=\"axm-session-lock-overlay__footer-action\">\n @if (unlockMode() === 'pin') {\n <ax-button class=\"w-full\" look=\"blank\" color=\"primary\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.use-password-instead' | translate | async\"\n (onClick)=\"showPasswordUnlock($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n } @else {\n <ax-button class=\"w-full\" look=\"blank\" color=\"primary\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.use-pin-instead' | translate | async\" (onClick)=\"showPinUnlock($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__footer-divider\" aria-hidden=\"true\"></div>\n }\n\n <div class=\"axm-session-lock-overlay__footer-action\">\n <ax-button class=\"w-full\" look=\"blank\" color=\"danger\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.sign-out' | translate | async\" (onClick)=\"signOut($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-arrow-right-from-bracket\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n </div>\n </div>\n</div>"],"names":["i5","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,0BAA0B,GAAG,oBAAoB;AACvD,MAAM,+BAA+B,GAAG,MAAM;MAwBjC,8BAA8B,CAAA;AAtB3C,IAAA,WAAA,GAAA;;QAyBqB,IAAA,CAAA,SAAS,GAAG,wBAAwB;;;AAMpC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,EAAE,+EAAC;AACrB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,EAAE,oFAAC;AAC1B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,+EAAC;AACxB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,KAAK,oFAAC;AAC7B,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,KAAK,kFAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA2B,KAAK,iFAAC;AACpD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,EAAE,oFAAC;AAE1B,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,iFAAC;AAE9D,QAAA,IAAA,CAAA,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,wFAAC;AACzE,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,K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BACX,mBAAmB;wBACnB,mBAAmB;wBACnB,sBAAsB;wBACtB,yBAAyB;wBACzB,oBAAoB;qBACrB,EAAA,IAAA,EACK;AACJ,wBAAA,KAAK,EAAE,+BAA+B;AACvC,qBAAA,EAAA,QAAA,EAAA,uxKAAA,EAAA,MAAA,EAAA,CAAA,82jBAAA,CAAA,EAAA;AAkCqC,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,cAAc,0FACX,sBAAsB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-auth-client-session-lock-overlay.component-CN1JqPBW.mjs","sources":["../../../../libs/modules/auth/client/src/lib/features/session-lock/session-lock-overlay.component.ts","../../../../libs/modules/auth/client/src/lib/features/session-lock/session-lock-overlay.component.html"],"sourcesContent":["import { AXFocusTrapDirective } from '@acorex/cdk/focus-trap';\nimport { AXClickEvent, AXComponentState } from '@acorex/cdk/common';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXOtpCompletedEvent, AXOtpComponent, AXOtpModule } from '@acorex/components/otp';\nimport { AXPasswordBoxComponent, AXPasswordBoxModule } from '@acorex/components/password-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPDeviceService } from '@acorex-platform/framework-client/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPUserAvatarComponent, AXPVirtualKeypadComponent } from '@acorex-platform/framework-client/layout/components';\nimport { CommonModule } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n inject,\n Injector,\n OnInit,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { defaultTo, first, get } from 'lodash';\nimport { AXP_AUTH_PIN_CODE_LENGTH, AXP_AUTH_PIN_CODE_PATTERN } from '../../shared/constants/pin-code.constants';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { AXMAuthCommandKeys } from '@acorex-platform/module-auth-client/contracts';\nimport { AXPIdleLockService } from '../../shared/services/idle-lock.service';\n\n//#region ---- Session lock overlay ----\n\ntype AXMSessionLockUnlockMode = 'pin' | 'password';\n\nconst SECURITY_MANAGEMENT_MODULE = 'SecurityManagement';\nconst SECURITY_MANAGEMENT_USER_ENTITY = 'User';\n\n@Component({\n selector: 'axm-session-lock-overlay',\n templateUrl: './session-lock-overlay.component.html',\n styleUrl: './session-lock-overlay.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n CommonModule,\n FormsModule,\n AXButtonModule,\n AXDecoratorModule,\n AXOtpModule,\n AXPasswordBoxModule,\n AXTranslationModule,\n AXPUserAvatarComponent,\n AXPVirtualKeypadComponent,\n AXFocusTrapDirective,\n ],\n host: {\n class: 'axm-session-lock-overlay-host',\n },\n})\nexport class AXMSessionLockOverlayComponent implements OnInit {\n //#region ---- Constants ----\n\n protected readonly pinLength = AXP_AUTH_PIN_CODE_LENGTH;\n\n //#endregion\n\n //#region ---- State ----\n\n protected readonly pinInput = signal('');\n protected readonly passwordInput = signal('');\n protected readonly pinError = signal(false);\n protected readonly passwordError = signal(false);\n protected readonly isVerifying = signal(false);\n protected readonly unlockMode = signal<AXMSessionLockUnlockMode>('pin');\n protected readonly userRoleTitle = signal('');\n\n protected readonly hasPinCode = computed(() => this.idleLockService.hasPinCode());\n\n protected readonly useDeviceKeyboard = computed(() => !this.deviceService.isDesktopDevice());\n protected readonly displayName = computed(() => defaultTo(this.sessionService.user?.title, ''));\n protected readonly userId = computed(() => this.sessionService.user?.id ?? '');\n protected readonly applicationBadge = computed(() => {\n const application = this.sessionService.application;\n return defaultTo(application?.title, defaultTo(application?.name, ''));\n });\n protected readonly otpState = computed((): AXComponentState => (this.pinError() ? 'error' : 'clear'));\n\n //#endregion\n\n //#region ---- View children ----\n\n private readonly otpInput = viewChild(AXOtpComponent);\n private readonly passwordBox = viewChild(AXPasswordBoxComponent);\n\n //#endregion\n\n //#region ---- Services & Dependencies ----\n\n protected readonly idleLockService = inject(AXPIdleLockService);\n protected readonly sessionService = inject(AXPSessionService);\n private readonly deviceService = inject(AXPDeviceService);\n private readonly entityService = inject(AXPEntityService);\n private readonly toastService = inject(AXToastService);\n private readonly translateService = inject(AXTranslationService);\n private readonly commandService = inject(AXPCommandService);\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n //#endregion\n\n //#region ---- Lifecycle Methods ----\n\n ngOnInit(): void {\n void this.initializeUnlockMode();\n void this.loadUserRoleTitle();\n this.bindRefocusOnInteraction();\n }\n\n //#endregion\n\n //#region ---- UI Handlers ----\n\n protected onOverlayClick(): void {\n if (!this.isUnlockEntryFocused()) {\n this.focusUnlockEntry();\n }\n }\n\n protected onDesktopPinChange(value: string): void {\n const normalized = defaultTo(value, '');\n\n if (this.pinError() && normalized.length > 0) {\n this.pinError.set(false);\n }\n\n this.pinInput.set(normalized);\n }\n\n protected onDesktopPinCompleted(event: AXOtpCompletedEvent): void {\n if (!event.isCompleted || this.isVerifying()) {\n return;\n }\n\n this.pinInput.set(defaultTo(event.value, ''));\n void this.submitPin();\n }\n\n protected onMobilePinDigit(digit: number): void {\n if (this.isVerifying()) {\n return;\n }\n\n const current = this.pinInput();\n if (current.length >= AXP_AUTH_PIN_CODE_LENGTH) {\n return;\n }\n\n const next = `${current}${digit}`;\n\n if (this.pinError() && next.length > 0) {\n this.pinError.set(false);\n }\n\n this.pinInput.set(next);\n\n if (next.length === AXP_AUTH_PIN_CODE_LENGTH) {\n void this.submitPin();\n }\n }\n\n protected onMobilePinBackspace(): void {\n if (this.isVerifying()) {\n return;\n }\n\n const current = this.pinInput();\n if (!current.length) {\n return;\n }\n\n const next = current.slice(0, -1);\n\n if (this.pinError() && next.length > 0) {\n this.pinError.set(false);\n }\n\n this.pinInput.set(next);\n }\n\n protected onPasswordChange(value: string): void {\n this.passwordInput.set(defaultTo(value, ''));\n this.passwordError.set(false);\n }\n\n protected showPasswordUnlock(event?: AXClickEvent): void {\n event?.nativeEvent.stopPropagation();\n this.unlockMode.set('password');\n this.resetPinInput();\n this.focusUnlockEntry();\n }\n\n protected showPinUnlock(event?: AXClickEvent): void {\n event?.nativeEvent.stopPropagation();\n\n if (!this.hasPinCode()) {\n return;\n }\n\n this.unlockMode.set('pin');\n this.passwordInput.set('');\n this.passwordError.set(false);\n this.focusUnlockEntry();\n }\n\n protected submitPassword(): void {\n void this.verifyPasswordAndUnlock();\n }\n\n protected signOut(event?: AXClickEvent): void {\n event?.nativeEvent.stopPropagation();\n void this.commandService.execute(AXMAuthCommandKeys.Session.Signout, {});\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private async initializeUnlockMode(): Promise<void> {\n await this.idleLockService.refreshPinState();\n this.resetUnlockState();\n this.focusUnlockEntry();\n }\n\n private getDefaultUnlockMode(): AXMSessionLockUnlockMode {\n return this.idleLockService.hasPinCode() ? 'pin' : 'password';\n }\n\n private async loadUserRoleTitle(): Promise<void> {\n const userId = this.sessionService.user?.id;\n if (!userId) {\n this.userRoleTitle.set('');\n return;\n }\n\n try {\n const user = await this.entityService\n .withEntity(SECURITY_MANAGEMENT_MODULE, SECURITY_MANAGEMENT_USER_ENTITY)\n .data<string>()\n .byKey(userId);\n\n const roleTitle = defaultTo(get(first(get(user, 'roles', [])), 'title'), '');\n this.userRoleTitle.set(roleTitle);\n } catch (error) {\n console.error('Failed to load user role for session lock overlay', error);\n this.userRoleTitle.set('');\n }\n }\n\n private async submitPin(): Promise<void> {\n if (this.isVerifying()) {\n return;\n }\n\n const pin = this.pinInput();\n if (!AXP_AUTH_PIN_CODE_PATTERN.test(pin)) {\n return;\n }\n\n this.isVerifying.set(true);\n try {\n if (this.idleLockService.verifyPin(pin)) {\n this.idleLockService.unlock();\n this.resetUnlockState();\n return;\n }\n\n await this.showIncorrectPinError();\n this.applyPinValidationError();\n } finally {\n this.isVerifying.set(false);\n }\n }\n\n private async verifyPasswordAndUnlock(): Promise<void> {\n if (this.isVerifying() || !this.passwordInput()) {\n return;\n }\n\n this.isVerifying.set(true);\n try {\n if (await this.idleLockService.verifyPassword(this.passwordInput())) {\n this.idleLockService.unlock();\n this.resetUnlockState();\n return;\n }\n\n await this.showIncorrectPasswordError();\n this.triggerPasswordError();\n this.passwordInput.set('');\n this.focusUnlockEntry();\n } finally {\n this.isVerifying.set(false);\n }\n }\n\n private resetUnlockState(): void {\n this.unlockMode.set(this.getDefaultUnlockMode());\n this.resetPinInput();\n this.passwordInput.set('');\n this.passwordError.set(false);\n this.pinError.set(false);\n }\n\n private resetPinInput(clearError = true): void {\n if (clearError) {\n this.pinError.set(false);\n }\n\n this.pinInput.set('');\n this.otpInput()?.reset();\n }\n\n private applyPinValidationError(): void {\n this.resetPinInput(false);\n\n afterNextRender(\n () => {\n this.pinError.set(true);\n this.syncOtpErrorState();\n\n if (!this.useDeviceKeyboard()) {\n this.otpInput()?.focus();\n }\n },\n { injector: this.injector },\n );\n }\n\n private syncOtpErrorState(): void {\n const otp = this.otpInput();\n if (otp) {\n otp.state = 'error';\n }\n }\n\n private focusUnlockEntry(): void {\n afterNextRender(\n () => {\n if (this.unlockMode() === 'password') {\n this.focusPasswordInput();\n return;\n }\n\n if (!this.useDeviceKeyboard()) {\n this.otpInput()?.focus();\n }\n },\n { injector: this.injector },\n );\n }\n\n private focusPasswordInput(): void {\n const attemptFocus = (): boolean => {\n const passwordBox = this.passwordBox();\n if (!passwordBox) {\n return false;\n }\n\n passwordBox.focus();\n\n requestAnimationFrame(() => {\n if (!this.isUnlockEntryFocused()) {\n passwordBox.focus();\n }\n });\n\n return true;\n };\n\n if (!attemptFocus()) {\n afterNextRender(() => attemptFocus(), { injector: this.injector });\n }\n }\n\n private bindRefocusOnInteraction(): void {\n const onKeydown = (event: KeyboardEvent): void => {\n if (this.isUnlockEntryFocused() || event.defaultPrevented) {\n return;\n }\n\n this.focusUnlockEntry();\n };\n\n document.addEventListener('keydown', onKeydown, true);\n this.destroyRef.onDestroy(() => {\n document.removeEventListener('keydown', onKeydown, true);\n });\n }\n\n private isUnlockEntryFocused(): boolean {\n const active = document.activeElement;\n if (!(active instanceof HTMLElement)) {\n return false;\n }\n\n if (this.unlockMode() === 'password') {\n return active.closest('ax-password-box') !== null;\n }\n\n if (this.useDeviceKeyboard()) {\n return active.closest('axp-virtual-keypad') !== null;\n }\n\n return active.closest('ax-otp') !== null;\n }\n\n private triggerPasswordError(): void {\n this.passwordError.set(true);\n setTimeout(() => this.passwordError.set(false), 450);\n }\n\n private async showIncorrectPinError(): Promise<void> {\n const content = await this.translateService.translateAsync('@auth:session-lock.messages.incorrect-pin');\n const title = await this.translateService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'danger', title, content, closeButton: true });\n }\n\n private async showIncorrectPasswordError(): Promise<void> {\n const content = await this.translateService.translateAsync('@auth:session-lock.messages.incorrect-password');\n const title = await this.translateService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'danger', title, content, closeButton: true });\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-session-lock-overlay\" [class.axm-session-lock-overlay--desktop]=\"!useDeviceKeyboard()\"\n [class.axm-session-lock-overlay--mobile]=\"useDeviceKeyboard()\" (click)=\"onOverlayClick()\">\n <div class=\"axm-session-lock-overlay__panel\" axFocusTrap tabindex=\"-1\" (click)=\"$event.stopPropagation()\">\n <div class=\"axm-session-lock-overlay__profile\">\n <div class=\"axm-session-lock-overlay__avatar-wrap\">\n @if (userId(); as resolvedUserId) {\n <axp-user-avatar [size]=\"useDeviceKeyboard() ? 64 : 80\" [userId]=\"resolvedUserId\"></axp-user-avatar>\n }\n </div>\n\n @if (displayName()) {\n <p class=\"axm-session-lock-overlay__name m-0\">\n {{ displayName() }}\n </p>\n }\n\n <!-- @if (userRoleTitle()) {\n <p class=\"axm-session-lock-overlay__role m-0\">\n {{ userRoleTitle() }}\n </p>\n } -->\n\n @if (applicationBadge()) {\n <div class=\"axm-session-lock-overlay__user-badge\">\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n <span>{{ applicationBadge() }}</span>\n </div>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__divider\" aria-hidden=\"true\"></div>\n\n <div class=\"axm-session-lock-overlay__body\">\n <div class=\"axm-session-lock-overlay__body-main\">\n <div class=\"axm-session-lock-overlay__lock-badge\" aria-hidden=\"true\">\n <i class=\"fa-light fa-lock\"></i>\n </div>\n\n <h2 class=\"axm-session-lock-overlay__title m-0\">\n {{ '@auth:session-lock.title' | translate | async }}\n </h2>\n\n @if (unlockMode() === 'pin' && hasPinCode()) {\n <p class=\"axm-session-lock-overlay__instruction m-0\">\n {{ '@auth:session-lock.pin-instruction' | translate | async }}\n </p>\n\n <div class=\"axm-session-lock-overlay__otp\" [class.axm-session-lock-overlay__otp--error]=\"pinError()\">\n <ax-otp class=\"w-full block\" [type]=\"'number'\" [mode]=\"'star'\" [length]=\"pinLength\" [state]=\"otpState()\"\n [readonly]=\"useDeviceKeyboard()\" [disabled]=\"isVerifying()\" [ngModel]=\"pinInput()\"\n (ngModelChange)=\"onDesktopPinChange($event)\" (onCompleted)=\"onDesktopPinCompleted($event)\"></ax-otp>\n </div>\n } @else {\n <p class=\"axm-session-lock-overlay__instruction m-0\">\n {{ '@auth:session-lock.password-instruction' | translate | async }}\n </p>\n\n <div class=\"axm-session-lock-overlay__password\"\n [class.axm-session-lock-overlay__password--error]=\"passwordError()\">\n <ax-password-box class=\"axm-session-lock-overlay__password-input w-full\" look=\"outline\"\n [disabled]=\"isVerifying()\" [ngModel]=\"passwordInput()\" (ngModelChange)=\"onPasswordChange($event)\"\n (keydown.enter)=\"submitPassword()\" [placeholder]=\"'@auth:password' | translate | async\"></ax-password-box>\n </div>\n\n <div class=\"axm-session-lock-overlay__actions\">\n <ax-button class=\"axm-session-lock-overlay__action w-full rounded-lg\" look=\"solid\" color=\"primary\"\n [disabled]=\"isVerifying() || !passwordInput()\" [text]=\"'@auth:session-lock.unlock' | translate | async\"\n (onClick)=\"submitPassword()\"></ax-button>\n </div>\n }\n </div>\n\n @if (useDeviceKeyboard() && unlockMode() === 'pin' && hasPinCode()) {\n <axp-virtual-keypad class=\"axm-session-lock-overlay__keypad\" look=\"solid\" [disabled]=\"isVerifying()\"\n (digitPress)=\"onMobilePinDigit($event)\" (backspace)=\"onMobilePinBackspace()\">\n </axp-virtual-keypad>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__footer\">\n <div class=\"axm-session-lock-overlay__footer-actions\">\n @if (hasPinCode()) {\n <div class=\"axm-session-lock-overlay__footer-action\">\n @if (unlockMode() === 'pin') {\n <ax-button class=\"w-full\" look=\"blank\" color=\"primary\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.use-password-instead' | translate | async\"\n (onClick)=\"showPasswordUnlock($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n } @else {\n <ax-button class=\"w-full\" look=\"blank\" color=\"primary\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.use-pin-instead' | translate | async\" (onClick)=\"showPinUnlock($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-lock\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n }\n </div>\n\n <div class=\"axm-session-lock-overlay__footer-divider\" aria-hidden=\"true\"></div>\n }\n\n <div class=\"axm-session-lock-overlay__footer-action\">\n <ax-button class=\"w-full\" look=\"blank\" color=\"danger\" [disabled]=\"isVerifying()\"\n [text]=\"'@auth:session-lock.sign-out' | translate | async\" (onClick)=\"signOut($event)\">\n <ax-prefix>\n <i class=\"fa-light fa-arrow-right-from-bracket\" aria-hidden=\"true\"></i>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n </div>\n </div>\n</div>"],"names":["i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,0BAA0B,GAAG,oBAAoB;AACvD,MAAM,+BAA+B,GAAG,MAAM;MAwBjC,8BAA8B,CAAA;AAtB3C,IAAA,WAAA,GAAA;;QAyBqB,IAAA,CAAA,SAAS,GAAG,wBAAwB;;;AAMpC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,EAAE,+EAAC;AACrB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,EAAE,oFAAC;AAC1B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,+EAAC;AACxB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,KAAK,oFAAC;AAC7B,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,KAAK,kFAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA2B,KAAK,iFAAC;AACpD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,EAAE,oFAAC;AAE1B,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,iFAAC;AAE9D,QAAA,IAAA,CAAA,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,wFAAC;AACzE,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,kFAAC;AAC5E,QAAA,IAAA,CAAA,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE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