@propmix/profet-common-header 3.2.2-beta → 3.4.0-beta.1
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/README.md +13 -1
- package/esm2020/lib/common-header.interface.mjs +1 -1
- package/esm2020/lib/common-header.service.mjs +60 -1
- package/esm2020/lib/header/header.component.mjs +69 -71
- package/fesm2015/propmix-profet-common-header.mjs +127 -71
- package/fesm2015/propmix-profet-common-header.mjs.map +1 -1
- package/fesm2020/propmix-profet-common-header.mjs +127 -71
- package/fesm2020/propmix-profet-common-header.mjs.map +1 -1
- package/lib/common-header.interface.d.ts +3 -0
- package/lib/common-header.service.d.ts +16 -0
- package/lib/header/header.component.d.ts +4 -7
- package/package.json +1 -1
|
@@ -17,6 +17,9 @@ export interface HeaderConfig {
|
|
|
17
17
|
portalFrontendUrl?: string;
|
|
18
18
|
signOutUrl: string;
|
|
19
19
|
appType: PROFET_APPS;
|
|
20
|
+
enableLastUrlRedirection?: boolean;
|
|
21
|
+
disableAppMenu?: boolean;
|
|
22
|
+
appLogoNavigationUrl?: string;
|
|
20
23
|
}
|
|
21
24
|
export interface Company {
|
|
22
25
|
id: number;
|
|
@@ -3,6 +3,8 @@ import { AppMenu, Company, HeaderConfig, SessionOutInfo } from './common-header.
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class CommonHeaderService {
|
|
5
5
|
private config;
|
|
6
|
+
readonly SESSION_EXPIRED_KEY = "session_expired";
|
|
7
|
+
readonly LAST_ACTIVE_SESSION_KEY = "lastActiveSessionTime";
|
|
6
8
|
private baseUrl;
|
|
7
9
|
headerConfig: HeaderConfig;
|
|
8
10
|
isSessionExpiryDialogOpen: boolean;
|
|
@@ -30,6 +32,20 @@ export declare class CommonHeaderService {
|
|
|
30
32
|
getCompanyList(): import("rxjs").Observable<{}>;
|
|
31
33
|
getMenuList(): import("rxjs").Observable<{}>;
|
|
32
34
|
updateLastAccessedApplication(reqBody: any): import("rxjs").Observable<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Helper to get the root domain (e.g. .profet.ai) to share cookies across subdomains/ports.
|
|
37
|
+
* If on localhost or an IP, it falls back to the hostname.
|
|
38
|
+
*/
|
|
39
|
+
getRootDomain(): string;
|
|
40
|
+
/**
|
|
41
|
+
* Generates a unique cookie name based on the environment root domain.
|
|
42
|
+
* e.g. 'lastActive' on .qa.profet.ai -> 'lastActive_qa_profet_ai'
|
|
43
|
+
* @param name Base cookie name
|
|
44
|
+
*/
|
|
45
|
+
getSuffixedCookieName(name: string): string;
|
|
46
|
+
setCookie(name: string, value: string, days: number): void;
|
|
47
|
+
getCookie(name: string): string | null;
|
|
48
|
+
deleteCookie(name: string): void;
|
|
33
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommonHeaderService, never>;
|
|
34
50
|
static ɵprov: i0.ɵɵInjectableDeclaration<CommonHeaderService>;
|
|
35
51
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { MatMenuTrigger } from '@angular/material/menu';
|
|
3
4
|
import { MatSidenav } from '@angular/material/sidenav';
|
|
4
5
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
5
6
|
import { Router } from '@angular/router';
|
|
@@ -34,12 +35,15 @@ export declare class HeaderComponent implements OnInit, OnDestroy {
|
|
|
34
35
|
_domSanitizer: DomSanitizer;
|
|
35
36
|
private inactivityTimeout;
|
|
36
37
|
private logoutCheckInterval;
|
|
38
|
+
private componentInitTime;
|
|
39
|
+
private lastProcessedLogoutTimestamp;
|
|
37
40
|
INACTIVITY_LIMIT: number;
|
|
38
41
|
logoutEvent: EventEmitter<void>;
|
|
39
42
|
companyControl: FormControl<any>;
|
|
40
43
|
appConfig: any;
|
|
41
44
|
companyList: Company[];
|
|
42
45
|
sidenav: MatSidenav;
|
|
46
|
+
menuTrigger: MatMenuTrigger;
|
|
43
47
|
menuList: {
|
|
44
48
|
key: string;
|
|
45
49
|
value: AppMenu[];
|
|
@@ -47,13 +51,6 @@ export declare class HeaderComponent implements OnInit, OnDestroy {
|
|
|
47
51
|
activeCompany: Company | undefined;
|
|
48
52
|
constructor();
|
|
49
53
|
ngOnInit(): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* Helper to get the root domain (e.g. .mycom.ai) to share cookies across subdomains/ports.
|
|
52
|
-
* If on localhost or an IP, it falls back to the hostname.
|
|
53
|
-
*/
|
|
54
|
-
private getRootDomain;
|
|
55
|
-
private setCookie;
|
|
56
|
-
private getCookie;
|
|
57
54
|
resetTimer(isUserActivity?: boolean): void;
|
|
58
55
|
/**
|
|
59
56
|
* Helper to identify the session expiry in in-active tabs.
|