@flusys/ng-auth 8.1.5 → 9.1.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flusys/ng-auth",
3
- "version": "8.1.5",
3
+ "version": "9.1.0-rc.1",
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": ">=8.1.5",
12
- "@flusys/ng-layout": ">=8.1.5",
13
- "@flusys/ng-shared": ">=8.1.5",
14
- "@flusys/ng-ui": ">=8.1.5",
11
+ "@flusys/ng-core": ">=9.1.0-rc.1",
12
+ "@flusys/ng-layout": ">=9.1.0-rc.1",
13
+ "@flusys/ng-shared": ">=9.1.0-rc.1",
14
+ "@flusys/ng-ui": ">=9.1.0-rc.1",
15
15
  "rxjs": "^7.8.0"
16
16
  },
17
17
  "sideEffects": false,
@@ -470,6 +470,25 @@ declare class TokenRefreshStateService {
470
470
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<TokenRefreshStateService>;
471
471
  }
472
472
 
473
+ declare class PasswordPolicyService {
474
+ private readonly config;
475
+ private readonly translateAdapter;
476
+ private readonly rules;
477
+ readonly minLength: number;
478
+ private readonly maxLength;
479
+ validate(password: string): string | null;
480
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PasswordPolicyService, never>;
481
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<PasswordPolicyService>;
482
+ }
483
+
484
+ declare class EmailPolicyService {
485
+ private readonly config;
486
+ private readonly translateAdapter;
487
+ validate(email: string): string | null;
488
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailPolicyService, never>;
489
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EmailPolicyService>;
490
+ }
491
+
473
492
  /**
474
493
  * User API Service
475
494
  * Signal-based service for user CRUD operations
@@ -821,7 +840,16 @@ interface IUserDetailViewConfig {
821
840
  }>;
822
841
  }
823
842
  declare const AUTH_USER_DETAIL_CONFIG: InjectionToken<IUserDetailViewConfig>;
824
- declare function validatePassword(password: string, config: IPasswordValidationConfig): string | null;
843
+ declare const DEFAULT_PASSWORD_VALIDATION: {
844
+ readonly minLength: 8;
845
+ readonly maxLength: 128;
846
+ readonly requireUppercase: true;
847
+ readonly requireLowercase: true;
848
+ readonly requireNumbers: true;
849
+ readonly requireSpecialChars: true;
850
+ };
851
+ declare function resolvePasswordValidation(config?: IPasswordValidationConfig | null): IPasswordValidationConfig;
852
+ declare function validatePassword(password: string, config?: IPasswordValidationConfig): string | null;
825
853
  declare function validateEmail(email: string, config?: IEmailValidationConfig): string | null;
826
854
 
827
855
  /**
@@ -1055,7 +1083,7 @@ declare class LoginPageComponent {
1055
1083
  private readonly authApi;
1056
1084
  private readonly authState;
1057
1085
  private readonly translateAdapter;
1058
- private readonly validationConfig;
1086
+ private readonly emailPolicy;
1059
1087
  private translate;
1060
1088
  readonly returnUrl: _angular_core.InputSignal<string>;
1061
1089
  readonly currentStep: _angular_core.WritableSignal<LoginStep>;
@@ -1064,12 +1092,8 @@ declare class LoginPageComponent {
1064
1092
  readonly savedUserName: _angular_core.WritableSignal<string | null>;
1065
1093
  readonly welcomeBackText: _angular_core.Signal<string>;
1066
1094
  readonly loginFormModel: _angular_core.WritableSignal<ILoginFormModel>;
1067
- private readonly emailErrorMessage;
1068
- private readonly passwordMinLength;
1069
- private readonly passwordErrorMessage;
1070
1095
  readonly loginForm: _angular_forms_signals.FieldTree<ILoginFormModel, string | number, "writable">;
1071
1096
  readonly emailValidationError: _angular_core.Signal<string | null>;
1072
- readonly passwordValidationError: _angular_core.Signal<string | null>;
1073
1097
  readonly isLoginFormValid: _angular_core.Signal<boolean>;
1074
1098
  readonly selectionFormModel: _angular_core.WritableSignal<ISelectionFormModel>;
1075
1099
  readonly selectionForm: _angular_forms_signals.FieldTree<ISelectionFormModel, string | number, "writable">;
@@ -1109,6 +1133,7 @@ declare class ProfilePageComponent {
1109
1133
  private readonly authState;
1110
1134
  private readonly userService;
1111
1135
  private readonly authApiService;
1136
+ protected readonly passwordPolicy: PasswordPolicyService;
1112
1137
  private readonly fileUrlService;
1113
1138
  private readonly fileProvider;
1114
1139
  private readonly permissionProvider;
@@ -1162,6 +1187,7 @@ declare class ProfilePageComponent {
1162
1187
  readonly passwordModel: _angular_core.WritableSignal<IPasswordFormModel>;
1163
1188
  readonly passwordForm: _angular_forms_signals.FieldTree<IPasswordFormModel, string | number, "writable">;
1164
1189
  readonly isPasswordLoading: _angular_core.WritableSignal<boolean>;
1190
+ readonly newPasswordError: _angular_core.Signal<string | null>;
1165
1191
  readonly isPasswordFormValid: _angular_core.Signal<boolean>;
1166
1192
  readonly passwordsMatch: _angular_core.Signal<boolean>;
1167
1193
  readonly profileUploadOptions: {
@@ -1212,7 +1238,8 @@ declare class RegisterPageComponent {
1212
1238
  private readonly authState;
1213
1239
  private readonly route;
1214
1240
  private readonly router;
1215
- private readonly validationConfig;
1241
+ private readonly emailPolicy;
1242
+ protected readonly passwordPolicy: PasswordPolicyService;
1216
1243
  private readonly registrationExtension;
1217
1244
  private readonly translateAdapter;
1218
1245
  private translate;
@@ -1227,9 +1254,6 @@ declare class RegisterPageComponent {
1227
1254
  readonly hasDefaultBranch: _angular_core.Signal<boolean>;
1228
1255
  readonly extraFields: _angular_core.Signal<IRegistrationExtraField[]>;
1229
1256
  readonly extraFieldsModel: _angular_core.WritableSignal<Record<string, unknown>>;
1230
- private readonly emailErrorMessage;
1231
- readonly passwordMinLength: _angular_core.Signal<number>;
1232
- private readonly passwordErrorMessage;
1233
1257
  readonly userFormModel: _angular_core.WritableSignal<IUserFormModel$1>;
1234
1258
  readonly userForm: _angular_forms_signals.FieldTree<IUserFormModel$1, string | number, "writable">;
1235
1259
  readonly companyFormModel: _angular_core.WritableSignal<ICompanyFormModel>;
@@ -1246,7 +1270,7 @@ declare class RegisterPageComponent {
1246
1270
  private readonly fieldInjectors;
1247
1271
  getFieldInjector(field: IRegistrationExtraField): Injector;
1248
1272
  constructor();
1249
- onCreateCompanyToggle(): void;
1273
+ onCreateCompanyToggle(createNew: boolean): void;
1250
1274
  onSubmit(): void;
1251
1275
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<RegisterPageComponent, never>;
1252
1276
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<RegisterPageComponent, "lib-register-page", never, { "returnUrl": { "alias": "returnUrl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
@@ -1262,6 +1286,7 @@ declare class ResetPasswordPageComponent {
1262
1286
  private readonly route;
1263
1287
  private readonly messageService;
1264
1288
  private readonly authApi;
1289
+ private readonly passwordPolicy;
1265
1290
  private readonly translateAdapter;
1266
1291
  private translate;
1267
1292
  private readonly queryParams;
@@ -1272,6 +1297,7 @@ declare class ResetPasswordPageComponent {
1272
1297
  readonly formModel: _angular_core.WritableSignal<IResetPasswordFormModel>;
1273
1298
  readonly resetForm: _angular_forms_signals.FieldTree<IResetPasswordFormModel, string | number, "writable">;
1274
1299
  readonly passwordMismatch: _angular_core.Signal<boolean>;
1300
+ readonly passwordValidationError: _angular_core.Signal<string | null>;
1275
1301
  readonly canSubmit: _angular_core.Signal<boolean>;
1276
1302
  constructor();
1277
1303
  onSubmit(event: Event): void;
@@ -1349,6 +1375,7 @@ declare class UserFormComponent {
1349
1375
  private readonly userService;
1350
1376
  private readonly permissionService;
1351
1377
  private readonly authState;
1378
+ private readonly passwordPolicy;
1352
1379
  private readonly translateAdapter;
1353
1380
  private readonly userFormExtension;
1354
1381
  private readonly parentInjector;
@@ -1375,6 +1402,7 @@ declare class UserFormComponent {
1375
1402
  getFieldTemplateContext(field: IUserFormExtraField): IUserFormFieldTemplateContext;
1376
1403
  private readonly fieldInjectors;
1377
1404
  getFieldInjector(field: IUserFormExtraField): Injector;
1405
+ readonly passwordError: _angular_core.Signal<string | null>;
1378
1406
  readonly isFormValid: _angular_core.Signal<boolean>;
1379
1407
  constructor();
1380
1408
  loadUser(id: string): Promise<void>;
@@ -1634,5 +1662,5 @@ declare class UserCompanyPermissionDialogComponent {
1634
1662
  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>;
1635
1663
  }
1636
1664
 
1637
- 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 };
1665
+ 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, DEFAULT_PASSWORD_VALIDATION, EmailPolicyService, ForgotPasswordPageComponent, LoginPageComponent, PROFILE_FIELD_CONTEXT, PROFILE_ROUTES, PasswordPolicyService, 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, resolvePasswordValidation, signUpFeatureGuard, tokenRefreshInterceptor, validateEmail, validatePassword };
1638
1666
  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 };