@flusys/ng-auth 2.0.0-rc.0 → 3.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 +676 -365
- package/fesm2022/flusys-ng-auth.mjs +1566 -474
- package/fesm2022/flusys-ng-auth.mjs.map +1 -1
- package/package.json +11 -11
- package/types/flusys-ng-auth.d.ts +217 -35
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flusys/ng-auth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Authentication module for FLUSYS Angular applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@angular/common": "
|
|
8
|
-
"@angular/core": "
|
|
9
|
-
"@angular/forms": "
|
|
10
|
-
"@angular/router": "
|
|
11
|
-
"@flusys/ng-core": "
|
|
12
|
-
"@flusys/ng-layout": "
|
|
13
|
-
"@flusys/ng-shared": "
|
|
14
|
-
"@primeuix/themes": "
|
|
15
|
-
"primeicons": "
|
|
16
|
-
"primeng": "
|
|
7
|
+
"@angular/common": ">=21.0.0",
|
|
8
|
+
"@angular/core": ">=21.0.0",
|
|
9
|
+
"@angular/forms": ">=21.0.0",
|
|
10
|
+
"@angular/router": ">=21.0.0",
|
|
11
|
+
"@flusys/ng-core": ">=3.0.0",
|
|
12
|
+
"@flusys/ng-layout": ">=3.0.0",
|
|
13
|
+
"@flusys/ng-shared": ">=3.0.0",
|
|
14
|
+
"@primeuix/themes": ">=1.0.0",
|
|
15
|
+
"primeicons": ">=7.0.0",
|
|
16
|
+
"primeng": ">=21.0.0"
|
|
17
17
|
},
|
|
18
18
|
"sideEffects": false,
|
|
19
19
|
"module": "fesm2022/flusys-ng-auth.mjs",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IMessageResponse, ApiResourceService, ISingleResponse, ICompanyApiProvider, IListResponse, ICompanyBasicInfo, IAuthStateProvider, IUserPermissionProvider, IUserProvider, IUserBasicInfo, IProfileRoleInfo, IProfileActionInfo, UploadFileFn } from '@flusys/ng-shared';
|
|
1
|
+
import { IMessageResponse, ApiResourceService, ISingleResponse, ICompanyApiProvider, IListResponse, ICompanyBasicInfo, IAuthStateProvider, IUserPermissionProvider, IUserProvider, IUserBasicInfo, ILogicNode, IProfileRoleInfo, IProfileActionInfo, UploadFileFn } 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';
|
|
5
|
-
import { Signal, Provider } from '@angular/core';
|
|
6
|
-
import { HttpClient, HttpRequest, HttpHandlerFn, HttpEvent } from '@angular/common/http';
|
|
5
|
+
import { Signal, Provider, InjectionToken, Type, TemplateRef, Injector } from '@angular/core';
|
|
7
6
|
import { CanActivateFn, Routes } from '@angular/router';
|
|
7
|
+
import { HttpRequest, HttpHandlerFn, HttpEvent } from '@angular/common/http';
|
|
8
8
|
import { ILayoutAuthApi, ICompanyInfo as ICompanyInfo$1, IBranchInfo as IBranchInfo$1, ILayoutAuthState, IUserInfo as IUserInfo$1 } from '@flusys/ng-layout';
|
|
9
9
|
import * as _angular_forms_signals from '@angular/forms/signals';
|
|
10
10
|
import * as _flusys_ng_auth from '@flusys/ng-auth';
|
|
@@ -24,6 +24,7 @@ interface IRegistrationRequest {
|
|
|
24
24
|
newCompanyName?: string;
|
|
25
25
|
newCompanyPhone?: string;
|
|
26
26
|
newCompanyAddress?: string;
|
|
27
|
+
additionalFields?: Record<string, unknown>;
|
|
27
28
|
}
|
|
28
29
|
interface ISelectRequest {
|
|
29
30
|
sessionId: string;
|
|
@@ -445,7 +446,7 @@ declare class AuthStateService {
|
|
|
445
446
|
*/
|
|
446
447
|
declare class BranchApiService extends ApiResourceService<ICreateBranchRequest | IUpdateBranchRequest, IBranch> {
|
|
447
448
|
private readonly _currentCompanyId;
|
|
448
|
-
constructor(
|
|
449
|
+
constructor();
|
|
449
450
|
setCurrentCompanyId(companyId: string | null): void;
|
|
450
451
|
fetchByCompany(companyId: string, search?: string): void;
|
|
451
452
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BranchApiService, never>;
|
|
@@ -457,7 +458,7 @@ declare class BranchApiService extends ApiResourceService<ICreateBranchRequest |
|
|
|
457
458
|
* Signal-based service for company CRUD operations
|
|
458
459
|
*/
|
|
459
460
|
declare class CompanyApiService extends ApiResourceService<ICreateCompanyRequest | IUpdateCompanyRequest, ICompany> {
|
|
460
|
-
constructor(
|
|
461
|
+
constructor();
|
|
461
462
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CompanyApiService, never>;
|
|
462
463
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CompanyApiService>;
|
|
463
464
|
}
|
|
@@ -484,7 +485,7 @@ declare class TokenRefreshStateService {
|
|
|
484
485
|
* Signal-based service for user CRUD operations
|
|
485
486
|
*/
|
|
486
487
|
declare class UserApiService extends ApiResourceService<ICreateUserRequest | IUpdateUserRequest, IUser> {
|
|
487
|
-
constructor(
|
|
488
|
+
constructor();
|
|
488
489
|
updateProfile(data: IUpdateUserRequest): Observable<ISingleResponse<IUser>>;
|
|
489
490
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserApiService, never>;
|
|
490
491
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<UserApiService>;
|
|
@@ -493,6 +494,7 @@ declare class UserApiService extends ApiResourceService<ICreateUserRequest | IUp
|
|
|
493
494
|
/**
|
|
494
495
|
* User Permission API Service
|
|
495
496
|
* Handles user-company and user-branch permission assignments.
|
|
497
|
+
* Endpoint: POST /administration/permissions/*
|
|
496
498
|
*/
|
|
497
499
|
declare class UserPermissionApiService {
|
|
498
500
|
private readonly appConfig;
|
|
@@ -516,6 +518,10 @@ declare const authGuard: CanActivateFn;
|
|
|
516
518
|
declare const guestGuard: CanActivateFn;
|
|
517
519
|
/** Protects routes requiring company feature to be enabled */
|
|
518
520
|
declare const companyFeatureGuard: CanActivateFn;
|
|
521
|
+
/** Protects routes requiring email feature to be enabled */
|
|
522
|
+
declare const emailFeatureGuard: CanActivateFn;
|
|
523
|
+
/** Protects routes requiring sign-up feature to be enabled */
|
|
524
|
+
declare const signUpFeatureGuard: CanActivateFn;
|
|
519
525
|
|
|
520
526
|
/**
|
|
521
527
|
* Auth Interceptor - Adds auth headers and cookie credentials to requests
|
|
@@ -634,6 +640,151 @@ declare function provideAuthLayoutIntegration(): Provider[];
|
|
|
634
640
|
/** Provides auth implementations for ng-shared provider interfaces */
|
|
635
641
|
declare function provideAuthProviders(): Provider[];
|
|
636
642
|
|
|
643
|
+
interface IEmailValidationConfig {
|
|
644
|
+
pattern?: RegExp;
|
|
645
|
+
message?: string;
|
|
646
|
+
}
|
|
647
|
+
interface IPasswordValidationConfig {
|
|
648
|
+
minLength?: number;
|
|
649
|
+
maxLength?: number;
|
|
650
|
+
requireUppercase?: boolean;
|
|
651
|
+
requireLowercase?: boolean;
|
|
652
|
+
requireNumbers?: boolean;
|
|
653
|
+
requireSpecialChars?: boolean;
|
|
654
|
+
pattern?: RegExp;
|
|
655
|
+
message?: string;
|
|
656
|
+
}
|
|
657
|
+
interface IAuthValidationConfig {
|
|
658
|
+
email?: IEmailValidationConfig;
|
|
659
|
+
password?: IPasswordValidationConfig;
|
|
660
|
+
}
|
|
661
|
+
declare const AUTH_VALIDATION_CONFIG: InjectionToken<IAuthValidationConfig>;
|
|
662
|
+
interface IRegistrationFieldTemplateContext {
|
|
663
|
+
field: IRegistrationExtraField;
|
|
664
|
+
value: unknown;
|
|
665
|
+
updateValue: (value: unknown) => void;
|
|
666
|
+
}
|
|
667
|
+
declare const REGISTRATION_FIELD_CONTEXT: InjectionToken<IRegistrationFieldTemplateContext>;
|
|
668
|
+
interface IRegistrationExtraField {
|
|
669
|
+
key: string;
|
|
670
|
+
label: string;
|
|
671
|
+
type: 'text' | 'number' | 'select' | 'checkbox' | 'textarea' | 'date' | 'template';
|
|
672
|
+
placeholder?: string;
|
|
673
|
+
required?: boolean;
|
|
674
|
+
defaultValue?: unknown;
|
|
675
|
+
options?: Array<{
|
|
676
|
+
label: string;
|
|
677
|
+
value: unknown;
|
|
678
|
+
}>;
|
|
679
|
+
pattern?: RegExp;
|
|
680
|
+
validationMessage?: string;
|
|
681
|
+
order?: number;
|
|
682
|
+
containerClass?: string;
|
|
683
|
+
template?: TemplateRef<IRegistrationFieldTemplateContext>;
|
|
684
|
+
component?: Type<unknown>;
|
|
685
|
+
injector?: Injector;
|
|
686
|
+
}
|
|
687
|
+
interface IRegistrationExtensionProvider {
|
|
688
|
+
getExtraFields(): IRegistrationExtraField[];
|
|
689
|
+
transformRegistrationData?(data: Record<string, unknown>): Record<string, unknown>;
|
|
690
|
+
validateExtraFields?(data: Record<string, unknown>): string | null;
|
|
691
|
+
}
|
|
692
|
+
declare const AUTH_REGISTRATION_EXTENSION: InjectionToken<IRegistrationExtensionProvider>;
|
|
693
|
+
interface IUserListExtraColumn {
|
|
694
|
+
key: string;
|
|
695
|
+
header: string;
|
|
696
|
+
field?: string;
|
|
697
|
+
template?: TemplateRef<{
|
|
698
|
+
$implicit: IUser;
|
|
699
|
+
}>;
|
|
700
|
+
styleClass?: string;
|
|
701
|
+
width?: string;
|
|
702
|
+
sortable?: boolean;
|
|
703
|
+
order?: number;
|
|
704
|
+
}
|
|
705
|
+
interface IUserListExtraAction {
|
|
706
|
+
key: string;
|
|
707
|
+
label: string;
|
|
708
|
+
icon: string;
|
|
709
|
+
severity?: 'info' | 'success' | 'warn' | 'danger' | 'secondary' | 'contrast';
|
|
710
|
+
permission?: string;
|
|
711
|
+
onClick: (user: IUser) => void;
|
|
712
|
+
isVisible?: (user: IUser) => boolean;
|
|
713
|
+
isDisabled?: (user: IUser) => boolean;
|
|
714
|
+
order?: number;
|
|
715
|
+
}
|
|
716
|
+
interface IUserListExtensionProvider {
|
|
717
|
+
getExtraColumns(): IUserListExtraColumn[];
|
|
718
|
+
getExtraActions(): IUserListExtraAction[];
|
|
719
|
+
enrichUserData?(users: IUser[]): Observable<IUser[]>;
|
|
720
|
+
}
|
|
721
|
+
declare const AUTH_USER_LIST_EXTENSION: InjectionToken<IUserListExtensionProvider>;
|
|
722
|
+
interface IProfileExtraSection {
|
|
723
|
+
key: string;
|
|
724
|
+
title: string;
|
|
725
|
+
icon?: string;
|
|
726
|
+
order?: number;
|
|
727
|
+
component?: Type<unknown>;
|
|
728
|
+
template?: TemplateRef<{
|
|
729
|
+
user: IUser;
|
|
730
|
+
}>;
|
|
731
|
+
collapsible?: boolean;
|
|
732
|
+
collapsed?: boolean;
|
|
733
|
+
editPermission?: string | ILogicNode;
|
|
734
|
+
}
|
|
735
|
+
interface IProfileFieldTemplateContext {
|
|
736
|
+
field: IProfileExtraField;
|
|
737
|
+
value: unknown;
|
|
738
|
+
updateValue: (value: unknown) => void;
|
|
739
|
+
}
|
|
740
|
+
declare const PROFILE_FIELD_CONTEXT: InjectionToken<IProfileFieldTemplateContext>;
|
|
741
|
+
interface IProfileExtraField {
|
|
742
|
+
key: string;
|
|
743
|
+
label: string;
|
|
744
|
+
type: 'text' | 'number' | 'select' | 'checkbox' | 'textarea' | 'date' | 'template';
|
|
745
|
+
placeholder?: string;
|
|
746
|
+
editable?: boolean;
|
|
747
|
+
required?: boolean;
|
|
748
|
+
options?: Array<{
|
|
749
|
+
label: string;
|
|
750
|
+
value: unknown;
|
|
751
|
+
}>;
|
|
752
|
+
pattern?: RegExp;
|
|
753
|
+
validationMessage?: string;
|
|
754
|
+
order?: number;
|
|
755
|
+
sectionKey?: string;
|
|
756
|
+
template?: TemplateRef<IProfileFieldTemplateContext>;
|
|
757
|
+
component?: Type<unknown>;
|
|
758
|
+
injector?: Injector;
|
|
759
|
+
}
|
|
760
|
+
interface IProfileExtensionProvider {
|
|
761
|
+
getExtraSections?(): IProfileExtraSection[];
|
|
762
|
+
getExtraFields?(): IProfileExtraField[];
|
|
763
|
+
getExtraFieldValues?(userId: string): Observable<Record<string, unknown>>;
|
|
764
|
+
saveExtraFieldValues?(userId: string, data: Record<string, unknown>): Observable<void>;
|
|
765
|
+
validateExtraFields?(data: Record<string, unknown>): string | null;
|
|
766
|
+
}
|
|
767
|
+
declare const AUTH_PROFILE_EXTENSION: InjectionToken<IProfileExtensionProvider>;
|
|
768
|
+
type UserDetailViewMode = 'dialog' | 'sidebar' | 'page';
|
|
769
|
+
interface IUserDetailViewConfig {
|
|
770
|
+
viewMode: UserDetailViewMode;
|
|
771
|
+
allowEdit?: boolean;
|
|
772
|
+
width?: string;
|
|
773
|
+
component?: Type<unknown>;
|
|
774
|
+
tabs?: Array<{
|
|
775
|
+
key: string;
|
|
776
|
+
label: string;
|
|
777
|
+
icon?: string;
|
|
778
|
+
component?: Type<unknown>;
|
|
779
|
+
template?: TemplateRef<{
|
|
780
|
+
user: IUser;
|
|
781
|
+
}>;
|
|
782
|
+
}>;
|
|
783
|
+
}
|
|
784
|
+
declare const AUTH_USER_DETAIL_CONFIG: InjectionToken<IUserDetailViewConfig>;
|
|
785
|
+
declare function validatePassword(password: string, config: IPasswordValidationConfig): string | null;
|
|
786
|
+
declare function validateEmail(email: string, config?: IEmailValidationConfig): string | null;
|
|
787
|
+
|
|
637
788
|
/**
|
|
638
789
|
* Authentication API Endpoints
|
|
639
790
|
*
|
|
@@ -906,17 +1057,25 @@ declare class LoginPageComponent {
|
|
|
906
1057
|
private readonly messageService;
|
|
907
1058
|
private readonly authApi;
|
|
908
1059
|
private readonly authState;
|
|
1060
|
+
private readonly validationConfig;
|
|
909
1061
|
readonly returnUrl: _angular_core.InputSignal<string>;
|
|
910
1062
|
readonly currentStep: _angular_core.WritableSignal<LoginStep>;
|
|
911
1063
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
912
1064
|
readonly unverifiedEmail: _angular_core.WritableSignal<string>;
|
|
913
1065
|
readonly loginFormModel: _angular_core.WritableSignal<ILoginFormModel>;
|
|
1066
|
+
private readonly emailErrorMessage;
|
|
1067
|
+
private readonly passwordMinLength;
|
|
1068
|
+
private readonly passwordErrorMessage;
|
|
914
1069
|
readonly loginForm: _angular_forms_signals.FieldTree<ILoginFormModel, string | number>;
|
|
1070
|
+
readonly emailValidationError: _angular_core.Signal<string | null>;
|
|
1071
|
+
readonly passwordValidationError: _angular_core.Signal<string | null>;
|
|
915
1072
|
readonly isLoginFormValid: _angular_core.Signal<boolean>;
|
|
916
1073
|
readonly selectionFormModel: _angular_core.WritableSignal<ISelectionFormModel>;
|
|
917
1074
|
readonly selectionForm: _angular_forms_signals.FieldTree<ISelectionFormModel, string | number>;
|
|
918
1075
|
readonly isSelectionFormValid: _angular_core.Signal<boolean>;
|
|
919
1076
|
readonly companyFeatureEnabled: _angular_core.Signal<boolean>;
|
|
1077
|
+
readonly emailFeatureEnabled: _angular_core.Signal<boolean>;
|
|
1078
|
+
readonly signUpEnabled: _angular_core.Signal<boolean>;
|
|
920
1079
|
private sessionId;
|
|
921
1080
|
readonly companies: _angular_core.WritableSignal<ICompanyWithBranches[]>;
|
|
922
1081
|
readonly userName: _angular_core.WritableSignal<string>;
|
|
@@ -933,31 +1092,15 @@ declare class LoginPageComponent {
|
|
|
933
1092
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LoginPageComponent, "lib-login-page", never, { "returnUrl": { "alias": "returnUrl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
934
1093
|
}
|
|
935
1094
|
|
|
936
|
-
/** Profile form model */
|
|
937
1095
|
interface IProfileFormModel {
|
|
938
1096
|
name: string;
|
|
939
1097
|
phone: string;
|
|
940
1098
|
}
|
|
941
|
-
/** Password form model */
|
|
942
1099
|
interface IPasswordFormModel {
|
|
943
1100
|
currentPassword: string;
|
|
944
1101
|
newPassword: string;
|
|
945
1102
|
confirmPassword: string;
|
|
946
1103
|
}
|
|
947
|
-
/**
|
|
948
|
-
* Profile Page Component
|
|
949
|
-
*
|
|
950
|
-
* Allows users to view and update their profile information.
|
|
951
|
-
* Features:
|
|
952
|
-
* - Update name, phone, profile picture (if storage enabled)
|
|
953
|
-
* - View company/branch info (read-only, if company feature enabled)
|
|
954
|
-
* - View roles/actions (read-only, if IAM enabled via optional injection)
|
|
955
|
-
*
|
|
956
|
-
* Package Independence:
|
|
957
|
-
* - Uses PROFILE_UPLOAD_PROVIDER (optional) for storage functionality
|
|
958
|
-
* - Uses PROFILE_PERMISSION_PROVIDER (optional) for IAM functionality
|
|
959
|
-
* - No direct imports from ng-storage or ng-iam
|
|
960
|
-
*/
|
|
961
1104
|
declare class ProfilePageComponent {
|
|
962
1105
|
private readonly destroyRef;
|
|
963
1106
|
private readonly appConfig;
|
|
@@ -968,14 +1111,25 @@ declare class ProfilePageComponent {
|
|
|
968
1111
|
private readonly fileUrlService;
|
|
969
1112
|
private readonly uploadProvider;
|
|
970
1113
|
private readonly permissionProvider;
|
|
1114
|
+
private readonly profileExtension;
|
|
971
1115
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
972
1116
|
readonly isLoadingPermissions: _angular_core.WritableSignal<boolean>;
|
|
1117
|
+
readonly isLoadingExtraFields: _angular_core.WritableSignal<boolean>;
|
|
973
1118
|
private readonly _profilePictureUrl;
|
|
974
1119
|
readonly profilePictureUrl: _angular_core.Signal<string | null>;
|
|
975
1120
|
private readonly _userRoles;
|
|
976
1121
|
readonly userRoles: _angular_core.Signal<IProfileRoleInfo[]>;
|
|
977
1122
|
private readonly _userActions;
|
|
978
1123
|
readonly userActions: _angular_core.Signal<IProfileActionInfo[]>;
|
|
1124
|
+
readonly extraSections: _angular_core.Signal<IProfileExtraSection[]>;
|
|
1125
|
+
readonly extraFields: _angular_core.Signal<IProfileExtraField[]>;
|
|
1126
|
+
readonly viewOnlyFields: _angular_core.Signal<IProfileExtraField[]>;
|
|
1127
|
+
readonly editableFields: _angular_core.Signal<IProfileExtraField[]>;
|
|
1128
|
+
readonly hasExtraContent: _angular_core.Signal<boolean>;
|
|
1129
|
+
readonly extraFieldsModel: _angular_core.WritableSignal<Record<string, unknown>>;
|
|
1130
|
+
readonly originalExtraFieldsModel: _angular_core.WritableSignal<Record<string, unknown>>;
|
|
1131
|
+
readonly isExtraFieldsDirty: _angular_core.Signal<boolean>;
|
|
1132
|
+
readonly extraFieldsValidationError: _angular_core.Signal<string | null>;
|
|
979
1133
|
readonly userEmail: _angular_core.Signal<string>;
|
|
980
1134
|
readonly userName: _angular_core.Signal<string>;
|
|
981
1135
|
readonly userInitials: _angular_core.Signal<string>;
|
|
@@ -993,16 +1147,22 @@ declare class ProfilePageComponent {
|
|
|
993
1147
|
readonly formTree: _angular_forms_signals.FieldTree<IProfileFormModel, string | number>;
|
|
994
1148
|
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
995
1149
|
readonly isFormDirty: _angular_core.Signal<boolean>;
|
|
1150
|
+
updateExtraField(key: string, value: unknown): void;
|
|
1151
|
+
getExtraFieldValue(key: string): unknown;
|
|
1152
|
+
getSelectLabel(field: IProfileExtraField, value: unknown): string;
|
|
1153
|
+
getFieldTemplateContext(field: IProfileExtraField): IProfileFieldTemplateContext;
|
|
1154
|
+
private readonly parentInjector;
|
|
1155
|
+
getFieldInjector(field: IProfileExtraField): Injector;
|
|
996
1156
|
readonly passwordModel: _angular_core.WritableSignal<IPasswordFormModel>;
|
|
997
1157
|
readonly isPasswordLoading: _angular_core.WritableSignal<boolean>;
|
|
998
1158
|
readonly isPasswordFormValid: _angular_core.Signal<boolean>;
|
|
999
1159
|
readonly passwordsMatch: _angular_core.Signal<boolean>;
|
|
1000
1160
|
readonly uploadFileFn: UploadFileFn;
|
|
1001
|
-
/** Map upload result to IUploadedFile format */
|
|
1002
1161
|
private mapUploadResultToUploadedFile;
|
|
1003
1162
|
constructor();
|
|
1004
1163
|
private loadUserData;
|
|
1005
1164
|
private loadPermissions;
|
|
1165
|
+
private loadExtraFields;
|
|
1006
1166
|
onProfilePictureUploaded(file: {
|
|
1007
1167
|
id?: string;
|
|
1008
1168
|
name: string;
|
|
@@ -1040,17 +1200,36 @@ declare class RegisterPageComponent {
|
|
|
1040
1200
|
private readonly authState;
|
|
1041
1201
|
private readonly route;
|
|
1042
1202
|
private readonly router;
|
|
1203
|
+
private readonly validationConfig;
|
|
1204
|
+
private readonly registrationExtension;
|
|
1043
1205
|
private readonly queryParamMap;
|
|
1044
1206
|
private companySlugInitialized;
|
|
1045
1207
|
readonly returnUrl: _angular_core.InputSignal<string>;
|
|
1046
1208
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1047
1209
|
readonly companyFeatureEnabled: _angular_core.Signal<boolean>;
|
|
1210
|
+
readonly defaultCompanySlug: _angular_core.Signal<string | undefined>;
|
|
1211
|
+
readonly defaultBranchSlug: _angular_core.Signal<string | undefined>;
|
|
1212
|
+
readonly hasDefaultCompany: _angular_core.Signal<boolean>;
|
|
1213
|
+
readonly hasDefaultBranch: _angular_core.Signal<boolean>;
|
|
1214
|
+
readonly extraFields: _angular_core.Signal<IRegistrationExtraField[]>;
|
|
1215
|
+
readonly extraFieldsModel: _angular_core.WritableSignal<Record<string, unknown>>;
|
|
1216
|
+
private readonly emailErrorMessage;
|
|
1217
|
+
readonly passwordMinLength: _angular_core.Signal<number>;
|
|
1218
|
+
private readonly passwordErrorMessage;
|
|
1048
1219
|
readonly userFormModel: _angular_core.WritableSignal<IUserFormModel$1>;
|
|
1049
1220
|
readonly userForm: _angular_forms_signals.FieldTree<IUserFormModel$1, string | number>;
|
|
1050
1221
|
readonly companyFormModel: _angular_core.WritableSignal<ICompanyFormModel>;
|
|
1051
1222
|
readonly companyForm: _angular_forms_signals.FieldTree<ICompanyFormModel, string | number>;
|
|
1223
|
+
readonly emailValidationError: _angular_core.Signal<string | null>;
|
|
1224
|
+
readonly passwordValidationError: _angular_core.Signal<string | null>;
|
|
1225
|
+
readonly extraFieldsValidationError: _angular_core.Signal<string | null>;
|
|
1052
1226
|
readonly passwordsMatch: _angular_core.Signal<boolean>;
|
|
1053
1227
|
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
1228
|
+
private validateRequiredExtraFields;
|
|
1229
|
+
updateExtraField(key: string, value: unknown): void;
|
|
1230
|
+
getFieldTemplateContext(field: IRegistrationExtraField): IRegistrationFieldTemplateContext;
|
|
1231
|
+
private readonly parentInjector;
|
|
1232
|
+
getFieldInjector(field: IRegistrationExtraField): Injector;
|
|
1054
1233
|
constructor();
|
|
1055
1234
|
onCreateCompanyToggle(): void;
|
|
1056
1235
|
onSubmit(): void;
|
|
@@ -1142,10 +1321,6 @@ declare class UserFormComponent {
|
|
|
1142
1321
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserFormComponent, "lib-user-form", never, {}, {}, never, never, true, never>;
|
|
1143
1322
|
}
|
|
1144
1323
|
|
|
1145
|
-
/**
|
|
1146
|
-
* User List Component
|
|
1147
|
-
* Displays a list of users with CRUD operations.
|
|
1148
|
-
*/
|
|
1149
1324
|
declare class UserListComponent {
|
|
1150
1325
|
readonly USER_PERMISSIONS: {
|
|
1151
1326
|
readonly CREATE: "user.create";
|
|
@@ -1158,19 +1333,26 @@ declare class UserListComponent {
|
|
|
1158
1333
|
private readonly messageService;
|
|
1159
1334
|
private readonly confirmationService;
|
|
1160
1335
|
private readonly userService;
|
|
1161
|
-
|
|
1336
|
+
private readonly userListExtension;
|
|
1337
|
+
readonly userDetailConfig: _flusys_ng_auth.IUserDetailViewConfig | null;
|
|
1162
1338
|
readonly users: _angular_core.Signal<IUser[]>;
|
|
1163
|
-
/** Loading state from service */
|
|
1164
1339
|
readonly isLoading: _angular_core.Signal<boolean>;
|
|
1165
|
-
/** Total count from service */
|
|
1166
1340
|
readonly total: _angular_core.Signal<number>;
|
|
1167
|
-
/** Whether company feature is enabled */
|
|
1168
1341
|
readonly companyFeatureEnabled: _angular_core.Signal<boolean>;
|
|
1169
|
-
|
|
1342
|
+
readonly extraColumns: _angular_core.Signal<IUserListExtraColumn[]>;
|
|
1343
|
+
readonly extraActions: _angular_core.Signal<IUserListExtraAction[]>;
|
|
1344
|
+
readonly hasUserDetailView: _angular_core.Signal<boolean>;
|
|
1345
|
+
readonly tableColspan: _angular_core.Signal<number>;
|
|
1170
1346
|
readonly showCompanyDialog: _angular_core.WritableSignal<boolean>;
|
|
1171
1347
|
readonly showBranchDialog: _angular_core.WritableSignal<boolean>;
|
|
1172
|
-
|
|
1348
|
+
readonly showUserDetailDialog: _angular_core.WritableSignal<boolean>;
|
|
1173
1349
|
readonly selectedUser: _angular_core.WritableSignal<IUser | null>;
|
|
1350
|
+
getFieldValue(user: IUser, field: string): unknown;
|
|
1351
|
+
isActionVisible(action: IUserListExtraAction, user: IUser): boolean;
|
|
1352
|
+
isActionDisabled(action: IUserListExtraAction, user: IUser): boolean;
|
|
1353
|
+
onExtraAction(action: IUserListExtraAction, user: IUser): void;
|
|
1354
|
+
onViewDetails(user: IUser): void;
|
|
1355
|
+
closeUserDetailDialog(): void;
|
|
1174
1356
|
loadUsers(): void;
|
|
1175
1357
|
onLazyLoad(event: {
|
|
1176
1358
|
first?: number | null;
|
|
@@ -1269,5 +1451,5 @@ declare class UserCompanyPermissionDialogComponent {
|
|
|
1269
1451
|
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>;
|
|
1270
1452
|
}
|
|
1271
1453
|
|
|
1272
|
-
export { ADMINISTRATION_ROUTES, AUTH_ENDPOINTS, AUTH_ROUTES, AdministrationPageComponent, AuthApiService, AuthCompanyApiProviderAdapter, AuthInitService, AuthLayoutApiAdapter, AuthLayoutStateAdapter, AuthStateProviderAdapter, AuthStateService, AuthUserPermissionProviderAdapter, AuthUserProviderAdapter, BranchApiService, BranchFormComponent, BranchListComponent, CompanyApiService, CompanyFormComponent, CompanyListComponent, ForgotPasswordPageComponent, LoginPageComponent, PROFILE_ROUTES, ProfilePageComponent, RegisterPageComponent, ResetPasswordPageComponent, TokenRefreshStateService, UserApiService, UserBranchPermissionDialogComponent, UserCompanyPermissionDialogComponent, UserFormComponent, UserListComponent, UserPermissionApiService, VerifyEmailPageComponent, authGuard, authInterceptor, companyFeatureGuard, guestGuard, isCompanySelectionResponse, isEmailVerificationRequired, isEndpoint, isLoginResponse, provideAuthLayoutIntegration, provideAuthProviders, tokenRefreshInterceptor };
|
|
1273
|
-
export type { AuthResponse, IAssignUserBranchRequest, IAssignUserCompanyRequest, IBatchOperationResponse, IBranch, IBranchInfo, IBranchSelectionInfo, IChangePasswordRequest, ICompany, ICompanyInfo, ICompanySelectionResponse, ICompanyWithBranches, ICreateBranchRequest, ICreateCompanyRequest, ICreateUserRequest, ILoginRequest, ILoginRequiresEmailVerification, ILoginResponse, IMeResponse, IPermissionItem, IRefreshTokenResponse, IRegistrationRequest, IRegistrationResponse, ISelectRequest, ISwitchCompanyRequest, IUpdateBranchRequest, IUpdateCompanyRequest, IUpdateUserRequest, IUser, IUserBranchPermission, IUserBranchesResponse, IUserCompaniesResponse, IUserCompanyPermission, IUserInfo };
|
|
1454
|
+
export { ADMINISTRATION_ROUTES, AUTH_ENDPOINTS, AUTH_PROFILE_EXTENSION, AUTH_REGISTRATION_EXTENSION, AUTH_ROUTES, AUTH_USER_DETAIL_CONFIG, 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, UserApiService, UserBranchPermissionDialogComponent, UserCompanyPermissionDialogComponent, UserFormComponent, UserListComponent, UserPermissionApiService, VerifyEmailPageComponent, authGuard, authInterceptor, companyFeatureGuard, emailFeatureGuard, guestGuard, isCompanySelectionResponse, isEmailVerificationRequired, isEndpoint, isLoginResponse, provideAuthLayoutIntegration, provideAuthProviders, signUpFeatureGuard, tokenRefreshInterceptor, validateEmail, validatePassword };
|
|
1455
|
+
export type { AuthResponse, IAssignUserBranchRequest, IAssignUserCompanyRequest, IAuthValidationConfig, IBatchOperationResponse, IBranch, IBranchInfo, IBranchSelectionInfo, IChangePasswordRequest, ICompany, ICompanyInfo, ICompanySelectionResponse, ICompanyWithBranches, ICreateBranchRequest, ICreateCompanyRequest, ICreateUserRequest, IEmailValidationConfig, ILoginRequest, ILoginRequiresEmailVerification, ILoginResponse, IMeResponse, IPasswordValidationConfig, IPermissionItem, IProfileExtensionProvider, IProfileExtraField, IProfileExtraSection, IProfileFieldTemplateContext, IRefreshTokenResponse, IRegistrationExtensionProvider, IRegistrationExtraField, IRegistrationFieldTemplateContext, IRegistrationRequest, IRegistrationResponse, ISelectRequest, ISwitchCompanyRequest, IUpdateBranchRequest, IUpdateCompanyRequest, IUpdateUserRequest, IUser, IUserBranchPermission, IUserBranchesResponse, IUserCompaniesResponse, IUserCompanyPermission, IUserDetailViewConfig, IUserInfo, IUserListExtensionProvider, IUserListExtraAction, IUserListExtraColumn, UserDetailViewMode };
|