@myrmidon/auth-jwt-admin 8.0.0 → 8.0.3

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.
@@ -0,0 +1,343 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnChanges, SimpleChange } from '@angular/core';
3
+ import { FormGroup, FormControl, ValidatorFn } from '@angular/forms';
4
+ import { Observable } from 'rxjs';
5
+ import { DataPage } from '@myrmidon/ngx-tools';
6
+ import { User, GravatarOptions } from '@myrmidon/auth-jwt-login';
7
+ import { PageEvent } from '@angular/material/paginator';
8
+ import { PagedListStoreService } from '@myrmidon/paged-data-browsers';
9
+
10
+ /**
11
+ * User registration form.
12
+ */
13
+ declare class AuthJwtRegistrationComponent {
14
+ private _snackbar;
15
+ private _accountService;
16
+ private _userRepository;
17
+ form: FormGroup;
18
+ email: FormControl<string>;
19
+ name: FormControl<string>;
20
+ firstName: FormControl<string>;
21
+ lastName: FormControl<string>;
22
+ password: FormControl<string>;
23
+ confirmPassword: FormControl<string>;
24
+ /**
25
+ * True if the registration should be confirmed automatically.
26
+ */
27
+ readonly autoConfirm: _angular_core.InputSignal<boolean | undefined>;
28
+ /**
29
+ * Emitted when a user was successfully registered. Usually
30
+ * you should handle this to move away from the registration
31
+ * page.
32
+ */
33
+ registered: _angular_core.OutputEmitterRef<void>;
34
+ readonly busy: _angular_core.WritableSignal<boolean | undefined>;
35
+ readonly hidePassword: _angular_core.WritableSignal<boolean>;
36
+ constructor();
37
+ /**
38
+ * Creates a unique name validator. There is no dependency injection at this level,
39
+ * but we can use closures. As a matter of fact, we have access to the service instance
40
+ * from the component where we register validators. So we will implement a function
41
+ * that will accept the service as parameter, and create the actual validation function.
42
+ * This function will have access to the service when called during the validation process.
43
+ * See http://restlet.com/blog/2016/02/17/implementing-angular2-forms-beyond-basics-part-2/.
44
+ */
45
+ private getUniqueNameValidator;
46
+ private getUniqueEmailValidator;
47
+ onSubmit(): void;
48
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthJwtRegistrationComponent, never>;
49
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AuthJwtRegistrationComponent, "auth-jwt-registration", never, { "autoConfirm": { "alias": "autoConfirm"; "required": false; "isSignal": true; }; }, { "registered": "registered"; }, never, never, true, never>;
50
+ }
51
+
52
+ /**
53
+ * Configuration for a password validation rule.
54
+ */
55
+ interface PasswordRule {
56
+ /** Unique identifier for the rule */
57
+ id: string;
58
+ /** Display label for the rule */
59
+ label: string;
60
+ /** Whether this rule is enabled */
61
+ enabled: boolean;
62
+ }
63
+ /**
64
+ * Default labels for password rules.
65
+ */
66
+ declare const DEFAULT_RULE_LABELS: Record<string, string>;
67
+ /**
68
+ * A modern, fully reactive password checklist component with strength meter.
69
+ * Uses only signals for state management and is ready for zoneless Angular.
70
+ */
71
+ declare class PasswordChecklistComponent {
72
+ readonly password: _angular_core.InputSignal<string>;
73
+ readonly username: _angular_core.InputSignal<string>;
74
+ readonly email: _angular_core.InputSignal<string>;
75
+ readonly hidden: _angular_core.InputSignal<boolean>;
76
+ readonly minLength: _angular_core.InputSignal<number | null>;
77
+ readonly maxLength: _angular_core.InputSignal<number | null>;
78
+ readonly requireUppercase: _angular_core.InputSignal<boolean>;
79
+ readonly requireLowercase: _angular_core.InputSignal<boolean>;
80
+ readonly requireNumber: _angular_core.InputSignal<boolean>;
81
+ readonly requireSymbol: _angular_core.InputSignal<boolean>;
82
+ readonly checkUsername: _angular_core.InputSignal<boolean>;
83
+ readonly checkEmail: _angular_core.InputSignal<boolean>;
84
+ readonly minLengthLabel: _angular_core.InputSignal<string | null>;
85
+ readonly maxLengthLabel: _angular_core.InputSignal<string | null>;
86
+ readonly uppercaseLabel: _angular_core.InputSignal<string | null>;
87
+ readonly lowercaseLabel: _angular_core.InputSignal<string | null>;
88
+ readonly numberLabel: _angular_core.InputSignal<string | null>;
89
+ readonly symbolLabel: _angular_core.InputSignal<string | null>;
90
+ readonly usernameLabel: _angular_core.InputSignal<string | null>;
91
+ readonly emailLabel: _angular_core.InputSignal<string | null>;
92
+ readonly noChecklist: _angular_core.InputSignal<boolean>;
93
+ readonly noMeter: _angular_core.InputSignal<boolean>;
94
+ readonly validChange: _angular_core.OutputEmitterRef<boolean>;
95
+ private readonly symbolRegex;
96
+ readonly hasMinLength: _angular_core.Signal<boolean>;
97
+ readonly hasMaxLength: _angular_core.Signal<boolean>;
98
+ readonly hasUppercase: _angular_core.Signal<boolean>;
99
+ readonly hasLowercase: _angular_core.Signal<boolean>;
100
+ readonly hasNumber: _angular_core.Signal<boolean>;
101
+ readonly hasSymbol: _angular_core.Signal<boolean>;
102
+ readonly noUsernameInPassword: _angular_core.Signal<boolean>;
103
+ readonly noEmailInPassword: _angular_core.Signal<boolean>;
104
+ readonly rules: _angular_core.Signal<PasswordRule[]>;
105
+ readonly isRuleSatisfied: _angular_core.Signal<(ruleId: string) => boolean>;
106
+ readonly isValid: _angular_core.Signal<boolean>;
107
+ readonly strength: _angular_core.Signal<number>;
108
+ readonly strengthLevel: _angular_core.Signal<3 | 1 | 0 | 2 | 4>;
109
+ readonly strengthColor: _angular_core.Signal<string>;
110
+ readonly strengthPercent: _angular_core.Signal<number>;
111
+ constructor();
112
+ /**
113
+ * Gets the label for a rule, using custom label if provided, otherwise default.
114
+ */
115
+ private getLabel;
116
+ /**
117
+ * Interpolates {value} placeholder in label.
118
+ */
119
+ private interpolateLabel;
120
+ /**
121
+ * Helper method to check if a rule is satisfied (for template use).
122
+ */
123
+ checkRule(ruleId: string): boolean;
124
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PasswordChecklistComponent, never>;
125
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PasswordChecklistComponent, "auth-jwt-password-checklist", never, { "password": { "alias": "password"; "required": false; "isSignal": true; }; "username": { "alias": "username"; "required": false; "isSignal": true; }; "email": { "alias": "email"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "requireUppercase": { "alias": "requireUppercase"; "required": false; "isSignal": true; }; "requireLowercase": { "alias": "requireLowercase"; "required": false; "isSignal": true; }; "requireNumber": { "alias": "requireNumber"; "required": false; "isSignal": true; }; "requireSymbol": { "alias": "requireSymbol"; "required": false; "isSignal": true; }; "checkUsername": { "alias": "checkUsername"; "required": false; "isSignal": true; }; "checkEmail": { "alias": "checkEmail"; "required": false; "isSignal": true; }; "minLengthLabel": { "alias": "minLengthLabel"; "required": false; "isSignal": true; }; "maxLengthLabel": { "alias": "maxLengthLabel"; "required": false; "isSignal": true; }; "uppercaseLabel": { "alias": "uppercaseLabel"; "required": false; "isSignal": true; }; "lowercaseLabel": { "alias": "lowercaseLabel"; "required": false; "isSignal": true; }; "numberLabel": { "alias": "numberLabel"; "required": false; "isSignal": true; }; "symbolLabel": { "alias": "symbolLabel"; "required": false; "isSignal": true; }; "usernameLabel": { "alias": "usernameLabel"; "required": false; "isSignal": true; }; "emailLabel": { "alias": "emailLabel"; "required": false; "isSignal": true; }; "noChecklist": { "alias": "noChecklist"; "required": false; "isSignal": true; }; "noMeter": { "alias": "noMeter"; "required": false; "isSignal": true; }; }, { "validChange": "validChange"; }, never, never, true, never>;
126
+ }
127
+
128
+ declare class PasswordStrengthBarComponent implements OnChanges {
129
+ private _colors;
130
+ readonly passwordToCheck: _angular_core.InputSignal<string | undefined>;
131
+ readonly strengthChange: _angular_core.OutputEmitterRef<number>;
132
+ readonly bars: _angular_core.WritableSignal<string[]>;
133
+ private measureStrength;
134
+ private getColor;
135
+ ngOnChanges(changes: {
136
+ [propName: string]: SimpleChange;
137
+ }): void;
138
+ private setBarColors;
139
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PasswordStrengthBarComponent, never>;
140
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PasswordStrengthBarComponent, "auth-jwt-password-strength-bar", never, { "passwordToCheck": { "alias": "passwordToCheck"; "required": false; "isSignal": true; }; }, { "strengthChange": "strengthChange"; }, never, never, true, never>;
141
+ }
142
+
143
+ /**
144
+ * User registration model. You can expand this interface to add more data.
145
+ */
146
+ interface RegistrationModel {
147
+ email: string;
148
+ name: string;
149
+ firstName?: string;
150
+ lastName?: string;
151
+ password: string;
152
+ }
153
+ /**
154
+ * Result of an existing resource check.
155
+ */
156
+ interface ExistResult {
157
+ entry: string;
158
+ isExisting: boolean;
159
+ }
160
+ /**
161
+ * Password change data.
162
+ */
163
+ interface PasswordChange {
164
+ email: string;
165
+ oldPassword: string;
166
+ newPassword: string;
167
+ confirmPassword: string;
168
+ }
169
+ /**
170
+ * User filter parameters.
171
+ */
172
+ interface UserFilter {
173
+ name?: string;
174
+ }
175
+ /**
176
+ * Service for managing user accounts with JWT authentication.
177
+ */
178
+ declare class AuthJwtAccountService {
179
+ private _http;
180
+ private _error;
181
+ private _env;
182
+ /**
183
+ * Checks if the specified email address is registered on the server.
184
+ * @param email email address to test.
185
+ * @returns result.
186
+ */
187
+ isEmailRegistered(email: string): Observable<ExistResult>;
188
+ /**
189
+ * Checks if the specified user's given name is registered on the server.
190
+ * This name is a nickname chosen by users during registration, and is the key
191
+ * used for referencing users when talking to the server.
192
+ * @param name name to test.
193
+ * @returns result.
194
+ */
195
+ isNameRegistered(name: string): Observable<ExistResult>;
196
+ /**
197
+ * Register the user with the specified registration data.
198
+ * @param registration The registration data.
199
+ * @param confirmed True to automatically confirm the user's email address
200
+ * without sending the confirmation email message.
201
+ */
202
+ register(registration: RegistrationModel, confirmed?: boolean): Observable<any>;
203
+ /**
204
+ * Resend the confirmation email to the specified address.
205
+ * @param email address.
206
+ */
207
+ resendConfirmEmail(email: string): Observable<any>;
208
+ /**
209
+ * Request a password reset for the specified email address.
210
+ * @param email Email address.
211
+ */
212
+ requestPasswordReset(email: string): Observable<any>;
213
+ private getUserFromWrapper;
214
+ getAllUsers(): Observable<DataPage<User>>;
215
+ getUsers(filter: UserFilter, pageNumber?: number, pageSize?: number): Observable<DataPage<User>>;
216
+ /**
217
+ * Get the top N users matching the specified name filter.
218
+ * @param nameFilter The user name filter.
219
+ * @param limit The maximum number of users to get.
220
+ */
221
+ getTopUsers(nameFilter: string, limit?: number): Observable<User[]>;
222
+ /**
223
+ * Get information about all the users listed in the specified names.
224
+ * @param names User(s) names.
225
+ */
226
+ getUsersFromNames(names: string[]): Observable<User[]>;
227
+ /**
228
+ * Get data about the specified user.
229
+ * @param name The user name.
230
+ */
231
+ getUser(name: string): Observable<User>;
232
+ /**
233
+ * Update the editable data for the specified user.
234
+ * @param user The user to update.
235
+ */
236
+ updateUser(user: User): Observable<any>;
237
+ /**
238
+ * Request a password reset email for the specified email address.
239
+ * @param email The email address to receive the reset message.
240
+ */
241
+ resetPassword(email: string): Observable<any>;
242
+ /**
243
+ * Change the password.
244
+ * @param change The password change data.
245
+ */
246
+ changePassword(change: PasswordChange): Observable<any>;
247
+ /**
248
+ * Delete the user with the specified username.
249
+ * @param name The user name.
250
+ */
251
+ deleteUser(name: string): Observable<any>;
252
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthJwtAccountService, never>;
253
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthJwtAccountService>;
254
+ }
255
+
256
+ /**
257
+ * Users filter.
258
+ */
259
+ declare class UserFilterComponent {
260
+ private _filter?;
261
+ /**
262
+ * The filter.
263
+ */
264
+ readonly filter: _angular_core.InputSignal<UserFilter | null | undefined>;
265
+ /**
266
+ * Whether the filter is disabled.
267
+ */
268
+ readonly disabled: _angular_core.InputSignal<boolean | undefined>;
269
+ /**
270
+ * Event emitted when the filter changes.
271
+ */
272
+ filterChange: _angular_core.OutputEmitterRef<UserFilter>;
273
+ name: FormControl<string | null>;
274
+ form: FormGroup;
275
+ constructor();
276
+ private updateForm;
277
+ private getFilter;
278
+ reset(): void;
279
+ apply(): void;
280
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserFilterComponent, never>;
281
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserFilterComponent, "auth-jwt-user-filter", never, { "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "filterChange": "filterChange"; }, never, never, true, never>;
282
+ }
283
+
284
+ /**
285
+ * List of users.
286
+ */
287
+ declare class UserListComponent {
288
+ private _repository;
289
+ private _dialogService;
290
+ private _gravatarService;
291
+ active$: Observable<User | undefined>;
292
+ loading$: Observable<boolean>;
293
+ filter$: Observable<UserFilter>;
294
+ page$: Observable<DataPage<User>>;
295
+ constructor();
296
+ reset(): void;
297
+ onFilterChange(filter: UserFilter): void;
298
+ onPageChange(event: PageEvent): void;
299
+ deleteUser(user: User): void;
300
+ setActiveUser(user: User | null): void;
301
+ resetActiveUser(): void;
302
+ saveActiveUser(user: User | undefined): void;
303
+ onUserEditorClose(): void;
304
+ getGravatarUrl(email: string, options?: GravatarOptions): string | null;
305
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserListComponent, never>;
306
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserListComponent, "auth-jwt-user-list", never, {}, {}, never, never, true, never>;
307
+ }
308
+
309
+ declare class UserListRepository implements PagedListStoreService<UserFilter, User> {
310
+ private _accService;
311
+ private _store;
312
+ private _activeUser$;
313
+ private _loading$;
314
+ private _saving$;
315
+ get activeUser$(): Observable<User | undefined>;
316
+ get filter$(): Observable<UserFilter>;
317
+ get page$(): Observable<DataPage<User>>;
318
+ get loading$(): Observable<boolean>;
319
+ get saving$(): Observable<boolean>;
320
+ constructor();
321
+ loadPage(pageNumber: number, pageSize: number, filter: UserFilter): Observable<DataPage<User>>;
322
+ reset(): Promise<void>;
323
+ setFilter(filter: UserFilter): Promise<void>;
324
+ getFilter(): UserFilter;
325
+ setPage(pageNumber: number, pageSize: number): Promise<void>;
326
+ setActiveUser(user: User | null): void;
327
+ updateActiveUser(user: User): Promise<boolean>;
328
+ deleteUser(name: string): Promise<boolean>;
329
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserListRepository, never>;
330
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<UserListRepository>;
331
+ }
332
+
333
+ /**
334
+ * Password validators.
335
+ */
336
+ declare class PasswordValidators {
337
+ /** "Standard" password validator for my API services. */
338
+ static standard(): ValidatorFn;
339
+ static areEqual(controlName: string, otherControlName: string): ValidatorFn;
340
+ }
341
+
342
+ export { AuthJwtAccountService, AuthJwtRegistrationComponent, DEFAULT_RULE_LABELS, PasswordChecklistComponent, PasswordStrengthBarComponent, PasswordValidators, UserFilterComponent, UserListComponent, UserListRepository };
343
+ export type { ExistResult, PasswordChange, PasswordRule, RegistrationModel, UserFilter };
package/index.d.ts DELETED
@@ -1,267 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { OnChanges, SimpleChange } from '@angular/core';
3
- import { FormGroup, FormControl, ValidatorFn } from '@angular/forms';
4
- import { Observable } from 'rxjs';
5
- import { DataPage } from '@myrmidon/ngx-tools';
6
- import { User, GravatarOptions } from '@myrmidon/auth-jwt-login';
7
- import { PageEvent } from '@angular/material/paginator';
8
- import { PagedListStoreService } from '@myrmidon/paged-data-browsers';
9
-
10
- /**
11
- * User registration form.
12
- */
13
- declare class AuthJwtRegistrationComponent {
14
- private _snackbar;
15
- private _accountService;
16
- private _userRepository;
17
- busy: boolean | undefined;
18
- form: FormGroup;
19
- email: FormControl<string>;
20
- name: FormControl<string>;
21
- firstName: FormControl<string>;
22
- lastName: FormControl<string>;
23
- password: FormControl<string>;
24
- confirmPassword: FormControl<string>;
25
- /**
26
- * True if the registration should be confirmed automatically.
27
- */
28
- readonly autoConfirm: i0.InputSignal<boolean | undefined>;
29
- /**
30
- * Emitted when a user was successfully registered. Usually
31
- * you should handle this to move away from the registration
32
- * page.
33
- */
34
- registered: i0.OutputEmitterRef<void>;
35
- hide: boolean;
36
- constructor();
37
- /**
38
- * Creates a unique name validator. There is no dependency injection at this level,
39
- * but we can use closures. As a matter of fact, we have access to the service instance
40
- * from the component where we register validators. So we will implement a function
41
- * that will accept the service as parameter, and create the actual validation function.
42
- * This function will have access to the service when called during the validation process.
43
- * See http://restlet.com/blog/2016/02/17/implementing-angular2-forms-beyond-basics-part-2/.
44
- */
45
- private getUniqueNameValidator;
46
- private getUniqueEmailValidator;
47
- onSubmit(): void;
48
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthJwtRegistrationComponent, never>;
49
- static ɵcmp: i0.ɵɵComponentDeclaration<AuthJwtRegistrationComponent, "auth-jwt-registration", never, { "autoConfirm": { "alias": "autoConfirm"; "required": false; "isSignal": true; }; }, { "registered": "registered"; }, never, never, true, never>;
50
- }
51
-
52
- declare class PasswordStrengthBarComponent implements OnChanges {
53
- private _colors;
54
- readonly passwordToCheck: i0.InputSignal<string | undefined>;
55
- readonly strengthChange: i0.OutputEmitterRef<number>;
56
- bars: string[];
57
- private measureStrength;
58
- private getColor;
59
- ngOnChanges(changes: {
60
- [propName: string]: SimpleChange;
61
- }): void;
62
- private setBarColors;
63
- static ɵfac: i0.ɵɵFactoryDeclaration<PasswordStrengthBarComponent, never>;
64
- static ɵcmp: i0.ɵɵComponentDeclaration<PasswordStrengthBarComponent, "auth-jwt-password-strength-bar", never, { "passwordToCheck": { "alias": "passwordToCheck"; "required": false; "isSignal": true; }; }, { "strengthChange": "strengthChange"; }, never, never, true, never>;
65
- }
66
-
67
- /**
68
- * User registration model. You can expand this interface to add more data.
69
- */
70
- interface RegistrationModel {
71
- email: string;
72
- name: string;
73
- firstName?: string;
74
- lastName?: string;
75
- password: string;
76
- }
77
- /**
78
- * Result of an existing resource check.
79
- */
80
- interface ExistResult {
81
- entry: string;
82
- isExisting: boolean;
83
- }
84
- /**
85
- * Password change data.
86
- */
87
- interface PasswordChange {
88
- email: string;
89
- oldPassword: string;
90
- newPassword: string;
91
- confirmPassword: string;
92
- }
93
- /**
94
- * User filter parameters.
95
- */
96
- interface UserFilter {
97
- name?: string;
98
- }
99
- /**
100
- * Service for managing user accounts with JWT authentication.
101
- */
102
- declare class AuthJwtAccountService {
103
- private _http;
104
- private _error;
105
- private _env;
106
- /**
107
- * Checks if the specified email address is registered on the server.
108
- * @param email email address to test.
109
- * @returns result.
110
- */
111
- isEmailRegistered(email: string): Observable<ExistResult>;
112
- /**
113
- * Checks if the specified user's given name is registered on the server.
114
- * This name is a nickname chosen by users during registration, and is the key
115
- * used for referencing users when talking to the server.
116
- * @param name name to test.
117
- * @returns result.
118
- */
119
- isNameRegistered(name: string): Observable<ExistResult>;
120
- /**
121
- * Register the user with the specified registration data.
122
- * @param registration The registration data.
123
- * @param confirmed True to automatically confirm the user's email address
124
- * without sending the confirmation email message.
125
- */
126
- register(registration: RegistrationModel, confirmed?: boolean): Observable<any>;
127
- /**
128
- * Resend the confirmation email to the specified address.
129
- * @param email address.
130
- */
131
- resendConfirmEmail(email: string): Observable<any>;
132
- /**
133
- * Request a password reset for the specified email address.
134
- * @param email Email address.
135
- */
136
- requestPasswordReset(email: string): Observable<any>;
137
- private getUserFromWrapper;
138
- getAllUsers(): Observable<DataPage<User>>;
139
- getUsers(filter: UserFilter, pageNumber?: number, pageSize?: number): Observable<DataPage<User>>;
140
- /**
141
- * Get the top N users matching the specified name filter.
142
- * @param nameFilter The user name filter.
143
- * @param limit The maximum number of users to get.
144
- */
145
- getTopUsers(nameFilter: string, limit?: number): Observable<User[]>;
146
- /**
147
- * Get information about all the users listed in the specified names.
148
- * @param names User(s) names.
149
- */
150
- getUsersFromNames(names: string[]): Observable<User[]>;
151
- /**
152
- * Get data about the specified user.
153
- * @param name The user name.
154
- */
155
- getUser(name: string): Observable<User>;
156
- /**
157
- * Update the editable data for the specified user.
158
- * @param user The user to update.
159
- */
160
- updateUser(user: User): Observable<any>;
161
- /**
162
- * Request a password reset email for the specified email address.
163
- * @param email The email address to receive the reset message.
164
- */
165
- resetPassword(email: string): Observable<any>;
166
- /**
167
- * Change the password.
168
- * @param change The password change data.
169
- */
170
- changePassword(change: PasswordChange): Observable<any>;
171
- /**
172
- * Delete the user with the specified username.
173
- * @param name The user name.
174
- */
175
- deleteUser(name: string): Observable<any>;
176
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthJwtAccountService, never>;
177
- static ɵprov: i0.ɵɵInjectableDeclaration<AuthJwtAccountService>;
178
- }
179
-
180
- /**
181
- * Users filter.
182
- */
183
- declare class UserFilterComponent {
184
- private _filter?;
185
- /**
186
- * The filter.
187
- */
188
- readonly filter: i0.InputSignal<UserFilter | null | undefined>;
189
- /**
190
- * Whether the filter is disabled.
191
- */
192
- readonly disabled: i0.InputSignal<boolean | undefined>;
193
- /**
194
- * Event emitted when the filter changes.
195
- */
196
- filterChange: i0.OutputEmitterRef<UserFilter>;
197
- name: FormControl<string | null>;
198
- form: FormGroup;
199
- constructor();
200
- private updateForm;
201
- private getFilter;
202
- reset(): void;
203
- apply(): void;
204
- static ɵfac: i0.ɵɵFactoryDeclaration<UserFilterComponent, never>;
205
- static ɵcmp: i0.ɵɵComponentDeclaration<UserFilterComponent, "auth-jwt-user-filter", never, { "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "filterChange": "filterChange"; }, never, never, true, never>;
206
- }
207
-
208
- /**
209
- * List of users.
210
- */
211
- declare class UserListComponent {
212
- private _repository;
213
- private _dialogService;
214
- private _gravatarService;
215
- active$: Observable<User | undefined>;
216
- loading$: Observable<boolean>;
217
- filter$: Observable<UserFilter>;
218
- page$: Observable<DataPage<User>>;
219
- constructor();
220
- reset(): void;
221
- onFilterChange(filter: UserFilter): void;
222
- onPageChange(event: PageEvent): void;
223
- deleteUser(user: User): void;
224
- setActiveUser(user: User | null): void;
225
- resetActiveUser(): void;
226
- saveActiveUser(user: User | undefined): void;
227
- onUserEditorClose(): void;
228
- getGravatarUrl(email: string, options?: GravatarOptions): string | null;
229
- static ɵfac: i0.ɵɵFactoryDeclaration<UserListComponent, never>;
230
- static ɵcmp: i0.ɵɵComponentDeclaration<UserListComponent, "auth-jwt-user-list", never, {}, {}, never, never, true, never>;
231
- }
232
-
233
- declare class UserListRepository implements PagedListStoreService<UserFilter, User> {
234
- private _accService;
235
- private _store;
236
- private _activeUser$;
237
- private _loading$;
238
- private _saving$;
239
- get activeUser$(): Observable<User | undefined>;
240
- get filter$(): Observable<UserFilter>;
241
- get page$(): Observable<DataPage<User>>;
242
- get loading$(): Observable<boolean>;
243
- get saving$(): Observable<boolean>;
244
- constructor();
245
- loadPage(pageNumber: number, pageSize: number, filter: UserFilter): Observable<DataPage<User>>;
246
- reset(): Promise<void>;
247
- setFilter(filter: UserFilter): Promise<void>;
248
- getFilter(): UserFilter;
249
- setPage(pageNumber: number, pageSize: number): Promise<void>;
250
- setActiveUser(user: User | null): void;
251
- updateActiveUser(user: User): Promise<boolean>;
252
- deleteUser(name: string): Promise<boolean>;
253
- static ɵfac: i0.ɵɵFactoryDeclaration<UserListRepository, never>;
254
- static ɵprov: i0.ɵɵInjectableDeclaration<UserListRepository>;
255
- }
256
-
257
- /**
258
- * Password validators.
259
- */
260
- declare class PasswordValidators {
261
- /** "Standard" password validator for my API services. */
262
- static standard(): ValidatorFn;
263
- static areEqual(controlName: string, otherControlName: string): ValidatorFn;
264
- }
265
-
266
- export { AuthJwtAccountService, AuthJwtRegistrationComponent, PasswordStrengthBarComponent, PasswordValidators, UserFilterComponent, UserListComponent, UserListRepository };
267
- export type { ExistResult, PasswordChange, RegistrationModel, UserFilter };