@flusys/ng-auth 4.1.0 → 5.0.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 +70 -394
- package/fesm2022/flusys-ng-auth.mjs +3082 -2021
- package/fesm2022/flusys-ng-auth.mjs.map +1 -1
- package/package.json +4 -4
- package/types/flusys-ng-auth.d.ts +55 -161
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flusys/ng-auth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Authentication module for FLUSYS Angular applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"@angular/core": ">=21.0.0",
|
|
9
9
|
"@angular/forms": ">=21.0.0",
|
|
10
10
|
"@angular/router": ">=21.0.0",
|
|
11
|
-
"@flusys/ng-core": ">=
|
|
12
|
-
"@flusys/ng-layout": ">=
|
|
13
|
-
"@flusys/ng-shared": ">=
|
|
11
|
+
"@flusys/ng-core": ">=5.0.0",
|
|
12
|
+
"@flusys/ng-layout": ">=5.0.0",
|
|
13
|
+
"@flusys/ng-shared": ">=5.0.0",
|
|
14
14
|
"@primeuix/themes": ">=1.0.0",
|
|
15
15
|
"primeicons": ">=7.0.0",
|
|
16
16
|
"primeng": ">=21.0.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IMessageResponse, ApiResourceService,
|
|
1
|
+
import { ISingleResponse, IMessageResponse, ApiResourceService, ICompanyApiProvider, IListResponse, ICompanyBasicInfo, IAuthStateProvider, IUserPermissionProvider, IUserBranchPermission as IUserBranchPermission$1, IUserProvider, IUserBasicInfo, ILogicNode, IProfileRoleInfo, IProfileActionInfo } from '@flusys/ng-shared';
|
|
2
2
|
import * as rxjs from 'rxjs';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import * as _angular_core from '@angular/core';
|
|
@@ -75,19 +75,19 @@ interface ICompanyWithBranches {
|
|
|
75
75
|
logoId?: string | null;
|
|
76
76
|
branches: IBranchSelectionInfo[];
|
|
77
77
|
}
|
|
78
|
-
interface
|
|
78
|
+
interface ILoginData {
|
|
79
79
|
accessToken: string;
|
|
80
|
-
refreshToken
|
|
80
|
+
refreshToken?: string;
|
|
81
81
|
user: IUserInfo;
|
|
82
82
|
company?: ICompanyInfo;
|
|
83
83
|
branch?: IBranchInfo;
|
|
84
84
|
}
|
|
85
|
-
interface
|
|
85
|
+
interface IMeData {
|
|
86
86
|
user: IUserInfo;
|
|
87
87
|
company?: ICompanyInfo;
|
|
88
88
|
branch?: IBranchInfo;
|
|
89
89
|
}
|
|
90
|
-
interface
|
|
90
|
+
interface IRegistrationData {
|
|
91
91
|
accessToken?: string;
|
|
92
92
|
refreshToken?: string;
|
|
93
93
|
user: IUserInfo;
|
|
@@ -95,23 +95,27 @@ interface IRegistrationResponse {
|
|
|
95
95
|
branch?: IBranchInfo;
|
|
96
96
|
requiresEmailVerification?: boolean;
|
|
97
97
|
}
|
|
98
|
-
interface
|
|
98
|
+
interface ICompanySelectionData {
|
|
99
99
|
requiresSelection: true;
|
|
100
100
|
sessionId: string;
|
|
101
101
|
expiresAt: Date | string;
|
|
102
102
|
user: IUserInfo;
|
|
103
103
|
companies: ICompanyWithBranches[];
|
|
104
104
|
}
|
|
105
|
-
interface
|
|
106
|
-
accessToken: string;
|
|
107
|
-
refreshToken?: string;
|
|
108
|
-
}
|
|
109
|
-
interface ILoginRequiresEmailVerification {
|
|
105
|
+
interface IEmailVerificationData {
|
|
110
106
|
requiresEmailVerification: true;
|
|
111
107
|
email: string;
|
|
112
|
-
message: string;
|
|
113
108
|
}
|
|
114
|
-
type
|
|
109
|
+
type ILoginResponse = ISingleResponse<ILoginData>;
|
|
110
|
+
type IMeResponse = ISingleResponse<IMeData>;
|
|
111
|
+
type IRegistrationResponse = ISingleResponse<IRegistrationData>;
|
|
112
|
+
type ICompanySelectionResponse = ISingleResponse<ICompanySelectionData>;
|
|
113
|
+
type ILoginRequiresEmailVerification = ISingleResponse<IEmailVerificationData>;
|
|
114
|
+
type IRefreshTokenResponse = ISingleResponse<{
|
|
115
|
+
accessToken: string;
|
|
116
|
+
refreshToken?: string;
|
|
117
|
+
}>;
|
|
118
|
+
type AuthResponse = ISingleResponse<ILoginData | ICompanySelectionData | IEmailVerificationData>;
|
|
115
119
|
declare function isEmailVerificationRequired(response: AuthResponse): response is ILoginRequiresEmailVerification;
|
|
116
120
|
declare function isCompanySelectionResponse(response: AuthResponse): response is ICompanySelectionResponse;
|
|
117
121
|
declare function isLoginResponse(response: AuthResponse): response is ILoginResponse;
|
|
@@ -211,20 +215,6 @@ interface IUserBranchPermission {
|
|
|
211
215
|
branchSlug: string;
|
|
212
216
|
companyId: string;
|
|
213
217
|
}
|
|
214
|
-
interface IUserCompaniesResponse {
|
|
215
|
-
success: boolean;
|
|
216
|
-
message: string;
|
|
217
|
-
data: IUserCompanyPermission[];
|
|
218
|
-
}
|
|
219
|
-
interface IUserBranchesResponse {
|
|
220
|
-
success: boolean;
|
|
221
|
-
message: string;
|
|
222
|
-
data: IUserBranchPermission[];
|
|
223
|
-
}
|
|
224
|
-
interface IBatchOperationResponse {
|
|
225
|
-
success: boolean;
|
|
226
|
-
message: string;
|
|
227
|
-
}
|
|
228
218
|
|
|
229
219
|
interface ICreateUserRequest {
|
|
230
220
|
name: string;
|
|
@@ -266,113 +256,34 @@ interface IUser {
|
|
|
266
256
|
deletedAt?: Date | string | null;
|
|
267
257
|
}
|
|
268
258
|
|
|
269
|
-
/**
|
|
270
|
-
* Auth API Service
|
|
271
|
-
* Handles all authentication-related API calls matching NestJS auth endpoints
|
|
272
|
-
*/
|
|
273
259
|
declare class AuthApiService {
|
|
274
260
|
private readonly appConfig;
|
|
275
261
|
private readonly http;
|
|
276
262
|
private readonly baseUrl;
|
|
277
263
|
constructor();
|
|
278
|
-
/**
|
|
279
|
-
* Login with email and password
|
|
280
|
-
* Returns either:
|
|
281
|
-
* - ILoginResponse (direct login success)
|
|
282
|
-
* - ICompanySelectionResponse (requires company/branch selection)
|
|
283
|
-
*/
|
|
284
264
|
login(data: ILoginRequest): Observable<AuthResponse>;
|
|
285
|
-
/**
|
|
286
|
-
* Register new user
|
|
287
|
-
* Supports simple registration and company-based registration
|
|
288
|
-
* Returns RegistrationResponse directly (not wrapped in SingleResponse)
|
|
289
|
-
*/
|
|
290
265
|
register(data: IRegistrationRequest): Observable<IRegistrationResponse>;
|
|
291
|
-
/**
|
|
292
|
-
* Select company and branch after login
|
|
293
|
-
* Used when login returns requiresSelection: true
|
|
294
|
-
* Returns LoginResponse directly (not wrapped)
|
|
295
|
-
*/
|
|
296
266
|
select(data: ISelectRequest): Observable<ILoginResponse>;
|
|
297
|
-
/**
|
|
298
|
-
* Switch company/branch for logged-in user
|
|
299
|
-
* Returns LoginResponse directly (not wrapped)
|
|
300
|
-
*/
|
|
301
267
|
switchCompany(data: ISwitchCompanyRequest): Observable<ILoginResponse>;
|
|
302
|
-
/**
|
|
303
|
-
* Refresh access token
|
|
304
|
-
* Refresh token is sent via HTTP-only cookie
|
|
305
|
-
* Returns RefreshTokenResponse directly (not wrapped)
|
|
306
|
-
*/
|
|
307
268
|
refresh(): Observable<IRefreshTokenResponse>;
|
|
308
|
-
/**
|
|
309
|
-
* Get current user info
|
|
310
|
-
* Returns only user data (no tokens) - IMeResponse
|
|
311
|
-
*/
|
|
312
269
|
me(): Observable<IMeResponse>;
|
|
313
|
-
/**
|
|
314
|
-
* Logout current user
|
|
315
|
-
*/
|
|
316
270
|
logout(): Observable<IMessageResponse>;
|
|
317
|
-
/**
|
|
318
|
-
* Change password for logged-in user
|
|
319
|
-
*/
|
|
320
271
|
changePassword(data: IChangePasswordRequest): Observable<IMessageResponse>;
|
|
321
|
-
/**
|
|
322
|
-
* Send forgot password email
|
|
323
|
-
*/
|
|
324
272
|
forgotPassword(email: string): Observable<IMessageResponse>;
|
|
325
|
-
/**
|
|
326
|
-
* Reset password with token
|
|
327
|
-
*/
|
|
328
273
|
resetPassword(token: string, newPassword: string): Observable<IMessageResponse>;
|
|
329
|
-
/**
|
|
330
|
-
* Resend verification email (unauthenticated)
|
|
331
|
-
*/
|
|
332
274
|
resendVerification(email: string): Observable<IMessageResponse>;
|
|
333
|
-
/**
|
|
334
|
-
* Verify email with token
|
|
335
|
-
* Returns IMessageResponse for existing user verification
|
|
336
|
-
* Returns IRegistrationResponse for pending registration completion
|
|
337
|
-
*/
|
|
338
275
|
verifyEmail(token: string): Observable<IMessageResponse | IRegistrationResponse>;
|
|
339
276
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthApiService, never>;
|
|
340
277
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthApiService>;
|
|
341
278
|
}
|
|
342
279
|
|
|
343
|
-
/**
|
|
344
|
-
* Auth Initialization Service
|
|
345
|
-
* Handles app startup authentication flow:
|
|
346
|
-
* 1. Check if user has valid session (via refresh token cookie)
|
|
347
|
-
* 2. Restore user state from /auth/me
|
|
348
|
-
* 3. Handle company selection if needed
|
|
349
|
-
*
|
|
350
|
-
* IMPORTANT: Skips initialization during SSR to avoid cookie/localStorage issues
|
|
351
|
-
*/
|
|
352
280
|
declare class AuthInitService {
|
|
353
281
|
private readonly authState;
|
|
354
282
|
private readonly authApi;
|
|
355
|
-
private readonly router;
|
|
356
283
|
private readonly appConfig;
|
|
357
|
-
|
|
358
|
-
readonly initialized: _angular_core.
|
|
359
|
-
/** Whether auth check is in progress */
|
|
360
|
-
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
361
|
-
/** Error from auth check */
|
|
362
|
-
readonly error: _angular_core.WritableSignal<string | null>;
|
|
363
|
-
/** Cached initialization observable to prevent duplicate calls */
|
|
284
|
+
private readonly _initialized;
|
|
285
|
+
readonly initialized: _angular_core.Signal<boolean>;
|
|
364
286
|
private initializationCache$;
|
|
365
|
-
/**
|
|
366
|
-
* Initialize authentication state on app startup.
|
|
367
|
-
*
|
|
368
|
-
* Flow:
|
|
369
|
-
* 1. If already authenticated with user data -> done
|
|
370
|
-
* 2. Try refresh token (via cookie) -> get new access token
|
|
371
|
-
* 3. Call /auth/me to get user info
|
|
372
|
-
* 4. Update state accordingly
|
|
373
|
-
*
|
|
374
|
-
* Uses shareReplay to prevent duplicate initialization calls.
|
|
375
|
-
*/
|
|
376
287
|
initialize(): Observable<boolean>;
|
|
377
288
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthInitService, never>;
|
|
378
289
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthInitService>;
|
|
@@ -399,7 +310,6 @@ declare class AuthStateService {
|
|
|
399
310
|
readonly branch: _angular_core.Signal<IBranchInfo | null>;
|
|
400
311
|
private readonly _selectionSessionId;
|
|
401
312
|
private readonly _availableCompanies;
|
|
402
|
-
private readonly _selectionExpiresAt;
|
|
403
313
|
readonly selectionSessionId: _angular_core.Signal<string | null>;
|
|
404
314
|
readonly availableCompanies: _angular_core.Signal<ICompanyWithBranches[]>;
|
|
405
315
|
readonly isAuthenticated: _angular_core.Signal<boolean>;
|
|
@@ -414,8 +324,8 @@ declare class AuthStateService {
|
|
|
414
324
|
readonly isTokenExpired: _angular_core.Signal<boolean>;
|
|
415
325
|
readonly tenantId: _angular_core.Signal<string | null>;
|
|
416
326
|
constructor();
|
|
417
|
-
setLoginState(
|
|
418
|
-
setSelectionState(
|
|
327
|
+
setLoginState(data: ILoginData): void;
|
|
328
|
+
setSelectionState(data: ICompanySelectionData): void;
|
|
419
329
|
clearSelectionState(): void;
|
|
420
330
|
resetState(): void;
|
|
421
331
|
setUser(user: IUserInfo | null): void;
|
|
@@ -446,9 +356,7 @@ declare class AuthStateService {
|
|
|
446
356
|
* Signal-based service for branch CRUD operations
|
|
447
357
|
*/
|
|
448
358
|
declare class BranchApiService extends ApiResourceService<ICreateBranchRequest | IUpdateBranchRequest, IBranch> {
|
|
449
|
-
private readonly _currentCompanyId;
|
|
450
359
|
constructor();
|
|
451
|
-
setCurrentCompanyId(companyId: string | null): void;
|
|
452
360
|
fetchByCompany(companyId: string, search?: string): void;
|
|
453
361
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BranchApiService, never>;
|
|
454
362
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<BranchApiService>;
|
|
@@ -501,14 +409,14 @@ declare class UserPermissionApiService {
|
|
|
501
409
|
private readonly appConfig;
|
|
502
410
|
private readonly http;
|
|
503
411
|
private readonly baseUrl;
|
|
504
|
-
assignUserCompanies(data: IAssignUserCompanyRequest): Observable<
|
|
505
|
-
assignUserToCompany(userId: string, companyId: string): Observable<
|
|
506
|
-
revokeUserFromCompany(userId: string, companyId: string): Observable<
|
|
507
|
-
getUserCompanies(userId: string): Observable<
|
|
508
|
-
assignUserBranches(data: IAssignUserBranchRequest): Observable<
|
|
509
|
-
assignUserToBranch(userId: string, branchId: string): Observable<
|
|
510
|
-
revokeUserFromBranch(userId: string, branchId: string): Observable<
|
|
511
|
-
getUserBranches(userId: string, companyId?: string): Observable<
|
|
412
|
+
assignUserCompanies(data: IAssignUserCompanyRequest): Observable<IMessageResponse>;
|
|
413
|
+
assignUserToCompany(userId: string, companyId: string): Observable<IMessageResponse>;
|
|
414
|
+
revokeUserFromCompany(userId: string, companyId: string): Observable<IMessageResponse>;
|
|
415
|
+
getUserCompanies(userId: string): Observable<ISingleResponse<IUserCompanyPermission[]>>;
|
|
416
|
+
assignUserBranches(data: IAssignUserBranchRequest): Observable<IMessageResponse>;
|
|
417
|
+
assignUserToBranch(userId: string, branchId: string): Observable<IMessageResponse>;
|
|
418
|
+
revokeUserFromBranch(userId: string, branchId: string): Observable<IMessageResponse>;
|
|
419
|
+
getUserBranches(userId: string, companyId?: string): Observable<ISingleResponse<IUserBranchPermission[]>>;
|
|
512
420
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserPermissionApiService, never>;
|
|
513
421
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<UserPermissionApiService>;
|
|
514
422
|
}
|
|
@@ -622,7 +530,7 @@ declare class AuthCompanyApiProviderAdapter implements ICompanyApiProvider {
|
|
|
622
530
|
}
|
|
623
531
|
declare class AuthUserPermissionProviderAdapter implements IUserPermissionProvider {
|
|
624
532
|
private readonly userPermissionApi;
|
|
625
|
-
getUserBranchPermissions(userId: string, companyId?: string): Observable<ISingleResponse<
|
|
533
|
+
getUserBranchPermissions(userId: string, companyId?: string): Observable<ISingleResponse<IUserBranchPermission$1[]>>;
|
|
626
534
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthUserPermissionProviderAdapter, never>;
|
|
627
535
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthUserPermissionProviderAdapter>;
|
|
628
536
|
}
|
|
@@ -1181,8 +1089,6 @@ declare class ProfilePageComponent {
|
|
|
1181
1089
|
private readonly userFormExtension;
|
|
1182
1090
|
private readonly translateAdapter;
|
|
1183
1091
|
private translate;
|
|
1184
|
-
/** Translate with fallback: if key returns unchanged, use fallback instead */
|
|
1185
|
-
safeTranslate(key: string | undefined, fallback: string): string;
|
|
1186
1092
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1187
1093
|
readonly isLoadingPermissions: _angular_core.WritableSignal<boolean>;
|
|
1188
1094
|
readonly isLoadingExtraFields: _angular_core.WritableSignal<boolean>;
|
|
@@ -1281,8 +1187,6 @@ declare class RegisterPageComponent {
|
|
|
1281
1187
|
private readonly registrationExtension;
|
|
1282
1188
|
private readonly translateAdapter;
|
|
1283
1189
|
private translate;
|
|
1284
|
-
/** Translate with fallback: if key returns unchanged, use fallback instead */
|
|
1285
|
-
safeTranslate(key: string | undefined, fallback: string): string;
|
|
1286
1190
|
private readonly queryParamMap;
|
|
1287
1191
|
private companySlugInitialized;
|
|
1288
1192
|
readonly returnUrl: _angular_core.InputSignal<string>;
|
|
@@ -1345,7 +1249,6 @@ declare class ResetPasswordPageComponent {
|
|
|
1345
1249
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ResetPasswordPageComponent, "lib-reset-password-page", never, {}, {}, never, never, true, never>;
|
|
1346
1250
|
}
|
|
1347
1251
|
|
|
1348
|
-
/** User form model interface */
|
|
1349
1252
|
interface IUserFormModel {
|
|
1350
1253
|
name: string;
|
|
1351
1254
|
email: string;
|
|
@@ -1354,11 +1257,6 @@ interface IUserFormModel {
|
|
|
1354
1257
|
isActive: boolean;
|
|
1355
1258
|
emailVerified: boolean;
|
|
1356
1259
|
}
|
|
1357
|
-
/**
|
|
1358
|
-
* User Form Component
|
|
1359
|
-
* Handles creating and editing users.
|
|
1360
|
-
* When company feature is enabled, automatically assigns new users to current company/branch.
|
|
1361
|
-
*/
|
|
1362
1260
|
declare class UserFormComponent {
|
|
1363
1261
|
private readonly destroyRef;
|
|
1364
1262
|
private readonly router;
|
|
@@ -1372,25 +1270,15 @@ declare class UserFormComponent {
|
|
|
1372
1270
|
private readonly userFormExtension;
|
|
1373
1271
|
private readonly parentInjector;
|
|
1374
1272
|
private translate;
|
|
1375
|
-
/** Translate with fallback: if key returns unchanged, use fallback instead */
|
|
1376
|
-
safeTranslate(key: string | undefined, fallback: string): string;
|
|
1377
1273
|
private readonly routeParams;
|
|
1378
1274
|
private userLoadTriggered;
|
|
1379
|
-
/** Loading state */
|
|
1380
1275
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1381
|
-
/** Existing user data when editing */
|
|
1382
1276
|
readonly existingUser: _angular_core.WritableSignal<IUser | null>;
|
|
1383
|
-
/** Whether in edit mode */
|
|
1384
1277
|
readonly isEditMode: _angular_core.Signal<boolean>;
|
|
1385
|
-
/** Whether company feature is enabled */
|
|
1386
1278
|
readonly companyFeatureEnabled: _angular_core.Signal<boolean>;
|
|
1387
|
-
/** Current company name */
|
|
1388
1279
|
readonly currentCompanyName: _angular_core.Signal<string>;
|
|
1389
|
-
/** Current branch name */
|
|
1390
1280
|
readonly currentBranchName: _angular_core.Signal<string>;
|
|
1391
|
-
/** Form model */
|
|
1392
1281
|
readonly formModel: _angular_core.WritableSignal<IUserFormModel>;
|
|
1393
|
-
/** Form with validation schema */
|
|
1394
1282
|
readonly formTree: _angular_forms_signals.FieldTree<IUserFormModel, string | number>;
|
|
1395
1283
|
readonly isLoadingExtraFields: _angular_core.WritableSignal<boolean>;
|
|
1396
1284
|
readonly extraFieldsModel: _angular_core.WritableSignal<Record<string, unknown>>;
|
|
@@ -1403,10 +1291,9 @@ declare class UserFormComponent {
|
|
|
1403
1291
|
getExtraFieldValue(key: string): unknown;
|
|
1404
1292
|
getFieldTemplateContext(field: IUserFormExtraField): IUserFormFieldTemplateContext;
|
|
1405
1293
|
getFieldInjector(field: IUserFormExtraField): Injector;
|
|
1406
|
-
/** Check if form is valid */
|
|
1407
1294
|
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
1408
1295
|
constructor();
|
|
1409
|
-
loadUser(id: string): void
|
|
1296
|
+
loadUser(id: string): Promise<void>;
|
|
1410
1297
|
private loadExtraFields;
|
|
1411
1298
|
private toFormModel;
|
|
1412
1299
|
onSubmit(): void;
|
|
@@ -1414,9 +1301,6 @@ declare class UserFormComponent {
|
|
|
1414
1301
|
private createUser;
|
|
1415
1302
|
private saveExtraFieldsForNewUser;
|
|
1416
1303
|
private onSaveSuccess;
|
|
1417
|
-
/**
|
|
1418
|
-
* Assign user to current company and branch
|
|
1419
|
-
*/
|
|
1420
1304
|
private assignUserToCompanyAndBranch;
|
|
1421
1305
|
onCancel(): void;
|
|
1422
1306
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserFormComponent, never>;
|
|
@@ -1439,8 +1323,6 @@ declare class UserListComponent {
|
|
|
1439
1323
|
readonly userDetailConfig: _flusys_ng_auth.IUserDetailViewConfig | null;
|
|
1440
1324
|
private readonly translateAdapter;
|
|
1441
1325
|
private translate;
|
|
1442
|
-
/** Translate with fallback: if key returns unchanged, use fallback instead */
|
|
1443
|
-
safeTranslate(key: string | undefined, fallback: string): string;
|
|
1444
1326
|
readonly users: _angular_core.Signal<IUser[]>;
|
|
1445
1327
|
readonly isLoading: _angular_core.Signal<boolean>;
|
|
1446
1328
|
readonly total: _angular_core.Signal<number>;
|
|
@@ -1519,20 +1401,32 @@ declare class UserBranchPermissionDialogComponent {
|
|
|
1519
1401
|
readonly user: _angular_core.InputSignal<IUser | null>;
|
|
1520
1402
|
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
1521
1403
|
readonly permissionsChanged: _angular_core.OutputEmitterRef<void>;
|
|
1522
|
-
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1523
1404
|
readonly isSaving: _angular_core.WritableSignal<boolean>;
|
|
1524
|
-
readonly
|
|
1525
|
-
readonly
|
|
1405
|
+
readonly selectedCompanyId: _angular_core.WritableSignal<string | null>;
|
|
1406
|
+
readonly companiesResource: _angular_core.ResourceRef<{
|
|
1526
1407
|
id: string;
|
|
1527
1408
|
name: string;
|
|
1528
|
-
}[]>;
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1409
|
+
}[] | undefined>;
|
|
1410
|
+
readonly branchesResource: _angular_core.ResourceRef<{
|
|
1411
|
+
isAssigned: boolean;
|
|
1412
|
+
id: string;
|
|
1413
|
+
name: string;
|
|
1414
|
+
slug: string;
|
|
1415
|
+
companyId: string;
|
|
1416
|
+
parentId?: string | null;
|
|
1417
|
+
logoId?: string | null;
|
|
1418
|
+
address?: string | null;
|
|
1419
|
+
phone?: string | null;
|
|
1420
|
+
email?: string | null;
|
|
1421
|
+
serial?: number;
|
|
1422
|
+
isActive: boolean;
|
|
1423
|
+
readOnly: boolean;
|
|
1424
|
+
additionalFields?: Record<string, unknown> | null;
|
|
1425
|
+
createdAt: Date | string;
|
|
1426
|
+
updatedAt: Date | string;
|
|
1427
|
+
}[] | undefined>;
|
|
1428
|
+
readonly isInitialLoading: _angular_core.Signal<boolean>;
|
|
1429
|
+
onBranchToggle(branch: BranchWithAssignment, isAssigned: boolean): Promise<void>;
|
|
1536
1430
|
onClose(): void;
|
|
1537
1431
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserBranchPermissionDialogComponent, never>;
|
|
1538
1432
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserBranchPermissionDialogComponent, "lib-user-branch-permission-dialog", never, { "visible": { "alias": "visible"; "required": true; "isSignal": true; }; "user": { "alias": "user"; "required": true; "isSignal": true; }; }, { "closed": "closed"; "permissionsChanged": "permissionsChanged"; }, never, never, true, never>;
|
|
@@ -1564,4 +1458,4 @@ declare class UserCompanyPermissionDialogComponent {
|
|
|
1564
1458
|
}
|
|
1565
1459
|
|
|
1566
1460
|
export { ADMINISTRATION_ROUTES, AUTH_ENDPOINTS, AUTH_MESSAGES, AUTH_PROFILE_EXTENSION, AUTH_REGISTRATION_EXTENSION, AUTH_ROUTES, AUTH_USER_DETAIL_CONFIG, AUTH_USER_FORM_EXTENSION, AUTH_USER_LIST_EXTENSION, AUTH_VALIDATION_CONFIG, AdministrationPageComponent, AuthApiService, AuthCompanyApiProviderAdapter, AuthInitService, AuthLayoutApiAdapter, AuthLayoutStateAdapter, AuthStateProviderAdapter, AuthStateService, AuthUserPermissionProviderAdapter, AuthUserProviderAdapter, BranchApiService, BranchFormComponent, BranchListComponent, CompanyApiService, CompanyFormComponent, CompanyListComponent, ForgotPasswordPageComponent, LoginPageComponent, PROFILE_FIELD_CONTEXT, PROFILE_ROUTES, ProfilePageComponent, REGISTRATION_FIELD_CONTEXT, RegisterPageComponent, ResetPasswordPageComponent, TokenRefreshStateService, USER_FORM_FIELD_CONTEXT, UserApiService, UserBranchPermissionDialogComponent, UserCompanyPermissionDialogComponent, UserFormComponent, UserListComponent, UserPermissionApiService, VerifyEmailPageComponent, authGuard, authInterceptor, companyFeatureGuard, emailFeatureGuard, guestGuard, isCompanySelectionResponse, isEmailVerificationRequired, isEndpoint, isLoginResponse, provideAuthLayoutIntegration, provideAuthProviders, signUpFeatureGuard, tokenRefreshInterceptor, validateEmail, validatePassword };
|
|
1567
|
-
export type { AuthResponse, IAssignUserBranchRequest, IAssignUserCompanyRequest, IAuthValidationConfig,
|
|
1461
|
+
export type { AuthResponse, IAssignUserBranchRequest, IAssignUserCompanyRequest, IAuthValidationConfig, IBranch, IBranchInfo, IBranchSelectionInfo, IChangePasswordRequest, ICompany, ICompanyInfo, ICompanySelectionData, ICompanySelectionResponse, ICompanyWithBranches, ICreateBranchRequest, ICreateCompanyRequest, ICreateUserRequest, IEmailValidationConfig, IEmailVerificationData, ILoginData, ILoginRequest, ILoginRequiresEmailVerification, ILoginResponse, IMeData, IMeResponse, IPasswordValidationConfig, IPermissionItem, IProfileExtensionProvider, IProfileExtraField, IProfileExtraSection, IProfileFieldTemplateContext, IRefreshTokenResponse, IRegistrationData, IRegistrationExtensionProvider, IRegistrationExtraField, IRegistrationFieldTemplateContext, IRegistrationRequest, IRegistrationResponse, ISelectRequest, ISwitchCompanyRequest, IUpdateBranchRequest, IUpdateCompanyRequest, IUpdateUserRequest, IUser, IUserBranchPermission, IUserCompanyPermission, IUserDetailViewConfig, IUserFormExtensionProvider, IUserFormExtraField, IUserFormFieldTemplateContext, IUserInfo, IUserListExtensionProvider, IUserListExtraAction, IUserListExtraColumn, UserDetailViewMode };
|