verben-authentication-ui 0.3.4 → 0.3.6

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.
Files changed (30) hide show
  1. package/esm2022/lib/components/forgot-password/forgot-password.component.mjs +6 -3
  2. package/esm2022/lib/components/o-auth/o-auth.component.mjs +82 -4
  3. package/esm2022/lib/components/reset-password/reset-password.component.mjs +3 -3
  4. package/esm2022/lib/components/sign-up/sign-up.component.mjs +3 -3
  5. package/esm2022/lib/components/user-management/base-table-style.mjs +11 -11
  6. package/esm2022/lib/components/user-management/helper.mjs +8 -3
  7. package/esm2022/lib/components/user-management/services/user-management.service.mjs +70 -0
  8. package/esm2022/lib/components/user-management/useer-management.module.mjs +9 -3
  9. package/esm2022/lib/components/user-management/user-management-form/use-management-form.component.mjs +5 -5
  10. package/esm2022/lib/components/user-management/user-management.columns.mjs +1 -1
  11. package/esm2022/lib/components/user-management/user-management.component.mjs +84 -39
  12. package/esm2022/lib/components/user-request-approval/base-table-style.mjs +2 -2
  13. package/esm2022/lib/components/user-request-approval/facades/user-access-request.facade.mjs +10 -4
  14. package/esm2022/lib/components/user-request-approval/user-request-approval.component.mjs +2 -2
  15. package/esm2022/lib/models/PagedResult.mjs +2 -0
  16. package/esm2022/lib/models/user-management.mjs +2 -0
  17. package/esm2022/lib/services/http-web-request.service.mjs +3 -1
  18. package/fesm2022/verben-authentication-ui.mjs +286 -108
  19. package/fesm2022/verben-authentication-ui.mjs.map +1 -1
  20. package/lib/components/forgot-password/forgot-password.component.d.ts +1 -0
  21. package/lib/components/o-auth/o-auth.component.d.ts +9 -0
  22. package/lib/components/user-management/helper.d.ts +2 -2
  23. package/lib/components/user-management/services/user-management.service.d.ts +42 -0
  24. package/lib/components/user-management/useer-management.module.d.ts +5 -4
  25. package/lib/components/user-management/user-management.columns.d.ts +2 -2
  26. package/lib/components/user-management/user-management.component.d.ts +16 -8
  27. package/lib/components/user-request-approval/facades/user-access-request.facade.d.ts +3 -1
  28. package/lib/models/PagedResult.d.ts +3 -0
  29. package/lib/models/user-management.d.ts +8 -0
  30. package/package.json +1 -1
