@acorex/modules 19.1.7 → 19.1.9
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/auth/lib/auth.module.d.ts +1 -1
- package/auth/lib/{forgot → pages/forgot}/password/password.component.d.ts +1 -1
- package/auth/lib/{login → pages/login}/password/password.component.d.ts +1 -1
- package/fesm2022/acorex-modules-application-management.mjs +9 -1
- package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-BuSxsqTx.mjs → acorex-modules-auth-acorex-modules-auth-BukQhL3i.mjs} +171 -248
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-BukQhL3i.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-app-chooser.component-B3yFTcfb.mjs → acorex-modules-auth-app-chooser.component-Co9UVNs7.mjs} +2 -2
- package/fesm2022/acorex-modules-auth-app-chooser.component-Co9UVNs7.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-login.module-BwbsBdZm.mjs → acorex-modules-auth-login.module-DF8O2Xsc.mjs} +4 -4
- package/fesm2022/acorex-modules-auth-login.module-DF8O2Xsc.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-master.layout-BIwGGzl9.mjs → acorex-modules-auth-master.layout-Bql93CSW.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-master.layout-BIwGGzl9.mjs.map → acorex-modules-auth-master.layout-Bql93CSW.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-CquAxSV0.mjs → acorex-modules-auth-password.component-4qadgU3K.mjs} +2 -2
- package/fesm2022/acorex-modules-auth-password.component-4qadgU3K.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-password.component-Ce57WfMX.mjs → acorex-modules-auth-password.component-C7dIOlgw.mjs} +2 -2
- package/fesm2022/acorex-modules-auth-password.component-C7dIOlgw.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-routes-CbA94Lwp.mjs → acorex-modules-auth-routes-CGtWtEQI.mjs} +2 -2
- package/fesm2022/acorex-modules-auth-routes-CGtWtEQI.mjs.map +1 -0
- package/fesm2022/acorex-modules-auth-setting.provider-GJeEbIRd.mjs +59 -0
- package/fesm2022/acorex-modules-auth-setting.provider-GJeEbIRd.mjs.map +1 -0
- package/fesm2022/acorex-modules-auth-tenant-chooser.component-CFT3i6iA.mjs.map +1 -1
- package/fesm2022/acorex-modules-auth-two-factor-code.component-BEsTVMeC.mjs.map +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor.module-DiN9uKFz.mjs → acorex-modules-auth-two-factor.module-CqzFrEEK.mjs} +2 -2
- package/fesm2022/acorex-modules-auth-two-factor.module-CqzFrEEK.mjs.map +1 -0
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/{acorex-modules-form-template-management-category.entity-Cqu3urCo.mjs → acorex-modules-form-template-management-category.entity-m0HWwBzu.mjs} +13 -9
- package/fesm2022/acorex-modules-form-template-management-category.entity-m0HWwBzu.mjs.map +1 -0
- package/fesm2022/acorex-modules-form-template-management-setting.provider-ceq0ZtxA.mjs +65 -0
- package/fesm2022/acorex-modules-form-template-management-setting.provider-ceq0ZtxA.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-template-picker.component-CsGnikzF.mjs → acorex-modules-form-template-management-template-picker.component-vh_xdN7Z.mjs} +3 -3
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-vh_xdN7Z.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-template.entity-CGhbmYel.mjs → acorex-modules-form-template-management-template.entity-EoPISAfV.mjs} +15 -14
- package/fesm2022/acorex-modules-form-template-management-template.entity-EoPISAfV.mjs.map +1 -0
- package/fesm2022/acorex-modules-form-template-management.mjs +110 -112
- package/fesm2022/acorex-modules-form-template-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +1319 -996
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-platform-management.mjs +7 -28
- package/fesm2022/acorex-modules-platform-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-security-management.mjs +1632 -0
- package/fesm2022/acorex-modules-security-management.mjs.map +1 -0
- package/fesm2022/acorex-modules-text-template-management.mjs +62 -77
- package/fesm2022/acorex-modules-text-template-management.mjs.map +1 -1
- package/form-template-management/lib/const.d.ts +22 -6
- package/form-template-management/lib/entity.provider.d.ts +5 -4
- package/form-template-management/lib/permission.provider.d.ts +4 -0
- package/form-template-management/lib/search-command.provider.d.ts +4 -0
- package/notification-management/index.d.ts +5 -4
- package/notification-management/lib/const.d.ts +27 -8
- package/notification-management/lib/entities/channel/index.d.ts +3 -0
- package/notification-management/lib/entities/index.d.ts +2 -0
- package/notification-management/lib/entities/notification/index.d.ts +3 -0
- package/notification-management/lib/entities/notification/notification.service.d.ts +17 -0
- package/notification-management/lib/entities/notification/notification.types.d.ts +5 -0
- package/notification-management/lib/entities/template/index.d.ts +4 -0
- package/notification-management/lib/entities/template/template.module.d.ts +6 -0
- package/notification-management/lib/entities/template/template.types.d.ts +0 -1
- package/notification-management/lib/entity.provider.d.ts +10 -0
- package/notification-management/lib/setting.keys.d.ts +17 -0
- package/notification-management/lib/setting.provider.d.ts +4 -0
- package/package.json +9 -5
- package/platform-management/index.d.ts +0 -1
- package/platform-management/lib/menu.provider.d.ts +1 -1
- package/security-management/README.md +3 -0
- package/security-management/index.d.ts +2 -0
- package/security-management/lib/const.d.ts +29 -0
- package/security-management/lib/entities/profile/index.d.ts +4 -0
- package/security-management/lib/entities/profile/profile.entity.d.ts +3 -0
- package/security-management/lib/entities/profile/profile.module.d.ts +6 -0
- package/security-management/lib/entities/profile/profile.service.d.ts +13 -0
- package/security-management/lib/entities/profile/profile.types.d.ts +5 -0
- package/security-management/lib/entities/roles/index.d.ts +4 -0
- package/security-management/lib/entities/roles/roles.entity.d.ts +3 -0
- package/security-management/lib/entities/roles/roles.module.d.ts +6 -0
- package/security-management/lib/entities/roles/roles.service.d.ts +10 -0
- package/security-management/lib/entities/roles/roles.types.d.ts +5 -0
- package/security-management/lib/entities/users/index.d.ts +4 -0
- package/security-management/lib/entities/users/users.entity.d.ts +3 -0
- package/security-management/lib/entities/users/users.module.d.ts +6 -0
- package/security-management/lib/entities/users/users.service.d.ts +10 -0
- package/security-management/lib/entities/users/users.types.d.ts +5 -0
- package/security-management/lib/entity.provider.d.ts +10 -0
- package/security-management/lib/menu.provider.d.ts +5 -0
- package/security-management/lib/search-command.provider.d.ts +4 -0
- package/security-management/lib/security-management.module.d.ts +9 -0
- package/text-template-management/lib/const.d.ts +22 -6
- package/text-template-management/lib/entity.provider.d.ts +5 -4
- package/text-template-management/lib/menu.provider.d.ts +1 -1
- package/text-template-management/lib/setting.provider.d.ts +1 -1
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-BuSxsqTx.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-app-chooser.component-B3yFTcfb.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-login.module-BwbsBdZm.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-password.component-Ce57WfMX.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-password.component-CquAxSV0.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-routes-CbA94Lwp.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-two-factor.module-DiN9uKFz.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-category.entity-Cqu3urCo.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-CsGnikzF.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template.entity-CGhbmYel.mjs.map +0 -1
- package/form-template-management/lib/search-definition.provider.d.ts +0 -4
- package/notification-management/lib/entity.loader.d.ts +0 -9
- package/notification-management/lib/notification.service.d.ts +0 -6
- package/platform-management/lib/text-search/index.d.ts +0 -2
- package/platform-management/lib/text-search/text-search.service.d.ts +0 -10
- package/platform-management/lib/text-search/text-search.types.d.ts +0 -9
- package/text-template-management/lib/search-definition.provider.d.ts +0 -4
- /package/auth/lib/{account → pages/account}/account.module.d.ts +0 -0
- /package/auth/lib/{account → pages/account}/app-chooser/app-chooser-list.component.d.ts +0 -0
- /package/auth/lib/{account → pages/account}/app-chooser/app-chooser-slot.component.d.ts +0 -0
- /package/auth/lib/{account → pages/account}/app-chooser/app-chooser.component.d.ts +0 -0
- /package/auth/lib/{account → pages/account}/profile/profile-slot.component.d.ts +0 -0
- /package/auth/lib/{account → pages/account}/tenant-chooser/tenant-chooser-dropdown.component.d.ts +0 -0
- /package/auth/lib/{account → pages/account}/tenant-chooser/tenant-chooser.component.d.ts +0 -0
- /package/auth/lib/{forgot → pages/forgot}/routes.d.ts +0 -0
- /package/auth/lib/{login → pages/login}/login.module.d.ts +0 -0
- /package/auth/lib/{two-factor → pages/two-factor}/two-factor-code/two-factor-code.component.d.ts +0 -0
- /package/auth/lib/{two-factor → pages/two-factor}/two-factor.module.d.ts +0 -0
- /package/notification-management/lib/{admin-notification-slot → components}/admin-notification-item/admin-notification-item.component.d.ts +0 -0
- /package/notification-management/lib/{admin-notification-slot → components}/admin-notification-panel/admin-notification-panel.component.d.ts +0 -0
- /package/notification-management/lib/{admin-notification-slot → components}/admin-notification-slot/admin-notification-slot.component.d.ts +0 -0
- /package/notification-management/lib/entities/{notification.entity.d.ts → notification/notification.entity.d.ts} +0 -0
@@ -3,18 +3,16 @@ import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
|
|
3
3
|
import { HttpErrorResponse } from '@angular/common/http';
|
4
4
|
import * as i0 from '@angular/core';
|
5
5
|
import { inject, isDevMode, Injectable, InjectionToken, Component, signal, ViewChild, NgModule } from '@angular/core';
|
6
|
-
import * as i2 from '@angular/router';
|
6
|
+
import * as i2$1 from '@angular/router';
|
7
7
|
import { Router, RouterModule, ROUTES } from '@angular/router';
|
8
|
-
import * as i1$
|
9
|
-
import {
|
10
|
-
import * as i1
|
8
|
+
import * as i1$1 from '@acorex/platform/common';
|
9
|
+
import { AXPDataProvider, AXPComponentSlotModule, AXPSignOutAction, AXPSignInAction, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXPCommonModule } from '@acorex/platform/common';
|
10
|
+
import * as i1 from '@angular/common';
|
11
11
|
import { CommonModule } from '@angular/common';
|
12
|
-
import * as i1 from '@ngrx/effects';
|
12
|
+
import * as i1$2 from '@ngrx/effects';
|
13
13
|
import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
14
|
-
import {
|
15
|
-
import
|
16
|
-
import { startWith, switchMap, tap } from 'rxjs/operators';
|
17
|
-
import * as i2$1 from '@acorex/components/button';
|
14
|
+
import { of, first, firstValueFrom, Subject, timer, switchMap as switchMap$1, tap as tap$1 } from 'rxjs';
|
15
|
+
import * as i2 from '@acorex/components/button';
|
18
16
|
import { AXButtonModule } from '@acorex/components/button';
|
19
17
|
import * as i7 from '@acorex/components/decorators';
|
20
18
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
@@ -28,7 +26,8 @@ import * as i3$2 from '@acorex/components/image';
|
|
28
26
|
import { AXImageModule } from '@acorex/components/image';
|
29
27
|
import * as i9 from '@acorex/core/translation';
|
30
28
|
import { AXTranslationModule } from '@acorex/core/translation';
|
31
|
-
import {
|
29
|
+
import { AXDialogService } from '@acorex/components/dialog';
|
30
|
+
import { startWith, switchMap, tap } from 'rxjs/operators';
|
32
31
|
|
33
32
|
class AXMAuthErrorHandler {
|
34
33
|
constructor() {
|
@@ -104,18 +103,18 @@ const routes = [
|
|
104
103
|
},
|
105
104
|
{
|
106
105
|
path: '',
|
107
|
-
loadComponent: () => import('./acorex-modules-auth-master.layout-
|
108
|
-
loadChildren: () => import('./acorex-modules-auth-login.module-
|
106
|
+
loadComponent: () => import('./acorex-modules-auth-master.layout-Bql93CSW.mjs').then((c) => c.AXPAuthMasterLayoutComponent),
|
107
|
+
loadChildren: () => import('./acorex-modules-auth-login.module-DF8O2Xsc.mjs').then((c) => c.AXPSignInModule),
|
109
108
|
},
|
110
109
|
{
|
111
110
|
path: '',
|
112
|
-
loadComponent: () => import('./acorex-modules-auth-master.layout-
|
113
|
-
loadChildren: () => import('./acorex-modules-auth-two-factor.module-
|
111
|
+
loadComponent: () => import('./acorex-modules-auth-master.layout-Bql93CSW.mjs').then((c) => c.AXPAuthMasterLayoutComponent),
|
112
|
+
loadChildren: () => import('./acorex-modules-auth-two-factor.module-CqzFrEEK.mjs').then((c) => c.AXPTwoFactorModule),
|
114
113
|
},
|
115
114
|
{
|
116
115
|
path: '',
|
117
|
-
loadComponent: () => import('./acorex-modules-auth-master.layout-
|
118
|
-
loadChildren: () => import('./acorex-modules-auth-routes-
|
116
|
+
loadComponent: () => import('./acorex-modules-auth-master.layout-Bql93CSW.mjs').then((c) => c.AXPAuthMasterLayoutComponent),
|
117
|
+
loadChildren: () => import('./acorex-modules-auth-routes-CGtWtEQI.mjs').then((c) => c),
|
119
118
|
},
|
120
119
|
{
|
121
120
|
path: 'account',
|
@@ -132,122 +131,34 @@ const routes = [
|
|
132
131
|
},
|
133
132
|
];
|
134
133
|
|
135
|
-
class
|
134
|
+
class AXMSecurityManagmentModuleMenuProvider {
|
136
135
|
constructor() {
|
137
|
-
this.configs = inject(AXM_AUTH_CONFIG_TOKEN);
|
138
|
-
this.idle$ = new Subject();
|
139
|
-
this.timeoutDuration = this.configs.idleTimeout ?? 10 * 60 * 1000;
|
140
|
-
this.userActivity$ = new Subject();
|
141
|
-
this.idleSubscription = null;
|
142
|
-
this.setupActivityListeners();
|
143
|
-
}
|
144
|
-
get idleState$() {
|
145
|
-
return this.idle$.asObservable();
|
146
|
-
}
|
147
|
-
setupActivityListeners() {
|
148
|
-
const activityEvents = ['mousemove', 'keydown', 'wheel'];
|
149
|
-
activityEvents.forEach(event => document.addEventListener(event, () => this.resetTimer()));
|
150
|
-
}
|
151
|
-
startWatching() {
|
152
|
-
this.stopWatching(); // Stop any existing subscription
|
153
|
-
this.idleSubscription = this.userActivity$.pipe(startWith(null), switchMap(() => timer(this.timeoutDuration)), tap(() => this.idle$.next())).subscribe();
|
154
|
-
}
|
155
|
-
resetTimer() {
|
156
|
-
this.userActivity$.next();
|
157
|
-
}
|
158
|
-
stopWatching() {
|
159
|
-
if (this.idleSubscription) {
|
160
|
-
this.idleSubscription.unsubscribe();
|
161
|
-
this.idleSubscription = null;
|
162
|
-
}
|
163
|
-
}
|
164
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPIdleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
165
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPIdleService, providedIn: 'root' }); }
|
166
|
-
}
|
167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPIdleService, decorators: [{
|
168
|
-
type: Injectable,
|
169
|
-
args: [{ providedIn: 'root' }]
|
170
|
-
}], ctorParameters: () => [] });
|
171
|
-
|
172
|
-
class AXPAuthEffects {
|
173
|
-
constructor(actions$, router) {
|
174
|
-
this.actions$ = actions$;
|
175
|
-
this.router = router;
|
176
|
-
this.configs = inject(AXM_AUTH_CONFIG_TOKEN);
|
177
136
|
this.sessionService = inject(AXPSessionService);
|
178
|
-
this.idleService = inject(AXPIdleService);
|
179
|
-
this.dialogService = inject(AXDialogService);
|
180
|
-
this.dialogAlreadyOpen = false;
|
181
|
-
this.signout$ = createEffect(() => this.actions$.pipe(ofType(AXPSignOutAction), switchMap$1((action) => {
|
182
|
-
this.idleService.stopWatching();
|
183
|
-
this.router.navigate(['/auth/login']);
|
184
|
-
return of();
|
185
|
-
})), { dispatch: false });
|
186
|
-
this.signin$ = createEffect(() => this.actions$.pipe(ofType(AXPSignInAction), switchMap$1((action) => {
|
187
|
-
if (this.configs.idleTimeout) {
|
188
|
-
this.idleService.startWatching();
|
189
|
-
}
|
190
|
-
return of();
|
191
|
-
})), { dispatch: false });
|
192
|
-
this.idle$ = createEffect(() => this.idleService.idleState$.pipe(tap$1(() => {
|
193
|
-
if (!this.dialogAlreadyOpen) {
|
194
|
-
let time = 60;
|
195
|
-
let intervalId;
|
196
|
-
const buttonText = (time) => `Stay Sign In (${time})`;
|
197
|
-
const stayButton = {
|
198
|
-
text: buttonText(time),
|
199
|
-
color: 'primary',
|
200
|
-
autofocus: true,
|
201
|
-
onClick: () => {
|
202
|
-
this.idleService.resetTimer();
|
203
|
-
dialog.close();
|
204
|
-
this.dialogAlreadyOpen = false;
|
205
|
-
clearInterval(intervalId);
|
206
|
-
}
|
207
|
-
};
|
208
|
-
const dialog = this.dialogService.open({
|
209
|
-
title: "Session Timeout",
|
210
|
-
content: "You're being timed out due to inactivity. Please choose to stay signed in or to sign off. Otherwise, you will signed off automatically.",
|
211
|
-
type: 'warning',
|
212
|
-
buttons: [
|
213
|
-
{
|
214
|
-
text: "Sign Off",
|
215
|
-
color: 'ghost',
|
216
|
-
onClick: async () => {
|
217
|
-
await this.sessionService.signout();
|
218
|
-
dialog.close();
|
219
|
-
this.dialogAlreadyOpen = false;
|
220
|
-
clearInterval(intervalId);
|
221
|
-
}
|
222
|
-
},
|
223
|
-
stayButton,
|
224
|
-
]
|
225
|
-
});
|
226
|
-
this.dialogAlreadyOpen = true;
|
227
|
-
// Automatically close dialog and sign out after additional time
|
228
|
-
intervalId = setInterval(() => {
|
229
|
-
if (time > 0) {
|
230
|
-
stayButton.text = buttonText(--time);
|
231
|
-
}
|
232
|
-
else {
|
233
|
-
clearInterval(intervalId);
|
234
|
-
this.sessionService.signout();
|
235
|
-
dialog.close();
|
236
|
-
this.dialogAlreadyOpen = false;
|
237
|
-
}
|
238
|
-
}, 1000);
|
239
|
-
//
|
240
|
-
}
|
241
|
-
})), { dispatch: false });
|
242
137
|
}
|
243
|
-
|
244
|
-
|
138
|
+
async provide(context) {
|
139
|
+
const scope = 'auth';
|
140
|
+
context.addItems([
|
141
|
+
{
|
142
|
+
text: `t('profile.title', {scope: "${scope}"})`,
|
143
|
+
name: 'user-profile',
|
144
|
+
icon: 'fa-solid fa-user',
|
145
|
+
children: [
|
146
|
+
{
|
147
|
+
text: `t('profile.edit', {scope: "${scope}"})`,
|
148
|
+
name: 'edit-profile',
|
149
|
+
icon: 'fa-solid fa-address-card',
|
150
|
+
},
|
151
|
+
{
|
152
|
+
text: `t('settings.user.title', {scope: "platform-management"})`,
|
153
|
+
name: 'user-settings',
|
154
|
+
icon: 'fa-solid fa-gear',
|
155
|
+
path: `/${this.sessionService.application?.name}/settings/user`,
|
156
|
+
},
|
157
|
+
],
|
158
|
+
},
|
159
|
+
]);
|
160
|
+
}
|
245
161
|
}
|
246
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPAuthEffects, decorators: [{
|
247
|
-
type: Injectable
|
248
|
-
}], ctorParameters: () => [{ type: i1.Actions }, { type: i2.Router }] });
|
249
|
-
|
250
|
-
//export * from './auth.actions';
|
251
162
|
|
252
163
|
class AXPAppChooserListComponent {
|
253
164
|
constructor() {
|
@@ -262,7 +173,7 @@ class AXPAppChooserListComponent {
|
|
262
173
|
this.router.navigate([`/${item.name}/home`]);
|
263
174
|
}
|
264
175
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPAppChooserListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
265
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPAppChooserListComponent, isStandalone: true, selector: "axp-app-chooser-list", ngImport: i0, template: "<div class=\" ax-w-full ax-overflow-auto ax-max-h-[300px] ax-pe-2\">\n @for(application of (applications$ | async); track $index){\n <div class=\"ax-flex ax-gap-2 ax-justify-between ax-border-b last:ax-border-b-0 ax-py-3 ax-items-start ax-cursor-pointer\"\n (click)=\"chooseApplication(application)\">\n <div class=\"ax-flex ax-flex-1 ax-gap-2 ax-items-center ax-justify-center ax-font-medium\">\n <div\n class=\"ax-w-12 ax-h-12 ax-flex ax-justify-center ax-items-center ax-rounded-full ax-bg-neutral-100 ax-m-auto\">\n <ax-icon class=\"fa-solid fa-computer ax-text-neutral-500 ax-text-lg\"> </ax-icon>\n <!-- TODO: logo instead of application icon -->\n <!-- <axp-logo [source]=\"application.logo\" [attr.alt]=\"application.title\"\n class=\"!ax-flex ax-items-center ax-justify-center !ax-text-sm ax-mx-auto ax-w-10 ax-h-10 ax-bg-neutral-200 ax-rounded-full\"></axp-logo> -->\n </div>\n <span class=\"ax-flex-1 ax-text-start md:ax-text-base ax-text-sm\">{{ application.title }}</span>\n <span class=\"ax-text-gray-500 md:ax-text-sm ax-text-xs\">{{application.editionName}}</span>\n @if(application.name===selectedApplication?.name){\n <ax-loading></ax-loading>\n }@else {\n <ax-icon class=\"fa-solid fa-chevron-right ax-text-neutral-400\"> </ax-icon>\n }\n </div>\n </div>\n }\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1
|
176
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPAppChooserListComponent, isStandalone: true, selector: "axp-app-chooser-list", ngImport: i0, template: "<div class=\" ax-w-full ax-overflow-auto ax-max-h-[300px] ax-pe-2\">\n @for(application of (applications$ | async); track $index){\n <div class=\"ax-flex ax-gap-2 ax-justify-between ax-border-b last:ax-border-b-0 ax-py-3 ax-items-start ax-cursor-pointer\"\n (click)=\"chooseApplication(application)\">\n <div class=\"ax-flex ax-flex-1 ax-gap-2 ax-items-center ax-justify-center ax-font-medium\">\n <div\n class=\"ax-w-12 ax-h-12 ax-flex ax-justify-center ax-items-center ax-rounded-full ax-bg-neutral-100 ax-m-auto\">\n <ax-icon class=\"fa-solid fa-computer ax-text-neutral-500 ax-text-lg\"> </ax-icon>\n <!-- TODO: logo instead of application icon -->\n <!-- <axp-logo [source]=\"application.logo\" [attr.alt]=\"application.title\"\n class=\"!ax-flex ax-items-center ax-justify-center !ax-text-sm ax-mx-auto ax-w-10 ax-h-10 ax-bg-neutral-200 ax-rounded-full\"></axp-logo> -->\n </div>\n <span class=\"ax-flex-1 ax-text-start md:ax-text-base ax-text-sm\">{{ application.title }}</span>\n <span class=\"ax-text-gray-500 md:ax-text-sm ax-text-xs\">{{application.editionName}}</span>\n @if(application.name===selectedApplication?.name){\n <ax-loading></ax-loading>\n }@else {\n <ax-icon class=\"fa-solid fa-chevron-right ax-text-neutral-400\"> </ax-icon>\n }\n </div>\n </div>\n }\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i7.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i3.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }] }); }
|
266
177
|
}
|
267
178
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPAppChooserListComponent, decorators: [{
|
268
179
|
type: Component,
|
@@ -282,7 +193,7 @@ class AXMAppChooserSlotComponent {
|
|
282
193
|
this.router.navigate([`/${item.name}/home`]);
|
283
194
|
}
|
284
195
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMAppChooserSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
285
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMAppChooserSlotComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "@if(((applications$ | async)?.length ?? 0) > 1)\n{\n<ax-button color=\"default\" look=\"blank\" #appChooser>\n <ax-icon>\n <i class=\"fa-solid fa-grid-2 ax-text-slate-400 dark:ax-text-slate-200\"></i>\n </ax-icon>\n</ax-button>\n<ax-popover [target]=\"appChooser\" [openOn]=\"'toggle'\" [closeOn]=\"'clickOut'\" [adaptivityEnabled]=\"true\">\n <div class=\"ax-bg-surface ax-border ax-overflow-hidden ax-rounded-md ax-shadow-md ax-w-full ax-min-w-64 ax-p-3\">\n <axp-app-chooser-list></axp-app-chooser-list>\n </div>\n</ax-popover>\n}", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1
|
196
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMAppChooserSlotComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "@if(((applications$ | async)?.length ?? 0) > 1)\n{\n<ax-button color=\"default\" look=\"blank\" #appChooser>\n <ax-icon>\n <i class=\"fa-solid fa-grid-2 ax-text-slate-400 dark:ax-text-slate-200\"></i>\n </ax-icon>\n</ax-button>\n<ax-popover [target]=\"appChooser\" [openOn]=\"'toggle'\" [closeOn]=\"'clickOut'\" [adaptivityEnabled]=\"true\">\n <div class=\"ax-bg-surface ax-border ax-overflow-hidden ax-rounded-md ax-shadow-md ax-w-full ax-min-w-64 ax-p-3\">\n <axp-app-chooser-list></axp-app-chooser-list>\n </div>\n</ax-popover>\n}", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i3$1.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i7.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXPAppChooserListComponent, selector: "axp-app-chooser-list" }] }); }
|
286
197
|
}
|
287
198
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMAppChooserSlotComponent, decorators: [{
|
288
199
|
type: Component,
|
@@ -300,7 +211,7 @@ class AXPTenantChooserDropdownComponent {
|
|
300
211
|
this.router.navigate(['/auth/account/tenant-chooser']);
|
301
212
|
}
|
302
213
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTenantChooserDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
303
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTenantChooserDropdownComponent, isStandalone: true, selector: "axp-tenant-chooser-dropdown", ngImport: i0, template: "<ng-container *ngIf=\"tenants$ | async as tenants\">\n @if(tenants.length>1){\n <div (click)=\"tenantChooser()\"\n class=\"ax-flex ax-items-center ax-border ax-rounded-full ax-px-4 ax-py-1 ax-gap-2 ax-cursor-pointer\">\n <ax-icon class=\"fa-solid fa-building ax-text-neutral-500 ax-text-xs\"></ax-icon>\n <p class=\"ax-text-neutral-500 ax-text-sm ax-font-medium\">\n {{ tenant?.title }}\n </p>\n <ax-icon class=\"fa-regular fa-chevron-down ax-text-neutral-400\"></ax-icon>\n </div>\n }@else {\n <div class=\"ax-flex ax-items-center ax-border ax-rounded-full ax-px-4 ax-py-1 ax-gap-2 ax-cursor-pointer\">\n <ax-icon class=\"fa-solid fa-building ax-text-neutral-500\"></ax-icon>\n <p class=\"ax-text-neutral-500 ax-text-sm ax-font-medium\">\n {{ tenant?.title }}\n </p>\n </div>\n }\n</ng-container>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1
|
214
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTenantChooserDropdownComponent, isStandalone: true, selector: "axp-tenant-chooser-dropdown", ngImport: i0, template: "<ng-container *ngIf=\"tenants$ | async as tenants\">\n @if(tenants.length>1){\n <div (click)=\"tenantChooser()\"\n class=\"ax-flex ax-items-center ax-border ax-rounded-full ax-px-4 ax-py-1 ax-gap-2 ax-cursor-pointer\">\n <ax-icon class=\"fa-solid fa-building ax-text-neutral-500 ax-text-xs\"></ax-icon>\n <p class=\"ax-text-neutral-500 ax-text-sm ax-font-medium\">\n {{ tenant?.title }}\n </p>\n <ax-icon class=\"fa-regular fa-chevron-down ax-text-neutral-400\"></ax-icon>\n </div>\n }@else {\n <div class=\"ax-flex ax-items-center ax-border ax-rounded-full ax-px-4 ax-py-1 ax-gap-2 ax-cursor-pointer\">\n <ax-icon class=\"fa-solid fa-building ax-text-neutral-500\"></ax-icon>\n <p class=\"ax-text-neutral-500 ax-text-sm ax-font-medium\">\n {{ tenant?.title }}\n </p>\n </div>\n }\n</ng-container>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i7.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }] }); }
|
304
215
|
}
|
305
216
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTenantChooserDropdownComponent, decorators: [{
|
306
217
|
type: Component,
|
@@ -332,12 +243,7 @@ class AXMAuthProfileSlotComponent {
|
|
332
243
|
this.getAvatarText();
|
333
244
|
}
|
334
245
|
editProfile() {
|
335
|
-
|
336
|
-
this.router.navigate([`/asc/oidc/e/user-info/0/view`]);
|
337
|
-
}
|
338
|
-
else {
|
339
|
-
this.router.navigate([`/${this.appName()}/m/oidc/e/user-info/0/view`]);
|
340
|
-
}
|
246
|
+
this.router.navigate([`/${this.appName()}/m/securityManagement/e/profile/0/view`]);
|
341
247
|
}
|
342
248
|
async logOut() {
|
343
249
|
await this.sessionService.signout();
|
@@ -372,9 +278,9 @@ class AXMAuthProfileSlotComponent {
|
|
372
278
|
}
|
373
279
|
}
|
374
280
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMAuthProfileSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
375
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMAuthProfileSlotComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "profilePopover", first: true, predicate: ["profilePopover"], descendants: true }], ngImport: i0, template: "@if((isAuthenticated$ | async)) {\n<div class=\"ax-size-fit ax-px-2\">\n <ax-avatar\n #avatar\n color=\"neutral\"\n (error)=\"this.src = 'path/to/default-image.jpg'\"\n [size]=\"32\"\n class=\"ax-cursor-pointer\"\n >\n @if(hasPicture()){\n <ax-image (onError)=\"onImageError($event)\" [src]=\"src\"></ax-image>\n }@else{\n <ax-text>\n <small class=\"ax-text-xs ax-font-semibold\">{{ avatarText() }}</small>\n </ax-text>\n }\n </ax-avatar>\n <ax-popover [target]=\"avatar\" [openOn]=\"'toggle'\" [closeOn]=\"'clickOut'\" #p>\n <div class=\"ax-bg-surface ax-border ax-border-default ax-rounded-md ax-shadow-md ax-w-full ax-min-w-64\">\n <div class=\"ax-flex ax-flex-col ax-items-center ax-p-4 ax-border-b\">\n <ax-avatar [size]=\"60\">\n @if(hasPicture()){\n <ax-image (onError)=\"onImageError($event)\" [src]=\"src\">\n <ax-loading></ax-loading>\n </ax-image>\n }@else{\n <ax-text>\n <span class=\"\">{{ avatarText() }}</span>\n </ax-text>\n }\n </ax-avatar>\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-mt-2 ax-gap-1\">\n <div class=\"ax-text-base ax-font-bold\">{{ (user$ | async)?.title }}</div>\n <axp-tenant-chooser-dropdown></axp-tenant-chooser-dropdown>\n </div>\n </div>\n <div class=\"profile-menus ax-text-slate-500\">\n <ul>\n <li>\n <a (click)=\"editProfile()\">\n <i class=\"fa-solid fa-user\"></i>\n <span>{{ 'profile.edit' | translate : { scope: 'auth' } | async }}</span>\n </a>\n </li>\n </ul>\n <ul>\n <li>\n <a (click)=\"p.close()\" [routerLink]=\"['/', appName(), 'settings', 'user']\">\n <i class=\"fa-solid fa-gear\"></i>\n <span>{{ 'profile.settings' | translate : { scope: 'auth' } | async }}</span>\n </a>\n </li>\n </ul>\n <ul>\n <li class=\"ax-text-danger-500\">\n <a (click)=\"logOut()\">\n <i class=\"fa-solid fa-arrow-right-from-bracket\"></i>\n <span>{{ 'profile.logout' | translate : { scope: 'auth' } | async }}</span>\n </a>\n </li>\n </ul>\n </div>\n </div>\n </ax-popover>\n</div>\n\n} @else {\n<ax-button color=\"default\" look=\"blank\" text=\"Sign Up / Sign In\" (click)=\"handleSignIn()\">\n <ax-icon>\n <i class=\"fa-solid fa-user ax-text-slate-400 dark:ax-text-slate-200\"></i>\n </ax-icon>\n</ax-button>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1
|
281
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMAuthProfileSlotComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "profilePopover", first: true, predicate: ["profilePopover"], descendants: true }], ngImport: i0, template: "@if((isAuthenticated$ | async)) {\n<div class=\"ax-size-fit ax-px-2\">\n <ax-avatar\n #avatar\n color=\"neutral\"\n (error)=\"this.src = 'path/to/default-image.jpg'\"\n [size]=\"32\"\n class=\"ax-cursor-pointer\"\n >\n @if(hasPicture()){\n <ax-image (onError)=\"onImageError($event)\" [src]=\"src\"></ax-image>\n }@else{\n <ax-text>\n <small class=\"ax-text-xs ax-font-semibold\">{{ avatarText() }}</small>\n </ax-text>\n }\n </ax-avatar>\n <ax-popover [target]=\"avatar\" [openOn]=\"'toggle'\" [closeOn]=\"'clickOut'\" #p>\n <div class=\"ax-bg-surface ax-border ax-border-default ax-rounded-md ax-shadow-md ax-w-full ax-min-w-64\">\n <div class=\"ax-flex ax-flex-col ax-items-center ax-p-4 ax-border-b\">\n <ax-avatar [size]=\"60\">\n @if(hasPicture()){\n <ax-image (onError)=\"onImageError($event)\" [src]=\"src\">\n <ax-loading></ax-loading>\n </ax-image>\n }@else{\n <ax-text>\n <span class=\"\">{{ avatarText() }}</span>\n </ax-text>\n }\n </ax-avatar>\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-mt-2 ax-gap-1\">\n <div class=\"ax-text-base ax-font-bold\">{{ (user$ | async)?.title }}</div>\n <axp-tenant-chooser-dropdown></axp-tenant-chooser-dropdown>\n </div>\n </div>\n <div class=\"profile-menus ax-text-slate-500\">\n <ul>\n <li>\n <a (click)=\"editProfile()\">\n <i class=\"fa-solid fa-user\"></i>\n <span>{{ 'profile.edit' | translate : { scope: 'auth' } | async }}</span>\n </a>\n </li>\n </ul>\n <ul>\n <li>\n <a (click)=\"p.close()\" [routerLink]=\"['/', appName(), 'settings', 'user']\">\n <i class=\"fa-solid fa-gear\"></i>\n <span>{{ 'profile.settings' | translate : { scope: 'auth' } | async }}</span>\n </a>\n </li>\n </ul>\n <ul>\n <li class=\"ax-text-danger-500\">\n <a (click)=\"logOut()\">\n <i class=\"fa-solid fa-arrow-right-from-bracket\"></i>\n <span>{{ 'profile.logout' | translate : { scope: 'auth' } | async }}</span>\n </a>\n </li>\n </ul>\n </div>\n </div>\n </ax-popover>\n</div>\n\n} @else {\n<ax-button color=\"default\" look=\"blank\" text=\"Sign Up / Sign In\" (click)=\"handleSignIn()\">\n <ax-icon>\n <i class=\"fa-solid fa-user ax-text-slate-400 dark:ax-text-slate-200\"></i>\n </ax-icon>\n</ax-button>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type:
|
376
282
|
//
|
377
|
-
AXImageModule }, { kind: "component", type: i3$2.AXImageComponent, selector: "ax-image", inputs: ["overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "ngmodule", type: AXAvatarModule }, { kind: "component", type: i4.AXAvatarComponent, selector: "ax-avatar", inputs: ["color", "size", "look"], outputs: ["sizeChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i3$1.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2
|
283
|
+
AXImageModule }, { kind: "component", type: i3$2.AXImageComponent, selector: "ax-image", inputs: ["overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "ngmodule", type: AXAvatarModule }, { kind: "component", type: i4.AXAvatarComponent, selector: "ax-avatar", inputs: ["color", "size", "look"], outputs: ["sizeChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i3$1.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i7.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i7.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i3.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i9.AXTranslatorPipe, name: "translate" }, { kind: "component", type:
|
378
284
|
//
|
379
285
|
AXPTenantChooserDropdownComponent, selector: "axp-tenant-chooser-dropdown" }] }); }
|
380
286
|
}
|
@@ -435,7 +341,7 @@ function routesFacory() {
|
|
435
341
|
},
|
436
342
|
{
|
437
343
|
path: 'app-chooser',
|
438
|
-
loadComponent: () => import('./acorex-modules-auth-app-chooser.component-
|
344
|
+
loadComponent: () => import('./acorex-modules-auth-app-chooser.component-Co9UVNs7.mjs').then((c) => c.AXPAuthAppChooserComponent),
|
439
345
|
canActivate: [AXPAuthGuard, canActivateAppChooser],
|
440
346
|
},
|
441
347
|
];
|
@@ -443,7 +349,7 @@ function routesFacory() {
|
|
443
349
|
}
|
444
350
|
class AXPAccountModule {
|
445
351
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPAccountModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
446
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPAccountModule, imports: [RouterModule, i1$
|
352
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPAccountModule, imports: [RouterModule, i1$1.AXPComponentSlotModule] }); }
|
447
353
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPAccountModule, providers: [
|
448
354
|
{
|
449
355
|
provide: ROUTES,
|
@@ -505,127 +411,141 @@ var account_module = /*#__PURE__*/Object.freeze({
|
|
505
411
|
AXPAccountModule: AXPAccountModule
|
506
412
|
});
|
507
413
|
|
508
|
-
class
|
414
|
+
class AXPIdleService {
|
509
415
|
constructor() {
|
510
|
-
this.
|
416
|
+
this.configs = inject(AXM_AUTH_CONFIG_TOKEN);
|
417
|
+
this.idle$ = new Subject();
|
418
|
+
this.timeoutDuration = this.configs.idleTimeout ?? 10 * 60 * 1000;
|
419
|
+
this.userActivity$ = new Subject();
|
420
|
+
this.idleSubscription = null;
|
421
|
+
this.setupActivityListeners();
|
511
422
|
}
|
512
|
-
|
513
|
-
|
514
|
-
context.addItems([
|
515
|
-
{
|
516
|
-
text: `t('profile.title', {scope: "${scope}"})`,
|
517
|
-
name: 'user-profile',
|
518
|
-
icon: 'fa-solid fa-user',
|
519
|
-
children: [
|
520
|
-
{
|
521
|
-
text: `t('profile.edit', {scope: "${scope}"})`,
|
522
|
-
name: 'edit-profile',
|
523
|
-
icon: 'fa-solid fa-address-card',
|
524
|
-
},
|
525
|
-
{
|
526
|
-
text: `t('settings.user.title', {scope: "platform-management"})`,
|
527
|
-
name: 'user-settings',
|
528
|
-
icon: 'fa-solid fa-gear',
|
529
|
-
path: `/${this.sessionService.application?.name}/settings/user`
|
530
|
-
},
|
531
|
-
],
|
532
|
-
},
|
533
|
-
{
|
534
|
-
text: `t('management.title', {scope: "${scope}"})`,
|
535
|
-
name: 'user-management',
|
536
|
-
path: '/security',
|
537
|
-
icon: 'fa-solid fa-lock',
|
538
|
-
priority: 9001,
|
539
|
-
data: {
|
540
|
-
//requiredPermission: 'platform.admin.settings',
|
541
|
-
},
|
542
|
-
children: [
|
543
|
-
{
|
544
|
-
text: `t('management.users', {scope: "${scope}"})`,
|
545
|
-
icon: 'fa-solid fa-users',
|
546
|
-
priority: 1,
|
547
|
-
},
|
548
|
-
{
|
549
|
-
text: `t('management.rols', {scope: "${scope}"})`,
|
550
|
-
icon: 'fa-solid fa-key',
|
551
|
-
priority: 2,
|
552
|
-
},
|
553
|
-
],
|
554
|
-
},
|
555
|
-
]);
|
423
|
+
get idleState$() {
|
424
|
+
return this.idle$.asObservable();
|
556
425
|
}
|
426
|
+
setupActivityListeners() {
|
427
|
+
const activityEvents = ['mousemove', 'keydown', 'wheel'];
|
428
|
+
activityEvents.forEach(event => document.addEventListener(event, () => this.resetTimer()));
|
429
|
+
}
|
430
|
+
startWatching() {
|
431
|
+
this.stopWatching(); // Stop any existing subscription
|
432
|
+
this.idleSubscription = this.userActivity$.pipe(startWith(null), switchMap(() => timer(this.timeoutDuration)), tap(() => this.idle$.next())).subscribe();
|
433
|
+
}
|
434
|
+
resetTimer() {
|
435
|
+
this.userActivity$.next();
|
436
|
+
}
|
437
|
+
stopWatching() {
|
438
|
+
if (this.idleSubscription) {
|
439
|
+
this.idleSubscription.unsubscribe();
|
440
|
+
this.idleSubscription = null;
|
441
|
+
}
|
442
|
+
}
|
443
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPIdleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
444
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPIdleService, providedIn: 'root' }); }
|
557
445
|
}
|
446
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPIdleService, decorators: [{
|
447
|
+
type: Injectable,
|
448
|
+
args: [{ providedIn: 'root' }]
|
449
|
+
}], ctorParameters: () => [] });
|
558
450
|
|
559
|
-
class
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
451
|
+
class AXPAuthEffects {
|
452
|
+
constructor(actions$, router) {
|
453
|
+
this.actions$ = actions$;
|
454
|
+
this.router = router;
|
455
|
+
this.configs = inject(AXM_AUTH_CONFIG_TOKEN);
|
456
|
+
this.sessionService = inject(AXPSessionService);
|
457
|
+
this.idleService = inject(AXPIdleService);
|
458
|
+
this.dialogService = inject(AXDialogService);
|
459
|
+
this.dialogAlreadyOpen = false;
|
460
|
+
this.signout$ = createEffect(() => this.actions$.pipe(ofType(AXPSignOutAction), switchMap$1((action) => {
|
461
|
+
this.idleService.stopWatching();
|
462
|
+
this.router.navigate(['/auth/login']);
|
463
|
+
return of();
|
464
|
+
})), { dispatch: false });
|
465
|
+
this.signin$ = createEffect(() => this.actions$.pipe(ofType(AXPSignInAction), switchMap$1((action) => {
|
466
|
+
if (this.configs.idleTimeout) {
|
467
|
+
this.idleService.startWatching();
|
468
|
+
}
|
469
|
+
return of();
|
470
|
+
})), { dispatch: false });
|
471
|
+
this.idle$ = createEffect(() => this.idleService.idleState$.pipe(tap$1(() => {
|
472
|
+
if (!this.dialogAlreadyOpen) {
|
473
|
+
let time = 60;
|
474
|
+
let intervalId;
|
475
|
+
const buttonText = (time) => `Stay Sign In (${time})`;
|
476
|
+
const stayButton = {
|
477
|
+
text: buttonText(time),
|
478
|
+
color: 'primary',
|
479
|
+
autofocus: true,
|
480
|
+
onClick: () => {
|
481
|
+
this.idleService.resetTimer();
|
482
|
+
dialog.close();
|
483
|
+
this.dialogAlreadyOpen = false;
|
484
|
+
clearInterval(intervalId);
|
485
|
+
}
|
486
|
+
};
|
487
|
+
const dialog = this.dialogService.open({
|
488
|
+
title: "Session Timeout",
|
489
|
+
content: "You're being timed out due to inactivity. Please choose to stay signed in or to sign off. Otherwise, you will signed off automatically.",
|
490
|
+
type: 'warning',
|
491
|
+
buttons: [
|
492
|
+
{
|
493
|
+
text: "Sign Off",
|
494
|
+
color: 'ghost',
|
495
|
+
onClick: async () => {
|
496
|
+
await this.sessionService.signout();
|
497
|
+
dialog.close();
|
498
|
+
this.dialogAlreadyOpen = false;
|
499
|
+
clearInterval(intervalId);
|
500
|
+
}
|
501
|
+
},
|
502
|
+
stayButton,
|
503
|
+
]
|
504
|
+
});
|
505
|
+
this.dialogAlreadyOpen = true;
|
506
|
+
// Automatically close dialog and sign out after additional time
|
507
|
+
intervalId = setInterval(() => {
|
508
|
+
if (time > 0) {
|
509
|
+
stayButton.text = buttonText(--time);
|
510
|
+
}
|
511
|
+
else {
|
512
|
+
clearInterval(intervalId);
|
513
|
+
this.sessionService.signout();
|
514
|
+
dialog.close();
|
515
|
+
this.dialogAlreadyOpen = false;
|
516
|
+
}
|
517
|
+
}, 1000);
|
518
|
+
//
|
519
|
+
}
|
520
|
+
})), { dispatch: false });
|
611
521
|
}
|
522
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPAuthEffects, deps: [{ token: i1$2.Actions }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
523
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPAuthEffects }); }
|
612
524
|
}
|
525
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPAuthEffects, decorators: [{
|
526
|
+
type: Injectable
|
527
|
+
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: i2$1.Router }] });
|
528
|
+
|
529
|
+
//export * from './auth.actions';
|
613
530
|
|
614
531
|
class AXMAuthModule {
|
615
532
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
616
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMAuthModule, imports: [CommonModule, i1$
|
533
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMAuthModule, imports: [CommonModule, i1$1.AXPCommonModule, i2$1.RouterModule, i1$2.EffectsFeatureModule, AXPAccountModule] }); }
|
617
534
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMAuthModule, providers: [
|
618
535
|
AXMAuthErrorHandler,
|
619
536
|
{
|
620
537
|
provide: AXP_MENU_PROVIDER,
|
621
538
|
useClass: AXMSecurityManagmentModuleMenuProvider,
|
622
|
-
multi: true
|
539
|
+
multi: true,
|
623
540
|
},
|
624
541
|
{
|
625
542
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
626
|
-
|
543
|
+
useFactory: async () => {
|
544
|
+
const provider = (await import('./acorex-modules-auth-setting.provider-GJeEbIRd.mjs')).AXMSettingProvider;
|
545
|
+
return new provider();
|
546
|
+
},
|
627
547
|
multi: true,
|
628
|
-
}
|
548
|
+
},
|
629
549
|
], imports: [CommonModule,
|
630
550
|
AXPCommonModule.forChild({ errorHandlers: [AXMAuthErrorHandler] }),
|
631
551
|
RouterModule.forChild(routes),
|
@@ -640,20 +560,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
640
560
|
AXPCommonModule.forChild({ errorHandlers: [AXMAuthErrorHandler] }),
|
641
561
|
RouterModule.forChild(routes),
|
642
562
|
EffectsModule.forFeature([AXPAuthEffects]),
|
643
|
-
AXPAccountModule
|
563
|
+
AXPAccountModule,
|
644
564
|
],
|
645
565
|
providers: [
|
646
566
|
AXMAuthErrorHandler,
|
647
567
|
{
|
648
568
|
provide: AXP_MENU_PROVIDER,
|
649
569
|
useClass: AXMSecurityManagmentModuleMenuProvider,
|
650
|
-
multi: true
|
570
|
+
multi: true,
|
651
571
|
},
|
652
572
|
{
|
653
573
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
654
|
-
|
574
|
+
useFactory: async () => {
|
575
|
+
const provider = (await import('./acorex-modules-auth-setting.provider-GJeEbIRd.mjs')).AXMSettingProvider;
|
576
|
+
return new provider();
|
577
|
+
},
|
655
578
|
multi: true,
|
656
|
-
}
|
579
|
+
},
|
657
580
|
],
|
658
581
|
}]
|
659
582
|
}] });
|
@@ -663,4 +586,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
663
586
|
*/
|
664
587
|
|
665
588
|
export { AXM_AUTH_CONFIG_TOKEN as A, AXMAuthenticationTypes as a, AXPTenantChooserDropdownComponent as b, AXPAppChooserListComponent as c, AXMAuthErrorHandler as d, AXMDefaultAuthConfigs as e, configAuthModule as f, AXMAuthModule as g, AXPIdleService as h };
|
666
|
-
//# sourceMappingURL=acorex-modules-auth-acorex-modules-auth-
|
589
|
+
//# sourceMappingURL=acorex-modules-auth-acorex-modules-auth-BukQhL3i.mjs.map
|