@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.
- package/common/lib/home-page/home-page-settings.provider.d.ts +1 -0
- package/fesm2022/acorex-platform-common.mjs +2 -1
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +90 -60
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +0 -9
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +13 -4
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/layout/components/lib/user-avatar/user-avatar.component.d.ts +16 -5
- package/layout/components/lib/user-avatar/user-avatar.service.d.ts +8 -8
- package/layout/components/lib/user-avatar/user-avatar.types.d.ts +2 -1
- package/package.json +1 -1
- package/themes/default/lib/layouts/base/page-layout/page-layout.component.d.ts +2 -0
|
@@ -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
|
-
|
|
10
|
+
userId: import("@angular/core").InputSignal<string>;
|
|
8
11
|
src: import("@angular/core").WritableSignal<string>;
|
|
9
|
-
|
|
10
|
-
|
|
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").
|
|
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; }; "
|
|
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
|
|
11
|
+
* @param userId The username to fetch information for
|
|
12
12
|
* @returns Observable that emits user avatar data
|
|
13
13
|
*/
|
|
14
|
-
getUserInfo$(
|
|
14
|
+
getUserInfo$(userId: string): Observable<AXPUserAvatarData>;
|
|
15
15
|
/**
|
|
16
16
|
* Gets user information (Promise-based for backward compatibility)
|
|
17
|
-
* @param
|
|
17
|
+
* @param userId The username to fetch information for
|
|
18
18
|
* @returns Promise that resolves to user avatar data
|
|
19
19
|
*/
|
|
20
|
-
getUserInfo(
|
|
20
|
+
getUserInfo(userId: string): Promise<AXPUserAvatarData>;
|
|
21
21
|
/**
|
|
22
22
|
* Clears the entire cache or a specific user's cache
|
|
23
|
-
* @param
|
|
23
|
+
* @param userId Optional username to clear specific cache
|
|
24
24
|
*/
|
|
25
|
-
clearCache(
|
|
25
|
+
clearCache(userId?: string): void;
|
|
26
26
|
/**
|
|
27
27
|
* Force refresh data for a specific username
|
|
28
|
-
* @param
|
|
28
|
+
* @param userId The username to refresh
|
|
29
29
|
* @returns Promise that resolves to the refreshed data
|
|
30
30
|
*/
|
|
31
|
-
refreshUserInfo(
|
|
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(
|
|
12
|
+
provide(userId: string): Promise<AXPUserAvatarData>;
|
|
12
13
|
}
|
package/package.json
CHANGED
|
@@ -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: {}; }]>;
|