@flusys/ng-auth 7.1.0 → 8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flusys/ng-auth",
3
- "version": "7.1.0",
3
+ "version": "8.0.0",
4
4
  "description": "Authentication module for FLUSYS Angular applications",
5
5
  "license": "MIT",
6
6
  "peerDependencies": {
@@ -8,10 +8,10 @@
8
8
  "@angular/core": ">=22.0.0",
9
9
  "@angular/forms": ">=22.0.0",
10
10
  "@angular/router": ">=22.0.0",
11
- "@flusys/ng-core": ">=7.1.0",
12
- "@flusys/ng-layout": ">=7.1.0",
13
- "@flusys/ng-shared": ">=7.1.0",
14
- "@flusys/ng-ui": ">=7.1.0",
11
+ "@flusys/ng-core": ">=8.0.0",
12
+ "@flusys/ng-layout": ">=8.0.0",
13
+ "@flusys/ng-shared": ">=8.0.0",
14
+ "@flusys/ng-ui": ">=8.0.0",
15
15
  "rxjs": "^7.8.0"
16
16
  },
17
17
  "sideEffects": false,
@@ -223,6 +223,18 @@ interface IUserBranchPermission {
223
223
  branchSlug: string;
224
224
  companyId: string;
225
225
  }
226
+ interface ICompanyPermittedUser {
227
+ id: string;
228
+ userId: string;
229
+ userName: string;
230
+ userEmail: string;
231
+ }
232
+ interface IBranchPermittedUser {
233
+ id: string;
234
+ userId: string;
235
+ userName: string;
236
+ userEmail: string;
237
+ }
226
238
 