@@ -18,6 +18,7 @@ export declare class ForgotPasswordComponent {
18
18
  onSubmit: EventEmitter<ForgotPasswordData>;
19
19
  onSubmitEnd: EventEmitter<ResponseKeyValue | ErrorResponse>;
20
20
  forgotPasswordForm: FormGroup;
21
+ isSubmitted: boolean;
21
22
  constructor(fb: FormBuilder, server: HttpWebRequestService, utilService: UtilService);
22
23
  isValidEmail(mail: string): boolean;
23
24
  emailValidator(control: AbstractControl): ValidationErrors | null;
@@ -1,7 +1,13 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { AuthMechanism } from '../../models/auth-mechanism';
3
3
  import * as i0 from "@angular/core";
4
+ declare global {
5
+ interface Window {
6
+ google: any;
7
+ }
8
+ }
4
9
  export declare class OAuthComponent implements OnInit {
10
+ clientId: string;
5
11
  showGoogle: boolean;
6
12
  showMicrosoft: boolean;
7
13
  showApple: boolean;
@@ -10,8 +16,11 @@ export declare class OAuthComponent implements OnInit {
10
16
  googleClick: EventEmitter<void>;
11
17
  appleClick: EventEmitter<void>;
12
18
  ngOnInit(): void;
19
+ loadGoogleScript(): void;
13
20
  oAuthWithMicrosoft(): void;
14
21
  oAuthWithGoogle(): void;
22
+ exchangeCodeForToken(authCode: string): void;
23
+ handleCredentialResponse(response: any): void;
15
24
  oAuthWithApple(): void;
16
25
  static ɵfac: i0.ɵɵFactoryDeclaration<OAuthComponent, never>;
17
26
  static ɵcmp: i0.ɵɵComponentDeclaration<OAuthComponent, "verben-o-auth", never, { "authMechanisms": { "alias": "authMechanisms"; "required": false; }; }, { "microsoftClick": "microsoftClick"; "googleClick": "googleClick"; "appleClick": "appleClick"; }, never, never, false, never>;
@@ -1,2 +1,2 @@
1
- import { UserAccessRequest } from '../../models/user-access-request';
2
- export declare const mockData: UserAccessRequest[];
1
+ import { UserManagement } from '../../models/user-management';
2
+ export declare const mockData: UserManagement[];
@@ -0,0 +1,42 @@
1
+ import { Observable } from 'rxjs';
2
+ import { HttpWebRequestService } from '../../../services/http-web-request.service';
3
+ import { User } from '../../../models/user';
4
+ import { ErrorResponse } from '../../../models/ErrorResponse';
5
+ import * as i0 from "@angular/core";
6
+ export declare class UserManagementService {
7
+ private httpService;
8
+ constructor(httpService: HttpWebRequestService);
9
+ /**
10
+ * Get users with pagination and sorting
11
+ * @param skip Number of records to skip
12
+ * @param limit Number of records to take
13
+ * @param sortParam Sort parameter
14
+ * @param sortOrder Sort order ('asc' or 'desc')
15
+ * @returns Promise containing the list of users
16
+ */
17
+ getUsers(skip: number, limit: number, sortParam: string, sortOrder: string): Promise<User[] | ErrorResponse>;
18
+ /**
19
+ * Get users with an additional search parameter, pagination, and sorting
20
+ * @param param Search parameter
21
+ * @param skip Number of records to skip
22
+ * @param limit Number of records to take
23
+ * @param sortParam Sort parameter
24
+ * @param sortOrder Sort order ('asc' or 'desc')
25
+ * @returns Promise containing the filtered list of users
26
+ */
27
+ getUsersWithParam(param: string, skip: number, limit: number, sortParam: string, sortOrder: string): Promise<User[]>;
28
+ /**
29
+ * Save multiple users
30
+ * @param users Array of users to save
31
+ * @returns Promise containing the save operation result
32
+ */
33
+ saveUsers(users: User[]): Promise<any>;
34
+ /**
35
+ * Delete multiple users
36
+ * @param userIds Array of user IDs to delete
37
+ * @returns Observable containing the delete operation result
38
+ */
39
+ deleteUsers(userIds: string[]): Observable<any>;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserManagementService, never>;
41
+ static ɵprov: i0.ɵɵInjectableDeclaration<UserManagementService>;
42
+ }
@@ -1,11 +1,12 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./user-management.component";
3
3
  import * as i2 from "./user-management-form/use-management-form.component";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "verben-ng-ui";
6
- import * as i5 from "@angular/forms";
4
+ import * as i3 from "@angular/common/http";
5
+ import * as i4 from "@angular/common";
6
+ import * as i5 from "verben-ng-ui";
7
+ import * as i6 from "@angular/forms";
7
8
  export declare class LibUserManagementModule {
8
9
  static ɵfac: i0.ɵɵFactoryDeclaration<LibUserManagementModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<LibUserManagementModule, [typeof i1.UserManagementComponent, typeof i2.UserManagementFormComponent], [typeof i3.CommonModule, typeof i4.DataTableModule, typeof i4.CardModule, typeof i4.SvgModule, typeof i4.DataViewModule, typeof i4.CardDataViewModule, typeof i4.SortTableModule, typeof i4.VisibleColumnModule, typeof i4.TableFilterModule, typeof i4.DataExportModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i4.VerbenaInputModule, typeof i4.VerbenaButtonModule, typeof i4.VerbenaBadgeModule, typeof i4.DropDownModule], [typeof i1.UserManagementComponent]>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LibUserManagementModule, [typeof i1.UserManagementComponent, typeof i2.UserManagementFormComponent], [typeof i3.HttpClientModule, typeof i4.CommonModule, typeof i5.DataTableModule, typeof i5.CardModule, typeof i5.SvgModule, typeof i5.DataViewModule, typeof i5.CardDataViewModule, typeof i5.SortTableModule, typeof i5.VisibleColumnModule, typeof i5.TableFilterModule, typeof i5.DataExportModule, typeof i6.FormsModule, typeof i6.ReactiveFormsModule, typeof i5.VerbenaInputModule, typeof i5.VerbenaButtonModule, typeof i5.VerbenaBadgeModule, typeof i5.DropDownModule], [typeof i1.UserManagementComponent]>;
10
11
  static ɵinj: i0.ɵɵInjectorDeclaration<LibUserManagementModule>;
11
12
  }
@@ -1,3 +1,3 @@
1
+ import { UserManagement } from './../../models/user-management';
1
2
  import { ColumnDefinition } from 'verben-ng-ui';
2
- import { UserAccessRequest } from '../../models/user-access-request';
3
- export declare const columns: ColumnDefinition<UserAccessRequest>[];
3
+ export declare const columns: ColumnDefinition<UserManagement>[];
@@ -1,15 +1,25 @@
1
- import { UserAccessRequest } from '../../models/user-access-request';
1
+ import { UserManagement } from '../../models/user-management';
2
2
  import { CardData, IDataFilter, DropdownLoadEvent, DropdownChangeEvent, CardDataViewComponent, DataViewComponent } from 'verben-ng-ui';
3
+ import { UserManagementService } from './services/user-management.service';
4
+ import { User } from '../../models/user';
3
5
  import * as i0 from "@angular/core";
4
6
  interface TestParentObject {
5
7
  Id: string;
6
8
  Name: string;
7
9
  }
8
10
  export declare class UserManagementComponent {
11
+ private userManagementService;
9
12
  cardDataView: CardDataViewComponent;
10
13
  dataView: DataViewComponent;
11
- columns: import("verben-ng-ui").ColumnDefinition<UserAccessRequest>[];
12
- data: UserAccessRequest[];
14
+ users: User[];
15
+ errorMessage: string;
16
+ constructor(userManagementService: UserManagementService);
17
+ ngOnInit(): void;
18
+ fetchUsers(): Promise<void>;
19
+ cardData: CardData[];
20
+ data: any[];
21
+ fetchDatq(): Promise<void>;
22
+ columns: import("verben-ng-ui").ColumnDefinition<UserManagement>[];
13
23
  styles: any;
14
24
  selectedParent?: string;
15
25
  basicOption?: string;
@@ -17,8 +27,8 @@ export declare class UserManagementComponent {
17
27
  selectedOptionTwo: string[];
18
28
  selectedOptionThree?: string;
19
29
  missingObject: any;
20
- private generateNewUserAccessRequest;
21
- addNewUserToMockData(): UserAccessRequest;
30
+ private generateNewUserManagement;
31
+ addNewUserToMockData(): UserManagement;
22
32
  isGridView: boolean;
23
33
  currentData: CardData;
24
34
  selectedColumnCount: number;
@@ -32,12 +42,10 @@ export declare class UserManagementComponent {
32
42
  filterArray: IDataFilter[];
33
43
  sortOptions: IDataFilter[];
34
44
  testParents: TestParentObject[];
35
- cardData: CardData[];
36
- ngOnInit(): void;
37
45
  getParentLabel(context: any): string;
38
46
  loadMoreParents(event: DropdownLoadEvent): Promise<TestParentObject[]>;
39
47
  onDropdownChange(event: DropdownChangeEvent): void;
40
- onSelectionChange(selectedRows: UserAccessRequest[]): void;
48
+ onSelectionChange(selectedRows: UserManagement[]): void;
41
49
  handleExport(exportedData: Partial<any>[]): void;
42
50
  private downloadCSV;
43
51
  getCardDataByMailAddress(mailAddress: string): CardData | undefined;
@@ -3,11 +3,13 @@ import { UserAccessRequestState } from '../states/user-access-request.state';
3
3
  import { UserAccessRequest } from '../../../models/user-access-request';
4
4
  import { QueryParams } from '../../../models/query-params';
5
5
  import { UserAccessRequestService } from '../services/user-access-request.service';
6
+ import { UtilService } from '../../../services/util.service';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class UserAccessRequestFacade {
8
9
  private userAccessRequestService;
9
10
  private userAccessRequestState;
10
- constructor(userAccessRequestService: UserAccessRequestService, userAccessRequestState: UserAccessRequestState);
11
+ private utilService;
12
+ constructor(userAccessRequestService: UserAccessRequestService, userAccessRequestState: UserAccessRequestState, utilService: UtilService);
11
13
  isUpdating$(): Observable<boolean>;
12
14
  getRequests$(): Observable<UserAccessRequest[]>;
13
15
  getQueryParams$(): Observable<QueryParams<UserAccessRequest>>;
@@ -0,0 +1,3 @@
1
+ export interface PagedResult<T> {
2
+ Result: T[];
3
+ }
@@ -0,0 +1,8 @@
1
+ import { User } from './user';
2
+ import { UserAccessRequestStatus } from './user-access-request-status';
3
+ export interface UserManagement extends Omit<User, 'Status'> {
4
+ Status: UserAccessRequestStatus;
5
+ ActionBy?: string;
6
+ Comment?: string;
7
+ RequestStatus?: string;
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verben-authentication-ui",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.0.0 || ^18.0.0",
6
6
  "@angular/core": "^14.0.0 || ^18.0.0",