@anarchitects/auth-angular 0.1.6 → 0.4.0
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 +33 -17
- package/feature/README.md +2 -2
- package/fesm2022/anarchitects-auth-angular-feature.mjs +67 -286
- package/fesm2022/anarchitects-auth-angular-feature.mjs.map +1 -1
- package/fesm2022/anarchitects-auth-angular-state.mjs +6 -2
- package/fesm2022/anarchitects-auth-angular-state.mjs.map +1 -1
- package/fesm2022/anarchitects-auth-angular-ui.mjs +458 -0
- package/fesm2022/anarchitects-auth-angular-ui.mjs.map +1 -0
- package/fesm2022/anarchitects-auth-angular.mjs +1 -0
- package/fesm2022/anarchitects-auth-angular.mjs.map +1 -1
- package/package.json +29 -15
- package/state/README.md +3 -2
- package/types/anarchitects-auth-angular-feature.d.ts +58 -49
- package/types/anarchitects-auth-angular-state.d.ts +5 -2
- package/types/anarchitects-auth-angular-ui.d.ts +138 -0
- package/types/anarchitects-auth-angular.d.ts +1 -0
- package/ui/README.md +22 -0
- package/util/README.md +1 -1
|
@@ -1,225 +1,101 @@
|
|
|
1
1
|
import { AuthStore } from '@anarchitects/auth-angular/state';
|
|
2
|
-
import {
|
|
2
|
+
import { AnarchitectsAuthUiRegisterForm, AnarchitectsAuthUiActivateUserForm, AnarchitectsAuthUiForgotPasswordForm, AnarchitectsAuthUiResetPasswordForm, AnarchitectsAuthUiVerifyEmailForm, AnarchitectsAuthUiChangePasswordForm, AnarchitectsAuthUiUpdateEmailForm, AnarchitectsAuthUiLogoutForm, AnarchitectsAuthUiRefreshTokensForm, AnarchitectsAuthUiLoginForm } from '@anarchitects/auth-angular/ui';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject,
|
|
4
|
+
import { inject, input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
5
|
import { jwtDecode } from 'jwt-decode';
|
|
6
6
|
|
|
7
7
|
class AnarchitectsFeatureRegister {
|
|
8
8
|
authStore = inject(AuthStore);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
version: 1,
|
|
12
|
-
fields: [
|
|
13
|
-
{
|
|
14
|
-
name: 'userName',
|
|
15
|
-
kind: 'string',
|
|
16
|
-
ui: { label: 'Username' },
|
|
17
|
-
required: false,
|
|
18
|
-
},
|
|
19
|
-
{ name: 'email', kind: 'email', ui: { label: 'Email' }, required: true },
|
|
20
|
-
{
|
|
21
|
-
name: 'password',
|
|
22
|
-
kind: 'password',
|
|
23
|
-
ui: { label: 'Password' },
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'confirmPassword',
|
|
28
|
-
kind: 'password',
|
|
29
|
-
ui: { label: 'Confirm Password' },
|
|
30
|
-
required: true,
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
}, ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
|
|
9
|
+
layout = input(null, ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
10
|
+
layoutOptions = input({}, ...(ngDevMode ? [{ debugName: "layoutOptions" }] : []));
|
|
34
11
|
async submitForm(input) {
|
|
35
|
-
|
|
36
|
-
userName: input.payload['userName'],
|
|
37
|
-
email: input.payload['email'],
|
|
38
|
-
password: input.payload['password'],
|
|
39
|
-
confirmPassword: input.payload['confirmPassword'],
|
|
40
|
-
};
|
|
41
|
-
await this.authStore.registerUser(registerInput);
|
|
12
|
+
await this.authStore.registerUser(input);
|
|
42
13
|
}
|
|
43
14
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureRegister, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
44
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
15
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureRegister, isStandalone: true, selector: "anarchitects-auth-feature-register", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, layoutOptions: { classPropertyName: "layoutOptions", publicName: "layoutOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-auth-ui-register-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-register-form>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: AnarchitectsAuthUiRegisterForm, selector: "anarchitects-auth-ui-register-form", inputs: ["layout", "layoutOptions"], outputs: ["submitted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
45
16
|
}
|
|
46
17
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureRegister, decorators: [{
|
|
47
18
|
type: Component,
|
|
48
|
-
args: [{ selector: 'anarchitects-auth-feature-register', imports: [
|
|
49
|
-
}] });
|
|
19
|
+
args: [{ selector: 'anarchitects-auth-feature-register', imports: [AnarchitectsAuthUiRegisterForm], changeDetection: ChangeDetectionStrategy.OnPush, template: "<anarchitects-auth-ui-register-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-register-form>\n", styles: [":host{display:block}\n"] }]
|
|
20
|
+
}], propDecorators: { layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], layoutOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutOptions", required: false }] }] } });
|
|
50
21
|
|
|
51
22
|
class AnarchitectsFeatureActivateUser {
|
|
52
23
|
authStore = inject(AuthStore);
|
|
53
24
|
token = input(...(ngDevMode ? [undefined, { debugName: "token" }] : []));
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
version: 1,
|
|
57
|
-
fields: [
|
|
58
|
-
{
|
|
59
|
-
name: 'token',
|
|
60
|
-
kind: 'string',
|
|
61
|
-
required: !this.token(),
|
|
62
|
-
minLength: 1,
|
|
63
|
-
ui: { label: 'Activation Token' },
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
}), ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
|
|
25
|
+
layout = input(null, ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
26
|
+
layoutOptions = input({}, ...(ngDevMode ? [{ debugName: "layoutOptions" }] : []));
|
|
67
27
|
async submitForm(input) {
|
|
68
|
-
|
|
69
|
-
if (!resolvedToken) {
|
|
28
|
+
if (!input.token) {
|
|
70
29
|
return;
|
|
71
30
|
}
|
|
72
|
-
|
|
73
|
-
await this.authStore.activateUser(dto);
|
|
31
|
+
await this.authStore.activateUser(input);
|
|
74
32
|
}
|
|
75
33
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureActivateUser, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
76
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureActivateUser, isStandalone: true, selector: "anarchitects-auth-feature-activate-user", inputs: { token: { classPropertyName: "token", publicName: "token", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-
|
|
34
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureActivateUser, isStandalone: true, selector: "anarchitects-auth-feature-activate-user", inputs: { token: { classPropertyName: "token", publicName: "token", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, layoutOptions: { classPropertyName: "layoutOptions", publicName: "layoutOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-auth-ui-activate-user-form\n [token]=\"token()\"\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-activate-user-form>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: AnarchitectsAuthUiActivateUserForm, selector: "anarchitects-auth-ui-activate-user-form", inputs: ["token", "layout", "layoutOptions"], outputs: ["submitted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
77
35
|
}
|
|
78
36
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureActivateUser, decorators: [{
|
|
79
37
|
type: Component,
|
|
80
|
-
args: [{ selector: 'anarchitects-auth-feature-activate-user', imports: [
|
|
81
|
-
}], propDecorators: { token: [{ type: i0.Input, args: [{ isSignal: true, alias: "token", required: false }] }] } });
|
|
38
|
+
args: [{ selector: 'anarchitects-auth-feature-activate-user', imports: [AnarchitectsAuthUiActivateUserForm], changeDetection: ChangeDetectionStrategy.OnPush, template: "<anarchitects-auth-ui-activate-user-form\n [token]=\"token()\"\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-activate-user-form>\n", styles: [":host{display:block}\n"] }]
|
|
39
|
+
}], propDecorators: { token: [{ type: i0.Input, args: [{ isSignal: true, alias: "token", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], layoutOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutOptions", required: false }] }] } });
|
|
82
40
|
|
|
83
41
|
class AnarchitectsFeatureForgotPassword {
|
|
84
42
|
authStore = inject(AuthStore);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
version: 1,
|
|
88
|
-
fields: [
|
|
89
|
-
{
|
|
90
|
-
name: 'email',
|
|
91
|
-
kind: 'email',
|
|
92
|
-
required: true,
|
|
93
|
-
ui: { label: 'Email' },
|
|
94
|
-
},
|
|
95
|
-
],
|
|
96
|
-
}, ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
|
|
43
|
+
layout = input(null, ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
44
|
+
layoutOptions = input({}, ...(ngDevMode ? [{ debugName: "layoutOptions" }] : []));
|
|
97
45
|
async submitForm(input) {
|
|
98
|
-
|
|
99
|
-
email: input.payload['email'],
|
|
100
|
-
};
|
|
101
|
-
await this.authStore.forgotPassword(dto);
|
|
46
|
+
await this.authStore.forgotPassword(input);
|
|
102
47
|
}
|
|
103
48
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureForgotPassword, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
104
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
49
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureForgotPassword, isStandalone: true, selector: "anarchitects-auth-feature-forgot-password", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, layoutOptions: { classPropertyName: "layoutOptions", publicName: "layoutOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-auth-ui-forgot-password-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-forgot-password-form>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: AnarchitectsAuthUiForgotPasswordForm, selector: "anarchitects-auth-ui-forgot-password-form", inputs: ["layout", "layoutOptions"], outputs: ["submitted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
105
50
|
}
|
|
106
51
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureForgotPassword, decorators: [{
|
|
107
52
|
type: Component,
|
|
108
|
-
args: [{ selector: 'anarchitects-auth-feature-forgot-password', imports: [
|
|
109
|
-
}] });
|
|
53
|
+
args: [{ selector: 'anarchitects-auth-feature-forgot-password', imports: [AnarchitectsAuthUiForgotPasswordForm], changeDetection: ChangeDetectionStrategy.OnPush, template: "<anarchitects-auth-ui-forgot-password-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-forgot-password-form>\n", styles: [":host{display:block}\n"] }]
|
|
54
|
+
}], propDecorators: { layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], layoutOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutOptions", required: false }] }] } });
|
|
110
55
|
|
|
111
56
|
class AnarchitectsFeatureResetPassword {
|
|
112
57
|
authStore = inject(AuthStore);
|
|
113
58
|
token = input(...(ngDevMode ? [undefined, { debugName: "token" }] : []));
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
version: 1,
|
|
117
|
-
fields: [
|
|
118
|
-
{
|
|
119
|
-
name: 'token',
|
|
120
|
-
kind: 'string',
|
|
121
|
-
required: !this.token(),
|
|
122
|
-
minLength: 1,
|
|
123
|
-
ui: { label: 'Reset Token' },
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
name: 'password',
|
|
127
|
-
kind: 'password',
|
|
128
|
-
required: true,
|
|
129
|
-
minLength: 6,
|
|
130
|
-
ui: { label: 'Password' },
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
name: 'confirmPassword',
|
|
134
|
-
kind: 'password',
|
|
135
|
-
required: true,
|
|
136
|
-
minLength: 6,
|
|
137
|
-
ui: { label: 'Confirm Password' },
|
|
138
|
-
},
|
|
139
|
-
],
|
|
140
|
-
}), ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
|
|
59
|
+
layout = input(null, ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
60
|
+
layoutOptions = input({}, ...(ngDevMode ? [{ debugName: "layoutOptions" }] : []));
|
|
141
61
|
async submitForm(input) {
|
|
142
|
-
|
|
143
|
-
if (!token) {
|
|
62
|
+
if (!input.token) {
|
|
144
63
|
return;
|
|
145
64
|
}
|
|
146
|
-
|
|
147
|
-
token,
|
|
148
|
-
password: input.payload['password'],
|
|
149
|
-
confirmPassword: input.payload['confirmPassword'],
|
|
150
|
-
};
|
|
151
|
-
await this.authStore.resetPassword({ dto });
|
|
65
|
+
await this.authStore.resetPassword({ dto: input });
|
|
152
66
|
}
|
|
153
67
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureResetPassword, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
154
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureResetPassword, isStandalone: true, selector: "anarchitects-auth-feature-reset-password", inputs: { token: { classPropertyName: "token", publicName: "token", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-
|
|
68
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureResetPassword, isStandalone: true, selector: "anarchitects-auth-feature-reset-password", inputs: { token: { classPropertyName: "token", publicName: "token", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, layoutOptions: { classPropertyName: "layoutOptions", publicName: "layoutOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-auth-ui-reset-password-form\n [token]=\"token()\"\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-reset-password-form>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: AnarchitectsAuthUiResetPasswordForm, selector: "anarchitects-auth-ui-reset-password-form", inputs: ["token", "layout", "layoutOptions"], outputs: ["submitted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
155
69
|
}
|
|
156
70
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureResetPassword, decorators: [{
|
|
157
71
|
type: Component,
|
|
158
|
-
args: [{ selector: 'anarchitects-auth-feature-reset-password', imports: [
|
|
159
|
-
}], propDecorators: { token: [{ type: i0.Input, args: [{ isSignal: true, alias: "token", required: false }] }] } });
|
|
72
|
+
args: [{ selector: 'anarchitects-auth-feature-reset-password', imports: [AnarchitectsAuthUiResetPasswordForm], changeDetection: ChangeDetectionStrategy.OnPush, template: "<anarchitects-auth-ui-reset-password-form\n [token]=\"token()\"\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-reset-password-form>\n", styles: [":host{display:block}\n"] }]
|
|
73
|
+
}], propDecorators: { token: [{ type: i0.Input, args: [{ isSignal: true, alias: "token", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], layoutOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutOptions", required: false }] }] } });
|
|
160
74
|
|
|
161
75
|
class AnarchitectsFeatureVerifyEmail {
|
|
162
76
|
authStore = inject(AuthStore);
|
|
163
77
|
token = input(...(ngDevMode ? [undefined, { debugName: "token" }] : []));
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
version: 1,
|
|
167
|
-
fields: [
|
|
168
|
-
{
|
|
169
|
-
name: 'token',
|
|
170
|
-
kind: 'string',
|
|
171
|
-
required: !this.token(),
|
|
172
|
-
minLength: 1,
|
|
173
|
-
ui: { label: 'Verification Token' },
|
|
174
|
-
},
|
|
175
|
-
],
|
|
176
|
-
}), ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
|
|
78
|
+
layout = input(null, ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
79
|
+
layoutOptions = input({}, ...(ngDevMode ? [{ debugName: "layoutOptions" }] : []));
|
|
177
80
|
async submitForm(input) {
|
|
178
|
-
|
|
179
|
-
if (!token) {
|
|
81
|
+
if (!input.token) {
|
|
180
82
|
return;
|
|
181
83
|
}
|
|
182
|
-
|
|
183
|
-
await this.authStore.verifyEmail(dto);
|
|
84
|
+
await this.authStore.verifyEmail(input);
|
|
184
85
|
}
|
|
185
86
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureVerifyEmail, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
186
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureVerifyEmail, isStandalone: true, selector: "anarchitects-auth-feature-verify-email", inputs: { token: { classPropertyName: "token", publicName: "token", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-
|
|
87
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureVerifyEmail, isStandalone: true, selector: "anarchitects-auth-feature-verify-email", inputs: { token: { classPropertyName: "token", publicName: "token", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, layoutOptions: { classPropertyName: "layoutOptions", publicName: "layoutOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-auth-ui-verify-email-form\n [token]=\"token()\"\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-verify-email-form>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: AnarchitectsAuthUiVerifyEmailForm, selector: "anarchitects-auth-ui-verify-email-form", inputs: ["token", "layout", "layoutOptions"], outputs: ["submitted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
187
88
|
}
|
|
188
89
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureVerifyEmail, decorators: [{
|
|
189
90
|
type: Component,
|
|
190
|
-
args: [{ selector: 'anarchitects-auth-feature-verify-email', imports: [
|
|
191
|
-
}], propDecorators: { token: [{ type: i0.Input, args: [{ isSignal: true, alias: "token", required: false }] }] } });
|
|
91
|
+
args: [{ selector: 'anarchitects-auth-feature-verify-email', imports: [AnarchitectsAuthUiVerifyEmailForm], changeDetection: ChangeDetectionStrategy.OnPush, template: "<anarchitects-auth-ui-verify-email-form\n [token]=\"token()\"\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-verify-email-form>\n", styles: [":host{display:block}\n"] }]
|
|
92
|
+
}], propDecorators: { token: [{ type: i0.Input, args: [{ isSignal: true, alias: "token", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], layoutOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutOptions", required: false }] }] } });
|
|
192
93
|
|
|
193
94
|
class AnarchitectsFeatureChangePassword {
|
|
194
95
|
authStore = inject(AuthStore);
|
|
195
96
|
userId = input(...(ngDevMode ? [undefined, { debugName: "userId" }] : []));
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
version: 1,
|
|
199
|
-
fields: [
|
|
200
|
-
{
|
|
201
|
-
name: 'currentPassword',
|
|
202
|
-
kind: 'password',
|
|
203
|
-
required: true,
|
|
204
|
-
minLength: 6,
|
|
205
|
-
ui: { label: 'Current Password' },
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
name: 'newPassword',
|
|
209
|
-
kind: 'password',
|
|
210
|
-
required: true,
|
|
211
|
-
minLength: 6,
|
|
212
|
-
ui: { label: 'New Password' },
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
name: 'confirmPassword',
|
|
216
|
-
kind: 'password',
|
|
217
|
-
required: true,
|
|
218
|
-
minLength: 6,
|
|
219
|
-
ui: { label: 'Confirm Password' },
|
|
220
|
-
},
|
|
221
|
-
],
|
|
222
|
-
}, ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
|
|
97
|
+
layout = input(null, ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
98
|
+
layoutOptions = input({}, ...(ngDevMode ? [{ debugName: "layoutOptions" }] : []));
|
|
223
99
|
resolveUserId() {
|
|
224
100
|
const fromInput = this.userId();
|
|
225
101
|
if (fromInput) {
|
|
@@ -246,43 +122,21 @@ class AnarchitectsFeatureChangePassword {
|
|
|
246
122
|
if (!userId) {
|
|
247
123
|
return;
|
|
248
124
|
}
|
|
249
|
-
|
|
250
|
-
currentPassword: input.payload['currentPassword'],
|
|
251
|
-
newPassword: input.payload['newPassword'],
|
|
252
|
-
confirmPassword: input.payload['confirmPassword'],
|
|
253
|
-
};
|
|
254
|
-
await this.authStore.changePassword({ userId, dto });
|
|
125
|
+
await this.authStore.changePassword({ userId, dto: input });
|
|
255
126
|
}
|
|
256
127
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureChangePassword, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
257
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureChangePassword, isStandalone: true, selector: "anarchitects-auth-feature-change-password", inputs: { userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-
|
|
128
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureChangePassword, isStandalone: true, selector: "anarchitects-auth-feature-change-password", inputs: { userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, layoutOptions: { classPropertyName: "layoutOptions", publicName: "layoutOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-auth-ui-change-password-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-change-password-form>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: AnarchitectsAuthUiChangePasswordForm, selector: "anarchitects-auth-ui-change-password-form", inputs: ["layout", "layoutOptions"], outputs: ["submitted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
258
129
|
}
|
|
259
130
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureChangePassword, decorators: [{
|
|
260
131
|
type: Component,
|
|
261
|
-
args: [{ selector: 'anarchitects-auth-feature-change-password', imports: [
|
|
262
|
-
}], propDecorators: { userId: [{ type: i0.Input, args: [{ isSignal: true, alias: "userId", required: false }] }] } });
|
|
132
|
+
args: [{ selector: 'anarchitects-auth-feature-change-password', imports: [AnarchitectsAuthUiChangePasswordForm], changeDetection: ChangeDetectionStrategy.OnPush, template: "<anarchitects-auth-ui-change-password-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-change-password-form>\n", styles: [":host{display:block}\n"] }]
|
|
133
|
+
}], propDecorators: { userId: [{ type: i0.Input, args: [{ isSignal: true, alias: "userId", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], layoutOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutOptions", required: false }] }] } });
|
|
263
134
|
|
|
264
135
|
class AnarchitectsFeatureUpdateEmail {
|
|
265
136
|
authStore = inject(AuthStore);
|
|
266
137
|
userId = input(...(ngDevMode ? [undefined, { debugName: "userId" }] : []));
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
version: 1,
|
|
270
|
-
fields: [
|
|
271
|
-
{
|
|
272
|
-
name: 'newEmail',
|
|
273
|
-
kind: 'email',
|
|
274
|
-
required: true,
|
|
275
|
-
ui: { label: 'New Email' },
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
name: 'password',
|
|
279
|
-
kind: 'password',
|
|
280
|
-
required: true,
|
|
281
|
-
minLength: 6,
|
|
282
|
-
ui: { label: 'Password' },
|
|
283
|
-
},
|
|
284
|
-
],
|
|
285
|
-
}, ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
|
|
138
|
+
layout = input(null, ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
139
|
+
layoutOptions = input({}, ...(ngDevMode ? [{ debugName: "layoutOptions" }] : []));
|
|
286
140
|
resolveUserId() {
|
|
287
141
|
const fromInput = this.userId();
|
|
288
142
|
if (fromInput) {
|
|
@@ -309,82 +163,39 @@ class AnarchitectsFeatureUpdateEmail {
|
|
|
309
163
|
if (!userId) {
|
|
310
164
|
return;
|
|
311
165
|
}
|
|
312
|
-
|
|
313
|
-
newEmail: input.payload['newEmail'],
|
|
314
|
-
password: input.payload['password'],
|
|
315
|
-
};
|
|
316
|
-
await this.authStore.updateEmail({ userId, dto });
|
|
166
|
+
await this.authStore.updateEmail({ userId, dto: input });
|
|
317
167
|
}
|
|
318
168
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureUpdateEmail, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
319
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureUpdateEmail, isStandalone: true, selector: "anarchitects-auth-feature-update-email", inputs: { userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-
|
|
169
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureUpdateEmail, isStandalone: true, selector: "anarchitects-auth-feature-update-email", inputs: { userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, layoutOptions: { classPropertyName: "layoutOptions", publicName: "layoutOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-auth-ui-update-email-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-update-email-form>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: AnarchitectsAuthUiUpdateEmailForm, selector: "anarchitects-auth-ui-update-email-form", inputs: ["layout", "layoutOptions"], outputs: ["submitted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
320
170
|
}
|
|
321
171
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureUpdateEmail, decorators: [{
|
|
322
172
|
type: Component,
|
|
323
|
-
args: [{ selector: 'anarchitects-auth-feature-update-email', imports: [
|
|
324
|
-
}], propDecorators: { userId: [{ type: i0.Input, args: [{ isSignal: true, alias: "userId", required: false }] }] } });
|
|
173
|
+
args: [{ selector: 'anarchitects-auth-feature-update-email', imports: [AnarchitectsAuthUiUpdateEmailForm], changeDetection: ChangeDetectionStrategy.OnPush, template: "<anarchitects-auth-ui-update-email-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-update-email-form>\n", styles: [":host{display:block}\n"] }]
|
|
174
|
+
}], propDecorators: { userId: [{ type: i0.Input, args: [{ isSignal: true, alias: "userId", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], layoutOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutOptions", required: false }] }] } });
|
|
325
175
|
|
|
326
176
|
class AnarchitectsFeatureLogout {
|
|
327
177
|
authStore = inject(AuthStore);
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
version: 1,
|
|
331
|
-
fields: [
|
|
332
|
-
{
|
|
333
|
-
name: 'refreshToken',
|
|
334
|
-
kind: 'string',
|
|
335
|
-
required: false,
|
|
336
|
-
minLength: 1,
|
|
337
|
-
ui: { label: 'Refresh Token' },
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
name: 'accessToken',
|
|
341
|
-
kind: 'string',
|
|
342
|
-
required: false,
|
|
343
|
-
minLength: 1,
|
|
344
|
-
ui: { label: 'Access Token (optional)' },
|
|
345
|
-
},
|
|
346
|
-
],
|
|
347
|
-
}, ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
|
|
178
|
+
layout = input(null, ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
179
|
+
layoutOptions = input({}, ...(ngDevMode ? [{ debugName: "layoutOptions" }] : []));
|
|
348
180
|
async submitForm(input) {
|
|
349
|
-
|
|
350
|
-
localStorage.getItem('refreshToken') ||
|
|
351
|
-
undefined;
|
|
352
|
-
const accessToken = input.payload['accessToken'] ||
|
|
353
|
-
localStorage.getItem('accessToken') ||
|
|
354
|
-
undefined;
|
|
355
|
-
if (!refreshToken) {
|
|
181
|
+
if (!input.refreshToken) {
|
|
356
182
|
return;
|
|
357
183
|
}
|
|
358
|
-
|
|
359
|
-
refreshToken,
|
|
360
|
-
...(accessToken ? { accessToken } : {}),
|
|
361
|
-
};
|
|
362
|
-
await this.authStore.logout(dto);
|
|
184
|
+
await this.authStore.logout(input);
|
|
363
185
|
}
|
|
364
186
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureLogout, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
365
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
187
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureLogout, isStandalone: true, selector: "anarchitects-auth-feature-logout", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, layoutOptions: { classPropertyName: "layoutOptions", publicName: "layoutOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-auth-ui-logout-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-logout-form>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: AnarchitectsAuthUiLogoutForm, selector: "anarchitects-auth-ui-logout-form", inputs: ["layout", "layoutOptions"], outputs: ["submitted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
366
188
|
}
|
|
367
189
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureLogout, decorators: [{
|
|
368
190
|
type: Component,
|
|
369
|
-
args: [{ selector: 'anarchitects-auth-feature-logout', imports: [
|
|
370
|
-
}] });
|
|
191
|
+
args: [{ selector: 'anarchitects-auth-feature-logout', imports: [AnarchitectsAuthUiLogoutForm], changeDetection: ChangeDetectionStrategy.OnPush, template: "<anarchitects-auth-ui-logout-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-logout-form>\n", styles: [":host{display:block}\n"] }]
|
|
192
|
+
}], propDecorators: { layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], layoutOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutOptions", required: false }] }] } });
|
|
371
193
|
|
|
372
194
|
class AnarchitectsFeatureRefreshTokens {
|
|
373
195
|
authStore = inject(AuthStore);
|
|
374
196
|
userId = input(...(ngDevMode ? [undefined, { debugName: "userId" }] : []));
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
version: 1,
|
|
378
|
-
fields: [
|
|
379
|
-
{
|
|
380
|
-
name: 'refreshToken',
|
|
381
|
-
kind: 'string',
|
|
382
|
-
required: false,
|
|
383
|
-
minLength: 1,
|
|
384
|
-
ui: { label: 'Refresh Token' },
|
|
385
|
-
},
|
|
386
|
-
],
|
|
387
|
-
}, ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
|
|
197
|
+
layout = input(null, ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
198
|
+
layoutOptions = input({}, ...(ngDevMode ? [{ debugName: "layoutOptions" }] : []));
|
|
388
199
|
resolveUserId() {
|
|
389
200
|
const fromInput = this.userId();
|
|
390
201
|
if (fromInput) {
|
|
@@ -408,25 +219,18 @@ class AnarchitectsFeatureRefreshTokens {
|
|
|
408
219
|
}
|
|
409
220
|
async submitForm(input) {
|
|
410
221
|
const userId = this.resolveUserId();
|
|
411
|
-
if (!userId) {
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
|
-
const refreshToken = input.payload['refreshToken'] ||
|
|
415
|
-
localStorage.getItem('refreshToken') ||
|
|
416
|
-
undefined;
|
|
417
|
-
if (!refreshToken) {
|
|
222
|
+
if (!userId || !input.refreshToken) {
|
|
418
223
|
return;
|
|
419
224
|
}
|
|
420
|
-
|
|
421
|
-
await this.authStore.refreshTokens({ userId, dto });
|
|
225
|
+
await this.authStore.refreshTokens({ userId, dto: input });
|
|
422
226
|
}
|
|
423
227
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureRefreshTokens, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
424
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureRefreshTokens, isStandalone: true, selector: "anarchitects-auth-feature-refresh-tokens", inputs: { userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-
|
|
228
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureRefreshTokens, isStandalone: true, selector: "anarchitects-auth-feature-refresh-tokens", inputs: { userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, layoutOptions: { classPropertyName: "layoutOptions", publicName: "layoutOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-auth-ui-refresh-tokens-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-refresh-tokens-form>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: AnarchitectsAuthUiRefreshTokensForm, selector: "anarchitects-auth-ui-refresh-tokens-form", inputs: ["layout", "layoutOptions"], outputs: ["submitted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
425
229
|
}
|
|
426
230
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureRefreshTokens, decorators: [{
|
|
427
231
|
type: Component,
|
|
428
|
-
args: [{ selector: 'anarchitects-auth-feature-refresh-tokens', imports: [
|
|
429
|
-
}], propDecorators: { userId: [{ type: i0.Input, args: [{ isSignal: true, alias: "userId", required: false }] }] } });
|
|
232
|
+
args: [{ selector: 'anarchitects-auth-feature-refresh-tokens', imports: [AnarchitectsAuthUiRefreshTokensForm], changeDetection: ChangeDetectionStrategy.OnPush, template: "<anarchitects-auth-ui-refresh-tokens-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-refresh-tokens-form>\n", styles: [":host{display:block}\n"] }]
|
|
233
|
+
}], propDecorators: { userId: [{ type: i0.Input, args: [{ isSignal: true, alias: "userId", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], layoutOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutOptions", required: false }] }] } });
|
|
430
234
|
|
|
431
235
|
const policyGuard = (route) => {
|
|
432
236
|
const { action, subject } = route.data;
|
|
@@ -440,41 +244,18 @@ const policyGuard = (route) => {
|
|
|
440
244
|
|
|
441
245
|
class AnarchitectsFeatureLogin {
|
|
442
246
|
authStore = inject(AuthStore);
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
version: 1,
|
|
446
|
-
fields: [
|
|
447
|
-
{
|
|
448
|
-
name: 'credential',
|
|
449
|
-
kind: 'string',
|
|
450
|
-
required: true,
|
|
451
|
-
minLength: 2,
|
|
452
|
-
maxLength: 100,
|
|
453
|
-
ui: { label: 'Email or Username' },
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
name: 'password',
|
|
457
|
-
kind: 'password',
|
|
458
|
-
required: true,
|
|
459
|
-
minLength: 6,
|
|
460
|
-
ui: { label: 'Password' },
|
|
461
|
-
},
|
|
462
|
-
],
|
|
463
|
-
}, ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
|
|
247
|
+
layout = input(null, ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
248
|
+
layoutOptions = input({}, ...(ngDevMode ? [{ debugName: "layoutOptions" }] : []));
|
|
464
249
|
async submitForm(input) {
|
|
465
|
-
|
|
466
|
-
credential: input.payload['credential'],
|
|
467
|
-
password: input.payload['password'],
|
|
468
|
-
};
|
|
469
|
-
await this.authStore.login(loginInput);
|
|
250
|
+
await this.authStore.login(input);
|
|
470
251
|
}
|
|
471
252
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureLogin, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
472
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
253
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: AnarchitectsFeatureLogin, isStandalone: true, selector: "anarchitects-auth-feature-login", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, layoutOptions: { classPropertyName: "layoutOptions", publicName: "layoutOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<anarchitects-auth-ui-login-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-login-form>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: AnarchitectsAuthUiLoginForm, selector: "anarchitects-auth-ui-login-form", inputs: ["layout", "layoutOptions"], outputs: ["submitted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
473
254
|
}
|
|
474
255
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AnarchitectsFeatureLogin, decorators: [{
|
|
475
256
|
type: Component,
|
|
476
|
-
args: [{ selector: 'anarchitects-auth-feature-login', imports: [
|
|
477
|
-
}] });
|
|
257
|
+
args: [{ selector: 'anarchitects-auth-feature-login', imports: [AnarchitectsAuthUiLoginForm], changeDetection: ChangeDetectionStrategy.OnPush, template: "<anarchitects-auth-ui-login-form\n [layout]=\"layout()\"\n [layoutOptions]=\"layoutOptions()\"\n (submitted)=\"submitForm($event)\"\n>\n <ng-content select=\"ng-template[anxTemplate]\"></ng-content>\n <ng-content select=\"[anxSlot]\"></ng-content>\n</anarchitects-auth-ui-login-form>\n", styles: [":host{display:block}\n"] }]
|
|
258
|
+
}], propDecorators: { layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], layoutOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutOptions", required: false }] }] } });
|
|
478
259
|
|
|
479
260
|
/**
|
|
480
261
|
* Generated bundle index. Do not edit.
|