common-header-lib 0.0.21 → 0.0.23
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 +330 -12
- package/assets/i18n/ar.json +25 -2
- package/assets/i18n/de.json +25 -2
- package/assets/i18n/en.json +26 -3
- package/assets/i18n/es.json +25 -2
- package/assets/i18n/fr.json +25 -2
- package/assets/i18n/hi.json +25 -2
- package/assets/i18n/ja.json +25 -2
- package/assets/i18n/ko.json +25 -2
- package/assets/images/APP035.svg +20 -0
- package/assets/images/APP036.svg +14 -0
- package/assets/images/check.svg +3 -3
- package/assets/images/copy-success.svg +4 -0
- package/assets/images/copy.svg +3 -3
- package/assets/images/download-blue.svg +3 -0
- package/assets/images/generate.svg +3 -0
- package/assets/images/regenerate.svg +3 -0
- package/fesm2022/common-header-lib.mjs +4370 -0
- package/fesm2022/common-header-lib.mjs.map +1 -0
- package/index.d.ts +664 -5
- package/package.json +20 -31
- package/src/assets/i18n/ar.json +25 -2
- package/src/assets/i18n/de.json +25 -2
- package/src/assets/i18n/en.json +26 -3
- package/src/assets/i18n/es.json +25 -2
- package/src/assets/i18n/fr.json +25 -2
- package/src/assets/i18n/hi.json +25 -2
- package/src/assets/i18n/ja.json +25 -2
- package/src/assets/i18n/ko.json +25 -2
- package/src/assets/images/APP035.svg +20 -0
- package/src/assets/images/APP036.svg +14 -0
- package/src/assets/images/check.svg +3 -3
- package/src/assets/images/copy-success.svg +4 -0
- package/src/assets/images/copy.svg +3 -3
- package/src/assets/images/download-blue.svg +3 -0
- package/src/assets/images/generate.svg +3 -0
- package/src/assets/images/regenerate.svg +3 -0
- package/assets/scss/_sidebar.scss +0 -257
- package/assets/scss/styles.scss +0 -577
- package/esm2020/common-header-lib.mjs +0 -5
- package/esm2020/lib/Validators/noSpaceAllowed.mjs +0 -16
- package/esm2020/lib/common-header-lib.component.mjs +0 -629
- package/esm2020/lib/common-header-lib.module.mjs +0 -178
- package/esm2020/lib/common-header-lib.service.mjs +0 -200
- package/esm2020/lib/components/confirm-dialog/confirm-dialog.component.mjs +0 -49
- package/esm2020/lib/components/general-configuration/general-configuration.component.mjs +0 -399
- package/esm2020/lib/components/general-configuration/landingpg-config/landingpg-config.component.mjs +0 -124
- package/esm2020/lib/components/general-configuration/timezone-configuration/timezone-configuration.component.mjs +0 -137
- package/esm2020/lib/components/grid-pagination/grid-pagination.component.mjs +0 -38
- package/esm2020/lib/components/ng-translation/ng-translation.component.mjs +0 -82
- package/esm2020/lib/components/no-service-my-access-pg/no-service-my-access-pg.component.mjs +0 -19
- package/esm2020/lib/components/notification-sidebar/notification-sidebar.component.mjs +0 -40
- package/esm2020/lib/components/side-popup/side-popup.component.mjs +0 -34
- package/esm2020/lib/components/user-mailbox/user-mailbox.component.mjs +0 -168
- package/esm2020/lib/components/user-sidebar/user-sidebar.component.mjs +0 -274
- package/esm2020/lib/components/viewpassword-popup/viewpassword-popup.component.mjs +0 -197
- package/esm2020/lib/model/data_model.mjs +0 -229
- package/esm2020/lib/pipes/custome-dateformat.pipe.mjs +0 -27
- package/esm2020/lib/pipes/date-diff.pipe.mjs +0 -55
- package/esm2020/lib/pipes/slice-to-two.pipe.mjs +0 -34
- package/esm2020/lib/services/EncrypDecryp_RSA.service.mjs +0 -100
- package/esm2020/lib/services/async-passwordcheck.service.mjs +0 -70
- package/esm2020/lib/services/cookie-storage-manager.service.mjs +0 -78
- package/esm2020/lib/services/encrpdata.service.mjs +0 -55
- package/esm2020/lib/services/encrydecrydata.service.mjs +0 -205
- package/esm2020/lib/services/event.service.mjs +0 -132
- package/esm2020/lib/services/http/http-common.service.mjs +0 -245
- package/esm2020/lib/services/http/http-general-config.service.mjs +0 -84
- package/esm2020/lib/services/rest-login-form.service.mjs +0 -294
- package/esm2020/lib/services/rest-signalr.service.mjs +0 -104
- package/esm2020/lib/services/storage.service.mjs +0 -33
- package/esm2020/lib/services/toast-msg.service.mjs +0 -101
- package/esm2020/lib/services/vapt-validation.service.mjs +0 -31
- package/esm2020/public-api.mjs +0 -13
- package/fesm2015/common-header-lib.mjs +0 -4206
- package/fesm2015/common-header-lib.mjs.map +0 -1
- package/fesm2020/common-header-lib.mjs +0 -4186
- package/fesm2020/common-header-lib.mjs.map +0 -1
- package/lib/Validators/noSpaceAllowed.d.ts +0 -2
- package/lib/common-header-lib.component.d.ts +0 -149
- package/lib/common-header-lib.module.d.ts +0 -56
- package/lib/common-header-lib.service.d.ts +0 -25
- package/lib/components/confirm-dialog/confirm-dialog.component.d.ts +0 -13
- package/lib/components/general-configuration/general-configuration.component.d.ts +0 -86
- package/lib/components/general-configuration/landingpg-config/landingpg-config.component.d.ts +0 -37
- package/lib/components/general-configuration/timezone-configuration/timezone-configuration.component.d.ts +0 -38
- package/lib/components/grid-pagination/grid-pagination.component.d.ts +0 -20
- package/lib/components/ng-translation/ng-translation.component.d.ts +0 -21
- package/lib/components/no-service-my-access-pg/no-service-my-access-pg.component.d.ts +0 -8
- package/lib/components/notification-sidebar/notification-sidebar.component.d.ts +0 -16
- package/lib/components/side-popup/side-popup.component.d.ts +0 -14
- package/lib/components/user-mailbox/user-mailbox.component.d.ts +0 -40
- package/lib/components/user-sidebar/user-sidebar.component.d.ts +0 -62
- package/lib/components/viewpassword-popup/viewpassword-popup.component.d.ts +0 -47
- package/lib/model/data_model.d.ts +0 -185
- package/lib/pipes/custome-dateformat.pipe.d.ts +0 -8
- package/lib/pipes/date-diff.pipe.d.ts +0 -9
- package/lib/pipes/slice-to-two.pipe.d.ts +0 -7
- package/lib/services/EncrypDecryp_RSA.service.d.ts +0 -15
- package/lib/services/async-passwordcheck.service.d.ts +0 -18
- package/lib/services/cookie-storage-manager.service.d.ts +0 -16
- package/lib/services/encrpdata.service.d.ts +0 -12
- package/lib/services/encrydecrydata.service.d.ts +0 -33
- package/lib/services/event.service.d.ts +0 -30
- package/lib/services/http/http-common.service.d.ts +0 -40
- package/lib/services/http/http-general-config.service.d.ts +0 -15
- package/lib/services/rest-login-form.service.d.ts +0 -39
- package/lib/services/rest-signalr.service.d.ts +0 -23
- package/lib/services/storage.service.d.ts +0 -11
- package/lib/services/toast-msg.service.d.ts +0 -23
- package/lib/services/vapt-validation.service.d.ts +0 -7
- package/public-api.d.ts +0 -8
- package/src/assets/scss/_sidebar.scss +0 -257
- package/src/assets/scss/styles.scss +0 -577
package/index.d.ts
CHANGED
|
@@ -1,5 +1,664 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnInit, PipeTransform, AfterViewInit } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
5
|
+
import * as i7 from '@ngx-translate/core';
|
|
6
|
+
import { HttpInterceptorFn } from '@angular/common/http';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Holds a reference to <lib-app-header>'s own host element, so this
|
|
10
|
+
* library's dialogs (LOB confirm dialog, General Configuration, Password /
|
|
11
|
+
* View-Password) can be appended there instead of PrimeNG's default of
|
|
12
|
+
* <body> — letting consuming apps target/style the dialogs with a scoped
|
|
13
|
+
* CSS selector, since they stay inside the header's own DOM subtree.
|
|
14
|
+
*
|
|
15
|
+
* Provided at CommonHeaderLibComponent level (not root) so every dialog
|
|
16
|
+
* this library renders can inject it and reach that one instance, and so
|
|
17
|
+
* multiple <lib-app-header> instances on the same page each get their own.
|
|
18
|
+
*/
|
|
19
|
+
declare class DialogHostService {
|
|
20
|
+
hostElement: HTMLElement | null;
|
|
21
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogHostService, never>;
|
|
22
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DialogHostService>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare class ConfirmDialogComponent {
|
|
26
|
+
header: _angular_core.InputSignal<string>;
|
|
27
|
+
message: _angular_core.InputSignal<string>;
|
|
28
|
+
/** Extra class(es) to layer onto the underlying p-confirmDialog root, e.g.
|
|
29
|
+
* a per-instance marker so a specific confirm dialog (like the LOB change
|
|
30
|
+
* confirmation) can be targeted from consuming apps' global styles.
|
|
31
|
+
* Always combined with the library's own `lib-dialog` scoping class —
|
|
32
|
+
* see _dialogs.scss. */
|
|
33
|
+
styleClass: _angular_core.InputSignal<string>;
|
|
34
|
+
result: _angular_core.OutputEmitterRef<boolean>;
|
|
35
|
+
private readonly confirmationService;
|
|
36
|
+
/** Appends the dialog inside <lib-app-header> instead of PrimeNG's default
|
|
37
|
+
* of <body>, so consuming apps can target it with a scoped CSS selector.
|
|
38
|
+
* See DialogHostService. */
|
|
39
|
+
protected readonly dialogHostService: DialogHostService;
|
|
40
|
+
openConfirmModal(event: Event): void;
|
|
41
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfirmDialogComponent, never>;
|
|
42
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConfirmDialogComponent, "confirm-dialog", never, { "header": { "alias": "header"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; }, { "result": "result"; }, never, never, true, never>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface Language {
|
|
46
|
+
langKey: string;
|
|
47
|
+
langName: string;
|
|
48
|
+
}
|
|
49
|
+
declare class GlobalConstants {
|
|
50
|
+
static readonly loggedInUserName: string;
|
|
51
|
+
static readonly COOKIEDELETEVENT: string;
|
|
52
|
+
static readonly ALLCOOKIEDELET: string;
|
|
53
|
+
static token: string;
|
|
54
|
+
static TimeForEncToken: number;
|
|
55
|
+
static ErrorCode: string;
|
|
56
|
+
static AgGridPaginationSize: number;
|
|
57
|
+
static Version: string;
|
|
58
|
+
static reconcileServiceLimit: number;
|
|
59
|
+
static baseURL: string;
|
|
60
|
+
static ssoURL: string;
|
|
61
|
+
static workflowURL: string;
|
|
62
|
+
static signalRURL: string;
|
|
63
|
+
static accessToken: string;
|
|
64
|
+
static authToken: string;
|
|
65
|
+
static refreshToken: string;
|
|
66
|
+
static ERRCODE: string;
|
|
67
|
+
static loggedInUserId: number;
|
|
68
|
+
static applicationName: string;
|
|
69
|
+
static publicKey: string;
|
|
70
|
+
static TokenURL: string;
|
|
71
|
+
static tokenExpired: number;
|
|
72
|
+
static validUntil: string;
|
|
73
|
+
static PAMPluginURL: string;
|
|
74
|
+
static APPName: string;
|
|
75
|
+
static MFAURL: string;
|
|
76
|
+
static MFA_ACCESSTOKEN: string;
|
|
77
|
+
static isPAMPluginInstalled: string;
|
|
78
|
+
static PlugInDownloadURL: string;
|
|
79
|
+
static cipluginversion: string;
|
|
80
|
+
static localInstalledCIPluginVersion: string;
|
|
81
|
+
static isPAMPluginRequired: boolean;
|
|
82
|
+
static PCI_DSS_Standard: boolean;
|
|
83
|
+
static MFAEnable: boolean;
|
|
84
|
+
static setCookies: boolean;
|
|
85
|
+
static TOKENTIME: number;
|
|
86
|
+
static LOGOUTIMER: number;
|
|
87
|
+
static PAGEROW: number;
|
|
88
|
+
static CONFIGCONNECTORS: boolean;
|
|
89
|
+
static USERLANGUAGES: {
|
|
90
|
+
langKey: string;
|
|
91
|
+
langName: string;
|
|
92
|
+
}[];
|
|
93
|
+
static USERFILTEREDLANGUAGES: Language[];
|
|
94
|
+
static DEFAULTLANG: Language;
|
|
95
|
+
static DEFAULTLANGKEY: string;
|
|
96
|
+
static DEFAULT_IMGPATH: string;
|
|
97
|
+
static DEFAULT_BGIMG: string;
|
|
98
|
+
static DEFAULT_LOGO: string;
|
|
99
|
+
static IMG_CODE: string;
|
|
100
|
+
static DYNAMIC_LOGO: string;
|
|
101
|
+
static DYNAMIC_BGIMG: string;
|
|
102
|
+
static APP_VERSION: string;
|
|
103
|
+
}
|
|
104
|
+
declare class COOKIECONSTANT {
|
|
105
|
+
static LOBNAME: string;
|
|
106
|
+
static DOMAINAME: string;
|
|
107
|
+
static DOMAINID: string;
|
|
108
|
+
static USERDETAILS: string;
|
|
109
|
+
static SESSIONID: string;
|
|
110
|
+
static USERNAME: string;
|
|
111
|
+
static USERID: string;
|
|
112
|
+
static _AT: string;
|
|
113
|
+
static _RT: string;
|
|
114
|
+
static USERDISPLAYNAME: string;
|
|
115
|
+
static ENCRYPTEDKEY: string;
|
|
116
|
+
static MFASTATUS: string;
|
|
117
|
+
static EVENTNAME: string;
|
|
118
|
+
static MACHINEDETAILS: string;
|
|
119
|
+
static COOKIEDELETEVENT: string;
|
|
120
|
+
static COOKIECREATEEVENT: string;
|
|
121
|
+
static COOKIEUPDATEEVENT: string;
|
|
122
|
+
static ALLCOOKIEDELET: string;
|
|
123
|
+
static NEWUSER: string;
|
|
124
|
+
static UNLOCKACC: string;
|
|
125
|
+
static ERRORCODE: string;
|
|
126
|
+
static PUBLICCODE: string;
|
|
127
|
+
static USERLANG: string;
|
|
128
|
+
static MFATIMEOUT: number;
|
|
129
|
+
static MFASTATUSCHECK: string;
|
|
130
|
+
static MFASTATUSCHECKFAIL: string;
|
|
131
|
+
static MFACLI: string;
|
|
132
|
+
static WINDOWAUTH_HEADER: string;
|
|
133
|
+
static SIGNALR_INDEX: string;
|
|
134
|
+
static ONETIME_TOKEN: string;
|
|
135
|
+
static THICKCLIENT_KEY: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
interface AppDetails {
|
|
139
|
+
applicationName: string;
|
|
140
|
+
applicationId: number;
|
|
141
|
+
appCode: string;
|
|
142
|
+
privileges: any;
|
|
143
|
+
applicationUrl: string;
|
|
144
|
+
isAssignedLanding: boolean;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* 9-dots waffle panel — shows the list of applications the logged-in user can access.
|
|
148
|
+
*
|
|
149
|
+
* Extracted from CommonHeaderLibComponent to remove the God class smell.
|
|
150
|
+
* Responsibilities:
|
|
151
|
+
* - Toggle the PrimeNG popover on the 9-dots button click
|
|
152
|
+
* - Lazily load the app list on first open (avoids an API call if never opened)
|
|
153
|
+
* - Run pre-connection checks for specific apps before launching them
|
|
154
|
+
*/
|
|
155
|
+
declare class AppPanelComponent {
|
|
156
|
+
private readonly httpCommonService;
|
|
157
|
+
private readonly msgService;
|
|
158
|
+
private readonly destroyRef;
|
|
159
|
+
private readonly cdRef;
|
|
160
|
+
private readonly document;
|
|
161
|
+
private readonly injector;
|
|
162
|
+
private readonly popoverRef;
|
|
163
|
+
private readonly popoverContentRef;
|
|
164
|
+
/** The 9-dots trigger button, captured on open so focus can return to it on close. */
|
|
165
|
+
private triggerElement;
|
|
166
|
+
private readonly APP_PANEL_SKELETON_COUNT;
|
|
167
|
+
/** List of apps the user is privileged to access. */
|
|
168
|
+
ListOfUserPrivillegedApp: AppDetails[];
|
|
169
|
+
/** Controls skeleton loader while the app list is being fetched. */
|
|
170
|
+
userAppLoaderLoadder: boolean;
|
|
171
|
+
readonly repeatLoader: any[];
|
|
172
|
+
private readonly APP_CONNECTION_CHECKS;
|
|
173
|
+
/** Toggles the popover and fetches the app list the first time it opens. */
|
|
174
|
+
toggle(event: Event): void;
|
|
175
|
+
/** Moves focus to the first app tile. Called on popover open, and again once
|
|
176
|
+
* the app list finishes loading if the popover was opened while it was
|
|
177
|
+
* still showing the skeleton (which has no focusable tiles yet).
|
|
178
|
+
* Uses afterNextRender rather than setTimeout: a setTimeout(0) can fire
|
|
179
|
+
* before Angular has actually re-rendered the tiles (only guaranteed to
|
|
180
|
+
* run after the current task, not after the next change-detection pass),
|
|
181
|
+
* which made the focus call intermittently land on nothing — the
|
|
182
|
+
* "sometimes no focus shown" symptom. afterNextRender only fires once
|
|
183
|
+
* the DOM genuinely reflects the latest state. */
|
|
184
|
+
onPopoverShow(): void;
|
|
185
|
+
/** Returns focus to the 9-dots trigger button on most close paths (Escape,
|
|
186
|
+
* outside click, or selecting an app). Skipped for a forward Tab-out —
|
|
187
|
+
* see onPopoverKeydown's Tab case and skipTriggerFocusOnHide below. */
|
|
188
|
+
onPopoverHide(): void;
|
|
189
|
+
/** Set just before closing via a forward Tab-out (see onPopoverKeydown),
|
|
190
|
+
* so onPopoverHide's normal focus-to-trigger restore is skipped — that
|
|
191
|
+
* path already sent focus to the next element itself. */
|
|
192
|
+
private skipTriggerFocusOnHide;
|
|
193
|
+
/** Grid keyboard navigation for the app tiles, matching the reference
|
|
194
|
+
* acmo-login-page waffle panel: Arrow keys + Home/End move the roving
|
|
195
|
+
* focus between tiles (3-column grid, see .waffle-align).
|
|
196
|
+
* Tab past the last tile continues the user's forward tab traversal to
|
|
197
|
+
* whatever comes after the 9-dots button on the page, instead of looping
|
|
198
|
+
* focus back onto it. Shift+Tab before the first tile returns focus to
|
|
199
|
+
* the 9-dots button itself (the natural "one step back" target). */
|
|
200
|
+
onPopoverKeydown(event: KeyboardEvent): void;
|
|
201
|
+
private focusFirstTile;
|
|
202
|
+
private getFocusableTiles;
|
|
203
|
+
/** Focuses whatever comes immediately after the 9-dots trigger button in
|
|
204
|
+
* the page's natural tab order, continuing the user's forward Tab press
|
|
205
|
+
* instead of looping it back onto the button they just tabbed away from.
|
|
206
|
+
* App tiles are excluded from the candidate list since they're mid-close. */
|
|
207
|
+
private focusNextAfterTrigger;
|
|
208
|
+
private isVisible;
|
|
209
|
+
/** Fetches the apps assigned to the current user. */
|
|
210
|
+
private getUserAssignedApp;
|
|
211
|
+
/** Handles a click on an app tile.
|
|
212
|
+
* Apps with special pre-validation (MFA, internal config) are checked first;
|
|
213
|
+
* all other apps open immediately. */
|
|
214
|
+
getConnectionofApplication(appCode: string): void;
|
|
215
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppPanelComponent, never>;
|
|
216
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppPanelComponent, "app-panel", never, {}, {}, never, never, true, never>;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
interface LoadOptions {
|
|
220
|
+
enableNotifications: boolean;
|
|
221
|
+
enableProfile: boolean;
|
|
222
|
+
enableTimeZone: boolean;
|
|
223
|
+
enableMail: boolean;
|
|
224
|
+
userId: string;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Handles all data loading and real-time state for the header.
|
|
228
|
+
*
|
|
229
|
+
* Extracted from CommonHeaderLibComponent to remove the God class smell.
|
|
230
|
+
* Responsibilities:
|
|
231
|
+
* - Load header data on init via a single forkJoin (notifications, user info, timezone, email count)
|
|
232
|
+
* - Listen for real-time updates: SignalR notifications, timezone changes, email count, language
|
|
233
|
+
* - Expose all results as signals so the template re-renders automatically
|
|
234
|
+
*
|
|
235
|
+
* Provided at the component level (not root) so each header instance gets its own state
|
|
236
|
+
* and the service lifetime is tied to the component.
|
|
237
|
+
*/
|
|
238
|
+
declare class HeaderDataService {
|
|
239
|
+
private readonly http;
|
|
240
|
+
private readonly signalR;
|
|
241
|
+
private readonly eventService;
|
|
242
|
+
private readonly translate;
|
|
243
|
+
private readonly destroyRef;
|
|
244
|
+
/** Base64-encoded header logo string (set after loadLogo() completes) */
|
|
245
|
+
readonly headerLogo: _angular_core.WritableSignal<string>;
|
|
246
|
+
/** True once the forkJoin in loadAll() has finished (success or error) */
|
|
247
|
+
readonly isHeaderContentLoaded: _angular_core.WritableSignal<boolean>;
|
|
248
|
+
/** Logged-in user's display name */
|
|
249
|
+
readonly userdisplayName: _angular_core.WritableSignal<string>;
|
|
250
|
+
/** Formatted notification count string (e.g. "5", "99+", or "" when zero) */
|
|
251
|
+
readonly userNotificationCount: _angular_core.WritableSignal<string>;
|
|
252
|
+
/** User's preferred timezone abbreviation (e.g. "IST") */
|
|
253
|
+
readonly userTimeZoneAbbreviations: _angular_core.WritableSignal<string>;
|
|
254
|
+
/** User's full timezone name shown as a tooltip */
|
|
255
|
+
readonly userTimeZoneFullForm: _angular_core.WritableSignal<string>;
|
|
256
|
+
/** Formatted unread email count string */
|
|
257
|
+
readonly totalEmails: _angular_core.WritableSignal<string>;
|
|
258
|
+
/** Event-wise notification data pushed by SignalR; null until first push */
|
|
259
|
+
readonly signalREventwiseData: _angular_core.WritableSignal<any[] | null>;
|
|
260
|
+
/** Set whenever a timezone update arrives (initial load or live change) */
|
|
261
|
+
readonly timezoneEmitValue: _angular_core.WritableSignal<any>;
|
|
262
|
+
/** Set after the logo API returns; carries the raw response for getBgImage output */
|
|
263
|
+
readonly bgImageEmitValue: _angular_core.WritableSignal<any>;
|
|
264
|
+
private userNotificationCountObj;
|
|
265
|
+
private readonly accessTypes;
|
|
266
|
+
private readonly translateKeys;
|
|
267
|
+
/** Fetches the header logo and sets headerLogo + bgImageEmitValue signals. */
|
|
268
|
+
loadLogo(): void;
|
|
269
|
+
/** Runs all enabled header APIs in parallel using forkJoin.
|
|
270
|
+
* Only the APIs the host app has enabled are included in the request batch,
|
|
271
|
+
* so disabled features never make unnecessary network calls. */
|
|
272
|
+
loadAll(options: LoadOptions): void;
|
|
273
|
+
/** Registers all real-time listeners. Call once from ngOnInit.
|
|
274
|
+
* All subscriptions clean up automatically when the component is destroyed. */
|
|
275
|
+
initListeners(): void;
|
|
276
|
+
/** Returns "" for zero/negative counts, "99+" for counts above 99. */
|
|
277
|
+
formatCount(count: number): string;
|
|
278
|
+
private processNotifications;
|
|
279
|
+
private processUserInfo;
|
|
280
|
+
/** Updates timezone signals and sets the bridge signal for the output emit. */
|
|
281
|
+
private processTimeZone;
|
|
282
|
+
private refreshTranslations;
|
|
283
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HeaderDataService, never>;
|
|
284
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<HeaderDataService>;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
interface LobItem {
|
|
288
|
+
LOBId: any;
|
|
289
|
+
LOBName: string;
|
|
290
|
+
CustomLOBSetByParent: boolean;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Manages Line of Business (LOB) state and selection logic for the header.
|
|
294
|
+
*
|
|
295
|
+
* Extracted from CommonHeaderLibComponent to remove the God class smell.
|
|
296
|
+
* Responsibilities:
|
|
297
|
+
* - Fetch the LOB list from the API
|
|
298
|
+
* - Restore the previously selected LOB from localStorage on load
|
|
299
|
+
* - Persist the confirmed LOB selection back to localStorage
|
|
300
|
+
* - Revert the dropdown to the last confirmed LOB when the user cancels
|
|
301
|
+
* - Validate LOB IDs set programmatically by the host app
|
|
302
|
+
* - When read-only (host sets `lobReadOnly`), freeze the LOB and refuse
|
|
303
|
+
* every mutation below regardless of caller — see loadLOBs()'s readOnly
|
|
304
|
+
* param for how a page reload during read-only mode stays frozen too.
|
|
305
|
+
*
|
|
306
|
+
* Provided at the component level so each header instance has isolated LOB state.
|
|
307
|
+
*/
|
|
308
|
+
declare class LobService {
|
|
309
|
+
private readonly http;
|
|
310
|
+
private readonly msgService;
|
|
311
|
+
private readonly translate;
|
|
312
|
+
private readonly destroyRef;
|
|
313
|
+
/** Full LOB list used as options for the dropdown. */
|
|
314
|
+
userLOBList: any[];
|
|
315
|
+
/** Controls the skeleton loader shown while the LOB list is being fetched. */
|
|
316
|
+
showLobLoader: boolean;
|
|
317
|
+
/** Tracks the last confirmed LOB ID so changes can be reverted on cancel. */
|
|
318
|
+
private tempSelectedLobId;
|
|
319
|
+
/** Fetches the LOB list and resolves the initial selection.
|
|
320
|
+
* - Normally: if localStorage['XOB'] has a valid pre-selected LOB, it is
|
|
321
|
+
* restored; otherwise the first item in the list is selected and saved.
|
|
322
|
+
* - When readOnly is true: localStorage['XOB'] is not trusted at all (that
|
|
323
|
+
* is the exact tamper vector read-only mode exists to close). Instead the
|
|
324
|
+
* LOB is resolved from a separate 'XOB_LOCK' key. The first time this
|
|
325
|
+
* runs while read-only, 'XOB_LOCK' doesn't exist yet, so the normal
|
|
326
|
+
* XOB-restore-or-default resolution runs once to establish a baseline,
|
|
327
|
+
* which is then locked into 'XOB_LOCK' — 'XOB' itself is left untouched
|
|
328
|
+
* so the pre-lock value is intact once read-only turns back off. Every
|
|
329
|
+
* subsequent call while still read-only (including across a page reload)
|
|
330
|
+
* reads 'XOB_LOCK' instead, so editing 'XOB' has no effect. */
|
|
331
|
+
loadLOBs(showAllLOB: boolean, readOnly?: boolean): Observable<{
|
|
332
|
+
initialLobSelected: LobItem;
|
|
333
|
+
selectedLobId: any;
|
|
334
|
+
}>;
|
|
335
|
+
/** Read-only resolution: prefer the existing lock; if none exists yet
|
|
336
|
+
* (first read-only load), establish one from the normal XOB-or-default
|
|
337
|
+
* resolution without touching 'XOB' itself. */
|
|
338
|
+
private resolveReadOnlyLob;
|
|
339
|
+
/** Shared resolution used by both the normal and first-time-read-only
|
|
340
|
+
* paths: restore from `readKey` if it holds a valid, still-listed LOB;
|
|
341
|
+
* otherwise default to the first list item. Writes the resolved value to
|
|
342
|
+
* `writeKey` (only on the default branch, unless forceWrite is set — used
|
|
343
|
+
* by the read-only baseline path, which must persist even when it
|
|
344
|
+
* legitimately restored from 'XOB' rather than defaulting). */
|
|
345
|
+
private resolveAndPersistLob;
|
|
346
|
+
/** Called when the user confirms the LOB change dialog.
|
|
347
|
+
* Updates the temp reference and persists the new selection to localStorage.
|
|
348
|
+
* No-ops when readOnly is true — defense-in-depth so this stays safe even
|
|
349
|
+
* if a caller bypasses the component-level guard. */
|
|
350
|
+
confirmChange(selectedLobId: any, readOnly?: boolean): LobItem | null;
|
|
351
|
+
/** Called when the user cancels the LOB change dialog.
|
|
352
|
+
* Returns the last confirmed LOB ID so the dropdown can be reverted. */
|
|
353
|
+
revertChange(): any;
|
|
354
|
+
/** Validates a LOB ID set programmatically by the host app (via setCustomLobId).
|
|
355
|
+
* Shows an error toast if the ID does not exist in the current list.
|
|
356
|
+
* No-ops when readOnly is true — defense-in-depth, same as confirmChange. */
|
|
357
|
+
validateCustomLobId(lobId: any, readOnly?: boolean): LobItem | null;
|
|
358
|
+
/** Finds a LOB in the list by its ID and returns a normalised LobItem.
|
|
359
|
+
* Returns an empty object cast as LobItem when no match is found. */
|
|
360
|
+
getLobById(list: any[], id: any): LobItem;
|
|
361
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LobService, never>;
|
|
362
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<LobService>;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Main header component — acts as a thin coordinator.
|
|
367
|
+
*
|
|
368
|
+
* Responsibilities kept here:
|
|
369
|
+
* - Declare signal inputs and outputs (public API for the host app)
|
|
370
|
+
* - Toggle UI panels (mailbox, user profile, notifications)
|
|
371
|
+
* - Coordinate LOB selection + confirmation dialog
|
|
372
|
+
* - Wire service signals to Angular outputs via effects
|
|
373
|
+
*
|
|
374
|
+
* Heavy logic is delegated to:
|
|
375
|
+
* - HeaderDataService — data loading, SignalR/event listeners, state signals
|
|
376
|
+
* - LobService — LOB list loading, selection persistence, validation
|
|
377
|
+
* - AppPanelComponent — 9-dots waffle panel (app list + connection checks)
|
|
378
|
+
* - NotificationPanelComponent — notification sidebar (event counts, refresh)
|
|
379
|
+
*/
|
|
380
|
+
declare class CommonHeaderLibComponent implements OnInit {
|
|
381
|
+
EnableLogo: _angular_core.InputSignal<boolean>;
|
|
382
|
+
moduleName: _angular_core.InputSignal<string>;
|
|
383
|
+
EnableTimeZone: _angular_core.InputSignal<boolean>;
|
|
384
|
+
EnableLOB: _angular_core.InputSignal<boolean>;
|
|
385
|
+
showAllLOB: _angular_core.InputSignal<boolean>;
|
|
386
|
+
lobReadOnly: _angular_core.InputSignal<boolean>;
|
|
387
|
+
showLobChangeConfirmation: _angular_core.InputSignal<boolean>;
|
|
388
|
+
EnableMail: _angular_core.InputSignal<boolean>;
|
|
389
|
+
EnableNotifications: _angular_core.InputSignal<boolean>;
|
|
390
|
+
EnableMoreApps: _angular_core.InputSignal<boolean>;
|
|
391
|
+
EnableProfile: _angular_core.InputSignal<boolean>;
|
|
392
|
+
EnableLearningCenter: _angular_core.InputSignal<boolean>;
|
|
393
|
+
EnableGeneralConfiguration: _angular_core.InputSignal<boolean>;
|
|
394
|
+
languages: _angular_core.InputSignal<Language[]>;
|
|
395
|
+
timezoneDetails: _angular_core.OutputEmitterRef<any>;
|
|
396
|
+
lobSelected: _angular_core.OutputEmitterRef<any>;
|
|
397
|
+
getBgImage: _angular_core.OutputEmitterRef<any>;
|
|
398
|
+
langChange: _angular_core.OutputEmitterRef<any>;
|
|
399
|
+
overlayStateChange: _angular_core.OutputEmitterRef<boolean>;
|
|
400
|
+
confirmDialog: _angular_core.Signal<ConfirmDialogComponent>;
|
|
401
|
+
appPanelRef: _angular_core.Signal<AppPanelComponent>;
|
|
402
|
+
readonly headerData: HeaderDataService;
|
|
403
|
+
readonly lobService: LobService;
|
|
404
|
+
private readonly dialogHostService;
|
|
405
|
+
private readonly elementRef;
|
|
406
|
+
selectedLOBId: any;
|
|
407
|
+
isOpenSidePopup: boolean;
|
|
408
|
+
showUserDetails: boolean;
|
|
409
|
+
showMailboxScreenflag: boolean;
|
|
410
|
+
isNotificationPanelOpen: boolean;
|
|
411
|
+
private readonly cdRef;
|
|
412
|
+
constructor();
|
|
413
|
+
ngOnInit(): void;
|
|
414
|
+
showMailBoxScreen(): void;
|
|
415
|
+
hideMailBoxScreen(): void;
|
|
416
|
+
languageChange(event: any): void;
|
|
417
|
+
showUserAppsPanel(event: Event): void;
|
|
418
|
+
showUserDetailsPanel(): void;
|
|
419
|
+
closeSidePopup(): void;
|
|
420
|
+
OpenNotificationModal(): void;
|
|
421
|
+
closeModal(): void;
|
|
422
|
+
/** Called when the user picks a different LOB from the dropdown.
|
|
423
|
+
* Stores the new value, then either opens the confirmation dialog or
|
|
424
|
+
* commits immediately, per showLobChangeConfirmation.
|
|
425
|
+
* When lobReadOnly is true: PrimeNG's [(ngModel)] has already written
|
|
426
|
+
* event.value into selectedLOBId by the time this handler runs (ngModel
|
|
427
|
+
* writeback happens before (onChange) fires), so a bare early return would
|
|
428
|
+
* leave the dropdown showing the tampered value — force-revert it to the
|
|
429
|
+
* last confirmed LOB instead, and never open the confirm dialog. */
|
|
430
|
+
onLobChangeEvent(event: any): void;
|
|
431
|
+
/** Called when the user confirms the LOB change dialog.
|
|
432
|
+
* Persists the new selection and emits it to the host app.
|
|
433
|
+
* Re-checks lobReadOnly here too (not just in onLobChangeEvent) so a
|
|
434
|
+
* dialog already open when read-only turns on, or the dialog's own accept
|
|
435
|
+
* callback invoked directly, cannot still commit a change. */
|
|
436
|
+
confirmLobChange(): void;
|
|
437
|
+
/** Called when the user cancels the LOB change dialog.
|
|
438
|
+
* Reverts the dropdown back to the previously confirmed LOB. Intentionally
|
|
439
|
+
* NOT gated by lobReadOnly — reverting only ever restores the last
|
|
440
|
+
* confirmed value, never advances it, so it's safe (and useful as a
|
|
441
|
+
* self-heal) to allow regardless of read-only state. */
|
|
442
|
+
revertLobChange(): void;
|
|
443
|
+
/** Public API — allows the host app to force-select a specific LOB by ID.
|
|
444
|
+
* Also respects lobReadOnly: while read-only, nobody — including host-app
|
|
445
|
+
* code — can change the LOB except by first turning the flag back off. */
|
|
446
|
+
setCustomLobId(lobId: any): void;
|
|
447
|
+
/** Sets the base API URL once. Falls back to the current browser origin
|
|
448
|
+
* if no URL has been stored in localStorage under '_WAU'. */
|
|
449
|
+
private setWebAPIURL;
|
|
450
|
+
/** Loads the LOB list and emits the initially selected LOB to the host app.
|
|
451
|
+
* detectChanges() is used (not markForCheck) because lobService properties
|
|
452
|
+
* are plain values, not signals — we need an immediate re-render after the
|
|
453
|
+
* subscription updates showLobLoader and userLOBList on the service.
|
|
454
|
+
* lobReadOnly is read here (not inside the constructor effect, which only
|
|
455
|
+
* depends on EnableLOB) so toggling lobReadOnly never re-triggers this
|
|
456
|
+
* call on its own — the effect's untracked() wrapper means changes here
|
|
457
|
+
* are inert as an effect dependency, matching the existing showAllLOB
|
|
458
|
+
* pattern. This is what keeps a read-only toggle from re-resolving or
|
|
459
|
+
* re-emitting lobSelected by itself. */
|
|
460
|
+
private getListofLOB;
|
|
461
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CommonHeaderLibComponent, never>;
|
|
462
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CommonHeaderLibComponent, "lib-app-header", never, { "EnableLogo": { "alias": "EnableLogo"; "required": false; "isSignal": true; }; "moduleName": { "alias": "moduleName"; "required": false; "isSignal": true; }; "EnableTimeZone": { "alias": "EnableTimeZone"; "required": false; "isSignal": true; }; "EnableLOB": { "alias": "EnableLOB"; "required": false; "isSignal": true; }; "showAllLOB": { "alias": "showAllLOB"; "required": false; "isSignal": true; }; "lobReadOnly": { "alias": "lobReadOnly"; "required": false; "isSignal": true; }; "showLobChangeConfirmation": { "alias": "showLobChangeConfirmation"; "required": false; "isSignal": true; }; "EnableMail": { "alias": "EnableMail"; "required": false; "isSignal": true; }; "EnableNotifications": { "alias": "EnableNotifications"; "required": false; "isSignal": true; }; "EnableMoreApps": { "alias": "EnableMoreApps"; "required": false; "isSignal": true; }; "EnableProfile": { "alias": "EnableProfile"; "required": false; "isSignal": true; }; "EnableLearningCenter": { "alias": "EnableLearningCenter"; "required": false; "isSignal": true; }; "EnableGeneralConfiguration": { "alias": "EnableGeneralConfiguration"; "required": false; "isSignal": true; }; "languages": { "alias": "languages"; "required": false; "isSignal": true; }; }, { "timezoneDetails": "timezoneDetails"; "lobSelected": "lobSelected"; "getBgImage": "getBgImage"; "langChange": "langChange"; "overlayStateChange": "overlayStateChange"; }, never, never, true, never>;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
declare class SliceToTwoPipe implements PipeTransform {
|
|
466
|
+
transform(textName: string): string;
|
|
467
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SliceToTwoPipe, never>;
|
|
468
|
+
static ɵpipe: _angular_core.ɵɵPipeDeclaration<SliceToTwoPipe, "sliceToTwo", true>;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
declare class CustomDateFormatPipe implements PipeTransform {
|
|
472
|
+
private datePipe;
|
|
473
|
+
transform(value: any): string;
|
|
474
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CustomDateFormatPipe, never>;
|
|
475
|
+
static ɵpipe: _angular_core.ɵɵPipeDeclaration<CustomDateFormatPipe, "customDateFormat", true>;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
declare class DateDiffPipe implements PipeTransform {
|
|
479
|
+
transform(date: string): string;
|
|
480
|
+
private convertUTCToLocal;
|
|
481
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DateDiffPipe, never>;
|
|
482
|
+
static ɵpipe: _angular_core.ɵɵPipeDeclaration<DateDiffPipe, "dateDiff", true>;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
declare class ViewpasswordPopupComponent implements OnInit, AfterViewInit {
|
|
486
|
+
mailDetails: any;
|
|
487
|
+
protected servicePassword: string;
|
|
488
|
+
showVaultBtn: boolean;
|
|
489
|
+
isContentLoaded: boolean;
|
|
490
|
+
isValueUpdated: boolean;
|
|
491
|
+
OpenTillDate: string;
|
|
492
|
+
private readonly destroyRef;
|
|
493
|
+
private readonly cdr;
|
|
494
|
+
readonly dialogService: DynamicDialogConfig<any, any>;
|
|
495
|
+
private readonly dialogRef;
|
|
496
|
+
private readonly msgService;
|
|
497
|
+
private readonly _eventService;
|
|
498
|
+
private readonly translateService;
|
|
499
|
+
private readonly httpCommonService;
|
|
500
|
+
private totalEmails;
|
|
501
|
+
private SSHFileType;
|
|
502
|
+
private SSHFileName;
|
|
503
|
+
isSSHKey: boolean;
|
|
504
|
+
isPasswordVisible: boolean;
|
|
505
|
+
isVaulted: boolean;
|
|
506
|
+
private PasswordViewSuccessMsg;
|
|
507
|
+
private SSHPasswordViewSuccessMsg;
|
|
508
|
+
private SSHPasswordViewErrorMsg;
|
|
509
|
+
private sshKeyForDownload;
|
|
510
|
+
constructor();
|
|
511
|
+
ngAfterViewInit(): void;
|
|
512
|
+
ngOnInit(): void;
|
|
513
|
+
private getSelectedGridData;
|
|
514
|
+
private getTranslateContent;
|
|
515
|
+
getAccessServicePassword(): void;
|
|
516
|
+
/** Closes the dialog for a vaulted credential — no password is shown, just an acknowledgement. */
|
|
517
|
+
acknowledgeVaulted(): void;
|
|
518
|
+
getHideServicePassword(): void;
|
|
519
|
+
private getCurrentEmailsCount;
|
|
520
|
+
getGenerateFile(): void;
|
|
521
|
+
private generateSSHKeyFile;
|
|
522
|
+
private updateMailCount;
|
|
523
|
+
copyToClipboard(text: string): void;
|
|
524
|
+
togglePasswordVisibility(): void;
|
|
525
|
+
showPassword(): boolean;
|
|
526
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ViewpasswordPopupComponent, never>;
|
|
527
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ViewpasswordPopupComponent, "app-viewpassword-popup", never, {}, {}, never, never, true, never>;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Thin re-export wrapper for NgModule-based host apps.
|
|
532
|
+
*
|
|
533
|
+
* All components and pipes are now standalone. This module simply imports and
|
|
534
|
+
* re-exports the public API so that existing NgModule consumers can continue
|
|
535
|
+
* using `CommonHeaderLibModule` without changes.
|
|
536
|
+
*
|
|
537
|
+
* Translation initialization (app initializer, languages.json validation,
|
|
538
|
+
* fallback chain, language-file loading) is OWNED BY THE CONSUMING APP.
|
|
539
|
+
* TranslateModule is re-exported here so that consumers get access to the
|
|
540
|
+
* translate pipe. Do NOT use forChild({ isolate: true }) — library components
|
|
541
|
+
* share the host app's TranslateService singleton.
|
|
542
|
+
*/
|
|
543
|
+
declare class CommonHeaderLibModule {
|
|
544
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CommonHeaderLibModule, never>;
|
|
545
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<CommonHeaderLibModule, never, [typeof CommonHeaderLibComponent, typeof SliceToTwoPipe, typeof CustomDateFormatPipe, typeof DateDiffPipe, typeof ConfirmDialogComponent, typeof ViewpasswordPopupComponent, typeof i7.TranslateModule], [typeof CommonHeaderLibComponent, typeof SliceToTwoPipe, typeof DateDiffPipe, typeof CustomDateFormatPipe, typeof ConfirmDialogComponent, typeof ViewpasswordPopupComponent, typeof i7.TranslateModule]>;
|
|
546
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<CommonHeaderLibModule>;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
declare class StorageService {
|
|
550
|
+
saveData(key: string, value: string): void;
|
|
551
|
+
getData(key: string): string | null;
|
|
552
|
+
removeData(key: string): void;
|
|
553
|
+
clearData(): void;
|
|
554
|
+
checkData(key: string): boolean;
|
|
555
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StorageService, never>;
|
|
556
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<StorageService>;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
declare class ToastMsgService {
|
|
560
|
+
private toastType_sucess;
|
|
561
|
+
private toastType_info;
|
|
562
|
+
private toastType_error;
|
|
563
|
+
private toastType_warning;
|
|
564
|
+
private readonly toastr;
|
|
565
|
+
private readonly translateService;
|
|
566
|
+
success(textMessage: string, title?: string): void;
|
|
567
|
+
error(textMessage: string, title?: string): void;
|
|
568
|
+
info(textMessage: string, title?: string): void;
|
|
569
|
+
warning(textMessage: string, title?: string): void;
|
|
570
|
+
private updateActiveToastMessage;
|
|
571
|
+
private isToastMsgActive;
|
|
572
|
+
private getActiveToastMessagesByType;
|
|
573
|
+
private checkActiveToastMessagesByType;
|
|
574
|
+
clear(): void;
|
|
575
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToastMsgService, never>;
|
|
576
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ToastMsgService>;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
declare const httpErrorInterceptor: HttpInterceptorFn;
|
|
580
|
+
|
|
581
|
+
declare class SessionEndService {
|
|
582
|
+
private readonly http;
|
|
583
|
+
private ending;
|
|
584
|
+
/** localStorage key one tab writes its logout redirect URL to, so the other open tabs follow. */
|
|
585
|
+
static readonly LOGOUT_REDIRECT_KEY = "dTKavvAWsXVRfmRTUuZBbA==";
|
|
586
|
+
/** True once the storage listener is registered, so it is added only once. */
|
|
587
|
+
private watchingLogoutRedirect;
|
|
588
|
+
/**
|
|
589
|
+
* Fires in every OTHER tab of this origin when localStorage changes (the browser never fires it
|
|
590
|
+
* in the tab that made the change - that tab navigates itself in redirect()).
|
|
591
|
+
* When the logout redirect key gets a value, this tab leaves to that same URL.
|
|
592
|
+
*/
|
|
593
|
+
private readonly onStorageChange;
|
|
594
|
+
/**
|
|
595
|
+
* Starts watching localStorage for LOGOUT_REDIRECT_KEY, so a logout / session end in one tab
|
|
596
|
+
* redirects every other open tab too. Safe to call more than once.
|
|
597
|
+
* Started by the header component (CommonHeaderLibComponent).
|
|
598
|
+
*/
|
|
599
|
+
watchLogoutRedirect(): void;
|
|
600
|
+
/** The cookiesUpdation payload: delete ('d') all cookies ('-100'). Unchanged from before. */
|
|
601
|
+
private readonly deleteAllCookiesPayload;
|
|
602
|
+
/**
|
|
603
|
+
* The session has expired: delete the server-side cookies, clear the browser storage and send
|
|
604
|
+
* the user where their sign-in method allows (see readSessionEndAction).
|
|
605
|
+
*
|
|
606
|
+
* Called by the host application - its HTTP interceptor (302 / 401 / 419, missing token) and
|
|
607
|
+
* its 403 error page. Safe to call more than once; only the first call does anything.
|
|
608
|
+
*/
|
|
609
|
+
endSession(): void;
|
|
610
|
+
/**
|
|
611
|
+
* Sends the user where a cookiesUpdation / logout `result` says:
|
|
612
|
+
* the login page for loginMethod 1, the logout screen with `?mode=windowsAuth` /
|
|
613
|
+
* `?mode=defaultIdp` for 2 / 3. Without a valid loginMethod (always the case for the logout
|
|
614
|
+
* API's result) `identity`, then `ssoDefaultLogin` decide, else the login page - see
|
|
615
|
+
* readSessionEndAction.
|
|
616
|
+
*
|
|
617
|
+
* Used by endSession() and by the header's Logout button.
|
|
618
|
+
*/
|
|
619
|
+
redirect(result: any): void;
|
|
620
|
+
/**
|
|
621
|
+
* Leaves the page. A full page load (not router navigation) on purpose: the login and logout
|
|
622
|
+
* screens are served at the origin root, not inside the host application, so a router path
|
|
623
|
+
* like '/logout' would land on the host's page-not-found.
|
|
624
|
+
* Public only so tests can replace it - a real navigation would unload the test runner.
|
|
625
|
+
*/
|
|
626
|
+
navigate(url: string): void;
|
|
627
|
+
private origin;
|
|
628
|
+
/**
|
|
629
|
+
* The value as an absolute URL only if it is this origin's login or logout screen, else null.
|
|
630
|
+
* Anything on the origin can write localStorage, so the value is untrusted: no open redirect
|
|
631
|
+
* to another site, and no jumping to an arbitrary page of this one.
|
|
632
|
+
*/
|
|
633
|
+
private sameOriginUrl;
|
|
634
|
+
private clearStorage;
|
|
635
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SessionEndService, never>;
|
|
636
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SessionEndService>;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/** Where the user has to go once their session has ended. */
|
|
640
|
+
type SessionEndAction = 'login' | 'windowsAuth' | 'defaultIdp';
|
|
641
|
+
/**
|
|
642
|
+
* Reads where to send the user from a cookiesUpdation / logout `result`.
|
|
643
|
+
*
|
|
644
|
+
* Rules (all four matter):
|
|
645
|
+
* 1. `loginMethod` is read first - it is the more precise signal.
|
|
646
|
+
* 2. An unrecognised `loginMethod` (e.g. a 4th method this build does not know) falls through to
|
|
647
|
+
* the legacy booleans, NOT to the login page - the booleans are still a better answer.
|
|
648
|
+
* 3. The login page is the floor - what a tenant with no special sign-in method always had.
|
|
649
|
+
* 4. `0` is not a value and a numeric string is (see toEnumValue).
|
|
650
|
+
*/
|
|
651
|
+
declare function readSessionEndAction(result: any): SessionEndAction;
|
|
652
|
+
/**
|
|
653
|
+
* The login page of the host. `origin` is the page's own origin (never a URL from an API
|
|
654
|
+
* response - that would be an open redirect).
|
|
655
|
+
*/
|
|
656
|
+
declare function loginPageUrl(origin: string): string;
|
|
657
|
+
/**
|
|
658
|
+
* The logout screen for a mode that must not go to the login page. Built from the page's own
|
|
659
|
+
* origin and the route constant - never from a URL in the API response (open redirect).
|
|
660
|
+
*/
|
|
661
|
+
declare function logoutScreenUrl(origin: string, mode: Exclude<SessionEndAction, 'login'>): string;
|
|
662
|
+
|
|
663
|
+
export { COOKIECONSTANT, CommonHeaderLibComponent, CommonHeaderLibModule, ConfirmDialogComponent, CustomDateFormatPipe, DateDiffPipe, GlobalConstants, SessionEndService, SliceToTwoPipe, StorageService, ToastMsgService, ViewpasswordPopupComponent, httpErrorInterceptor, loginPageUrl, logoutScreenUrl, readSessionEndAction };
|
|
664
|
+
export type { SessionEndAction };
|