@acorex/platform 19.3.1 → 19.3.2

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.
@@ -1,15 +1,24 @@
1
1
  import { OnDestroy, OnInit } from '@angular/core';
2
+ import { AXHtmlEvent } from '@acorex/components/common';
3
+ import { AXPUserAvatarData } from './user-avatar.types';
2
4
  import * as i0 from "@angular/core";
3
5
  export declare class AXPUserAvatarComponent implements OnInit, OnDestroy {
4
6
  private readonly userAvatarService;
5
7
  private readonly destroy$;
8
+ protected userInfo: import("@angular/core").WritableSignal<AXPUserAvatarData | null>;
6
9
  size: import("@angular/core").InputSignal<number>;
7
- username: import("@angular/core").InputSignal<string>;
10
+ userId: import("@angular/core").InputSignal<string>;
8
11
  src: import("@angular/core").WritableSignal<string>;
9
- firstName: import("@angular/core").WritableSignal<string>;
10
- lastName: import("@angular/core").WritableSignal<string>;
12
+ userName: import("@angular/core").Signal<string>;
13
+ firstName: import("@angular/core").Signal<string>;
14
+ lastName: import("@angular/core").Signal<string>;
11
15
  title: import("@angular/core").Signal<string>;
12
- isOnline: import("@angular/core").WritableSignal<boolean>;
16
+ isOnline: import("@angular/core").Signal<boolean>;
17
+ avatarText: import("@angular/core").Signal<string>;
18
+ avatarColor: import("@angular/core").Signal<string>;
19
+ protected hasPicture: import("@angular/core").WritableSignal<boolean>;
20
+ protected onImageError(event: AXHtmlEvent<ErrorEvent>): void;
21
+ protected onImageLoad(event: AXHtmlEvent<Event>): void;
13
22
  ngOnInit(): void;
14
23
  ngOnDestroy(): void;
15
24
  private loadUserData;
@@ -22,6 +31,8 @@ export declare class AXPUserAvatarComponent implements OnInit, OnDestroy {
22
31
  * Get initials from first and last name
23
32
  */
24
33
  private getInitials;
34
+ private hashString;
35
+ private pickColor;
25
36
  static ɵfac: i0.ɵɵFactoryDeclaration<AXPUserAvatarComponent, never>;
26
- static ɵcmp: i0.ɵɵComponentDeclaration<AXPUserAvatarComponent, "axp-user-avatar", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "username": { "alias": "username"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXPUserAvatarComponent, "axp-user-avatar", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "userId": { "alias": "userId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
27
38
  }
@@ -8,27 +8,27 @@ export declare class AXPUserAvatarService {
8
8
  private cache;
9
9
  /**
10
10
  * Gets user information with caching and auto-refresh
11
- * @param username The username to fetch information for
11
+ * @param userId The username to fetch information for
12
12
  * @returns Observable that emits user avatar data
13
13
  */
14
- getUserInfo$(username: string): Observable<AXPUserAvatarData>;
14
+ getUserInfo$(userId: string): Observable<AXPUserAvatarData>;
15
15
  /**
16
16
  * Gets user information (Promise-based for backward compatibility)
17
- * @param username The username to fetch information for
17
+ * @param userId The username to fetch information for
18
18
  * @returns Promise that resolves to user avatar data
19
19
  */
20
- getUserInfo(username: string): Promise<AXPUserAvatarData>;
20
+ getUserInfo(userId: string): Promise<AXPUserAvatarData>;
21
21
  /**
22
22
  * Clears the entire cache or a specific user's cache
23
- * @param username Optional username to clear specific cache
23
+ * @param userId Optional username to clear specific cache
24
24
  */
25
- clearCache(username?: string): void;
25
+ clearCache(userId?: string): void;
26
26
  /**
27
27
  * Force refresh data for a specific username
28
- * @param username The username to refresh
28
+ * @param userId The username to refresh
29
29
  * @returns Promise that resolves to the refreshed data
30
30
  */
31
- refreshUserInfo(username: string): Promise<AXPUserAvatarData>;
31
+ refreshUserInfo(userId: string): Promise<AXPUserAvatarData>;
32
32
  /**
33
33
  * Checks if a cache entry is expired
34
34
  */
@@ -1,6 +1,7 @@
1
1
  export type AXPUserAvatarSize = 'small' | 'medium' | 'large';
2
2
  export type AXPUserAvatarStatus = 'online' | 'offline';
3
3
  export type AXPUserAvatarData = {
4
+ id: string;
4
5
  status: AXPUserAvatarStatus;
5
6
  username: string;
6
7
  firstName: string;
@@ -8,5 +9,5 @@ export type AXPUserAvatarData = {
8
9
  avatarUrl?: string;
9
10
  };
10
11
  export interface AXPUserAvatarProvider {
11
- provide(username: string): Promise<AXPUserAvatarData>;
12
+ provide(userId: string): Promise<AXPUserAvatarData>;
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex/platform",
3
- "version": "19.3.1",
3
+ "version": "19.3.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=19.0.0",
6
6
  "@angular/core": ">=19.0.0",
@@ -1,3 +1,4 @@
1
+ import { AXClickEvent } from '@acorex/components/common';
1
2
  import { AXDrawerItemDirective } from '@acorex/cdk/drawer';
2
3
  import { AXPActionMenuItem, AXPExecuteCommand } from '@acorex/platform/core';
3
4
  import { AXPWorkflowService } from '@acorex/platform/workflow';
@@ -73,6 +74,7 @@ export declare class AXPPageLayoutComponent {
73
74
  protected handleActionClick(item: AXPActionMenuItem): void;
74
75
  toggleStartSide(): void;
75
76
  protected handleSecondaryActionClick(item: AXPActionMenuItem): void;
77
+ protected handleBackdropClick(e: AXClickEvent): boolean;
76
78
  protected execute(command: AXPExecuteCommand): Promise<void>;
77
79
  static ɵfac: i0.ɵɵFactoryDeclaration<AXPPageLayoutComponent, never>;
78
80
  static ɵcmp: i0.ɵɵComponentDeclaration<AXPPageLayoutComponent, "axp-page-layout", never, {}, {}, never, ["axp-layout-start-side", "axp-page-toolbar", "axp-page-content", "axp-page-footer"], true, [{ directive: typeof i1.AXDrawerContainerDirective; inputs: {}; outputs: {}; }]>;