@acorex/modules 18.0.0 → 18.0.1
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/README.md +7 -7
- package/auth/README.md +3 -3
- package/auth/lib/account/account.module.d.ts +1 -1
- package/backend/lib/auth/oidc/application.loader.d.ts +2 -2
- package/backend/lib/auth/oidc/oidc.strategy.d.ts +2 -3
- package/backend/lib/auth/oidc/tenant.loader.d.ts +2 -2
- package/backend/lib/data/api/data-provider.d.ts +1 -2
- package/backend/lib/data/local/data-Conditioner.d.ts +1 -1
- package/backend/lib/data/local/local-data-provider.d.ts +1 -1
- package/esm2022/auth/index.mjs +1 -1
- package/esm2022/auth/lib/account/account.module.mjs +3 -3
- package/esm2022/auth/lib/account/app-chooser/app-chooser-list.component.mjs +4 -4
- package/esm2022/auth/lib/account/app-chooser/app-chooser-slot.component.mjs +4 -4
- package/esm2022/auth/lib/account/app-chooser/app-chooser.component.mjs +4 -5
- package/esm2022/auth/lib/account/profile/profile-slot.component.mjs +6 -5
- package/esm2022/auth/lib/account/tenant-chooser/tenant-chooser-dropdown.component.mjs +3 -3
- package/esm2022/auth/lib/account/tenant-chooser/tenant-chooser.component.mjs +4 -5
- package/esm2022/auth/lib/auth.config.mjs +1 -1
- package/esm2022/auth/lib/auth.module.mjs +1 -1
- package/esm2022/auth/lib/auth.routes.mjs +1 -1
- package/esm2022/auth/lib/error-handler.mjs +2 -2
- package/esm2022/auth/lib/forgot/password/password.component.mjs +3 -3
- package/esm2022/auth/lib/forgot/routes.mjs +1 -1
- package/esm2022/auth/lib/login/login.module.mjs +1 -1
- package/esm2022/auth/lib/login/password/password.component.mjs +3 -3
- package/esm2022/auth/lib/shared/layouts/blank/blank.layout.mjs +1 -1
- package/esm2022/auth/lib/shared/layouts/master/master.layout.mjs +5 -7
- package/esm2022/auth/lib/shared/services/idle.service.mjs +1 -1
- package/esm2022/auth/lib/shared/services/index.mjs +1 -1
- package/esm2022/auth/lib/store/auth.effects.mjs +1 -1
- package/esm2022/auth/lib/store/index.mjs +1 -1
- package/esm2022/auth/lib/two-factor/two-factor-code/two-factor-code.component.mjs +3 -3
- package/esm2022/auth/lib/two-factor/two-factor.module.mjs +1 -1
- package/esm2022/backend/index.mjs +1 -1
- package/esm2022/backend/lib/auth/oidc/application.loader.mjs +17 -12
- package/esm2022/backend/lib/auth/oidc/configuration.service.mjs +2 -3
- package/esm2022/backend/lib/auth/oidc/feature.loader.mjs +1 -1
- package/esm2022/backend/lib/auth/oidc/index.mjs +1 -1
- package/esm2022/backend/lib/auth/oidc/oidc.strategy.mjs +2 -4
- package/esm2022/backend/lib/auth/oidc/permission.loader.mjs +3 -3
- package/esm2022/backend/lib/auth/oidc/signincallback.component.mjs +1 -1
- package/esm2022/backend/lib/auth/oidc/tenant.loader.mjs +4 -13
- package/esm2022/backend/lib/auth/oidc/usermanager.service.mjs +1 -1
- package/esm2022/backend/lib/backend.configs.mjs +1 -1
- package/esm2022/backend/lib/backend.module.mjs +1 -1
- package/esm2022/backend/lib/data/api/data-provider.mjs +54 -15
- package/esm2022/backend/lib/data/index.mjs +1 -1
- package/esm2022/backend/lib/data/local/data-Conditioner.mjs +25 -19
- package/esm2022/backend/lib/data/local/local-data-provider.mjs +1 -1
- package/esm2022/log-management/lib/audit-logs.entity.mjs +2 -3
- package/esm2022/notification/index.mjs +1 -1
- package/esm2022/notification/lib/notification.module.mjs +1 -1
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-jEqtVhBE.mjs → acorex-modules-auth-acorex-modules-auth-DeS0JelZ.mjs} +23 -25
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-DeS0JelZ.mjs.map +1 -0
- package/fesm2022/acorex-modules-auth-app-chooser.component-Bw4IumjA.mjs +70 -0
- package/fesm2022/acorex-modules-auth-app-chooser.component-Bw4IumjA.mjs.map +1 -0
- package/fesm2022/acorex-modules-auth-blank.layout-BOdRxDNv.mjs.map +1 -1
- package/fesm2022/{acorex-modules-auth-login.module-Drm4fC1I.mjs → acorex-modules-auth-login.module-CsfZ__0S.mjs} +5 -7
- package/fesm2022/acorex-modules-auth-login.module-CsfZ__0S.mjs.map +1 -0
- package/fesm2022/acorex-modules-auth-master.layout-7OSbK7SF.mjs +37 -0
- package/fesm2022/acorex-modules-auth-master.layout-7OSbK7SF.mjs.map +1 -0
- package/fesm2022/acorex-modules-auth-password.component-V2IWBUZb.mjs +125 -0
- package/fesm2022/acorex-modules-auth-password.component-V2IWBUZb.mjs.map +1 -0
- package/fesm2022/acorex-modules-auth-password.component-qr9vkp8j.mjs +72 -0
- package/fesm2022/acorex-modules-auth-password.component-qr9vkp8j.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-routes-DyjibH6l.mjs → acorex-modules-auth-routes--jOmlQkp.mjs} +2 -2
- package/fesm2022/acorex-modules-auth-routes--jOmlQkp.mjs.map +1 -0
- package/fesm2022/acorex-modules-auth-tenant-chooser.component-CjEiwASS.mjs +83 -0
- package/fesm2022/acorex-modules-auth-tenant-chooser.component-CjEiwASS.mjs.map +1 -0
- package/fesm2022/acorex-modules-auth-two-factor-code.component-C0JWM0rO.mjs +40 -0
- package/fesm2022/acorex-modules-auth-two-factor-code.component-C0JWM0rO.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-two-factor.module-A0hevYO2.mjs → acorex-modules-auth-two-factor.module-CmSVriRz.mjs} +4 -6
- package/fesm2022/acorex-modules-auth-two-factor.module-CmSVriRz.mjs.map +1 -0
- package/fesm2022/acorex-modules-auth.mjs +2 -4
- package/fesm2022/acorex-modules-auth.mjs.map +1 -1
- package/fesm2022/acorex-modules-backend.mjs +98 -61
- package/fesm2022/acorex-modules-backend.mjs.map +1 -1
- package/fesm2022/acorex-modules-log-management.mjs +1 -2
- package/fesm2022/acorex-modules-log-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-notification.mjs.map +1 -1
- package/log-management/lib/audit-logs.entity.d.ts +1 -1
- package/notification/README.md +3 -3
- package/package.json +1 -1
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-jEqtVhBE.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-app-chooser.component-BbtMSwfI.mjs +0 -72
- package/fesm2022/acorex-modules-auth-app-chooser.component-BbtMSwfI.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-login.module-Drm4fC1I.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-master.layout-cAm6TYeA.mjs +0 -39
- package/fesm2022/acorex-modules-auth-master.layout-cAm6TYeA.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-password.component-Ch2Wqi2W.mjs +0 -74
- package/fesm2022/acorex-modules-auth-password.component-Ch2Wqi2W.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-password.component-D4CkGaq0.mjs +0 -127
- package/fesm2022/acorex-modules-auth-password.component-D4CkGaq0.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-routes-DyjibH6l.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-tenant-chooser.component-CJu2Lfbf.mjs +0 -84
- package/fesm2022/acorex-modules-auth-tenant-chooser.component-CJu2Lfbf.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-two-factor-code.component-B41iXHoT.mjs +0 -40
- package/fesm2022/acorex-modules-auth-two-factor-code.component-B41iXHoT.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-two-factor.module-A0hevYO2.mjs.map +0 -1
@@ -0,0 +1,125 @@
|
|
1
|
+
import * as i2$1 from '@acorex/components/button';
|
2
|
+
import { AXButtonModule } from '@acorex/components/button';
|
3
|
+
import * as i8 from '@acorex/components/check-box';
|
4
|
+
import { AXCheckBoxModule } from '@acorex/components/check-box';
|
5
|
+
import * as i2$2 from '@acorex/components/decorators';
|
6
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
7
|
+
import { AXDialogService } from '@acorex/components/dialog';
|
8
|
+
import * as i2 from '@acorex/components/form';
|
9
|
+
import { AXFormModule, AXFormComponent } from '@acorex/components/form';
|
10
|
+
import * as i6 from '@acorex/components/label';
|
11
|
+
import { AXLabelModule } from '@acorex/components/label';
|
12
|
+
import * as i3$1 from '@acorex/components/loading';
|
13
|
+
import { AXLoadingModule } from '@acorex/components/loading';
|
14
|
+
import * as i4 from '@acorex/components/password-box';
|
15
|
+
import { AXPasswordBoxModule } from '@acorex/components/password-box';
|
16
|
+
import * as i3 from '@acorex/components/text-box';
|
17
|
+
import { AXTextBoxModule } from '@acorex/components/text-box';
|
18
|
+
import * as i6$1 from '@acorex/core/translation';
|
19
|
+
import { AXTranslationModule } from '@acorex/core/translation';
|
20
|
+
import * as i1 from '@angular/common';
|
21
|
+
import { CommonModule } from '@angular/common';
|
22
|
+
import * as i0 from '@angular/core';
|
23
|
+
import { inject, Component, ViewChild } from '@angular/core';
|
24
|
+
import { RouterModule, Router } from '@angular/router';
|
25
|
+
import { AXValidationModule } from '@acorex/core/validation';
|
26
|
+
import { AXPSessionService } from '@acorex/platform/auth';
|
27
|
+
import { BehaviorSubject } from 'rxjs';
|
28
|
+
import { A as AXM_AUTH_CONFIG_TOKEN, a as AXMAuthenticationTypes } from './acorex-modules-auth-acorex-modules-auth-DeS0JelZ.mjs';
|
29
|
+
import '@acorex/platform/common';
|
30
|
+
import '@angular/common/http';
|
31
|
+
import '@ngrx/effects';
|
32
|
+
import 'rxjs/operators';
|
33
|
+
import '@acorex/components/popover';
|
34
|
+
import '@acorex/components/avatar';
|
35
|
+
import '@acorex/components/image';
|
36
|
+
import '@acorex/platform/mocks';
|
37
|
+
|
38
|
+
const MODULES = [
|
39
|
+
CommonModule,
|
40
|
+
AXFormModule,
|
41
|
+
AXTextBoxModule,
|
42
|
+
AXPasswordBoxModule,
|
43
|
+
AXButtonModule,
|
44
|
+
AXLabelModule,
|
45
|
+
AXDecoratorModule,
|
46
|
+
AXCheckBoxModule,
|
47
|
+
AXTranslationModule,
|
48
|
+
AXTranslationModule,
|
49
|
+
AXLoadingModule,
|
50
|
+
RouterModule,
|
51
|
+
AXValidationModule,
|
52
|
+
];
|
53
|
+
class AXPLoginPasswordComponent {
|
54
|
+
constructor() {
|
55
|
+
this.configs = inject(AXM_AUTH_CONFIG_TOKEN);
|
56
|
+
this.v1 = '';
|
57
|
+
this.v2 = '';
|
58
|
+
this.isLoading$ = new BehaviorSubject(false);
|
59
|
+
this.submitText = 'signin.submit';
|
60
|
+
this.dialogService = inject(AXDialogService);
|
61
|
+
this.sessionService = inject(AXPSessionService);
|
62
|
+
this.router = inject(Router);
|
63
|
+
}
|
64
|
+
ngOnInit() {
|
65
|
+
this.l2 = 'password';
|
66
|
+
switch (this.configs.type) {
|
67
|
+
case AXMAuthenticationTypes.EmailPassword:
|
68
|
+
this.l1 = 'email';
|
69
|
+
break;
|
70
|
+
case AXMAuthenticationTypes.MobilePassword:
|
71
|
+
this.l1 = 'mobile';
|
72
|
+
break;
|
73
|
+
case AXMAuthenticationTypes.UsernameEmailPassword:
|
74
|
+
this.l1 = 'username-email';
|
75
|
+
break;
|
76
|
+
case AXMAuthenticationTypes.UsernamePassword:
|
77
|
+
default:
|
78
|
+
this.l1 = 'username';
|
79
|
+
}
|
80
|
+
}
|
81
|
+
handleForgotOnClick() {
|
82
|
+
this.router.navigate(['/auth/forgot']);
|
83
|
+
}
|
84
|
+
handleLoginClick() {
|
85
|
+
this.form.validate().then(async (form) => {
|
86
|
+
if (form.result) {
|
87
|
+
this.isLoading$.next(true);
|
88
|
+
this.submitText = 'processing';
|
89
|
+
this.submitText = 'redirecting';
|
90
|
+
try {
|
91
|
+
await this.sessionService.signin({ strategy: 'user-pass', username: this.v1, password: this.v2 });
|
92
|
+
await this.sessionService.signInComplete();
|
93
|
+
if (this.sessionService.tenant == null) {
|
94
|
+
this.router.navigate(['/auth/account/tenant-chooser']);
|
95
|
+
}
|
96
|
+
else if (this.sessionService.application == null) {
|
97
|
+
this.router.navigate(['/auth/account/app-chooser']);
|
98
|
+
}
|
99
|
+
else {
|
100
|
+
this.router.navigate([`/${this.sessionService.application.name}/home`]);
|
101
|
+
}
|
102
|
+
//
|
103
|
+
}
|
104
|
+
catch (error) {
|
105
|
+
this.dialogService.alert('Something went wrong!', `${error.message} `, 'warning');
|
106
|
+
this.submitText = 'signin.submit';
|
107
|
+
this.v2 = null;
|
108
|
+
this.isLoading$.next(false);
|
109
|
+
}
|
110
|
+
}
|
111
|
+
});
|
112
|
+
}
|
113
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPLoginPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
114
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.2", type: AXPLoginPasswordComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: AXFormComponent, descendants: true }], ngImport: i0, template: "<ng-container *translate=\"let t\">\r\n <div class=\"ax-text-center ax-mb-4\">\r\n <h1 class=\"ax-font-bold ax-text-xl ax-mb-2\">\r\n {{ t('signin.title', { scope: 'auth' }) | async }}\r\n </h1>\r\n <p class=\"ax-text-base ax-text-neutral-600\">\r\n {{ t('signin.hint', { scope: 'auth' }) | async }}\r\n </p>\r\n </div>\r\n <div class=\"ax-w-80 lg:ax-w-96\">\r\n <ax-form>\r\n <div class=\"ax-flex ax-flex-col ax-gap-6\">\r\n <ax-form-field>\r\n <ax-label>{{ t(l1, { scope: 'auth' }) | async }}</ax-label>\r\n <ax-text-box [(value)]=\"v1\">\r\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\r\n </ax-text-box>\r\n </ax-form-field>\r\n <ax-form-field>\r\n <ax-label>{{ t(l2, { scope: 'auth' }) | async }}</ax-label>\r\n <ax-password-box [(value)]=\"v2\">\r\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\r\n </ax-password-box>\r\n </ax-form-field>\r\n <div class=\"ax-flex ax-justify-between ax-items-center\">\r\n <ax-check-box>\r\n <ax-label class=\"ax-mb-0\">{{ t('signin.remember', { scope: 'auth' }) | async }}</ax-label>\r\n </ax-check-box>\r\n <ax-button\r\n color=\"primary\"\r\n class=\"ax-sm\"\r\n [text]=\"t('forgot.password', { scope: 'auth' }) | async\"\r\n look=\"blank\"\r\n (onClick)=\"handleForgotOnClick()\"\r\n >\r\n </ax-button>\r\n </div>\r\n </div>\r\n <ax-button\r\n color=\"primary\"\r\n class=\"ax-mt-6 ax-w-full\"\r\n [text]=\"t(submitText, { scope: 'auth' }) | async\"\r\n (onClick)=\"handleLoginClick()\"\r\n [disabled]=\"isLoading$ | async\"\r\n [type]=\"'submit'\"\r\n >\r\n <ax-loading *ngIf=\"isLoading$ | async\"></ax-loading>\r\n </ax-button>\r\n <div class=\"ax-heading ax-heading-center !ax-my-8\">\r\n <span>{{ t('signin.or', { scope: 'auth' }) | async }}</span>\r\n </div>\r\n <div class=\"ax-flex ax-flex-col ax-gap-2 lg:ax-flex-row ax-justify-between ax-mt-6\">\r\n <ax-button text=\"Sign in with Google\" color=\"ghost\">\r\n <ax-prefix>\r\n <ax-icon>\r\n <i class=\"fa-brands fa-google fa-lg ax-text-danger-500\"></i>\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n <ax-button text=\"Sign in with Apple\" color=\"ghost\">\r\n <ax-prefix>\r\n <ax-icon>\r\n <i class=\"fa-brands fa-apple fa-xl\"></i>\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n </div>\r\n </ax-form>\r\n </div>\r\n</ng-container>\r\n", 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: AXFormModule }, { kind: "component", type: i2.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i2.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "directive", type: i2.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i3.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXPasswordBoxModule }, { kind: "component", type: i4.AXPasswordBoxComponent, selector: "ax-password-box", inputs: ["readonly", "disabled", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "autoComplete", "showToggleButton", "class"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i6.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$2.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: AXCheckBoxModule }, { kind: "component", type: i8.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "value", "name", "id", "checked", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i6$1.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i3$1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: AXValidationModule }] }); }
|
115
|
+
}
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPLoginPasswordComponent, decorators: [{
|
117
|
+
type: Component,
|
118
|
+
args: [{ imports: [...MODULES], standalone: true, template: "<ng-container *translate=\"let t\">\r\n <div class=\"ax-text-center ax-mb-4\">\r\n <h1 class=\"ax-font-bold ax-text-xl ax-mb-2\">\r\n {{ t('signin.title', { scope: 'auth' }) | async }}\r\n </h1>\r\n <p class=\"ax-text-base ax-text-neutral-600\">\r\n {{ t('signin.hint', { scope: 'auth' }) | async }}\r\n </p>\r\n </div>\r\n <div class=\"ax-w-80 lg:ax-w-96\">\r\n <ax-form>\r\n <div class=\"ax-flex ax-flex-col ax-gap-6\">\r\n <ax-form-field>\r\n <ax-label>{{ t(l1, { scope: 'auth' }) | async }}</ax-label>\r\n <ax-text-box [(value)]=\"v1\">\r\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\r\n </ax-text-box>\r\n </ax-form-field>\r\n <ax-form-field>\r\n <ax-label>{{ t(l2, { scope: 'auth' }) | async }}</ax-label>\r\n <ax-password-box [(value)]=\"v2\">\r\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\r\n </ax-password-box>\r\n </ax-form-field>\r\n <div class=\"ax-flex ax-justify-between ax-items-center\">\r\n <ax-check-box>\r\n <ax-label class=\"ax-mb-0\">{{ t('signin.remember', { scope: 'auth' }) | async }}</ax-label>\r\n </ax-check-box>\r\n <ax-button\r\n color=\"primary\"\r\n class=\"ax-sm\"\r\n [text]=\"t('forgot.password', { scope: 'auth' }) | async\"\r\n look=\"blank\"\r\n (onClick)=\"handleForgotOnClick()\"\r\n >\r\n </ax-button>\r\n </div>\r\n </div>\r\n <ax-button\r\n color=\"primary\"\r\n class=\"ax-mt-6 ax-w-full\"\r\n [text]=\"t(submitText, { scope: 'auth' }) | async\"\r\n (onClick)=\"handleLoginClick()\"\r\n [disabled]=\"isLoading$ | async\"\r\n [type]=\"'submit'\"\r\n >\r\n <ax-loading *ngIf=\"isLoading$ | async\"></ax-loading>\r\n </ax-button>\r\n <div class=\"ax-heading ax-heading-center !ax-my-8\">\r\n <span>{{ t('signin.or', { scope: 'auth' }) | async }}</span>\r\n </div>\r\n <div class=\"ax-flex ax-flex-col ax-gap-2 lg:ax-flex-row ax-justify-between ax-mt-6\">\r\n <ax-button text=\"Sign in with Google\" color=\"ghost\">\r\n <ax-prefix>\r\n <ax-icon>\r\n <i class=\"fa-brands fa-google fa-lg ax-text-danger-500\"></i>\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n <ax-button text=\"Sign in with Apple\" color=\"ghost\">\r\n <ax-prefix>\r\n <ax-icon>\r\n <i class=\"fa-brands fa-apple fa-xl\"></i>\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n </div>\r\n </ax-form>\r\n </div>\r\n</ng-container>\r\n" }]
|
119
|
+
}], propDecorators: { form: [{
|
120
|
+
type: ViewChild,
|
121
|
+
args: [AXFormComponent]
|
122
|
+
}] } });
|
123
|
+
|
124
|
+
export { AXPLoginPasswordComponent };
|
125
|
+
//# sourceMappingURL=acorex-modules-auth-password.component-V2IWBUZb.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-auth-password.component-V2IWBUZb.mjs","sources":["../../../../libs/modules/auth/src/lib/login/password/password.component.ts","../../../../libs/modules/auth/src/lib/login/password/password.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\r\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXDialogService } from '@acorex/components/dialog';\r\nimport { AXFormComponent, AXFormModule } from '@acorex/components/form';\r\nimport { AXLabelModule } from '@acorex/components/label';\r\nimport { AXLoadingModule } from '@acorex/components/loading';\r\nimport { AXPasswordBoxModule } from '@acorex/components/password-box';\r\nimport { AXTextBoxModule } from '@acorex/components/text-box';\r\nimport { AXTranslationModule } from '@acorex/core/translation';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Component, OnInit, ViewChild, inject } from '@angular/core';\r\nimport { Router, RouterModule } from '@angular/router';\r\n\r\nimport { AXValidationModule } from '@acorex/core/validation';\r\nimport { AXPSessionService } from '@acorex/platform/auth';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { AXMAuthConfigs, AXMAuthenticationTypes, AXM_AUTH_CONFIG_TOKEN } from '../../auth.config';\r\n\r\nconst MODULES = [\r\n CommonModule,\r\n AXFormModule,\r\n AXTextBoxModule,\r\n AXPasswordBoxModule,\r\n AXButtonModule,\r\n AXLabelModule,\r\n AXDecoratorModule,\r\n AXCheckBoxModule,\r\n AXTranslationModule,\r\n AXTranslationModule,\r\n AXLoadingModule,\r\n RouterModule,\r\n AXValidationModule,\r\n];\r\n\r\n@Component({\r\n templateUrl: './password.component.html',\r\n imports: [...MODULES],\r\n standalone: true,\r\n})\r\nexport class AXPLoginPasswordComponent implements OnInit {\r\n protected configs: AXMAuthConfigs = inject<AXMAuthConfigs>(AXM_AUTH_CONFIG_TOKEN);\r\n protected l1!: string;\r\n protected l2!: string;\r\n\r\n protected v1 = '';\r\n protected v2: string | null = '';\r\n\r\n protected isLoading$: BehaviorSubject<boolean> = new BehaviorSubject(false);\r\n\r\n protected submitText = 'signin.submit';\r\n private dialogService = inject(AXDialogService);\r\n private sessionService = inject(AXPSessionService);\r\n\r\n @ViewChild(AXFormComponent)\r\n private form!: AXFormComponent;\r\n\r\n private router = inject(Router);\r\n\r\n ngOnInit(): void {\r\n this.l2 = 'password';\r\n switch (this.configs.type) {\r\n case AXMAuthenticationTypes.EmailPassword:\r\n this.l1 = 'email';\r\n break;\r\n case AXMAuthenticationTypes.MobilePassword:\r\n this.l1 = 'mobile';\r\n break;\r\n case AXMAuthenticationTypes.UsernameEmailPassword:\r\n this.l1 = 'username-email';\r\n break;\r\n case AXMAuthenticationTypes.UsernamePassword:\r\n default:\r\n this.l1 = 'username';\r\n }\r\n }\r\n\r\n protected handleForgotOnClick() {\r\n this.router.navigate(['/auth/forgot']);\r\n }\r\n\r\n protected handleLoginClick() {\r\n this.form.validate().then(async (form) => {\r\n if (form.result) {\r\n this.isLoading$.next(true);\r\n this.submitText = 'processing';\r\n this.submitText = 'redirecting';\r\n try {\r\n await this.sessionService.signin({ strategy: 'user-pass', username: this.v1, password: this.v2! });\r\n await this.sessionService.signInComplete();\r\n if (this.sessionService.tenant == null) {\r\n this.router.navigate(['/auth/account/tenant-chooser']);\r\n } else if (this.sessionService.application == null) {\r\n this.router.navigate(['/auth/account/app-chooser']);\r\n } else {\r\n this.router.navigate([`/${this.sessionService.application.name}/home`]);\r\n }\r\n //\r\n } catch (error: any) {\r\n this.dialogService.alert('Something went wrong!', `${error.message} `, 'warning');\r\n this.submitText = 'signin.submit';\r\n this.v2 = null;\r\n this.isLoading$.next(false);\r\n }\r\n }\r\n });\r\n }\r\n}\r\n","<ng-container *translate=\"let t\">\r\n <div class=\"ax-text-center ax-mb-4\">\r\n <h1 class=\"ax-font-bold ax-text-xl ax-mb-2\">\r\n {{ t('signin.title', { scope: 'auth' }) | async }}\r\n </h1>\r\n <p class=\"ax-text-base ax-text-neutral-600\">\r\n {{ t('signin.hint', { scope: 'auth' }) | async }}\r\n </p>\r\n </div>\r\n <div class=\"ax-w-80 lg:ax-w-96\">\r\n <ax-form>\r\n <div class=\"ax-flex ax-flex-col ax-gap-6\">\r\n <ax-form-field>\r\n <ax-label>{{ t(l1, { scope: 'auth' }) | async }}</ax-label>\r\n <ax-text-box [(value)]=\"v1\">\r\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\r\n </ax-text-box>\r\n </ax-form-field>\r\n <ax-form-field>\r\n <ax-label>{{ t(l2, { scope: 'auth' }) | async }}</ax-label>\r\n <ax-password-box [(value)]=\"v2\">\r\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\r\n </ax-password-box>\r\n </ax-form-field>\r\n <div class=\"ax-flex ax-justify-between ax-items-center\">\r\n <ax-check-box>\r\n <ax-label class=\"ax-mb-0\">{{ t('signin.remember', { scope: 'auth' }) | async }}</ax-label>\r\n </ax-check-box>\r\n <ax-button\r\n color=\"primary\"\r\n class=\"ax-sm\"\r\n [text]=\"t('forgot.password', { scope: 'auth' }) | async\"\r\n look=\"blank\"\r\n (onClick)=\"handleForgotOnClick()\"\r\n >\r\n </ax-button>\r\n </div>\r\n </div>\r\n <ax-button\r\n color=\"primary\"\r\n class=\"ax-mt-6 ax-w-full\"\r\n [text]=\"t(submitText, { scope: 'auth' }) | async\"\r\n (onClick)=\"handleLoginClick()\"\r\n [disabled]=\"isLoading$ | async\"\r\n [type]=\"'submit'\"\r\n >\r\n <ax-loading *ngIf=\"isLoading$ | async\"></ax-loading>\r\n </ax-button>\r\n <div class=\"ax-heading ax-heading-center !ax-my-8\">\r\n <span>{{ t('signin.or', { scope: 'auth' }) | async }}</span>\r\n </div>\r\n <div class=\"ax-flex ax-flex-col ax-gap-2 lg:ax-flex-row ax-justify-between ax-mt-6\">\r\n <ax-button text=\"Sign in with Google\" color=\"ghost\">\r\n <ax-prefix>\r\n <ax-icon>\r\n <i class=\"fa-brands fa-google fa-lg ax-text-danger-500\"></i>\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n <ax-button text=\"Sign in with Apple\" color=\"ghost\">\r\n <ax-prefix>\r\n <ax-icon>\r\n <i class=\"fa-brands fa-apple fa-xl\"></i>\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n </div>\r\n </ax-form>\r\n </div>\r\n</ng-container>\r\n"],"names":["i5","i7","i9","i10"],"mappings":";;;;;;;;;;;;;;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EAAA,UAAA,EAAA,UAAA,EAAA,OAAA,EAAA,MAAA,EAAA,IAAA,EAAA,SAAA,EAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,EAAA,SAAA,EAAA,aAAA,EAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAChB,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,qBAAA,EAAA,QAAA,EAAA,aAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAEnB,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACf,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACZ,kBAAkB,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAQP,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBALrC,SAAS;AAEC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAC,GAAG,OAAO,CAAC,EAAA,UAAA,EACT,IAAI,EAAA,QAAA,EAAA,4tFAAA,EAAA,CAAA;8BAiBR,IAAI,EAAA,CAAA;sBADX,SAAS;uBAAC,eAAe,CAAA;;;;;"}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
import * as i2$1 from '@acorex/components/button';
|
2
|
+
import { AXButtonModule } from '@acorex/components/button';
|
3
|
+
import { AXCheckBoxModule } from '@acorex/components/check-box';
|
4
|
+
import * as i2 from '@acorex/components/form';
|
5
|
+
import { AXFormModule } from '@acorex/components/form';
|
6
|
+
import * as i6 from '@acorex/components/label';
|
7
|
+
import { AXLabelModule } from '@acorex/components/label';
|
8
|
+
import { AXPasswordBoxModule } from '@acorex/components/password-box';
|
9
|
+
import * as i3 from '@acorex/components/text-box';
|
10
|
+
import { AXTextBoxModule } from '@acorex/components/text-box';
|
11
|
+
import * as i6$1 from '@acorex/core/translation';
|
12
|
+
import { AXTranslationModule } from '@acorex/core/translation';
|
13
|
+
import * as i1 from '@angular/common';
|
14
|
+
import { CommonModule } from '@angular/common';
|
15
|
+
import * as i0 from '@angular/core';
|
16
|
+
import { inject, Component } from '@angular/core';
|
17
|
+
import * as i2$2 from '@angular/router';
|
18
|
+
import { RouterModule } from '@angular/router';
|
19
|
+
import { A as AXM_AUTH_CONFIG_TOKEN, a as AXMAuthenticationTypes } from './acorex-modules-auth-acorex-modules-auth-DeS0JelZ.mjs';
|
20
|
+
import '@acorex/platform/common';
|
21
|
+
import '@acorex/platform/auth';
|
22
|
+
import '@angular/common/http';
|
23
|
+
import '@ngrx/effects';
|
24
|
+
import '@acorex/components/dialog';
|
25
|
+
import 'rxjs';
|
26
|
+
import 'rxjs/operators';
|
27
|
+
import '@acorex/components/decorators';
|
28
|
+
import '@acorex/components/popover';
|
29
|
+
import '@acorex/components/loading';
|
30
|
+
import '@acorex/components/avatar';
|
31
|
+
import '@acorex/components/image';
|
32
|
+
import '@acorex/platform/mocks';
|
33
|
+
|
34
|
+
const MODULES = [
|
35
|
+
CommonModule,
|
36
|
+
AXFormModule,
|
37
|
+
AXTextBoxModule,
|
38
|
+
AXPasswordBoxModule,
|
39
|
+
AXButtonModule,
|
40
|
+
AXLabelModule,
|
41
|
+
AXCheckBoxModule,
|
42
|
+
AXTranslationModule,
|
43
|
+
RouterModule,
|
44
|
+
];
|
45
|
+
class AXPForgetPasswordComponent {
|
46
|
+
constructor() {
|
47
|
+
this.configs = inject(AXM_AUTH_CONFIG_TOKEN);
|
48
|
+
}
|
49
|
+
ngOnInit() {
|
50
|
+
this.l2 = 'password';
|
51
|
+
switch (this.configs.type) {
|
52
|
+
case AXMAuthenticationTypes.EmailPassword:
|
53
|
+
this.l1 = 'email';
|
54
|
+
break;
|
55
|
+
case AXMAuthenticationTypes.MobilePassword:
|
56
|
+
this.l1 = 'mobile';
|
57
|
+
break;
|
58
|
+
case AXMAuthenticationTypes.UsernamePassword:
|
59
|
+
default:
|
60
|
+
this.l1 = 'username';
|
61
|
+
}
|
62
|
+
}
|
63
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPForgetPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
64
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.2", type: AXPForgetPasswordComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<div class=\"ax-text-center ax-mb-4\" *translate=\"let t\">\r\n <h1 class=\"ax-font-bold ax-text-xl ax-mb-2\">{{ t('forgot.password',{scope:'auth'}) | async }}</h1>\r\n <p class=\"ax-text-base ax-text-neutral-600\">\r\n {{ t('forgot.hint',{ scope:'auth', params:{ name:(t(l1,{scope:'auth'}) | async) } }) | async }}\r\n </p>\r\n</div>\r\n<div class=\"ax-w-80 lg:ax-w-96\" *translate=\"let t\">\r\n <ax-form>\r\n <div class=\"ax-flex ax-flex-col ax-gap-6\">\r\n <ax-form-field>\r\n <ax-label>{{ t(l1,{scope:'auth'}) | async }}</ax-label>\r\n <ax-text-box></ax-text-box>\r\n </ax-form-field>\r\n </div>\r\n <ax-button color=\"primary\" class=\"ax-mt-6 ax-w-full\" [text]=\"t('forgot.submit',{scope:'auth'}) | async\"></ax-button>\r\n <div class=\"ax-text-center ax-mt-6 ax-text-sm ax-font-normal\">\r\n <span> {{ t('forgot.remember',{scope:'auth'}) | async}} </span>\r\n <a [routerLink]=\"['/auth/login']\" class=\"ax-link ax-font-semibold\">{{ t('signin.title',{scope:'auth'}) |\r\n async }}</a>\r\n </div>\r\n </ax-form>\r\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i2.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i3.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXPasswordBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i6.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i6$1.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
65
|
+
}
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPForgetPasswordComponent, decorators: [{
|
67
|
+
type: Component,
|
68
|
+
args: [{ imports: [...MODULES], standalone: true, template: "<div class=\"ax-text-center ax-mb-4\" *translate=\"let t\">\r\n <h1 class=\"ax-font-bold ax-text-xl ax-mb-2\">{{ t('forgot.password',{scope:'auth'}) | async }}</h1>\r\n <p class=\"ax-text-base ax-text-neutral-600\">\r\n {{ t('forgot.hint',{ scope:'auth', params:{ name:(t(l1,{scope:'auth'}) | async) } }) | async }}\r\n </p>\r\n</div>\r\n<div class=\"ax-w-80 lg:ax-w-96\" *translate=\"let t\">\r\n <ax-form>\r\n <div class=\"ax-flex ax-flex-col ax-gap-6\">\r\n <ax-form-field>\r\n <ax-label>{{ t(l1,{scope:'auth'}) | async }}</ax-label>\r\n <ax-text-box></ax-text-box>\r\n </ax-form-field>\r\n </div>\r\n <ax-button color=\"primary\" class=\"ax-mt-6 ax-w-full\" [text]=\"t('forgot.submit',{scope:'auth'}) | async\"></ax-button>\r\n <div class=\"ax-text-center ax-mt-6 ax-text-sm ax-font-normal\">\r\n <span> {{ t('forgot.remember',{scope:'auth'}) | async}} </span>\r\n <a [routerLink]=\"['/auth/login']\" class=\"ax-link ax-font-semibold\">{{ t('signin.title',{scope:'auth'}) |\r\n async }}</a>\r\n </div>\r\n </ax-form>\r\n</div>" }]
|
69
|
+
}] });
|
70
|
+
|
71
|
+
export { AXPForgetPasswordComponent };
|
72
|
+
//# sourceMappingURL=acorex-modules-auth-password.component-qr9vkp8j.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-auth-password.component-qr9vkp8j.mjs","sources":["../../../../libs/modules/auth/src/lib/forgot/password/password.component.ts","../../../../libs/modules/auth/src/lib/forgot/password/password.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\r\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\r\nimport { AXFormModule } from '@acorex/components/form';\r\nimport { AXLabelModule } from '@acorex/components/label';\r\nimport { AXPasswordBoxModule } from '@acorex/components/password-box';\r\nimport { AXTextBoxModule } from '@acorex/components/text-box';\r\nimport { AXTranslationModule } from '@acorex/core/translation';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Component, OnInit, inject } from '@angular/core';\r\nimport { RouterModule } from '@angular/router';\r\nimport { AXMAuthConfigs, AXMAuthenticationTypes, AXM_AUTH_CONFIG_TOKEN } from '../../auth.config';\r\n\r\nconst MODULES = [\r\n CommonModule,\r\n AXFormModule,\r\n AXTextBoxModule,\r\n AXPasswordBoxModule,\r\n AXButtonModule,\r\n AXLabelModule,\r\n AXCheckBoxModule,\r\n AXTranslationModule,\r\n RouterModule,\r\n];\r\n\r\n@Component({\r\n templateUrl: './password.component.html',\r\n imports: [...MODULES],\r\n standalone: true,\r\n})\r\nexport class AXPForgetPasswordComponent implements OnInit {\r\n protected l1!: string;\r\n protected l2!: string;\r\n\r\n protected configs: AXMAuthConfigs = inject<AXMAuthConfigs>(AXM_AUTH_CONFIG_TOKEN);\r\n\r\n ngOnInit(): void {\r\n this.l2 = 'password';\r\n switch (this.configs.type) {\r\n case AXMAuthenticationTypes.EmailPassword:\r\n this.l1 = 'email';\r\n break;\r\n case AXMAuthenticationTypes.MobilePassword:\r\n this.l1 = 'mobile';\r\n\r\n break;\r\n case AXMAuthenticationTypes.UsernamePassword:\r\n default:\r\n this.l1 = 'username';\r\n }\r\n }\r\n}\r\n","<div class=\"ax-text-center ax-mb-4\" *translate=\"let t\">\r\n <h1 class=\"ax-font-bold ax-text-xl ax-mb-2\">{{ t('forgot.password',{scope:'auth'}) | async }}</h1>\r\n <p class=\"ax-text-base ax-text-neutral-600\">\r\n {{ t('forgot.hint',{ scope:'auth', params:{ name:(t(l1,{scope:'auth'}) | async) } }) | async }}\r\n </p>\r\n</div>\r\n<div class=\"ax-w-80 lg:ax-w-96\" *translate=\"let t\">\r\n <ax-form>\r\n <div class=\"ax-flex ax-flex-col ax-gap-6\">\r\n <ax-form-field>\r\n <ax-label>{{ t(l1,{scope:'auth'}) | async }}</ax-label>\r\n <ax-text-box></ax-text-box>\r\n </ax-form-field>\r\n </div>\r\n <ax-button color=\"primary\" class=\"ax-mt-6 ax-w-full\" [text]=\"t('forgot.submit',{scope:'auth'}) | async\"></ax-button>\r\n <div class=\"ax-text-center ax-mt-6 ax-text-sm ax-font-normal\">\r\n <span> {{ t('forgot.remember',{scope:'auth'}) | async}} </span>\r\n <a [routerLink]=\"['/auth/login']\" class=\"ax-link ax-font-semibold\">{{ t('signin.title',{scope:'auth'}) |\r\n async }}</a>\r\n </div>\r\n </ax-form>\r\n</div>"],"names":["i5","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,OAAO,GAAG;IACd,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,gBAAgB;IAChB,mBAAmB;IACnB,YAAY;CACb,CAAC;MAOW,0BAA0B,CAAA;AALvC,IAAA,WAAA,GAAA;AASY,QAAA,IAAA,CAAA,OAAO,GAAmB,MAAM,CAAiB,qBAAqB,CAAC,CAAC;AAiBnF,KAAA;IAfC,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC;AACrB,QAAA,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI;YACvB,KAAK,sBAAsB,CAAC,aAAa;AACvC,gBAAA,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC;gBAClB,MAAM;YACR,KAAK,sBAAsB,CAAC,cAAc;AACxC,gBAAA,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC;gBAEnB,MAAM;YACR,KAAK,sBAAsB,CAAC,gBAAgB,CAAC;AAC7C,YAAA;AACE,gBAAA,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC;SACxB;KACF;8GApBU,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAA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EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAQD,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBALtC,SAAS;AAEC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAC,GAAG,OAAO,CAAC,EAAA,UAAA,EACT,IAAI,EAAA,QAAA,EAAA,wkCAAA,EAAA,CAAA;;;;;"}
|
package/fesm2022/{acorex-modules-auth-routes-DyjibH6l.mjs → acorex-modules-auth-routes--jOmlQkp.mjs}
RENAMED
@@ -1,9 +1,9 @@
|
|
1
1
|
var routes = [{
|
2
2
|
path: 'forgot',
|
3
3
|
loadComponent: () => {
|
4
|
-
return import('./acorex-modules-auth-password.component-
|
4
|
+
return import('./acorex-modules-auth-password.component-qr9vkp8j.mjs').then((c) => c.AXPForgetPasswordComponent);
|
5
5
|
},
|
6
6
|
}];
|
7
7
|
|
8
8
|
export { routes as default };
|
9
|
-
//# sourceMappingURL=acorex-modules-auth-routes
|
9
|
+
//# sourceMappingURL=acorex-modules-auth-routes--jOmlQkp.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-auth-routes--jOmlQkp.mjs","sources":["../../../../libs/modules/auth/src/lib/forgot/routes.ts"],"sourcesContent":["import { Route } from '@angular/router';\r\n\r\nexport default [{\r\n path: 'forgot',\r\n loadComponent: () => {\r\n return import('./password/password.component').then(\r\n (c) => c.AXPForgetPasswordComponent\r\n );\r\n },\r\n}] as Route[];"],"names":[],"mappings":"AAEA,aAAe,CAAC;AACZ,QAAA,IAAI,EAAE,QAAQ;QACd,aAAa,EAAE,MAAK;AAChB,YAAA,OAAO,OAAO,uDAA+B,CAAC,CAAC,IAAI,CAC/C,CAAC,CAAC,KAAK,CAAC,CAAC,0BAA0B,CACtC,CAAC;SACL;AACJ,KAAA,CAAY;;;;"}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { inject, Component, ViewEncapsulation } from '@angular/core';
|
3
|
+
import * as i3 from '@acorex/components/avatar';
|
4
|
+
import { AXAvatarModule } from '@acorex/components/avatar';
|
5
|
+
import * as i2 from '@acorex/components/button';
|
6
|
+
import { AXButtonModule } from '@acorex/components/button';
|
7
|
+
import { AXCheckBoxModule } from '@acorex/components/check-box';
|
8
|
+
import * as i2$2 from '@acorex/components/decorators';
|
9
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
10
|
+
import { AXFormModule } from '@acorex/components/form';
|
11
|
+
import * as i2$1 from '@acorex/components/image';
|
12
|
+
import { AXImageModule } from '@acorex/components/image';
|
13
|
+
import { AXLabelModule } from '@acorex/components/label';
|
14
|
+
import * as i3$1 from '@acorex/components/loading';
|
15
|
+
import { AXLoadingModule } from '@acorex/components/loading';
|
16
|
+
import { AXTextBoxModule } from '@acorex/components/text-box';
|
17
|
+
import * as i6 from '@acorex/core/translation';
|
18
|
+
import { AXTranslationModule } from '@acorex/core/translation';
|
19
|
+
import { AXPSessionService } from '@acorex/platform/auth';
|
20
|
+
import { AXP_PLATFORM_CONFIG_TOKEN, AXPLogoComponent } from '@acorex/platform/common';
|
21
|
+
import * as i1 from '@angular/common';
|
22
|
+
import { CommonModule } from '@angular/common';
|
23
|
+
import { Router } from '@angular/router';
|
24
|
+
import { Subscription, first } from 'rxjs';
|
25
|
+
|
26
|
+
class AXPAuthTenantChooserComponent {
|
27
|
+
constructor() {
|
28
|
+
this.router = inject(Router);
|
29
|
+
this.platformConfig = inject(AXP_PLATFORM_CONFIG_TOKEN);
|
30
|
+
this.sessionService = inject(AXPSessionService);
|
31
|
+
this.subscription = new Subscription();
|
32
|
+
this.user = this.sessionService.user;
|
33
|
+
this.showAll = false;
|
34
|
+
this.selectedTenant = null;
|
35
|
+
this.displayedTenants = [];
|
36
|
+
}
|
37
|
+
async handleChooseTenant(item) {
|
38
|
+
this.selectedTenant = item;
|
39
|
+
await this.sessionService.setTenant(item);
|
40
|
+
this.router.navigate(['/auth/account/app-chooser']);
|
41
|
+
}
|
42
|
+
ngOnInit() {
|
43
|
+
this.sessionService.tenants$
|
44
|
+
.pipe(first())
|
45
|
+
.subscribe((tenants) => {
|
46
|
+
this.displayedTenants = tenants.slice(0, 4);
|
47
|
+
this.allTenants = tenants;
|
48
|
+
});
|
49
|
+
}
|
50
|
+
showAllTenants() {
|
51
|
+
this.showAll = !this.showAll;
|
52
|
+
this.displayedTenants = this.showAll ? this.allTenants : this.allTenants.slice(0, 4);
|
53
|
+
}
|
54
|
+
async handleSignout() {
|
55
|
+
await this.sessionService.signout();
|
56
|
+
this.router.navigate(['/auth/login']);
|
57
|
+
}
|
58
|
+
ngOnDestroy() {
|
59
|
+
this.subscription.unsubscribe();
|
60
|
+
}
|
61
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPAuthTenantChooserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
62
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: AXPAuthTenantChooserComponent, isStandalone: true, selector: "axp-auth-tenant-chooser", ngImport: i0, template: "<main *translate=\"let t\"\r\n class=\"ax-w-full ax-space-y-10 ax-h-[100vh] ax-flex ax-flex-col ax-items-center ax-justify-center ax-bg-surface md:ax-bg-default\">\r\n <section>\r\n <axp-logo [source]=\"platformConfig.logo?.colored\" [attr.alt]=\"platformConfig.title\"\r\n class=\"ax-w-36 ax-mx-auto ax-text-2xl ax-font-bold\"></axp-logo>\r\n </section>\r\n <section class=\"ax-flex ax-justify-center\">\r\n <div\r\n class=\"ax-flex ax-gap-2 ax-justify-center ax-text-center ax-flex-col ax-items-center ax-border ax-rounded-lg ax-shadow-lg ax-p-6 md:ax-w-96 ax-w-80\">\r\n <ax-avatar class=\"ax-rounded-full\" [size]=\"72\">\r\n @if(user?.avatar){\r\n <ax-image [src]=\"user?.avatar\"></ax-image>\r\n }\r\n </ax-avatar>\r\n <h2 class=\"md:ax-text-lg ax-font-medium\">{{ t('welcome') | async }}, {{ user?.title }}</h2>\r\n <p class=\"ax-text-neutral-500 ax-text-sm md:ax-text-base ax-font-medium\">\r\n {{ t('tenant-chooser.description', { scope: 'auth' }) | async }}\r\n </p>\r\n <div class=\"ax-mt-3 ax-w-full ax-overflow-auto ax-max-h-[300px] ax-pe-2\">\r\n @for(tenant of displayedTenants; track $index){\r\n <div\r\n class=\"ax-flex ax-gap-2 ax-justify-between ax-border-b last:ax-border-b-0 ax-py-3 ax-items-center ax-cursor-pointer\"\r\n (click)=\"handleChooseTenant(tenant)\">\r\n <div class=\"ax-flex ax-gap-2 ax-items-center ax-font-medium\">\r\n <div\r\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\">\r\n <ax-icon class=\"fa-solid fa-building ax-text-neutral-500 ax-text-lg\"> </ax-icon>\r\n </div>\r\n <span class=\"md:ax-text-base ax-text-sm\">{{ tenant.title }}</span>\r\n </div>\r\n @if(tenant.name===selectedTenant?.name){\r\n <ax-loading></ax-loading>\r\n }@else {\r\n <ax-icon class=\"fa-solid fa-chevron-right ax-text-neutral-400\"> </ax-icon>\r\n }\r\n </div>\r\n }\r\n </div>\r\n @if(allTenants.length>4){\r\n <div class=\"ax-mt-6 ax-w-full ax-flex ax-justify-center\">\r\n <ax-button (onClick)=\"showAllTenants()\" class=\"ax-w-full\" look=\"outline\"\r\n [text]=\"showAll ? (t('viewLess') | async) : (t('viewAll') | async)\"></ax-button>\r\n </div>\r\n }\r\n </div>\r\n </section>\r\n <section>\r\n <p class=\"ax-text-neutral-400 ax-text-sm\">\r\n {{ t('tenant-chooser.footer', { scope: 'auth' }) | async }}\r\n <a (click)=\"handleSignout()\" class=\"ax-text-primary ax-cursor-pointer hover:ax-underline ax-font-medium\">\r\n {{ t('backLogin', { scope: 'auth' }) | async }}\r\n </a>\r\n </p>\r\n </section>\r\n</main>", styles: [":host{display:contents}.gradient{background:-webkit-linear-gradient(var(--ax-current-v1),var(--ax-current-v2));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXAvatarModule }, { kind: "component", type: i3.AXAvatarComponent, selector: "ax-avatar", inputs: ["color", "size", "look"] }, { kind: "ngmodule", type: AXImageModule }, { kind: "component", type: i2$1.AXImageComponent, selector: "ax-image", inputs: ["overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXPLogoComponent, selector: "axp-logo", inputs: ["source"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i3$1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i6.AXTranslatorDirective, selector: "[translate]" }], encapsulation: i0.ViewEncapsulation.None }); }
|
63
|
+
}
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPAuthTenantChooserComponent, decorators: [{
|
65
|
+
type: Component,
|
66
|
+
args: [{ selector: 'axp-auth-tenant-chooser', imports: [
|
67
|
+
CommonModule,
|
68
|
+
AXFormModule,
|
69
|
+
AXTextBoxModule,
|
70
|
+
AXButtonModule,
|
71
|
+
AXLabelModule,
|
72
|
+
AXCheckBoxModule,
|
73
|
+
AXAvatarModule,
|
74
|
+
AXImageModule,
|
75
|
+
AXDecoratorModule,
|
76
|
+
AXPLogoComponent,
|
77
|
+
AXLoadingModule,
|
78
|
+
AXTranslationModule,
|
79
|
+
], encapsulation: ViewEncapsulation.None, standalone: true, template: "<main *translate=\"let t\"\r\n class=\"ax-w-full ax-space-y-10 ax-h-[100vh] ax-flex ax-flex-col ax-items-center ax-justify-center ax-bg-surface md:ax-bg-default\">\r\n <section>\r\n <axp-logo [source]=\"platformConfig.logo?.colored\" [attr.alt]=\"platformConfig.title\"\r\n class=\"ax-w-36 ax-mx-auto ax-text-2xl ax-font-bold\"></axp-logo>\r\n </section>\r\n <section class=\"ax-flex ax-justify-center\">\r\n <div\r\n class=\"ax-flex ax-gap-2 ax-justify-center ax-text-center ax-flex-col ax-items-center ax-border ax-rounded-lg ax-shadow-lg ax-p-6 md:ax-w-96 ax-w-80\">\r\n <ax-avatar class=\"ax-rounded-full\" [size]=\"72\">\r\n @if(user?.avatar){\r\n <ax-image [src]=\"user?.avatar\"></ax-image>\r\n }\r\n </ax-avatar>\r\n <h2 class=\"md:ax-text-lg ax-font-medium\">{{ t('welcome') | async }}, {{ user?.title }}</h2>\r\n <p class=\"ax-text-neutral-500 ax-text-sm md:ax-text-base ax-font-medium\">\r\n {{ t('tenant-chooser.description', { scope: 'auth' }) | async }}\r\n </p>\r\n <div class=\"ax-mt-3 ax-w-full ax-overflow-auto ax-max-h-[300px] ax-pe-2\">\r\n @for(tenant of displayedTenants; track $index){\r\n <div\r\n class=\"ax-flex ax-gap-2 ax-justify-between ax-border-b last:ax-border-b-0 ax-py-3 ax-items-center ax-cursor-pointer\"\r\n (click)=\"handleChooseTenant(tenant)\">\r\n <div class=\"ax-flex ax-gap-2 ax-items-center ax-font-medium\">\r\n <div\r\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\">\r\n <ax-icon class=\"fa-solid fa-building ax-text-neutral-500 ax-text-lg\"> </ax-icon>\r\n </div>\r\n <span class=\"md:ax-text-base ax-text-sm\">{{ tenant.title }}</span>\r\n </div>\r\n @if(tenant.name===selectedTenant?.name){\r\n <ax-loading></ax-loading>\r\n }@else {\r\n <ax-icon class=\"fa-solid fa-chevron-right ax-text-neutral-400\"> </ax-icon>\r\n }\r\n </div>\r\n }\r\n </div>\r\n @if(allTenants.length>4){\r\n <div class=\"ax-mt-6 ax-w-full ax-flex ax-justify-center\">\r\n <ax-button (onClick)=\"showAllTenants()\" class=\"ax-w-full\" look=\"outline\"\r\n [text]=\"showAll ? (t('viewLess') | async) : (t('viewAll') | async)\"></ax-button>\r\n </div>\r\n }\r\n </div>\r\n </section>\r\n <section>\r\n <p class=\"ax-text-neutral-400 ax-text-sm\">\r\n {{ t('tenant-chooser.footer', { scope: 'auth' }) | async }}\r\n <a (click)=\"handleSignout()\" class=\"ax-text-primary ax-cursor-pointer hover:ax-underline ax-font-medium\">\r\n {{ t('backLogin', { scope: 'auth' }) | async }}\r\n </a>\r\n </p>\r\n </section>\r\n</main>", styles: [":host{display:contents}.gradient{background:-webkit-linear-gradient(var(--ax-current-v1),var(--ax-current-v2));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}\n"] }]
|
80
|
+
}] });
|
81
|
+
|
82
|
+
export { AXPAuthTenantChooserComponent };
|
83
|
+
//# sourceMappingURL=acorex-modules-auth-tenant-chooser.component-CjEiwASS.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-auth-tenant-chooser.component-CjEiwASS.mjs","sources":["../../../../libs/modules/auth/src/lib/account/tenant-chooser/tenant-chooser.component.ts","../../../../libs/modules/auth/src/lib/account/tenant-chooser/tenant-chooser.component.html"],"sourcesContent":["import { Component, OnDestroy, OnInit, ViewEncapsulation, inject } from '@angular/core';\r\n\r\nimport { AXAvatarModule } from '@acorex/components/avatar';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXFormModule } from '@acorex/components/form';\r\nimport { AXImageModule } from '@acorex/components/image';\r\nimport { AXLabelModule } from '@acorex/components/label';\r\nimport { AXLoadingModule } from '@acorex/components/loading';\r\nimport { AXTextBoxModule } from '@acorex/components/text-box';\r\nimport { AXTranslationModule } from '@acorex/core/translation';\r\nimport { AXPSessionService, AXPTenant } from '@acorex/platform/auth';\r\nimport { AXPLogoComponent, AXP_PLATFORM_CONFIG_TOKEN } from '@acorex/platform/common';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Router } from '@angular/router';\r\nimport { Subscription, first } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'axp-auth-tenant-chooser',\r\n templateUrl: './tenant-chooser.component.html',\r\n styleUrls: ['./tenant-chooser.component.scss'],\r\n imports: [\r\n CommonModule,\r\n AXFormModule,\r\n AXTextBoxModule,\r\n AXButtonModule,\r\n AXLabelModule,\r\n AXCheckBoxModule,\r\n AXAvatarModule,\r\n AXImageModule,\r\n AXDecoratorModule,\r\n AXPLogoComponent,\r\n AXLoadingModule,\r\n AXTranslationModule,\r\n ],\r\n encapsulation: ViewEncapsulation.None,\r\n standalone: true,\r\n})\r\nexport class AXPAuthTenantChooserComponent implements OnInit, OnDestroy {\r\n private router = inject(Router);\r\n protected platformConfig = inject(AXP_PLATFORM_CONFIG_TOKEN);\r\n private sessionService = inject(AXPSessionService);\r\n\r\n private subscription = new Subscription();\r\n\r\n protected user = this.sessionService.user;\r\n\r\n protected showAll = false;\r\n protected selectedTenant: AXPTenant | null = null;\r\n protected displayedTenants: AXPTenant[] = [];\r\n protected allTenants!: AXPTenant[];\r\n\r\n protected async handleChooseTenant(item: AXPTenant) {\r\n this.selectedTenant = item;\r\n await this.sessionService.setTenant(item);\r\n this.router.navigate(['/auth/account/app-chooser']);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.sessionService.tenants$\r\n .pipe(first())\r\n .subscribe((tenants) => {\r\n this.displayedTenants = tenants.slice(0, 4);\r\n this.allTenants = tenants;\r\n });\r\n }\r\n\r\n showAllTenants() {\r\n this.showAll = !this.showAll;\r\n this.displayedTenants = this.showAll ? this.allTenants : this.allTenants.slice(0, 4);\r\n }\r\n\r\n async handleSignout() {\r\n await this.sessionService.signout();\r\n this.router.navigate(['/auth/login']);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n }\r\n}\r\n","<main *translate=\"let t\"\r\n class=\"ax-w-full ax-space-y-10 ax-h-[100vh] ax-flex ax-flex-col ax-items-center ax-justify-center ax-bg-surface md:ax-bg-default\">\r\n <section>\r\n <axp-logo [source]=\"platformConfig.logo?.colored\" [attr.alt]=\"platformConfig.title\"\r\n class=\"ax-w-36 ax-mx-auto ax-text-2xl ax-font-bold\"></axp-logo>\r\n </section>\r\n <section class=\"ax-flex ax-justify-center\">\r\n <div\r\n class=\"ax-flex ax-gap-2 ax-justify-center ax-text-center ax-flex-col ax-items-center ax-border ax-rounded-lg ax-shadow-lg ax-p-6 md:ax-w-96 ax-w-80\">\r\n <ax-avatar class=\"ax-rounded-full\" [size]=\"72\">\r\n @if(user?.avatar){\r\n <ax-image [src]=\"user?.avatar\"></ax-image>\r\n }\r\n </ax-avatar>\r\n <h2 class=\"md:ax-text-lg ax-font-medium\">{{ t('welcome') | async }}, {{ user?.title }}</h2>\r\n <p class=\"ax-text-neutral-500 ax-text-sm md:ax-text-base ax-font-medium\">\r\n {{ t('tenant-chooser.description', { scope: 'auth' }) | async }}\r\n </p>\r\n <div class=\"ax-mt-3 ax-w-full ax-overflow-auto ax-max-h-[300px] ax-pe-2\">\r\n @for(tenant of displayedTenants; track $index){\r\n <div\r\n class=\"ax-flex ax-gap-2 ax-justify-between ax-border-b last:ax-border-b-0 ax-py-3 ax-items-center ax-cursor-pointer\"\r\n (click)=\"handleChooseTenant(tenant)\">\r\n <div class=\"ax-flex ax-gap-2 ax-items-center ax-font-medium\">\r\n <div\r\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\">\r\n <ax-icon class=\"fa-solid fa-building ax-text-neutral-500 ax-text-lg\"> </ax-icon>\r\n </div>\r\n <span class=\"md:ax-text-base ax-text-sm\">{{ tenant.title }}</span>\r\n </div>\r\n @if(tenant.name===selectedTenant?.name){\r\n <ax-loading></ax-loading>\r\n }@else {\r\n <ax-icon class=\"fa-solid fa-chevron-right ax-text-neutral-400\"> </ax-icon>\r\n }\r\n </div>\r\n }\r\n </div>\r\n @if(allTenants.length>4){\r\n <div class=\"ax-mt-6 ax-w-full ax-flex ax-justify-center\">\r\n <ax-button (onClick)=\"showAllTenants()\" class=\"ax-w-full\" look=\"outline\"\r\n [text]=\"showAll ? (t('viewLess') | async) : (t('viewAll') | async)\"></ax-button>\r\n </div>\r\n }\r\n </div>\r\n </section>\r\n <section>\r\n <p class=\"ax-text-neutral-400 ax-text-sm\">\r\n {{ t('tenant-chooser.footer', { scope: 'auth' }) | async }}\r\n <a (click)=\"handleSignout()\" class=\"ax-text-primary ax-cursor-pointer hover:ax-underline ax-font-medium\">\r\n {{ t('backLogin', { scope: 'auth' }) | async }}\r\n </a>\r\n </p>\r\n </section>\r\n</main>"],"names":["i4","i5","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;MAuCa,6BAA6B,CAAA;AArB1C,IAAA,WAAA,GAAA;AAsBU,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,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C,EAAA,CAAA,qBAAA,EAAA,QAAA,EAAA,aAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAKV,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBArBzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EAG1B,OAAA,EAAA;wBACP,YAAY;wBACZ,YAAY;wBACZ,eAAe;wBACf,cAAc;wBACd,aAAa;wBACb,gBAAgB;wBAChB,cAAc;wBACd,aAAa;wBACb,iBAAiB;wBACjB,gBAAgB;wBAChB,eAAe;wBACf,mBAAmB;AACpB,qBAAA,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EAAA,UAAA,EACzB,IAAI,EAAA,QAAA,EAAA,8wFAAA,EAAA,MAAA,EAAA,CAAA,yMAAA,CAAA,EAAA,CAAA;;;;;"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { Component, ViewEncapsulation } from '@angular/core';
|
3
|
+
import * as i2$1 from '@acorex/components/button';
|
4
|
+
import { AXButtonModule } from '@acorex/components/button';
|
5
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
6
|
+
import * as i2 from '@acorex/components/form';
|
7
|
+
import { AXFormModule } from '@acorex/components/form';
|
8
|
+
import * as i6 from '@acorex/components/label';
|
9
|
+
import { AXLabelModule } from '@acorex/components/label';
|
10
|
+
import * as i4 from '@acorex/components/password-box';
|
11
|
+
import { AXPasswordBoxModule } from '@acorex/components/password-box';
|
12
|
+
import { AXTextBoxModule } from '@acorex/components/text-box';
|
13
|
+
import * as i6$1 from '@acorex/core/translation';
|
14
|
+
import { AXTranslationModule } from '@acorex/core/translation';
|
15
|
+
import * as i1 from '@angular/common';
|
16
|
+
import { CommonModule } from '@angular/common';
|
17
|
+
|
18
|
+
class AXPAuthTwoFactorCodeComponent {
|
19
|
+
ngOnInit() { }
|
20
|
+
ngOnDestroy() { }
|
21
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPAuthTwoFactorCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
22
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.2", type: AXPAuthTwoFactorCodeComponent, isStandalone: true, selector: "axp-auth-two-factor-code", ngImport: i0, template: "<ng-container *translate=\"let t\">\r\n <div class=\"ax-text-center ax-mb-8\">\r\n <h1 class=\"ax-font-bold ax-text-xl ax-mb-2\">\r\n {{ t('auth.twofactor.title') | async }}\r\n </h1>\r\n <p class=\"ax-text-base ax-text-neutral-600 ax-mb-4\">\r\n {{ t('auth.twofactor.hint') | async }}\r\n </p>\r\n <p class=\"ax-text-base ax-font-medium\">**** *** 3320</p>\r\n </div>\r\n <div class=\"ax-w-80 lg:ax-w-96\">\r\n <ax-form>\r\n <div class=\"ax-flex ax-flex-col ax-gap-6\">\r\n <ax-form-field>\r\n <ax-label class=\"ax-text-start\">{{ t('auth.twofactor.textBoxHint') | async }}</ax-label>\r\n <ax-password-box></ax-password-box>\r\n </ax-form-field>\r\n <ax-button class=\"ax-w-full\" [text]=\"t('common.submit') | async\" color=\"primary\"> </ax-button>\r\n </div>\r\n </ax-form>\r\n </div>\r\n</ng-container>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i2.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i6.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXPasswordBoxModule }, { kind: "component", type: i4.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: "directive", type: i6$1.AXTranslatorDirective, selector: "[translate]" }], encapsulation: i0.ViewEncapsulation.None }); }
|
23
|
+
}
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPAuthTwoFactorCodeComponent, decorators: [{
|
25
|
+
type: Component,
|
26
|
+
args: [{ selector: 'axp-auth-two-factor-code', imports: [
|
27
|
+
CommonModule,
|
28
|
+
AXFormModule,
|
29
|
+
AXButtonModule,
|
30
|
+
AXDecoratorModule,
|
31
|
+
AXFormModule,
|
32
|
+
AXTextBoxModule,
|
33
|
+
AXLabelModule,
|
34
|
+
AXPasswordBoxModule,
|
35
|
+
AXTranslationModule,
|
36
|
+
], encapsulation: ViewEncapsulation.None, standalone: true, template: "<ng-container *translate=\"let t\">\r\n <div class=\"ax-text-center ax-mb-8\">\r\n <h1 class=\"ax-font-bold ax-text-xl ax-mb-2\">\r\n {{ t('auth.twofactor.title') | async }}\r\n </h1>\r\n <p class=\"ax-text-base ax-text-neutral-600 ax-mb-4\">\r\n {{ t('auth.twofactor.hint') | async }}\r\n </p>\r\n <p class=\"ax-text-base ax-font-medium\">**** *** 3320</p>\r\n </div>\r\n <div class=\"ax-w-80 lg:ax-w-96\">\r\n <ax-form>\r\n <div class=\"ax-flex ax-flex-col ax-gap-6\">\r\n <ax-form-field>\r\n <ax-label class=\"ax-text-start\">{{ t('auth.twofactor.textBoxHint') | async }}</ax-label>\r\n <ax-password-box></ax-password-box>\r\n </ax-form-field>\r\n <ax-button class=\"ax-w-full\" [text]=\"t('common.submit') | async\" color=\"primary\"> </ax-button>\r\n </div>\r\n </ax-form>\r\n </div>\r\n</ng-container>" }]
|
37
|
+
}] });
|
38
|
+
|
39
|
+
export { AXPAuthTwoFactorCodeComponent };
|
40
|
+
//# sourceMappingURL=acorex-modules-auth-two-factor-code.component-C0JWM0rO.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-auth-two-factor-code.component-C0JWM0rO.mjs","sources":["../../../../libs/modules/auth/src/lib/two-factor/two-factor-code/two-factor-code.component.ts","../../../../libs/modules/auth/src/lib/two-factor/two-factor-code/two-factor-code.component.html"],"sourcesContent":["import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';\r\n\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXFormModule } from '@acorex/components/form';\r\nimport { AXLabelModule } from '@acorex/components/label';\r\nimport { AXPasswordBoxModule } from '@acorex/components/password-box';\r\nimport { AXTextBoxModule } from '@acorex/components/text-box';\r\nimport { AXTranslationModule } from '@acorex/core/translation';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n\r\n@Component({\r\n selector: 'axp-auth-two-factor-code',\r\n templateUrl: './two-factor-code.component.html',\r\n imports: [\r\n CommonModule,\r\n AXFormModule,\r\n AXButtonModule,\r\n AXDecoratorModule,\r\n AXFormModule,\r\n AXTextBoxModule,\r\n AXLabelModule,\r\n AXPasswordBoxModule,\r\n AXTranslationModule,\r\n ],\r\n encapsulation: ViewEncapsulation.None,\r\n standalone: true\r\n})\r\nexport class AXPAuthTwoFactorCodeComponent implements OnInit, OnDestroy {\r\n ngOnInit(): void { }\r\n\r\n ngOnDestroy(): void { }\r\n}\r\n","<ng-container *translate=\"let t\">\r\n <div class=\"ax-text-center ax-mb-8\">\r\n <h1 class=\"ax-font-bold ax-text-xl ax-mb-2\">\r\n {{ t('auth.twofactor.title') | async }}\r\n </h1>\r\n <p class=\"ax-text-base ax-text-neutral-600 ax-mb-4\">\r\n {{ t('auth.twofactor.hint') | async }}\r\n </p>\r\n <p class=\"ax-text-base ax-font-medium\">**** *** 3320</p>\r\n </div>\r\n <div class=\"ax-w-80 lg:ax-w-96\">\r\n <ax-form>\r\n <div class=\"ax-flex ax-flex-col ax-gap-6\">\r\n <ax-form-field>\r\n <ax-label class=\"ax-text-start\">{{ t('auth.twofactor.textBoxHint') | async }}</ax-label>\r\n <ax-password-box></ax-password-box>\r\n </ax-form-field>\r\n <ax-button class=\"ax-w-full\" [text]=\"t('common.submit') | async\" color=\"primary\"> </ax-button>\r\n </div>\r\n </ax-form>\r\n </div>\r\n</ng-container>"],"names":["i3","i4","i6"],"mappings":";;;;;;;;;;;;;;;;;MA6Ba,6BAA6B,CAAA;AACxC,IAAA,QAAQ,MAAY;AAEpB,IAAA,WAAW,MAAY;8GAHZ,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA7B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,6BAA6B,oFC7B1C,63BAqBe,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDLX,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IA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A,qBAAA,EAAA,QAAA,EAAA,aAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAKV,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAjBzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,EAE3B,OAAA,EAAA;wBACP,YAAY;wBACZ,YAAY;wBACZ,cAAc;wBACd,iBAAiB;wBACjB,YAAY;wBACZ,eAAe;wBACf,aAAa;wBACb,mBAAmB;wBACnB,mBAAmB;AACpB,qBAAA,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EAAA,UAAA,EACzB,IAAI,EAAA,QAAA,EAAA,63BAAA,EAAA,CAAA;;;;;"}
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
2
|
import { inject, NgModule } from '@angular/core';
|
3
3
|
import { RouterModule, ROUTES } from '@angular/router';
|
4
|
-
import { A as AXM_AUTH_CONFIG_TOKEN } from './acorex-modules-auth-acorex-modules-auth-
|
4
|
+
import { A as AXM_AUTH_CONFIG_TOKEN } from './acorex-modules-auth-acorex-modules-auth-DeS0JelZ.mjs';
|
5
|
+
import '@acorex/platform/common';
|
5
6
|
import '@acorex/platform/auth';
|
6
7
|
import '@angular/common/http';
|
7
|
-
import '@acorex/platform/layouts';
|
8
|
-
import '@acorex/platform/common';
|
9
8
|
import '@angular/common';
|
10
9
|
import '@ngrx/effects';
|
11
10
|
import '@acorex/components/dialog';
|
@@ -18,7 +17,6 @@ import '@acorex/components/loading';
|
|
18
17
|
import '@acorex/components/avatar';
|
19
18
|
import '@acorex/components/image';
|
20
19
|
import '@acorex/platform/mocks';
|
21
|
-
import '@acorex/platform/layout';
|
22
20
|
|
23
21
|
function routesFacory() {
|
24
22
|
const val = inject(AXM_AUTH_CONFIG_TOKEN);
|
@@ -26,7 +24,7 @@ function routesFacory() {
|
|
26
24
|
routes = [
|
27
25
|
{
|
28
26
|
path: 'two-step',
|
29
|
-
loadComponent: () => import('./acorex-modules-auth-two-factor-code.component-
|
27
|
+
loadComponent: () => import('./acorex-modules-auth-two-factor-code.component-C0JWM0rO.mjs').then((c) => c.AXPAuthTwoFactorCodeComponent),
|
30
28
|
},
|
31
29
|
];
|
32
30
|
return routes;
|
@@ -59,4 +57,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
59
57
|
}] });
|
60
58
|
|
61
59
|
export { AXPTwoFactorModule };
|
62
|
-
//# sourceMappingURL=acorex-modules-auth-two-factor.module-
|
60
|
+
//# sourceMappingURL=acorex-modules-auth-two-factor.module-CmSVriRz.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-modules-auth-two-factor.module-CmSVriRz.mjs","sources":["../../../../libs/modules/auth/src/lib/two-factor/two-factor.module.ts"],"sourcesContent":["import { inject, NgModule } from '@angular/core';\r\nimport { RouterModule, ROUTES, Routes } from '@angular/router';\r\nimport { AXM_AUTH_CONFIG_TOKEN } from '../auth.config';\r\n\r\nfunction routesFacory() {\r\n const val = inject(AXM_AUTH_CONFIG_TOKEN);\r\n let routes: Routes = [];\r\n routes = [\r\n {\r\n path: 'two-step',\r\n loadComponent: () =>\r\n import('./two-factor-code/two-factor-code.component').then(\r\n (c) => c.AXPAuthTwoFactorCodeComponent\r\n ),\r\n },\r\n ];\r\n return routes;\r\n}\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [RouterModule],\r\n exports: [],\r\n providers: [\r\n {\r\n provide: ROUTES,\r\n multi: true,\r\n useFactory: routesFacory,\r\n },\r\n ],\r\n})\r\nexport class AXPTwoFactorModule { }\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,SAAS,YAAY,GAAA;AACnB,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAC1C,IAAI,MAAM,GAAW,EAAE,CA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AAI;AACX,4BAAA,UAAU,EAAE,YAAY;AACzB,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;;;;"}
|
@@ -1,10 +1,9 @@
|
|
1
|
-
export { d as AXMAuthErrorHandler, g as AXMAuthModule, a as AXMAuthenticationTypes, e as AXMDefaultAuthConfigs, A as AXM_AUTH_CONFIG_TOKEN, h as AXPIdleService, f as configAuthModule } from './acorex-modules-auth-acorex-modules-auth-
|
1
|
+
export { d as AXMAuthErrorHandler, g as AXMAuthModule, a as AXMAuthenticationTypes, e as AXMDefaultAuthConfigs, A as AXM_AUTH_CONFIG_TOKEN, h as AXPIdleService, f as configAuthModule } from './acorex-modules-auth-acorex-modules-auth-DeS0JelZ.mjs';
|
2
2
|
import '@angular/core';
|
3
|
+
import '@acorex/platform/common';
|
3
4
|
import '@angular/router';
|
4
5
|
import '@acorex/platform/auth';
|
5
6
|
import '@angular/common/http';
|
6
|
-
import '@acorex/platform/layouts';
|
7
|
-
import '@acorex/platform/common';
|
8
7
|
import '@angular/common';
|
9
8
|
import '@ngrx/effects';
|
10
9
|
import '@acorex/components/dialog';
|
@@ -17,5 +16,4 @@ import '@acorex/components/loading';
|
|
17
16
|
import '@acorex/components/avatar';
|
18
17
|
import '@acorex/components/image';
|
19
18
|
import '@acorex/platform/mocks';
|
20
|
-
import '@acorex/platform/layout';
|
21
19
|
//# sourceMappingURL=acorex-modules-auth.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-modules-auth.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"acorex-modules-auth.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|