227
239
  interface ISocialAuthConfig extends IBaseEntity {
228
240
  provider: SocialProviderEnum;
@@ -341,7 +353,6 @@ declare class AuthStateService {
341
353
  private readonly appConfig;
342
354
  private readonly router;
343
355
  private readonly platform;
344
- private readonly translateAdapter;
345
356
  private readonly permissionValidator;
346
357
  private readonly _user;
347
358
  private readonly _accessToken;
@@ -489,6 +500,8 @@ declare class UserPermissionApiService {
489
500
  assignUserToBranch(userId: string, branchId: string): Observable<IMessageResponse>;
490
501
  revokeUserFromBranch(userId: string, branchId: string): Observable<IMessageResponse>;
491
502
  getUserBranches(userId: string, companyId?: string): Observable<ISingleResponse<IUserBranchPermission[]>>;
503
+ getCompanyUsers(companyId: string): Observable<ISingleResponse<ICompanyPermittedUser[]>>;
504
+ getBranchUsers(branchId: string): Observable<ISingleResponse<IBranchPermittedUser[]>>;
492
505
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserPermissionApiService, never>;
493
506
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<UserPermissionApiService>;
494
507
  }
@@ -555,9 +568,9 @@ declare class AuthLayoutApiAdapter implements ILayoutAuthApi {
555
568
  private readonly authState;
556
569
  private readonly permissionApi;
557
570
  private readonly router;
558
- logOut(): Observable<any>;
571
+ logOut(): Observable<unknown>;
559
572
  navigateLogin(withUrl?: boolean): void;
560
- switchCompany(companyId: string, branchId: string): Observable<any>;
573
+ switchCompany(companyId: string, branchId: string): Observable<unknown>;
561
574
  getUserCompanies(): Observable<ICompanyInfo$1[]>;
562
575
  getCompanyBranches(companyId: string): Observable<IBranchInfo$1[]>;
563
576
  getMyCompanies(): Observable<ICompanyInfo$1[]>;
@@ -585,8 +598,9 @@ declare class AuthUserProviderAdapter implements IUserProvider {
585
598
  pageSize?: number;
586
599
  search?: string;
587
600
  isActive?: boolean;
588
- [key: string]: any;
601
+ [key: string]: unknown;
589
602
  }): Observable<IListResponse<IUserBasicInfo>>;
603
+ getUsersByIds(ids: string[]): Observable<IListResponse<IUserBasicInfo>>;
590
604
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthUserProviderAdapter, never>;
591
605
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthUserProviderAdapter>;
592
606
  }
@@ -912,7 +926,7 @@ declare class BranchFormComponent {
912
926
  loadBranch(id: string): Promise<void>;
913
927
  private toFormModel;
914
928
  generateSlug(): void;
915
- onSubmit(): Promise<void>;
929
+ onSubmit(event: Event): Promise<void>;
916
930
  private updateBranch;
917
931
  private createBranch;
918
932
  private buildOptionalFields;
@@ -930,6 +944,13 @@ declare class BranchListComponent {
930
944
  readonly UPDATE: "branch.update";
931
945
  readonly DELETE: "branch.delete";
932
946
  };
947
+ readonly USER_PERMISSIONS: {
948
+ readonly CREATE: "user.create";
949
+ readonly READ: "user.read";
950
+ readonly UPDATE: "user.update";
951
+ readonly DELETE: "user.delete";
952
+ readonly LOOKUP: "user.lookup";
953
+ };
933
954
  private readonly router;
934
955
  private readonly route;
935
956
  private readonly messageService;
@@ -951,6 +972,8 @@ declare class BranchListComponent {
951
972
  readonly isLoading: _angular_core.Signal<boolean>;
952
973
  /** Total count from service */
953
974
  readonly total: _angular_core.Signal<number>;
975
+ readonly permittedUsersDialogVisible: _angular_core.WritableSignal<boolean>;
976
+ readonly selectedBranch: _angular_core.WritableSignal<IBranch | null>;
954
977
  constructor();
955
978
  loadBranches(page?: number, pageSize?: number): void;
956
979
  onLazyLoad(event: {
@@ -959,6 +982,7 @@ declare class BranchListComponent {
959
982
  }): void;
960
983
  onCreate(): void;
961
984
  onEdit(branch: IBranch): void;
985
+ onViewUsers(branch: IBranch): void;
962
986
  onDelete(branch: IBranch): void;
963
987
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BranchListComponent, never>;
964
988
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<BranchListComponent, "lib-branch-list", never, {}, {}, never, never, true, never>;
@@ -988,7 +1012,9 @@ declare class CompanyListComponent {
988
1012
  readonly canCreate: _angular_core.Signal<boolean>;
989
1013
  readonly canEditFn: (_item: unknown) => boolean;
990
1014
  readonly canDeleteFn: (item: unknown) => boolean;
991
- readonly viewBranchesAction: ITableAction[];
1015
+ readonly permittedUsersDialogVisible: _angular_core.WritableSignal<boolean>;
1016
+ readonly selectedCompany: _angular_core.WritableSignal<ICompany | null>;
1017
+ readonly rowActions: ITableAction[];
992
1018
  readonly columns: ITableColumn[];
993
1019
  asCompany(item: unknown): ICompany;
994
1020
  private t;
@@ -1011,7 +1037,7 @@ declare class ForgotPasswordPageComponent {
1011
1037
  readonly formModel: _angular_core.WritableSignal<IForgotPasswordFormModel>;
1012
1038
  readonly forgotForm: _angular_forms_signals.FieldTree<IForgotPasswordFormModel, string | number, "writable">;
1013
1039
  readonly isFormValid: _angular_core.Signal<boolean>;
1014
- onSubmit(): void;
1040
+ onSubmit(event: Event): void;
1015
1041
  private showEmailSent;
1016
1042
  resetForm(): void;
1017
1043
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForgotPasswordPageComponent, never>;
@@ -1064,9 +1090,9 @@ declare class LoginPageComponent {
1064
1090
  readonly branches: _angular_core.Signal<IBranchSelectionInfo[]>;
1065
1091
  constructor();
1066
1092
  private restorePendingSelectionState;
1067
- onSubmit(): void;
1093
+ onSubmit(event: Event): void;
1068
1094
  onCompanyChange(): void;
1069
- onSelectCompany(): void;
1095
+ onSelectCompany(event: Event): void;
1070
1096
  goBackToCredentials(): void;
1071
1097
  onResendVerification(): void;
1072
1098
  private autoSelectIfSingle;
@@ -1141,6 +1167,7 @@ declare class ProfilePageComponent {
1141
1167
  private readonly fieldInjectors;
1142
1168
  getFieldInjector(field: IProfileExtraField): Injector;
1143
1169
  readonly passwordModel: _angular_core.WritableSignal<IPasswordFormModel>;
1170
+ readonly passwordForm: _angular_forms_signals.FieldTree<IPasswordFormModel, string | number, "writable">;
1144
1171
  readonly isPasswordLoading: _angular_core.WritableSignal<boolean>;
1145
1172
  readonly isPasswordFormValid: _angular_core.Signal<boolean>;
1146
1173
  readonly passwordsMatch: _angular_core.Signal<boolean>;
@@ -1254,7 +1281,7 @@ declare class ResetPasswordPageComponent {
1254
1281
  readonly passwordMismatch: _angular_core.Signal<boolean>;
1255
1282
  readonly canSubmit: _angular_core.Signal<boolean>;
1256
1283
  constructor();
1257
- onSubmit(): void;
1284
+ onSubmit(event: Event): void;
1258
1285
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ResetPasswordPageComponent, never>;
1259
1286
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ResetPasswordPageComponent, "lib-reset-password-page", never, {}, {}, never, never, true, never>;
1260
1287
  }
@@ -1447,12 +1474,78 @@ declare class VerifyEmailPageComponent {
1447
1474
  private verifyEmail;
1448
1475
  private handleVerificationResult;
1449
1476
  showResendForm(): void;
1450
- onResend(): void;
1477
+ onResend(event: Event): void;
1451
1478
  private handleResendComplete;
1452
1479
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<VerifyEmailPageComponent, never>;
1453
1480
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<VerifyEmailPageComponent, "lib-verify-email-page", never, {}, {}, never, never, true, never>;
1454
1481
  }
1455
1482
 
1483
+ /**
1484
+ * Read-only viewer for users permitted against a branch, with a remove-only
1485
+ * action per user. Assigning new users stays on the user-centric permission
1486
+ * flow (`UserBranchPermissionDialogComponent`) — this dialog intentionally
1487
+ * has no "add" affordance.
1488
+ */
1489
+ declare class BranchPermittedUsersDialogComponent {
1490
+ readonly USER_PERMISSIONS: {
1491
+ readonly CREATE: "user.create";
1492
+ readonly READ: "user.read";
1493
+ readonly UPDATE: "user.update";
1494
+ readonly DELETE: "user.delete";
1495
+ readonly LOOKUP: "user.lookup";
1496
+ };
1497
+ private readonly permissionApi;
1498
+ private readonly confirmationService;
1499
+ private readonly messageService;
1500
+ private readonly translateAdapter;
1501
+ private t;
1502
+ readonly visible: _angular_core.InputSignal<boolean>;
1503
+ readonly branch: _angular_core.InputSignal<IBranch | null>;
1504
+ readonly closed: _angular_core.OutputEmitterRef<void>;
1505
+ readonly isLoading: _angular_core.WritableSignal<boolean>;
1506
+ readonly isRemoving: _angular_core.WritableSignal<boolean>;
1507
+ readonly users: _angular_core.WritableSignal<IBranchPermittedUser[]>;
1508
+ constructor();
1509
+ private loadUsers;
1510
+ onRemove(user: IBranchPermittedUser): void;
1511
+ onClose(): void;
1512
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BranchPermittedUsersDialogComponent, never>;
1513
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BranchPermittedUsersDialogComponent, "lib-branch-permitted-users-dialog", never, { "visible": { "alias": "visible"; "required": true; "isSignal": true; }; "branch": { "alias": "branch"; "required": true; "isSignal": true; }; }, { "closed": "closed"; }, never, never, true, never>;
1514
+ }
1515
+
1516
+ /**
1517
+ * Read-only viewer for users permitted against a company, with a remove-only
1518
+ * action per user. Assigning new users stays on the user-centric permission
1519
+ * flow (`UserCompanyPermissionDialogComponent`) — this dialog intentionally
1520
+ * has no "add" affordance.
1521
+ */
1522
+ declare class CompanyPermittedUsersDialogComponent {
1523
+ readonly USER_PERMISSIONS: {
1524
+ readonly CREATE: "user.create";
1525
+ readonly READ: "user.read";
1526
+ readonly UPDATE: "user.update";
1527
+ readonly DELETE: "user.delete";
1528
+ readonly LOOKUP: "user.lookup";
1529
+ };
1530
+ private readonly permissionApi;
1531
+ private readonly confirmationService;
1532
+ private readonly messageService;
1533
+ private readonly translateAdapter;
1534
+ private t;
1535
+ readonly visible: _angular_core.InputSignal<boolean>;
1536
+ readonly company: _angular_core.InputSignal<ICompany | null>;
1537
+ readonly closed: _angular_core.OutputEmitterRef<void>;
1538
+ readonly isLoading: _angular_core.WritableSignal<boolean>;
1539
+ readonly isRemoving: _angular_core.WritableSignal<boolean>;
1540
+ readonly users: _angular_core.WritableSignal<ICompanyPermittedUser[]>;
1541
+ constructor();
1542
+ private loadUsers;
1543
+ onRemove(user: ICompanyPermittedUser): void;
1544
+ onClose(): void;
1545
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CompanyPermittedUsersDialogComponent, never>;
1546
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CompanyPermittedUsersDialogComponent, "lib-company-permitted-users-dialog", never, { "visible": { "alias": "visible"; "required": true; "isSignal": true; }; "company": { "alias": "company"; "required": true; "isSignal": true; }; }, { "closed": "closed"; }, never, never, true, never>;
1547
+ }
1548
+
1456
1549
  declare class SocialLoginButtonsComponent {
1457
1550
  private readonly destroyRef;
1458
1551
  private readonly socialApi;
@@ -1539,11 +1632,11 @@ declare class UserCompanyPermissionDialogComponent {
1539
1632
  private assignedCompanyIds;
1540
1633
  constructor();
1541
1634
  private loadData;
1542
- onCompanyToggle(company: CompanyWithAssignment): Promise<void>;
1635
+ onCompanyToggle(company: CompanyWithAssignment, isAssigned: boolean): Promise<void>;
1543
1636
  onClose(): void;
1544
1637
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserCompanyPermissionDialogComponent, never>;
1545
1638
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserCompanyPermissionDialogComponent, "lib-user-company-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>;
1546
1639
  }
1547
1640
 
1548
- 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, SOCIAL_PROVIDERS, SOCIAL_RETURN_URL_KEY, SocialAuthApiService, SocialAuthConfigApiService, SocialCallbackPageComponent, SocialConfigPageComponent, SocialLoginButtonsComponent, SocialProviderEnum, 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 };
1549
- export type { AuthResponse, IAssignUserBranchRequest, IAssignUserCompanyRequest, IAuthValidationConfig, IBranch, IBranchInfo, IBranchSelectionInfo, IChangePasswordRequest, ICompany, ICompanyInfo, ICompanySelectionData, ICompanySelectionResponse, ICompanyWithBranches, ICreateBranchRequest, ICreateCompanyRequest, ICreateSocialAuthConfigDto, ICreateUserRequest, IEmailValidationConfig, IEmailVerificationData, ILoginData, ILoginRequest, ILoginRequiresEmailVerification, ILoginResponse, IMeData, IMeResponse, IPasswordValidationConfig, IPermissionItem, IProfileExtensionProvider, IProfileExtraField, IProfileExtraSection, IProfileFieldTemplateContext, IRefreshTokenResponse, IRegistrationData, IRegistrationExtensionProvider, IRegistrationExtraField, IRegistrationFieldTemplateContext, IRegistrationRequest, IRegistrationResponse, ISelectRequest, ISocialAuthConfig, ISocialAuthorization, ISocialCallbackRequest, ISocialProviderInfo, ISwitchCompanyRequest, IUpdateBranchRequest, IUpdateCompanyRequest, IUpdateSocialAuthConfigDto, IUpdateUserRequest, IUser, IUserBranchPermission, IUserCompanyPermission, IUserDetailViewConfig, IUserFormExtensionProvider, IUserFormExtraField, IUserFormFieldTemplateContext, IUserInfo, IUserListExtensionProvider, IUserListExtraAction, IUserListExtraColumn, UserDetailViewMode };
1641
+ 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, BranchPermittedUsersDialogComponent, CompanyApiService, CompanyFormComponent, CompanyListComponent, CompanyPermittedUsersDialogComponent, ForgotPasswordPageComponent, LoginPageComponent, PROFILE_FIELD_CONTEXT, PROFILE_ROUTES, ProfilePageComponent, REGISTRATION_FIELD_CONTEXT, RegisterPageComponent, ResetPasswordPageComponent, SOCIAL_PROVIDERS, SOCIAL_RETURN_URL_KEY, SocialAuthApiService, SocialAuthConfigApiService, SocialCallbackPageComponent, SocialConfigPageComponent, SocialLoginButtonsComponent, SocialProviderEnum, 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 };
1642
+ export type { AuthResponse, IAssignUserBranchRequest, IAssignUserCompanyRequest, IAuthValidationConfig, IBranch, IBranchInfo, IBranchPermittedUser, IBranchSelectionInfo, IChangePasswordRequest, ICompany, ICompanyInfo, ICompanyPermittedUser, ICompanySelectionData, ICompanySelectionResponse, ICompanyWithBranches, ICreateBranchRequest, ICreateCompanyRequest, ICreateSocialAuthConfigDto, ICreateUserRequest, IEmailValidationConfig, IEmailVerificationData, ILoginData, ILoginRequest, ILoginRequiresEmailVerification, ILoginResponse, IMeData, IMeResponse, IPasswordValidationConfig, IPermissionItem, IProfileExtensionProvider, IProfileExtraField, IProfileExtraSection, IProfileFieldTemplateContext, IRefreshTokenResponse, IRegistrationData, IRegistrationExtensionProvider, IRegistrationExtraField, IRegistrationFieldTemplateContext, IRegistrationRequest, IRegistrationResponse, ISelectRequest, ISocialAuthConfig, ISocialAuthorization, ISocialCallbackRequest, ISocialProviderInfo, ISwitchCompanyRequest, IUpdateBranchRequest, IUpdateCompanyRequest, IUpdateSocialAuthConfigDto, IUpdateUserRequest, IUser, IUserBranchPermission, IUserCompanyPermission, IUserDetailViewConfig, IUserFormExtensionProvider, IUserFormExtraField, IUserFormFieldTemplateContext, IUserInfo, IUserListExtensionProvider, IUserListExtraAction, IUserListExtraColumn, UserDetailViewMode };