mesauth-angular 1.9.1 → 1.10.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mesauth-angular",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Angular helper library to connect to a backend API and SignalR hub to surface the current logged-in user and incoming notifications with dark/light theme support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -52,6 +52,11 @@ interface IUser {
|
|
|
52
52
|
perms?: Set<string>;
|
|
53
53
|
employeeCode?: string;
|
|
54
54
|
avatarPath?: string;
|
|
55
|
+
avatarShape?: 'circle' | 'rounded' | 'rectangle' | 'portrait';
|
|
56
|
+
avatarFrame?: string | null;
|
|
57
|
+
avatarSize?: 'sm' | 'md' | 'lg';
|
|
58
|
+
avatarRatio?: 'ar-11' | 'ar-43' | 'ar-169';
|
|
59
|
+
avatarStyleAllowed?: boolean;
|
|
55
60
|
loginMethod?: number;
|
|
56
61
|
hrFullNameVn?: string;
|
|
57
62
|
hrFullNameEn?: string;
|
|
@@ -145,6 +150,7 @@ declare class MesAuthService {
|
|
|
145
150
|
/** _ngZone accepted but ignored - not needed in zoneless apps. */
|
|
146
151
|
init(config: MesAuthConfig, httpClient: HttpClient, router?: Router, _ngZone?: unknown): void;
|
|
147
152
|
private injectThemeStylesheet;
|
|
153
|
+
private updateThemeStylesheetVersion;
|
|
148
154
|
getConfig(): MesAuthConfig | null;
|
|
149
155
|
private fetchCurrentUser;
|
|
150
156
|
getUnreadCount(): Observable<any>;
|
|
@@ -168,6 +174,16 @@ declare class MesAuthService {
|
|
|
168
174
|
* Callers can subscribe to wait for completion before proceeding (e.g., navigating after login).
|
|
169
175
|
*/
|
|
170
176
|
refreshUser(): Observable<any>;
|
|
177
|
+
getAvatarStyle(): Observable<{
|
|
178
|
+
data: string;
|
|
179
|
+
allowedActions: string[];
|
|
180
|
+
}>;
|
|
181
|
+
updateAvatarStyle(avatarShape: string | null, avatarFrame: string | null, avatarSize: string | null, avatarRatio: string | null): Observable<{
|
|
182
|
+
avatarShape: string | null;
|
|
183
|
+
avatarFrame: string | null;
|
|
184
|
+
avatarSize: string | null;
|
|
185
|
+
avatarRatio: string | null;
|
|
186
|
+
}>;
|
|
171
187
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MesAuthService, never>;
|
|
172
188
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MesAuthService>;
|
|
173
189
|
}
|
|
@@ -185,6 +201,33 @@ declare class MesAuthModule {
|
|
|
185
201
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<MesAuthModule>;
|
|
186
202
|
}
|
|
187
203
|
|
|
204
|
+
type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
205
|
+
type AvatarShape = 'circle' | 'rounded' | 'rectangle' | 'portrait';
|
|
206
|
+
interface AvatarFrameDef {
|
|
207
|
+
id: string;
|
|
208
|
+
label: string;
|
|
209
|
+
}
|
|
210
|
+
declare const AVATAR_FRAMES: ReadonlyArray<AvatarFrameDef>;
|
|
211
|
+
declare class MaAvatarComponent {
|
|
212
|
+
src: _angular_core.InputSignal<string>;
|
|
213
|
+
alt: _angular_core.InputSignal<string>;
|
|
214
|
+
initials: _angular_core.InputSignal<string>;
|
|
215
|
+
size: _angular_core.InputSignal<AvatarSize>;
|
|
216
|
+
shape: _angular_core.InputSignal<AvatarShape>;
|
|
217
|
+
frame: _angular_core.InputSignal<string>;
|
|
218
|
+
ratio: _angular_core.InputSignal<string>;
|
|
219
|
+
scale: _angular_core.InputSignal<number>;
|
|
220
|
+
private themeService;
|
|
221
|
+
get themeClass(): string;
|
|
222
|
+
readonly wrapperClass: _angular_core.Signal<string>;
|
|
223
|
+
readonly wrapperStyle: _angular_core.Signal<{
|
|
224
|
+
'--avatar-scale': number;
|
|
225
|
+
}>;
|
|
226
|
+
readonly showImage: _angular_core.Signal<boolean>;
|
|
227
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaAvatarComponent, never>;
|
|
228
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MaAvatarComponent, "ma-avatar", never, { "src": { "alias": "src"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "initials": { "alias": "initials"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "frame": { "alias": "frame"; "required": false; "isSignal": true; }; "ratio": { "alias": "ratio"; "required": false; "isSignal": true; }; "scale": { "alias": "scale"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
229
|
+
}
|
|
230
|
+
|
|
188
231
|
declare class UserProfileComponent {
|
|
189
232
|
notificationClick: _angular_core.OutputEmitterRef<void>;
|
|
190
233
|
approvalClick: _angular_core.OutputEmitterRef<void>;
|
|
@@ -194,6 +237,11 @@ declare class UserProfileComponent {
|
|
|
194
237
|
readonly pendingApprovalCount: _angular_core.WritableSignal<number>;
|
|
195
238
|
readonly dropdownOpen: _angular_core.WritableSignal<boolean>;
|
|
196
239
|
readonly avatarRefresh: _angular_core.WritableSignal<number>;
|
|
240
|
+
readonly navAvatarSize: _angular_core.Signal<AvatarSize>;
|
|
241
|
+
readonly dropAvatarSize: _angular_core.Signal<AvatarSize>;
|
|
242
|
+
readonly avatarShape: _angular_core.Signal<"circle" | "rounded" | "rectangle" | "portrait">;
|
|
243
|
+
readonly avatarFrame: _angular_core.Signal<string>;
|
|
244
|
+
readonly avatarRatio: _angular_core.Signal<"ar-11" | "ar-43" | "ar-169">;
|
|
197
245
|
private readonly authService;
|
|
198
246
|
private readonly router;
|
|
199
247
|
private readonly themeService;
|
|
@@ -686,6 +734,8 @@ interface MaUiManifest {
|
|
|
686
734
|
/** Feature flags read by components at runtime. */
|
|
687
735
|
features?: Record<string, boolean>;
|
|
688
736
|
}
|
|
737
|
+
/** Current installed package version — keep in sync with package.json. */
|
|
738
|
+
declare const PACKAGE_VERSION = "1.10.0";
|
|
689
739
|
/**
|
|
690
740
|
* Provides server-driven UI configuration loaded from the hosted manifest.
|
|
691
741
|
* Components read `labels()` and `features()` signals instead of hardcoded strings.
|
|
@@ -696,12 +746,15 @@ declare class MaUiConfigService {
|
|
|
696
746
|
private _labels;
|
|
697
747
|
private _features;
|
|
698
748
|
private _updateRequired;
|
|
749
|
+
private _manifestVersion;
|
|
699
750
|
/** Reactive map of UI string overrides from the server manifest. */
|
|
700
751
|
readonly labels: _angular_core.Signal<Record<string, string>>;
|
|
701
752
|
/** Reactive map of feature flags from the server manifest. */
|
|
702
753
|
readonly features: _angular_core.Signal<Record<string, boolean>>;
|
|
703
754
|
/** True when the server signals that a package upgrade is needed. */
|
|
704
755
|
readonly updateRequired: _angular_core.Signal<boolean>;
|
|
756
|
+
/** The manifest version string loaded from the server, or null if not yet loaded. */
|
|
757
|
+
readonly manifestVersion: _angular_core.Signal<string>;
|
|
705
758
|
/**
|
|
706
759
|
* Returns a label by key, falling back to `defaultValue` when the server
|
|
707
760
|
* manifest has not provided an override.
|
|
@@ -768,5 +821,5 @@ declare class MaThemeDirective {
|
|
|
768
821
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MaThemeDirective, "[maTheme]", never, {}, {}, never, never, true, never>;
|
|
769
822
|
}
|
|
770
823
|
|
|
771
|
-
export { ALL_ACTIONS, ApprovalActionType, ApprovalDocumentStatus, ApprovalStepMode, ApprovalStepStatus, MES_AUTH_CONFIG, MaApprovalPanelComponent, MaApprovalService, MaArvContainerComponent, MaIconComponent, MaThemeDirective, MaUiConfigService, MaUserComponent, MesAuthModule, MesAuthService, NotificationBadgeComponent, NotificationPanelComponent, NotificationType, ThemeService, ToastContainerComponent, ToastService, UserProfileComponent, extractXMaPerm, mesAuthInterceptor, provideMesAuth, withXMaPerm, xMaResource };
|
|
772
|
-
export type { ApprovalDashboardDto, ApprovalDocumentDto, ApprovalDocumentSummaryDto, ApprovalHistoryDto, ApprovalReferenceDto, ApprovalStepDto, ApprovalStepRequest, ApprovalSubmitResult, ApprovalTemplateDto, ApprovalTemplateStepDto, ApprovalTemplateSummaryDto, ApproveRejectRequest, CreateApprovalRequest, CreateApprovalResponseDto, CreateApprovalTemplateRequest, DelegateRequest, FrontEndRoute, IUser, MaUiManifest, MesAuthConfig, NotificationDto, PagedList, PermissionHeader, RealTimeNotificationDto, RequestConfig, RolePreviewUserDto, StepRoleDto, Theme, Toast, UpdateApprovalTemplateRequest, UserFrontEndRoutesGrouped };
|
|
824
|
+
export { ALL_ACTIONS, AVATAR_FRAMES, ApprovalActionType, ApprovalDocumentStatus, ApprovalStepMode, ApprovalStepStatus, MES_AUTH_CONFIG, MaApprovalPanelComponent, MaApprovalService, MaArvContainerComponent, MaAvatarComponent, MaIconComponent, MaThemeDirective, MaUiConfigService, MaUserComponent, MesAuthModule, MesAuthService, NotificationBadgeComponent, NotificationPanelComponent, NotificationType, PACKAGE_VERSION, ThemeService, ToastContainerComponent, ToastService, UserProfileComponent, extractXMaPerm, mesAuthInterceptor, provideMesAuth, withXMaPerm, xMaResource };
|
|
825
|
+
export type { ApprovalDashboardDto, ApprovalDocumentDto, ApprovalDocumentSummaryDto, ApprovalHistoryDto, ApprovalReferenceDto, ApprovalStepDto, ApprovalStepRequest, ApprovalSubmitResult, ApprovalTemplateDto, ApprovalTemplateStepDto, ApprovalTemplateSummaryDto, ApproveRejectRequest, AvatarFrameDef, AvatarShape, AvatarSize, CreateApprovalRequest, CreateApprovalResponseDto, CreateApprovalTemplateRequest, DelegateRequest, FrontEndRoute, IUser, MaUiManifest, MesAuthConfig, NotificationDto, PagedList, PermissionHeader, RealTimeNotificationDto, RequestConfig, RolePreviewUserDto, StepRoleDto, Theme, Toast, UpdateApprovalTemplateRequest, UserFrontEndRoutesGrouped };
|