mesauth-angular 1.8.5 → 1.8.7
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/fesm2022/mesauth-angular.mjs +132 -126
- package/fesm2022/mesauth-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/types/mesauth-angular.d.ts +30 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mesauth-angular",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.7",
|
|
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",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken,
|
|
2
|
+
import { InjectionToken, EnvironmentProviders, AfterViewInit, OnDestroy, ElementRef } from '@angular/core';
|
|
3
3
|
import { HttpClient, HttpInterceptorFn, HttpResponse, HttpParams } from '@angular/common/http';
|
|
4
4
|
import { Observable, OperatorFunction } from 'rxjs';
|
|
5
5
|
import { Router } from '@angular/router';
|
|
6
6
|
import { SafeHtml } from '@angular/platform-browser';
|
|
7
|
+
import * as mesauth_angular from 'mesauth-angular';
|
|
7
8
|
|
|
8
9
|
interface MesAuthConfig {
|
|
9
10
|
apiBaseUrl: string;
|
|
@@ -129,19 +130,20 @@ interface RealTimeNotificationDto {
|
|
|
129
130
|
}
|
|
130
131
|
declare class MesAuthService {
|
|
131
132
|
private hubConnection;
|
|
132
|
-
private _currentUser;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
private readonly _currentUser;
|
|
134
|
+
/** Observable for components that prefer RxJS — backed by the signal. */
|
|
135
|
+
readonly currentUser$: Observable<IUser | null>;
|
|
136
|
+
private readonly _notifications;
|
|
137
|
+
readonly notifications$: Observable<any>;
|
|
138
|
+
private readonly _approvalEvents;
|
|
139
|
+
readonly approvalEvents$: Observable<any>;
|
|
138
140
|
private apiBase;
|
|
139
141
|
private config;
|
|
140
142
|
private http;
|
|
141
143
|
private router?;
|
|
142
|
-
private ngZone;
|
|
143
144
|
constructor();
|
|
144
|
-
|
|
145
|
+
/** _ngZone accepted but ignored — not needed in zoneless apps. */
|
|
146
|
+
init(config: MesAuthConfig, httpClient: HttpClient, router?: Router, _ngZone?: unknown): void;
|
|
145
147
|
private injectThemeStylesheet;
|
|
146
148
|
getConfig(): MesAuthConfig | null;
|
|
147
149
|
private fetchCurrentUser;
|
|
@@ -508,6 +510,16 @@ declare class NotificationPanelComponent {
|
|
|
508
510
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NotificationPanelComponent, "ma-notification-panel", never, {}, { "notificationRead": "notificationRead"; }, never, never, true, never>;
|
|
509
511
|
}
|
|
510
512
|
|
|
513
|
+
declare class ToastContainerComponent {
|
|
514
|
+
get themeClass(): string;
|
|
515
|
+
private readonly toastService;
|
|
516
|
+
private readonly themeService;
|
|
517
|
+
protected readonly toasts: _angular_core.Signal<mesauth_angular.Toast[]>;
|
|
518
|
+
close(id: string): void;
|
|
519
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToastContainerComponent, never>;
|
|
520
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToastContainerComponent, "ma-toast-container", never, {}, {}, never, never, true, never>;
|
|
521
|
+
}
|
|
522
|
+
|
|
511
523
|
interface Toast {
|
|
512
524
|
id: string;
|
|
513
525
|
message: string;
|
|
@@ -516,8 +528,8 @@ interface Toast {
|
|
|
516
528
|
duration?: number;
|
|
517
529
|
}
|
|
518
530
|
declare class ToastService {
|
|
519
|
-
private
|
|
520
|
-
toasts:
|
|
531
|
+
private readonly _toasts;
|
|
532
|
+
readonly toasts: _angular_core.Signal<Toast[]>;
|
|
521
533
|
show(message: string, title?: string, type?: 'info' | 'success' | 'warning' | 'error', duration?: number): string;
|
|
522
534
|
remove(id: string): void;
|
|
523
535
|
clear(): void;
|
|
@@ -525,17 +537,6 @@ declare class ToastService {
|
|
|
525
537
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ToastService>;
|
|
526
538
|
}
|
|
527
539
|
|
|
528
|
-
declare class ToastContainerComponent {
|
|
529
|
-
get themeClass(): string;
|
|
530
|
-
toasts: Toast[];
|
|
531
|
-
private toastService;
|
|
532
|
-
private themeService;
|
|
533
|
-
constructor();
|
|
534
|
-
close(id: string): void;
|
|
535
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToastContainerComponent, never>;
|
|
536
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToastContainerComponent, "ma-toast-container", never, {}, {}, never, never, true, never>;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
540
|
type Theme = 'light' | 'dark';
|
|
540
541
|
declare class ThemeService implements OnDestroy {
|
|
541
542
|
private readonly _currentTheme;
|
|
@@ -598,7 +599,7 @@ declare class MaArvContainerComponent {
|
|
|
598
599
|
get themeClass(): string;
|
|
599
600
|
routingMode: 'template' | 'adhoc';
|
|
600
601
|
templates: _angular_core.WritableSignal<ApprovalTemplateSummaryDto[]>;
|
|
601
|
-
selectedTemplateId: number
|
|
602
|
+
selectedTemplateId: _angular_core.WritableSignal<number>;
|
|
602
603
|
selectedTemplate: _angular_core.WritableSignal<ApprovalTemplateDto>;
|
|
603
604
|
loadingTemplate: _angular_core.WritableSignal<boolean>;
|
|
604
605
|
stepCandidates: _angular_core.WritableSignal<RolePreviewUserDto[][]>;
|
|
@@ -612,9 +613,12 @@ declare class MaArvContainerComponent {
|
|
|
612
613
|
userSearchResults: any[][];
|
|
613
614
|
candidateSearchQuery: string[];
|
|
614
615
|
candidateSearchResults: any[][];
|
|
615
|
-
submitting: boolean
|
|
616
|
-
isSubmitted: boolean
|
|
617
|
-
errorMessage: string
|
|
616
|
+
submitting: _angular_core.WritableSignal<boolean>;
|
|
617
|
+
isSubmitted: _angular_core.WritableSignal<boolean>;
|
|
618
|
+
errorMessage: _angular_core.Signal<string>;
|
|
619
|
+
isError: _angular_core.Signal<boolean>;
|
|
620
|
+
isStepsError: _angular_core.Signal<Record<number, boolean>>;
|
|
621
|
+
submitResultError: _angular_core.WritableSignal<string>;
|
|
618
622
|
userLabelMap: Record<string, string>;
|
|
619
623
|
private mesAuth;
|
|
620
624
|
private themeService;
|