common-header-lib 0.0.20 → 0.20.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.
Files changed (98) hide show
  1. package/README.md +143 -24
  2. package/assets/i18n/ar.json +4 -1
  3. package/assets/i18n/de.json +4 -1
  4. package/assets/i18n/en.json +4 -1
  5. package/assets/i18n/es.json +4 -1
  6. package/assets/i18n/fr.json +4 -1
  7. package/assets/i18n/hi.json +4 -1
  8. package/assets/i18n/ja.json +4 -1
  9. package/assets/i18n/ko.json +4 -1
  10. package/fesm2022/common-header-lib.mjs +3380 -0
  11. package/fesm2022/common-header-lib.mjs.map +1 -0
  12. package/index.d.ts +459 -5
  13. package/package.json +20 -31
  14. package/src/assets/i18n/ar.json +4 -1
  15. package/src/assets/i18n/de.json +4 -1
  16. package/src/assets/i18n/en.json +4 -1
  17. package/src/assets/i18n/es.json +4 -1
  18. package/src/assets/i18n/fr.json +4 -1
  19. package/src/assets/i18n/hi.json +4 -1
  20. package/src/assets/i18n/ja.json +4 -1
  21. package/src/assets/i18n/ko.json +4 -1
  22. package/assets/scss/_sidebar.scss +0 -267
  23. package/assets/scss/styles.scss +0 -577
  24. package/esm2020/common-header-lib.mjs +0 -5
  25. package/esm2020/lib/Validators/noSpaceAllowed.mjs +0 -16
  26. package/esm2020/lib/common-header-lib.component.mjs +0 -629
  27. package/esm2020/lib/common-header-lib.module.mjs +0 -174
  28. package/esm2020/lib/common-header-lib.service.mjs +0 -200
  29. package/esm2020/lib/components/confirm-dialog/confirm-dialog.component.mjs +0 -49
  30. package/esm2020/lib/components/general-configuration/general-configuration.component.mjs +0 -399
  31. package/esm2020/lib/components/general-configuration/landingpg-config/landingpg-config.component.mjs +0 -124
  32. package/esm2020/lib/components/general-configuration/timezone-configuration/timezone-configuration.component.mjs +0 -137
  33. package/esm2020/lib/components/grid-pagination/grid-pagination.component.mjs +0 -38
  34. package/esm2020/lib/components/ng-translation/ng-translation.component.mjs +0 -82
  35. package/esm2020/lib/components/no-service-my-access-pg/no-service-my-access-pg.component.mjs +0 -19
  36. package/esm2020/lib/components/notification-sidebar/notification-sidebar.component.mjs +0 -40
  37. package/esm2020/lib/components/side-popup/side-popup.component.mjs +0 -34
  38. package/esm2020/lib/components/user-mailbox/user-mailbox.component.mjs +0 -168
  39. package/esm2020/lib/components/user-sidebar/user-sidebar.component.mjs +0 -254
  40. package/esm2020/lib/components/viewpassword-popup/viewpassword-popup.component.mjs +0 -197
  41. package/esm2020/lib/model/data_model.mjs +0 -229
  42. package/esm2020/lib/pipes/custome-dateformat.pipe.mjs +0 -27
  43. package/esm2020/lib/pipes/date-diff.pipe.mjs +0 -55
  44. package/esm2020/lib/pipes/slice-to-two.pipe.mjs +0 -34
  45. package/esm2020/lib/services/EncrypDecryp_RSA.service.mjs +0 -100
  46. package/esm2020/lib/services/async-passwordcheck.service.mjs +0 -70
  47. package/esm2020/lib/services/cookie-storage-manager.service.mjs +0 -78
  48. package/esm2020/lib/services/encrpdata.service.mjs +0 -55
  49. package/esm2020/lib/services/encrydecrydata.service.mjs +0 -205
  50. package/esm2020/lib/services/event.service.mjs +0 -132
  51. package/esm2020/lib/services/http/http-common.service.mjs +0 -245
  52. package/esm2020/lib/services/http/http-general-config.service.mjs +0 -84
  53. package/esm2020/lib/services/rest-login-form.service.mjs +0 -294
  54. package/esm2020/lib/services/rest-signalr.service.mjs +0 -104
  55. package/esm2020/lib/services/storage.service.mjs +0 -33
  56. package/esm2020/lib/services/toast-msg.service.mjs +0 -101
  57. package/esm2020/lib/services/vapt-validation.service.mjs +0 -31
  58. package/esm2020/public-api.mjs +0 -13
  59. package/fesm2015/common-header-lib.mjs +0 -4182
  60. package/fesm2015/common-header-lib.mjs.map +0 -1
  61. package/fesm2020/common-header-lib.mjs +0 -4162
  62. package/fesm2020/common-header-lib.mjs.map +0 -1
  63. package/lib/Validators/noSpaceAllowed.d.ts +0 -2
  64. package/lib/common-header-lib.component.d.ts +0 -149
  65. package/lib/common-header-lib.module.d.ts +0 -55
  66. package/lib/common-header-lib.service.d.ts +0 -25
  67. package/lib/components/confirm-dialog/confirm-dialog.component.d.ts +0 -13
  68. package/lib/components/general-configuration/general-configuration.component.d.ts +0 -86
  69. package/lib/components/general-configuration/landingpg-config/landingpg-config.component.d.ts +0 -37
  70. package/lib/components/general-configuration/timezone-configuration/timezone-configuration.component.d.ts +0 -38
  71. package/lib/components/grid-pagination/grid-pagination.component.d.ts +0 -20
  72. package/lib/components/ng-translation/ng-translation.component.d.ts +0 -21
  73. package/lib/components/no-service-my-access-pg/no-service-my-access-pg.component.d.ts +0 -8
  74. package/lib/components/notification-sidebar/notification-sidebar.component.d.ts +0 -16
  75. package/lib/components/side-popup/side-popup.component.d.ts +0 -14
  76. package/lib/components/user-mailbox/user-mailbox.component.d.ts +0 -40
  77. package/lib/components/user-sidebar/user-sidebar.component.d.ts +0 -60
  78. package/lib/components/viewpassword-popup/viewpassword-popup.component.d.ts +0 -47
  79. package/lib/model/data_model.d.ts +0 -185
  80. package/lib/pipes/custome-dateformat.pipe.d.ts +0 -8
  81. package/lib/pipes/date-diff.pipe.d.ts +0 -9
  82. package/lib/pipes/slice-to-two.pipe.d.ts +0 -7
  83. package/lib/services/EncrypDecryp_RSA.service.d.ts +0 -15
  84. package/lib/services/async-passwordcheck.service.d.ts +0 -18
  85. package/lib/services/cookie-storage-manager.service.d.ts +0 -16
  86. package/lib/services/encrpdata.service.d.ts +0 -12
  87. package/lib/services/encrydecrydata.service.d.ts +0 -33
  88. package/lib/services/event.service.d.ts +0 -30
  89. package/lib/services/http/http-common.service.d.ts +0 -40
  90. package/lib/services/http/http-general-config.service.d.ts +0 -15
  91. package/lib/services/rest-login-form.service.d.ts +0 -39
  92. package/lib/services/rest-signalr.service.d.ts +0 -23
  93. package/lib/services/storage.service.d.ts +0 -11
  94. package/lib/services/toast-msg.service.d.ts +0 -23
  95. package/lib/services/vapt-validation.service.d.ts +0 -7
  96. package/public-api.d.ts +0 -8
  97. package/src/assets/scss/_sidebar.scss +0 -267
  98. package/src/assets/scss/styles.scss +0 -577
@@ -0,0 +1,3380 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, output, inject, ChangeDetectionStrategy, Component, Pipe, Injectable, DestroyRef, ChangeDetectorRef, model, effect, viewChild, ViewEncapsulation, signal, untracked, NgModule } from '@angular/core';
3
+ import * as i3 from 'primeng/api';
4
+ import { ConfirmationService } from 'primeng/api';
5
+ import * as i1 from 'primeng/confirmdialog';
6
+ import { ConfirmDialogModule } from 'primeng/confirmdialog';
7
+ import * as i5 from '@ngx-translate/core';
8
+ import { TranslateService, TranslateModule } from '@ngx-translate/core';
9
+ import { CommonModule, DatePipe } from '@angular/common';
10
+ import * as i1$5 from '@angular/forms';
11
+ import { FormBuilder, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
12
+ import * as i2 from 'primeng/select';
13
+ import { SelectModule } from 'primeng/select';
14
+ import * as i1$1 from 'primeng/skeleton';
15
+ import { SkeletonModule } from 'primeng/skeleton';
16
+ import * as i5$1 from 'primeng/badge';
17
+ import { BadgeModule } from 'primeng/badge';
18
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
19
+ import { DynamicDialogConfig, DialogService } from 'primeng/dynamicdialog';
20
+ import { finalize as finalize$1, map as map$1, catchError as catchError$1, debounceTime, take, switchMap } from 'rxjs/operators';
21
+ import { HttpClient, HttpParams } from '@angular/common/http';
22
+ import { map, catchError, throwError, BehaviorSubject, Subject, finalize, of, forkJoin } from 'rxjs';
23
+ import { CookieService } from 'ngx-cookie-service';
24
+ import { ToastrService } from 'ngx-toastr';
25
+ import * as i4 from 'primeng/button';
26
+ import { ButtonModule } from 'primeng/button';
27
+ import * as i1$3 from 'primeng/table';
28
+ import { TableModule } from 'primeng/table';
29
+ import * as i1$2 from 'primeng/paginator';
30
+ import { PaginatorModule } from 'primeng/paginator';
31
+ import * as i1$4 from 'primeng/dialog';
32
+ import { DialogModule } from 'primeng/dialog';
33
+ import { Router } from '@angular/router';
34
+ import * as CryptoJS from 'crypto-js';
35
+ import JSEncrypt from 'jsencrypt';
36
+ import * as i2$1 from 'primeng/inputtext';
37
+ import { InputTextModule } from 'primeng/inputtext';
38
+ import * as i1$6 from 'primeng/popover';
39
+ import { PopoverModule } from 'primeng/popover';
40
+ import * as signalR from '@microsoft/signalr';
41
+
42
+ class ConfirmDialogComponent {
43
+ constructor() {
44
+ this.header = input('', ...(ngDevMode ? [{ debugName: "header" }] : []));
45
+ this.message = input('', ...(ngDevMode ? [{ debugName: "message" }] : []));
46
+ this.result = output();
47
+ this.confirmationService = inject(ConfirmationService);
48
+ }
49
+ openConfirmModal(event) {
50
+ this.confirmationService.confirm({
51
+ target: event.target ?? undefined,
52
+ message: this.message(),
53
+ header: this.header(),
54
+ closeOnEscape: true,
55
+ // PrimeNG button config
56
+ acceptLabel: 'Yes',
57
+ rejectLabel: 'No',
58
+ acceptButtonStyleClass: 'p-button-primary',
59
+ rejectButtonStyleClass: 'p-button-secondary p-button-outlined',
60
+ accept: () => {
61
+ this.result.emit(true);
62
+ },
63
+ reject: () => {
64
+ this.result.emit(false);
65
+ },
66
+ });
67
+ }
68
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
69
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: ConfirmDialogComponent, isStandalone: true, selector: "confirm-dialog", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { result: "result" }, providers: [ConfirmationService], ngImport: i0, template: "<div class=\"card flex justify-center gap-2 view-pass-details\">\r\n <p-confirmDialog icon=\"none\" acceptIcon=\"\" rejectIcon=\"\"></p-confirmDialog>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i1.ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "modal", "visible", "position", "draggable"], outputs: ["onHide"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
70
+ }
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
72
+ type: Component,
73
+ args: [{ selector: 'confirm-dialog', providers: [ConfirmationService], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ConfirmDialogModule], template: "<div class=\"card flex justify-center gap-2 view-pass-details\">\r\n <p-confirmDialog icon=\"none\" acceptIcon=\"\" rejectIcon=\"\"></p-confirmDialog>\r\n</div>\r\n" }]
74
+ }], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], result: [{ type: i0.Output, args: ["result"] }] } });
75
+
76
+ class GlobalConstants {
77
+ static { this.COOKIEDELETEVENT = 'd'; }
78
+ static { this.ALLCOOKIEDELET = '-100'; }
79
+ static { this.TimeForEncToken = 30; }
80
+ static { this.AgGridPaginationSize = 50; }
81
+ static { this.reconcileServiceLimit = 100; }
82
+ static { this.applicationName = 'Converged IAM'; }
83
+ static { this.publicKey = ''; }
84
+ static { this.PAMPluginURL = 'http://localhost:55755/'; }
85
+ static { this.APPName = 'workspace'; }
86
+ static { this.cipluginversion = ''; }
87
+ static { this.localInstalledCIPluginVersion = ''; } // to store installed CI plugin version
88
+ static { this.PCI_DSS_Standard = false; }
89
+ static { this.TOKENTIME = 30; }
90
+ static { this.LOGOUTIMER = 60; }
91
+ static { this.PAGEROW = 10; }
92
+ static { this.CONFIGCONNECTORS = false; }
93
+ static { this.USERLANGUAGES = [
94
+ { langKey: 'en', langName: 'English' },
95
+ { langKey: 'hi', langName: 'हिन्दी' },
96
+ { langKey: 'mr', langName: 'मराठी' },
97
+ { langKey: 'ar', langName: 'العربية' },
98
+ { langKey: 'fr', langName: 'Français' },
99
+ { langKey: 'es', langName: 'Español' },
100
+ { langKey: 'de', langName: 'Deutsch' },
101
+ { langKey: 'ja', langName: '日本語' },
102
+ { langKey: 'ko', langName: '한국어' },
103
+ { langKey: 'zh', langName: '中文' },
104
+ { langKey: 'ru', langName: 'Русский' },
105
+ { langKey: 'pt', langName: 'Português' },
106
+ { langKey: 'it', langName: 'Italiano' },
107
+ { langKey: 'nl', langName: 'Nederlands' },
108
+ { langKey: 'tr', langName: 'Türkçe' },
109
+ { langKey: 'sv', langName: 'Svenska' },
110
+ { langKey: 'pl', langName: 'Polski' },
111
+ { langKey: 'th', langName: 'ไทย' },
112
+ { langKey: 'vi', langName: 'Tiếng Việt' },
113
+ ]; }
114
+ static { this.USERFILTEREDLANGUAGES = []; }
115
+ static { this.DEFAULTLANG = { langKey: 'en', langName: 'English' }; }
116
+ static { this.DEFAULTLANGKEY = 'en'; }
117
+ static { this.DEFAULT_IMGPATH = 'assets/images/'; }
118
+ static { this.DEFAULT_BGIMG = `${GlobalConstants.DEFAULT_IMGPATH}login-bg/default_bg.svg`; }
119
+ static { this.DEFAULT_LOGO = `${GlobalConstants.DEFAULT_IMGPATH}default_logo.svg`; }
120
+ static { this.IMG_CODE = 'data:image/png;base64,'; }
121
+ static { this.DYNAMIC_LOGO = ''; }
122
+ static { this.DYNAMIC_BGIMG = ''; }
123
+ static { this.APP_VERSION = ''; }
124
+ }
125
+ class LoggedInUserInfo {
126
+ static { this.domainName = null; }
127
+ static { this.domainId = 0; }
128
+ static setPrivateKeyFromBigInts(arr) {
129
+ this.privateKey = arr.map((b) => b.toString()).join(',');
130
+ }
131
+ }
132
+ class RoutePaths {
133
+ static { this.LOGINPG_PATH = 'login'; }
134
+ static { this.WINDOW_AUTH = 'domainauth'; }
135
+ static { this.OTHER_METHODS_PATH = 'othermethods'; }
136
+ static { this.MY_ACCESS_PATH = 'my-access'; }
137
+ static { this.FORGOT_PASSWORD_PATH = 'forgotpassword'; }
138
+ static { this.AUTH_STATUS_PATH = 'auth-status'; }
139
+ static { this.LOGOUT_PATH = 'logout'; }
140
+ static { this.PAGE_NOT_FOUND_PATH = 'page-not-found'; }
141
+ static { this.INTERNAL_SERVER_ERROR_PATH = 'internal-server-error'; }
142
+ static { this.ERROR_PATH = 'error'; }
143
+ static { this.AUTH_LOADING = 'session-verify'; }
144
+ }
145
+ class errorMsg {
146
+ static { this.NOASSET = `No assets have been assigned to the user in the selected LOB. Please select a different LOB.`; }
147
+ static { this.NORECENTASSET = `No recently accessed Asset found.`; }
148
+ static { this.NOSEARCHRESULT = `We couldn't find any service matching your search within the chosen LOB. Try refining your keywords or choosing a different LOB for better results'`; }
149
+ static { this.NOMAILFOUND = `We couldn't find any mails assigned to you`; }
150
+ static { this.SERVERDOWN = `Something Went Wrong, Please Try Again later`; }
151
+ static { this.NOCIPLUGIN = `Install the CI Plugin or Contact Administrator`; }
152
+ static { this.CIPLUGINVERSIONISSUE = `Kindly Install latest version of CI Plugin`; }
153
+ static { this.ADMINMSG = `Kindly Contact Administrator`; }
154
+ static { this.PLUGINMSG = `Kindly check below link for downloadables.`; }
155
+ static { this.PAMPLUGINBTN = `Install the CI Plugin or Contact Administrator`; }
156
+ static { this.USERNOTFOUND = `Invalid User Details`; }
157
+ static { this.TIMEZONESUCCESS = `Time Zone Updated SuccessFully`; }
158
+ static { this.TIMEZONERROR = `Time Zone Updated Couldn't Update`; }
159
+ static { this.LOGOUTERROR = 'Logout Attempt Failed'; }
160
+ static { this.ASSETSTATUS = 'Asset Under Maintenance'; }
161
+ static { this.REFERENCEPOPUPTITLE = 'Reference Case ID for Accessing Asset'; }
162
+ static { this.DICREDENTIALINFO = 'Digital Identity Credentials Updated Successfully'; }
163
+ static { this.DICREDENTIALERROR = "Digital Identity Credentials Couldn't updated"; }
164
+ static { this.PATHSUCCESS = 'Preference Path Updated SuccessFully'; }
165
+ static { this.PATHERROR = "Preference Path Couldn't Update"; }
166
+ static { this.USERCREDENIALERROR = 'Configure Credentials'; }
167
+ static { this.CREDENIALERROR = 'Kindly Configure Credentials'; }
168
+ static { this.ADMINCREDENIALERROR = 'The credentials have yet to be configured by the Admin'; }
169
+ static { this.COMMONError = 'Something Went Wrong !'; }
170
+ static { this.NODIGITALIDENTITES = 'There are no digital identities assigned. Kindly contact administrator.'; }
171
+ static { this.SEARCHTEXT = 'Search Results'; }
172
+ static { this.MFACONFIGUREERROR = 'MFA is not configured for the user, Please contact the system administrator'; }
173
+ static { this.SESSIONIDERROR = 'Session Service ID not found'; }
174
+ static { this.CHROMEEXTENSIONERROR = 'Kindly Install the CI Extension or Contact Administrator'; }
175
+ static { this.WINDOW_DOMAIN_LOGINERR = 'Please wait, Domain Authentication is in progress for your login'; }
176
+ static { this.LANDINGPGSUCCESS = `Landing Page Configured SuccessFully`; }
177
+ static { this.LANDINGPGERROR = `Landing Page Configuration Couldn't Update`; }
178
+ static { this.SCRIPTERROR = `Unexpected Script Detected`; }
179
+ }
180
+ class COOKIECONSTANT {
181
+ static { this.LOBNAME = 'lobdata'; }
182
+ static { this.DOMAINAME = 'domainname'; }
183
+ static { this.DOMAINID = 'domainid'; }
184
+ static { this.USERDETAILS = 'UserDetail'; }
185
+ static { this.SESSIONID = 'userSessionId'; }
186
+ static { this.USERNAME = 'username'; }
187
+ static { this.USERID = 'userId'; }
188
+ static { this._AT = '_AT'; }
189
+ static { this._RT = '_RT'; }
190
+ static { this.USERDISPLAYNAME = 'userDisplayName'; }
191
+ static { this.ENCRYPTEDKEY = 'EncryptedKey'; }
192
+ static { this.MFASTATUS = 'MFAStatus'; }
193
+ static { this.EVENTNAME = 'Event'; }
194
+ static { this.MACHINEDETAILS = 'machinedetails'; }
195
+ static { this.COOKIEDELETEVENT = 'd'; }
196
+ static { this.COOKIECREATEEVENT = 'c'; }
197
+ static { this.COOKIEUPDATEEVENT = 'c'; }
198
+ static { this.ALLCOOKIEDELET = '-100'; }
199
+ static { this.NEWUSER = '003-NU-GEC'; }
200
+ static { this.UNLOCKACC = 'Unlock'; }
201
+ static { this.ERRORCODE = '001-SAC-GEC'; }
202
+ static { this.PUBLICCODE = '001-PUB-GEC'; }
203
+ static { this.USERLANG = 'lang'; }
204
+ static { this.MFATIMEOUT = 180000; } //3 mins
205
+ static { this.MFASTATUSCHECK = '_ssmf'; }
206
+ static { this.MFASTATUSCHECKFAIL = '_ssmff'; }
207
+ static { this.MFACLI = '_SSIDMFACLI'; }
208
+ static { this.WINDOWAUTH_HEADER = 'Authentication-Window'; }
209
+ static { this.SIGNALR_INDEX = '002-SR-NO'; }
210
+ static { this.ONETIME_TOKEN = 'state'; }
211
+ static { this.THICKCLIENT_KEY = 'APP_VER'; }
212
+ }
213
+ const EXCLUDED_URLS = [
214
+ 'http://localhost:55755/',
215
+ 'workflow/api/Workflow/Workflow/GetWorkFlowTicketCount',
216
+ 'workflow/api/Workflow/Workflow/GetWorkFlowTicketCountEventWise',
217
+ 'xaccess/api/SecureAccess/GetBackgroundImage',
218
+ 'xaccess/api/SecureAccess/UpdateLogoutTimer',
219
+ ];
220
+ class MFAEvent {
221
+ static { this.ForgotPwd = 1; }
222
+ static { this.unlockAcc = 2; }
223
+ static { this.Login = 3; }
224
+ }
225
+ class BrowserName {
226
+ static { this.Chrome = 'Chrome'; }
227
+ static { this.Firefox = 'Firefox'; }
228
+ static { this.Edge = 'Edge'; }
229
+ static { this.Safari = 'Safari'; }
230
+ static { this.Opera = 'Opera'; }
231
+ static { this.InterNetExp = 'Internet Explorer'; }
232
+ }
233
+ class PAMParameter {
234
+ constructor() {
235
+ this.ipAddress = '';
236
+ this.macAddress = '';
237
+ this.processorID = '';
238
+ this.bIOSSerialID = '';
239
+ this.domainName = '';
240
+ this.hostname = '';
241
+ this.pAMPluginInstalledVersion = '';
242
+ }
243
+ }
244
+
245
+ class SliceToTwoPipe {
246
+ transform(textName) {
247
+ if (textName === null || textName === '') {
248
+ return 'NA';
249
+ }
250
+ textName = textName?.trim();
251
+ let result = '';
252
+ if (textName && textName.includes(' ')) {
253
+ let splitStringArr = textName.split(' ');
254
+ result =
255
+ splitStringArr[0][0] + splitStringArr[splitStringArr.length - 1][0];
256
+ }
257
+ else if (textName && textName.includes('_')) {
258
+ let splitStringArr = textName.split('_');
259
+ result =
260
+ splitStringArr[0][0] + splitStringArr[splitStringArr.length - 1][0];
261
+ }
262
+ else {
263
+ result = textName[0] + textName[1];
264
+ }
265
+ return result.toLocaleUpperCase();
266
+ }
267
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SliceToTwoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
268
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: SliceToTwoPipe, isStandalone: true, name: "sliceToTwo" }); }
269
+ }
270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SliceToTwoPipe, decorators: [{
271
+ type: Pipe,
272
+ args: [{
273
+ name: 'sliceToTwo',
274
+ standalone: true,
275
+ }]
276
+ }] });
277
+
278
+ class HttpCommonService {
279
+ constructor() {
280
+ this.xAccessAPIUrl = '/xaccess/api/SecureAccess/';
281
+ this.metaAPIUrl = '/meta/api/metadata/';
282
+ this.metaAPIUrl1 = '/meta/api/Metadata/';
283
+ this.xServiceAPIUrl = '/xservice/api/CIInfraAsset/';
284
+ this.workflowAPIUrl = '/workflow/api/Workflow/Workflow/';
285
+ this.http = inject(HttpClient);
286
+ }
287
+ getLogo() {
288
+ return this.http
289
+ .get(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}BackgroundLogo`)
290
+ .pipe(map((response) => {
291
+ return response['result'];
292
+ }));
293
+ }
294
+ getGlobalTimeZone() {
295
+ return this.http
296
+ .get(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}GetSystemTimeZones`)
297
+ .pipe(map((response) => {
298
+ if (response && response['success']) {
299
+ return response['result'];
300
+ }
301
+ else {
302
+ return [];
303
+ }
304
+ }));
305
+ }
306
+ updateUserTimeZone(tz) {
307
+ const params = new HttpParams().set('timezone', tz);
308
+ return this.http
309
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}UpdateTimeZone`, {}, { params: params })
310
+ .pipe(map((response) => {
311
+ if (response && response['success']) {
312
+ return response['result'];
313
+ }
314
+ else {
315
+ return '';
316
+ }
317
+ }));
318
+ }
319
+ getLOBList() {
320
+ return this.http
321
+ .get(`${GlobalConstants.baseURL}${this.metaAPIUrl}Lobs`)
322
+ .pipe(map((response) => {
323
+ return response;
324
+ }));
325
+ }
326
+ getUnreadUserEmailsCount() {
327
+ return this.http
328
+ .get(`${GlobalConstants.baseURL}${this.xServiceAPIUrl}MailBoxCount`)
329
+ .pipe(map((response) => {
330
+ if (response && response['success'] && response['result'] > 0) {
331
+ return response['result'];
332
+ }
333
+ else {
334
+ return 0;
335
+ }
336
+ }));
337
+ }
338
+ getUserAssignedMails(userDetails) {
339
+ return this.http
340
+ .post(`${GlobalConstants.baseURL}${this.xServiceAPIUrl}MailBox`, userDetails)
341
+ .pipe(map((response) => {
342
+ if (response && response['success']) {
343
+ return response['result'];
344
+ }
345
+ else {
346
+ return [];
347
+ }
348
+ }));
349
+ }
350
+ /*Method : GET
351
+ Action : Get Application Password */
352
+ getAccessToViewServicePassword(mailDetails) {
353
+ return this.http
354
+ .post(`${GlobalConstants.baseURL}${this.xServiceAPIUrl}OpenServicePwd`, mailDetails)
355
+ .pipe(map((response) => {
356
+ if (response && response['success']) {
357
+ response['result'][1] = response['message'];
358
+ return response['result'];
359
+ }
360
+ else {
361
+ return [];
362
+ }
363
+ }), catchError((e) => throwError(() => e)));
364
+ }
365
+ getUserAssignedApps() {
366
+ return this.http
367
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}GetUserPriviledgesList`, {})
368
+ .pipe(map((response) => {
369
+ if (response && response['success']) {
370
+ return response['result'].filter((x) => x.appCode != null);
371
+ }
372
+ else {
373
+ return [];
374
+ }
375
+ }));
376
+ }
377
+ getLoggedInUserDetails() {
378
+ return this.http
379
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}GetUsersDetailsById`, {})
380
+ .pipe(map((response) => {
381
+ return response;
382
+ }));
383
+ }
384
+ //Method: Used to Total Notification count of user
385
+ //Action: It used get all notification count
386
+ getWorkFlowTicketCount(userDetails) {
387
+ return this.http
388
+ .post(`${GlobalConstants.baseURL}${this.workflowAPIUrl}GetWorkFlowTicketCount`, userDetails)
389
+ .pipe(map((response) => {
390
+ if (response && response[0]['Success']) {
391
+ if (response[0]['Data'][0]) {
392
+ return response[0]['Data'][0];
393
+ }
394
+ else {
395
+ return {};
396
+ }
397
+ }
398
+ else {
399
+ return {};
400
+ }
401
+ }), catchError((e) => throwError(() => e)));
402
+ }
403
+ getWorkFlowTicketEventwiseCount(userDetails) {
404
+ return this.http
405
+ .post(`${GlobalConstants.baseURL}${this.workflowAPIUrl}GetWorkFlowTicketCountEventWise`, userDetails)
406
+ .pipe(map((response) => {
407
+ if (response && response[0]['Success']) {
408
+ return response[0]['Data'];
409
+ }
410
+ else {
411
+ return [];
412
+ }
413
+ }));
414
+ }
415
+ setLandingPgPreference(moduleId) {
416
+ return this.http
417
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}SetLandingPage`, {
418
+ moduleId: moduleId,
419
+ })
420
+ .pipe(map((response) => {
421
+ if (response && response['success']) {
422
+ return response['result'];
423
+ }
424
+ else {
425
+ return '';
426
+ }
427
+ }));
428
+ }
429
+ /*Method : POST
430
+ Action :Will validate User entered PWD as
431
+ per Password Policy Set
432
+ */
433
+ validatePassword(userDetails) {
434
+ return this.http
435
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}ValidatePassword`, userDetails)
436
+ .pipe(catchError((e) => throwError(() => e)));
437
+ }
438
+ /*Method : POST
439
+ Action : RESET Password for First Time User
440
+ */
441
+ setNewpassword(loggedInUserDetails) {
442
+ return this.http
443
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}ChangeUserArcXwdManually`, loggedInUserDetails)
444
+ .pipe(catchError((e) => throwError(() => e)));
445
+ }
446
+ /*Method : GET
447
+ Action : Get hiding the password for a service. */
448
+ getProtectedServiceCredentials(mailDetails) {
449
+ return this.http
450
+ .post(`${GlobalConstants.baseURL}${this.xServiceAPIUrl}GetServicePasswordClose`, mailDetails)
451
+ .pipe(map((response) => {
452
+ if (response && response['success']) {
453
+ return response['result'];
454
+ }
455
+ else {
456
+ return false;
457
+ }
458
+ }), catchError((e) => throwError(() => e)));
459
+ }
460
+ /*Method : POST
461
+ Parameter : subID , id
462
+ Action : Get configuration ID based on to show hide DOMAIN dropdown
463
+ */
464
+ getglobalConfigDetails(subid, id) {
465
+ return this.http
466
+ .post(`${GlobalConstants.baseURL}${this.metaAPIUrl1}GetArcosConfigsValues?subId=${subid}`, id)
467
+ .pipe(map((response) => {
468
+ if (response['statusCode'] === 200) {
469
+ let result = response['result'];
470
+ return result;
471
+ }
472
+ }), catchError((e) => throwError(() => e)));
473
+ }
474
+ getInitiateUserLogout() {
475
+ return this.http
476
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}logout`, {})
477
+ .pipe(map((response) => {
478
+ if (response && response['success']) {
479
+ return response['result'];
480
+ }
481
+ else {
482
+ return {};
483
+ }
484
+ }), catchError((e) => throwError(() => e)));
485
+ }
486
+ //Method: Open the OAuth connection window for the given application
487
+ openAppConnection(appCode) {
488
+ const url = GlobalConstants.baseURL + '/xauth/api/Token/AppOAuth?appcode=' + appCode;
489
+ globalThis.open(url, '_blank');
490
+ }
491
+ //Method: Validate MFA / SAML configuration before establishing the APP032 connection
492
+ checkMFAConfiguration() {
493
+ return this.http
494
+ .get(`${GlobalConstants.baseURL}/xaccess/api/Token/getMfaSamlConfig`)
495
+ .pipe(catchError((e) => throwError(() => e)));
496
+ }
497
+ //Method: Validate internal SAML app configuration before establishing the connection (e.g. APP033)
498
+ getInternalAppConfig(appCode) {
499
+ return this.http
500
+ .get(`${GlobalConstants.baseURL}/xaccess/api/Token/getInternalAppConfig?appCode=${appCode}`)
501
+ .pipe(catchError((e) => throwError(() => e)));
502
+ }
503
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HttpCommonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
504
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HttpCommonService, providedIn: 'root' }); }
505
+ }
506
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HttpCommonService, decorators: [{
507
+ type: Injectable,
508
+ args: [{
509
+ providedIn: 'root',
510
+ }]
511
+ }] });
512
+
513
+ class EventService {
514
+ constructor() {
515
+ this.getUserLOB = new BehaviorSubject({});
516
+ this.getAssetType = new BehaviorSubject({});
517
+ this.refreshSidebar = new BehaviorSubject({});
518
+ this.filterRecords = new Subject();
519
+ this.AuthMethods = new BehaviorSubject([]);
520
+ this.refreshEmails = new BehaviorSubject({});
521
+ this.timeZone = new BehaviorSubject({});
522
+ this._cookie = inject(CookieService);
523
+ }
524
+ emitLOBEvent(data) {
525
+ this.getUserLOB.next(data);
526
+ }
527
+ listenerLOBEvent() {
528
+ return this.getUserLOB.asObservable();
529
+ }
530
+ emitAssetTypeEvent(data) {
531
+ this.getAssetType.next(data);
532
+ }
533
+ listenerAssetTypeEvent() {
534
+ return this.getAssetType.asObservable();
535
+ }
536
+ emitrefreshSidebar(data) {
537
+ this.refreshSidebar.next(data);
538
+ }
539
+ listenerrefreshSidebar() {
540
+ return this.refreshSidebar.asObservable();
541
+ }
542
+ emitFilterRecords(data) {
543
+ this.filterRecords.next(data);
544
+ }
545
+ listenerFilterEvent() {
546
+ return this.filterRecords.asObservable();
547
+ }
548
+ emitAuthMethod(data) {
549
+ this.AuthMethods.next(data);
550
+ }
551
+ listenerAuthMethod() {
552
+ return this.AuthMethods.asObservable();
553
+ }
554
+ emitUserEmail(data) {
555
+ this.refreshEmails.next(data);
556
+ }
557
+ listenerUserEmail() {
558
+ return this.refreshEmails.asObservable();
559
+ }
560
+ emitTimezone(data) {
561
+ this.timeZone.next(data);
562
+ }
563
+ listenerTimezone() {
564
+ return this.timeZone.asObservable();
565
+ }
566
+ checkMFA(mfaUrl) {
567
+ return new Promise((resolve, reject) => {
568
+ const params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,
569
+ width=600,height=500,left=350,top=150`;
570
+ const mfaWindow = globalThis.open(mfaUrl, 'CI Authentication', params);
571
+ if (!mfaWindow) {
572
+ reject(new Error('Failed to open MFA window. Popup blocked?'));
573
+ return;
574
+ }
575
+ // Polling interval to check cookie every second
576
+ const interval = setInterval(() => {
577
+ if (this._cookie.get(COOKIECONSTANT.MFASTATUSCHECK)) {
578
+ clearInterval(interval);
579
+ mfaWindow.close();
580
+ resolve(true);
581
+ }
582
+ else if (this._cookie.get(COOKIECONSTANT.MFASTATUSCHECKFAIL)) {
583
+ clearInterval(interval);
584
+ mfaWindow.close();
585
+ reject(false);
586
+ }
587
+ }, 1000);
588
+ // Detect manual close of popup window
589
+ const checkPopupClosed = setInterval(() => {
590
+ if (mfaWindow.closed) {
591
+ clearInterval(interval);
592
+ clearInterval(checkPopupClosed);
593
+ reject(false);
594
+ }
595
+ }, 500);
596
+ });
597
+ }
598
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
599
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EventService, providedIn: 'root' }); }
600
+ }
601
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EventService, decorators: [{
602
+ type: Injectable,
603
+ args: [{
604
+ providedIn: 'root',
605
+ }]
606
+ }] });
607
+
608
+ class ToastMsgService {
609
+ constructor() {
610
+ this.toastType_sucess = 'toast-success';
611
+ this.toastType_info = 'toast-info';
612
+ this.toastType_error = 'toast-error';
613
+ this.toastType_warning = 'toast-warn';
614
+ this.toastr = inject(ToastrService);
615
+ this.translateService = inject(TranslateService);
616
+ }
617
+ success(textMessage, title) {
618
+ const heading = title || this.translateService.instant('Generic_lib.Successful');
619
+ if (this.isToastMsgActive()) {
620
+ if (this.checkActiveToastMessagesByType(this.toastType_sucess)) {
621
+ this.updateActiveToastMessage(heading, textMessage, this.toastType_sucess);
622
+ }
623
+ else {
624
+ this.toastr.success(textMessage, heading);
625
+ }
626
+ }
627
+ else {
628
+ this.toastr.success(textMessage, heading);
629
+ }
630
+ }
631
+ error(textMessage, title) {
632
+ const heading = title || this.translateService.instant('Generic_lib.Error');
633
+ if (this.isToastMsgActive()) {
634
+ if (this.checkActiveToastMessagesByType(this.toastType_error)) {
635
+ this.updateActiveToastMessage(heading, textMessage, this.toastType_error);
636
+ }
637
+ else {
638
+ this.toastr.error(textMessage, heading);
639
+ }
640
+ }
641
+ else {
642
+ this.toastr.error(textMessage, heading);
643
+ }
644
+ }
645
+ info(textMessage, title) {
646
+ const heading = title || this.translateService.instant('Generic_lib.Information');
647
+ if (this.isToastMsgActive()) {
648
+ if (this.checkActiveToastMessagesByType(this.toastType_info)) {
649
+ this.updateActiveToastMessage(heading, textMessage, this.toastType_info);
650
+ }
651
+ else {
652
+ this.toastr.info(textMessage, heading);
653
+ }
654
+ }
655
+ else {
656
+ this.toastr.info(textMessage, heading);
657
+ }
658
+ }
659
+ warning(textMessage, title) {
660
+ const heading = title || this.translateService.instant('Generic_lib.Warning');
661
+ if (this.isToastMsgActive()) {
662
+ if (this.checkActiveToastMessagesByType(this.toastType_warning)) {
663
+ this.updateActiveToastMessage(heading, textMessage, this.toastType_warning);
664
+ }
665
+ else {
666
+ this.toastr.warning(textMessage, heading);
667
+ }
668
+ }
669
+ else {
670
+ this.toastr.warning(textMessage, heading);
671
+ }
672
+ }
673
+ updateActiveToastMessage(title, textMessage, ToastType) {
674
+ const activeToasts = this.getActiveToastMessagesByType(ToastType);
675
+ if (activeToasts.length > 0) {
676
+ const toastObj = activeToasts[0];
677
+ toastObj.toastRef.componentInstance.title = title;
678
+ toastObj.toastRef.componentInstance.message = textMessage;
679
+ }
680
+ }
681
+ isToastMsgActive() {
682
+ return !!this.toastr.currentlyActive;
683
+ }
684
+ getActiveToastMessagesByType(type) {
685
+ return this.toastr.toasts.filter((toastItem) => toastItem.toastRef.componentInstance.toastPackage.toastType.includes(type));
686
+ }
687
+ checkActiveToastMessagesByType(type) {
688
+ return this.toastr.toasts.some((toastItem) => toastItem.toastRef.componentInstance.toastPackage.toastType == type);
689
+ }
690
+ clear() {
691
+ this.toastr.clear();
692
+ }
693
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ToastMsgService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
694
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ToastMsgService, providedIn: 'root' }); }
695
+ }
696
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ToastMsgService, decorators: [{
697
+ type: Injectable,
698
+ args: [{
699
+ providedIn: 'root',
700
+ }]
701
+ }] });
702
+
703
+ class DateDiffPipe {
704
+ transform(date) {
705
+ if (date != null) {
706
+ const localDate = this.convertUTCToLocal(date);
707
+ let date2 = new Date(localDate);
708
+ let date1 = new Date();
709
+ if (date2 > date1) {
710
+ // Calculate the absolute difference in milliseconds between the two dates
711
+ const diffTime = Math.abs(date2.getTime() - date1.getTime());
712
+ // Calculate the number of days
713
+ const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
714
+ // Calculate the remaining time after removing the days
715
+ const remainingTime = diffTime % (1000 * 60 * 60 * 24);
716
+ // Calculate the number of hours
717
+ const diffHours = Math.floor(remainingTime / (1000 * 60 * 60));
718
+ // Calculate the remaining time after removing the hours
719
+ const remainingMinutes = remainingTime % (1000 * 60 * 60);
720
+ // Calculate the number of minutes
721
+ const diffMinutes = Math.floor(remainingMinutes / (1000 * 60));
722
+ let result = '';
723
+ if (diffDays > 0) {
724
+ result += `${diffDays} days `;
725
+ }
726
+ if (diffHours > 0) {
727
+ result += `${diffHours} hours `;
728
+ }
729
+ if (diffMinutes > 0) {
730
+ result += `${diffMinutes} minutes`;
731
+ }
732
+ return result.trim();
733
+ }
734
+ else {
735
+ return '00:00:00';
736
+ }
737
+ }
738
+ return '';
739
+ }
740
+ convertUTCToLocal(newdate) {
741
+ let localDate = newdate + 'Z';
742
+ localDate = localDate.toLocaleString();
743
+ return localDate;
744
+ }
745
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DateDiffPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
746
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: DateDiffPipe, isStandalone: true, name: "dateDiff" }); }
747
+ }
748
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DateDiffPipe, decorators: [{
749
+ type: Pipe,
750
+ args: [{
751
+ name: 'dateDiff',
752
+ standalone: true,
753
+ }]
754
+ }] });
755
+
756
+ class ViewpasswordPopupComponent {
757
+ constructor() {
758
+ this.servicePassword = 'Password';
759
+ this.showVaultBtn = false;
760
+ this.isContentLoaded = false;
761
+ this.isValueUpdated = false;
762
+ this.OpenTillDate = '';
763
+ this.destroyRef = inject(DestroyRef);
764
+ this.cdr = inject(ChangeDetectorRef);
765
+ this.dialogService = inject(DynamicDialogConfig);
766
+ this.msgService = inject(ToastMsgService);
767
+ this._eventService = inject(EventService);
768
+ this.translateService = inject(TranslateService);
769
+ this.httpCommonService = inject(HttpCommonService);
770
+ this.totalEmails = '';
771
+ this.SSHFileType = '';
772
+ this.SSHFileName = '';
773
+ this.isSSHKey = false;
774
+ this.isPasswordVisible = true;
775
+ this.PasswordViewSuccessMsg = '';
776
+ this.SSHPasswordViewSuccessMsg = '';
777
+ this.SSHPasswordViewErrorMsg = '';
778
+ this.sshKeyForDownload = '';
779
+ this.getSelectedGridData(this.dialogService.data); //Getting Data from popup
780
+ }
781
+ ngAfterViewInit() {
782
+ this.getTranslateContent();
783
+ }
784
+ ngOnInit() {
785
+ this.getAccessServicePassword();
786
+ }
787
+ getSelectedGridData(gridData) {
788
+ if (gridData && gridData['payload']) {
789
+ this.mailDetails = gridData['payload'];
790
+ this.SSHFileType = gridData['SSHfileType'];
791
+ this.showVaultBtn = gridData['btnStatus'];
792
+ this.OpenTillDate = this.mailDetails['spv_Opentildate'];
793
+ this.isSSHKey = this.mailDetails['sshkey_isenabled'];
794
+ }
795
+ }
796
+ //Method: Convert text one Lang. to another
797
+ getTranslateContent() {
798
+ this.translateService
799
+ .get([
800
+ 'Generic_lib.PasswordViewSuccessMsg',
801
+ 'Generic_lib.SSHPasswordViewSuccessMsg',
802
+ 'Generic_lib.SSHPasswordViewErrorMsg',
803
+ ])
804
+ .pipe(takeUntilDestroyed(this.destroyRef))
805
+ .subscribe((trans) => {
806
+ this.PasswordViewSuccessMsg =
807
+ trans['Generic_lib.PasswordViewSuccessMsg'];
808
+ this.SSHPasswordViewSuccessMsg =
809
+ trans['Generic_lib.SSHPasswordViewSuccessMsg'];
810
+ this.SSHPasswordViewErrorMsg =
811
+ trans['Generic_lib.SSHPasswordViewErrorMsg'];
812
+ });
813
+ }
814
+ //Method: Grants access to the View password for a service
815
+ getAccessServicePassword() {
816
+ this.isContentLoaded = false;
817
+ let mailDetails = {
818
+ mailid: String(this.mailDetails['smi_SpvId']),
819
+ };
820
+ this.httpCommonService
821
+ .getAccessToViewServicePassword(mailDetails)
822
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => {
823
+ this.isContentLoaded = true;
824
+ this.cdr.markForCheck();
825
+ }))
826
+ .subscribe((result) => {
827
+ this.servicePassword = result?.sshKeyPassPhrase;
828
+ this.SSHFileName = result?.sshFileName;
829
+ this.sshKeyForDownload = result?.sshKey;
830
+ this.getCurrentEmailsCount();
831
+ this.cdr.markForCheck();
832
+ });
833
+ }
834
+ //Method: Hide password of a service
835
+ getHideServicePassword() {
836
+ this.isValueUpdated = true;
837
+ let mailDetails = {
838
+ spvId: String(this.mailDetails['smi_SpvId']),
839
+ };
840
+ this.httpCommonService
841
+ .getProtectedServiceCredentials(mailDetails)
842
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => {
843
+ this.isValueUpdated = false;
844
+ this.cdr.markForCheck();
845
+ }))
846
+ .subscribe((result) => {
847
+ if (result) {
848
+ this._eventService.emitUserEmail({
849
+ component: 'view-pwd',
850
+ refreshGrid: true,
851
+ });
852
+ }
853
+ });
854
+ }
855
+ /*Method : GET
856
+ Action : Fetch User Mails Count */
857
+ getCurrentEmailsCount() {
858
+ this.httpCommonService
859
+ .getUnreadUserEmailsCount()
860
+ .pipe(takeUntilDestroyed(this.destroyRef))
861
+ .subscribe((count) => {
862
+ if (count <= 0) {
863
+ this.totalEmails = '';
864
+ }
865
+ else if (count > 99) {
866
+ this.totalEmails = '99+';
867
+ }
868
+ else {
869
+ this.totalEmails = String(count);
870
+ }
871
+ this.updateMailCount();
872
+ });
873
+ }
874
+ getGenerateFile() {
875
+ this.generateSSHKeyFile();
876
+ this.getHideServicePassword();
877
+ }
878
+ generateSSHKeyFile() {
879
+ try {
880
+ const blob = new Blob([this.sshKeyForDownload], { type: '' });
881
+ const url = URL.createObjectURL(blob);
882
+ const a = document.createElement('a');
883
+ a.href = url;
884
+ a.download = `${this.SSHFileName}.${this.SSHFileType}`;
885
+ document.body.appendChild(a);
886
+ a.click();
887
+ document.body.removeChild(a);
888
+ URL.revokeObjectURL(url);
889
+ this.msgService.success(this.SSHPasswordViewSuccessMsg);
890
+ }
891
+ catch (error) {
892
+ this.msgService.error(this.SSHPasswordViewErrorMsg);
893
+ }
894
+ }
895
+ updateMailCount() {
896
+ this._eventService.emitUserEmail({
897
+ component: 'email-count',
898
+ mailCount: this.totalEmails,
899
+ });
900
+ }
901
+ copyToClipboard(text) {
902
+ navigator.clipboard
903
+ .writeText(text)
904
+ .then(() => {
905
+ this.msgService.success(this.PasswordViewSuccessMsg);
906
+ })
907
+ .catch((error) => {
908
+ });
909
+ }
910
+ togglePasswordVisibility() {
911
+ this.isPasswordVisible = !this.isPasswordVisible;
912
+ }
913
+ showPassword() {
914
+ if (this.isSSHKey && !this.servicePassword) {
915
+ return false;
916
+ }
917
+ return true;
918
+ }
919
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ViewpasswordPopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
920
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ViewpasswordPopupComponent, isStandalone: true, selector: "app-viewpassword-popup", ngImport: i0, template: "<div class=\"view-pass-detail\">\r\n <div class=\"mt-4 position-relative px-4\">\r\n @if (isContentLoaded) {\r\n @if (isSSHKey) {\r\n <div class=\"title\">{{ mailDetails[\"smi_MailSubject\"] }}</div>\r\n <p class=\"note-text mt-2\">\r\n {{ \"Generic_lib.DownloadSSHNote\" | translate }}\r\n </p>\r\n }\r\n\r\n @if (showPassword()) {\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"password-checkbox-right\">\r\n <div class=\"checkbox-visibility-icon\">\r\n <input\r\n type=\"checkbox\"\r\n aria-label=\"Show password\"\r\n (change)=\"togglePasswordVisibility()\"\r\n />\r\n <span></span>\r\n </div>\r\n </div>\r\n <input\r\n class=\"form-control view-pass\"\r\n [class.ssh]=\"isSSHKey === true\"\r\n readonly\r\n type=\"{{ isPasswordVisible ? 'password' : 'text' }}\"\r\n [value]=\"servicePassword\"\r\n placeholder=\"\"\r\n autocomplete=\"off\"\r\n aria-label=\"{{ 'Generic_lib.Password' | translate }}\"\r\n />\r\n <button\r\n (click)=\"copyToClipboard(servicePassword)\"\r\n type=\"button\"\r\n class=\"btn btn-primary d-flex align-items-center copy-btn\"\r\n title=\"Copy To Clipboard\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/copy-img.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n class=\"mx-2\"\r\n />{{ \"Generic_lib.Copy\" | translate }}\r\n </button>\r\n @if (!isSSHKey) {\r\n <img\r\n src=\"assets/common-header-lib/images/pass-img.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n class=\"position-absolute mx-2\"\r\n />\r\n }\r\n @if (isSSHKey) {\r\n <p class=\"position-absolute mx-2\">\r\n {{ \"Generic_lib.KeyPassphrase\" | translate }}:\r\n </p>\r\n }\r\n </div>\r\n }\r\n } @else {\r\n <!-- LODDER -->\r\n <div class=\"row w-100\" aria-hidden=\"true\">\r\n <div class=\"col-12\">\r\n <p-skeleton height=\"1.5rem\" styleClass=\"mb-2\"></p-skeleton>\r\n </div>\r\n <div class=\"col-12\">\r\n <p-skeleton height=\"1.5rem\" styleClass=\"mb-2\"></p-skeleton>\r\n </div>\r\n <div class=\"col-12\">\r\n <p-skeleton\r\n height=\"1.5rem\"\r\n width=\"30%\"\r\n styleClass=\"float-end mb-2\"\r\n ></p-skeleton>\r\n </div>\r\n </div>\r\n <!-- /LODDER -->\r\n }\r\n </div>\r\n\r\n <!-- MAIN-CONTENT -->\r\n @if (isContentLoaded) {\r\n <div class=\"d-flex mt-2 my-4 gap-1 px-4\">\r\n <div class=\"label-text\">\r\n {{ \"Generic_lib.RemainingTime\" | translate }} :\r\n </div>\r\n <div class=\"time-text\">{{ OpenTillDate | dateDiff }}</div>\r\n </div>\r\n\r\n @if (showVaultBtn) {\r\n <div class=\"border-bottom\"></div>\r\n <div class=\"d-flex mt-4 justify-content-end gap-1 ms-auto px-4 mb-2\">\r\n @if (isSSHKey) {\r\n <p-button\r\n type=\"button\"\r\n label=\"{{ 'Generic_lib.DownloadKey' | translate }}\"\r\n [iconPos]=\"'right'\"\r\n [loading]=\"isValueUpdated\"\r\n class=\"submit-btn view-btn\"\r\n (click)=\"getGenerateFile()\"\r\n ></p-button>\r\n } @else {\r\n <p-button\r\n type=\"button\"\r\n label=\"{{ 'Generic_lib.VaultCredentials' | translate }}\"\r\n [iconPos]=\"'right'\"\r\n [loading]=\"isValueUpdated\"\r\n class=\"submit-btn view-btn\"\r\n (click)=\"getHideServicePassword()\"\r\n ></p-button>\r\n }\r\n </div>\r\n }\r\n }\r\n <!-- /MAIN-CONTENT -->\r\n</div>\r\n", styles: [".view-pass-detail .key-icon{position:fixed;top:134px;left:35px}.view-pass-detail .title{font-size:15px;font-weight:700;color:var(--primary-text)}.view-pass-detail .note-text{font-size:14px!important}.view-pass-detail .view-pass{border-radius:4px 0 0 4px;padding-left:40px;height:40px;font-size:14px}.view-pass-detail .view-pass.ssh{padding-left:115px;padding-right:40px;margin:10px 0}.view-pass-detail .copy-btn{border-radius:0 4px 4px 0;height:40px;font-size:14px;border:1px solid var(--primary-color);background-color:var(--primary-color);border-color:var(--primary-color)}.view-pass-detail .label-text{color:var(--secondary-text);font-size:13px}.view-pass-detail .time-text{font-size:13px;font-weight:600}.view-pass-detail .view-btn{border-radius:4px;height:35px;font-size:14px;text-align:center;margin-top:4px}.view-pass-detail .border-bottom{position:relative;top:13px}.view-pass-detail p{font-size:14px!important;margin-bottom:1px}.password-checkbox-right{right:120px;position:absolute}.checkbox-visibility-icon{position:relative}.checkbox-visibility-icon input[type=checkbox]{opacity:0;position:absolute;top:4px;left:5px;transform:scale(1.7);z-index:2;cursor:pointer}.checkbox-visibility-icon input[type=checkbox]:checked+span{background:url(assets/common-header-lib/images/login-bg/visibility.svg);background-repeat:no-repeat;background-position:0px;height:12px;width:18px;display:block;background-size:17px}@media(min-width:992px){.checkbox-visibility-icon input[type=checkbox]:checked+span{height:12px;width:18px;background-size:17px}}.checkbox-visibility-icon input[type=checkbox]+span{background:url(assets/common-header-lib/images/login-bg/visibility_off.svg);background-repeat:no-repeat;background-position:0px;height:12px;width:18px;display:block;background-size:17px}@media(min-width:992px){.checkbox-visibility-icon input[type=checkbox]+span{height:24px;width:18px;background-size:17px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i4.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: DateDiffPipe, name: "dateDiff" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
921
+ }
922
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ViewpasswordPopupComponent, decorators: [{
923
+ type: Component,
924
+ args: [{ selector: 'app-viewpassword-popup', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SkeletonModule, ButtonModule, TranslateModule, DateDiffPipe], template: "<div class=\"view-pass-detail\">\r\n <div class=\"mt-4 position-relative px-4\">\r\n @if (isContentLoaded) {\r\n @if (isSSHKey) {\r\n <div class=\"title\">{{ mailDetails[\"smi_MailSubject\"] }}</div>\r\n <p class=\"note-text mt-2\">\r\n {{ \"Generic_lib.DownloadSSHNote\" | translate }}\r\n </p>\r\n }\r\n\r\n @if (showPassword()) {\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"password-checkbox-right\">\r\n <div class=\"checkbox-visibility-icon\">\r\n <input\r\n type=\"checkbox\"\r\n aria-label=\"Show password\"\r\n (change)=\"togglePasswordVisibility()\"\r\n />\r\n <span></span>\r\n </div>\r\n </div>\r\n <input\r\n class=\"form-control view-pass\"\r\n [class.ssh]=\"isSSHKey === true\"\r\n readonly\r\n type=\"{{ isPasswordVisible ? 'password' : 'text' }}\"\r\n [value]=\"servicePassword\"\r\n placeholder=\"\"\r\n autocomplete=\"off\"\r\n aria-label=\"{{ 'Generic_lib.Password' | translate }}\"\r\n />\r\n <button\r\n (click)=\"copyToClipboard(servicePassword)\"\r\n type=\"button\"\r\n class=\"btn btn-primary d-flex align-items-center copy-btn\"\r\n title=\"Copy To Clipboard\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/copy-img.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n class=\"mx-2\"\r\n />{{ \"Generic_lib.Copy\" | translate }}\r\n </button>\r\n @if (!isSSHKey) {\r\n <img\r\n src=\"assets/common-header-lib/images/pass-img.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n class=\"position-absolute mx-2\"\r\n />\r\n }\r\n @if (isSSHKey) {\r\n <p class=\"position-absolute mx-2\">\r\n {{ \"Generic_lib.KeyPassphrase\" | translate }}:\r\n </p>\r\n }\r\n </div>\r\n }\r\n } @else {\r\n <!-- LODDER -->\r\n <div class=\"row w-100\" aria-hidden=\"true\">\r\n <div class=\"col-12\">\r\n <p-skeleton height=\"1.5rem\" styleClass=\"mb-2\"></p-skeleton>\r\n </div>\r\n <div class=\"col-12\">\r\n <p-skeleton height=\"1.5rem\" styleClass=\"mb-2\"></p-skeleton>\r\n </div>\r\n <div class=\"col-12\">\r\n <p-skeleton\r\n height=\"1.5rem\"\r\n width=\"30%\"\r\n styleClass=\"float-end mb-2\"\r\n ></p-skeleton>\r\n </div>\r\n </div>\r\n <!-- /LODDER -->\r\n }\r\n </div>\r\n\r\n <!-- MAIN-CONTENT -->\r\n @if (isContentLoaded) {\r\n <div class=\"d-flex mt-2 my-4 gap-1 px-4\">\r\n <div class=\"label-text\">\r\n {{ \"Generic_lib.RemainingTime\" | translate }} :\r\n </div>\r\n <div class=\"time-text\">{{ OpenTillDate | dateDiff }}</div>\r\n </div>\r\n\r\n @if (showVaultBtn) {\r\n <div class=\"border-bottom\"></div>\r\n <div class=\"d-flex mt-4 justify-content-end gap-1 ms-auto px-4 mb-2\">\r\n @if (isSSHKey) {\r\n <p-button\r\n type=\"button\"\r\n label=\"{{ 'Generic_lib.DownloadKey' | translate }}\"\r\n [iconPos]=\"'right'\"\r\n [loading]=\"isValueUpdated\"\r\n class=\"submit-btn view-btn\"\r\n (click)=\"getGenerateFile()\"\r\n ></p-button>\r\n } @else {\r\n <p-button\r\n type=\"button\"\r\n label=\"{{ 'Generic_lib.VaultCredentials' | translate }}\"\r\n [iconPos]=\"'right'\"\r\n [loading]=\"isValueUpdated\"\r\n class=\"submit-btn view-btn\"\r\n (click)=\"getHideServicePassword()\"\r\n ></p-button>\r\n }\r\n </div>\r\n }\r\n }\r\n <!-- /MAIN-CONTENT -->\r\n</div>\r\n", styles: [".view-pass-detail .key-icon{position:fixed;top:134px;left:35px}.view-pass-detail .title{font-size:15px;font-weight:700;color:var(--primary-text)}.view-pass-detail .note-text{font-size:14px!important}.view-pass-detail .view-pass{border-radius:4px 0 0 4px;padding-left:40px;height:40px;font-size:14px}.view-pass-detail .view-pass.ssh{padding-left:115px;padding-right:40px;margin:10px 0}.view-pass-detail .copy-btn{border-radius:0 4px 4px 0;height:40px;font-size:14px;border:1px solid var(--primary-color);background-color:var(--primary-color);border-color:var(--primary-color)}.view-pass-detail .label-text{color:var(--secondary-text);font-size:13px}.view-pass-detail .time-text{font-size:13px;font-weight:600}.view-pass-detail .view-btn{border-radius:4px;height:35px;font-size:14px;text-align:center;margin-top:4px}.view-pass-detail .border-bottom{position:relative;top:13px}.view-pass-detail p{font-size:14px!important;margin-bottom:1px}.password-checkbox-right{right:120px;position:absolute}.checkbox-visibility-icon{position:relative}.checkbox-visibility-icon input[type=checkbox]{opacity:0;position:absolute;top:4px;left:5px;transform:scale(1.7);z-index:2;cursor:pointer}.checkbox-visibility-icon input[type=checkbox]:checked+span{background:url(assets/common-header-lib/images/login-bg/visibility.svg);background-repeat:no-repeat;background-position:0px;height:12px;width:18px;display:block;background-size:17px}@media(min-width:992px){.checkbox-visibility-icon input[type=checkbox]:checked+span{height:12px;width:18px;background-size:17px}}.checkbox-visibility-icon input[type=checkbox]+span{background:url(assets/common-header-lib/images/login-bg/visibility_off.svg);background-repeat:no-repeat;background-position:0px;height:12px;width:18px;display:block;background-size:17px}@media(min-width:992px){.checkbox-visibility-icon input[type=checkbox]+span{height:24px;width:18px;background-size:17px}}\n"] }]
925
+ }], ctorParameters: () => [] });
926
+
927
+ class NoServiceMyAccessPgComponent {
928
+ constructor() {
929
+ this.heading = input("We couldn't find any service matching your search within the chosen LOB. Try refining your keywords or choosing a different LOB for better results", ...(ngDevMode ? [{ debugName: "heading" }] : []));
930
+ this.subHeading = input('', ...(ngDevMode ? [{ debugName: "subHeading" }] : []));
931
+ }
932
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NoServiceMyAccessPgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
933
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: NoServiceMyAccessPgComponent, isStandalone: true, selector: "app-no-service-my-access-pg", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, subHeading: { classPropertyName: "subHeading", publicName: "subHeading", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"no-service-content mt-5\">\r\n <div class=\"text-center\">\r\n <img src=\"assets/common-header-lib/images/Frame.svg\" class=\"frame-img w-75\" alt=\"\" aria-hidden=\"true\">\r\n </div>\r\n <div class=\"no-service-description\">\r\n <div class=\"no-data-text\">{{ heading() }}</div>\r\n <p>{{ subHeading() }}</p>\r\n </div>\r\n</div>", styles: [".no-service-content{display:flex;justify-content:center;align-items:center;flex-direction:column}@media screen and (min-width:1744px){.no-service-content{margin-top:200px!important}}.no-service-description{width:55%;text-align:center;margin-top:16px}.no-data-text{font-size:14px;color:var(--black-color);font-weight:400}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
934
+ }
935
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NoServiceMyAccessPgComponent, decorators: [{
936
+ type: Component,
937
+ args: [{ selector: 'app-no-service-my-access-pg', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule], template: "<div class=\"no-service-content mt-5\">\r\n <div class=\"text-center\">\r\n <img src=\"assets/common-header-lib/images/Frame.svg\" class=\"frame-img w-75\" alt=\"\" aria-hidden=\"true\">\r\n </div>\r\n <div class=\"no-service-description\">\r\n <div class=\"no-data-text\">{{ heading() }}</div>\r\n <p>{{ subHeading() }}</p>\r\n </div>\r\n</div>", styles: [".no-service-content{display:flex;justify-content:center;align-items:center;flex-direction:column}@media screen and (min-width:1744px){.no-service-content{margin-top:200px!important}}.no-service-description{width:55%;text-align:center;margin-top:16px}.no-data-text{font-size:14px;color:var(--black-color);font-weight:400}\n"] }]
938
+ }], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], subHeading: [{ type: i0.Input, args: [{ isSignal: true, alias: "subHeading", required: false }] }] } });
939
+
940
+ class GridPaginationComponent {
941
+ constructor() {
942
+ this.first = 0;
943
+ this.currentPgNo = 0;
944
+ this.rows = GlobalConstants.PAGEROW;
945
+ this.totalRecords = input(0, ...(ngDevMode ? [{ debugName: "totalRecords" }] : []));
946
+ this.onPgChange = output();
947
+ }
948
+ onPageChange(event) {
949
+ const page = (event.page ?? 0) + 1; // PaginatorState.page is 0-indexed; add +1
950
+ this.currentPgNo = page;
951
+ this.rows = event.rows ?? GlobalConstants.PAGEROW;
952
+ this.onPgChange.emit({
953
+ currentPgNo: this.currentPgNo,
954
+ perPgRows: this.rows,
955
+ });
956
+ }
957
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: GridPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
958
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: GridPaginationComponent, isStandalone: true, selector: "app-grid-pagination", inputs: { totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onPgChange: "onPgChange" }, ngImport: i0, template: "<p-paginator (onPageChange)=\"onPageChange($event)\" [first]=\"first\" [rows]=\"rows\" [totalRecords]=\"totalRecords()\"\r\n [showFirstLastIcon]=\"true\" [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} of {totalRecords}\" [rowsPerPageOptions]=\"[10, 50, 100]\"></p-paginator>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: PaginatorModule }, { kind: "component", type: i1$2.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first", "appendTo"], outputs: ["onPageChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
959
+ }
960
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: GridPaginationComponent, decorators: [{
961
+ type: Component,
962
+ args: [{ selector: 'app-grid-pagination', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [PaginatorModule], template: "<p-paginator (onPageChange)=\"onPageChange($event)\" [first]=\"first\" [rows]=\"rows\" [totalRecords]=\"totalRecords()\"\r\n [showFirstLastIcon]=\"true\" [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} of {totalRecords}\" [rowsPerPageOptions]=\"[10, 50, 100]\"></p-paginator>\r\n" }]
963
+ }], propDecorators: { totalRecords: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalRecords", required: false }] }], onPgChange: [{ type: i0.Output, args: ["onPgChange"] }] } });
964
+
965
+ class CustomDateFormatPipe {
966
+ constructor() {
967
+ this.datePipe = new DatePipe('en-US');
968
+ }
969
+ transform(value) {
970
+ if (!value) {
971
+ return 'Not Applicable';
972
+ }
973
+ const parsedDate = new Date(value);
974
+ if (isNaN(parsedDate.getTime())) {
975
+ return 'Invalid Date';
976
+ }
977
+ return this.datePipe.transform(parsedDate, 'dd-MMM-yyyy HH:mm:ss');
978
+ }
979
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CustomDateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
980
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: CustomDateFormatPipe, isStandalone: true, name: "customDateFormat" }); }
981
+ }
982
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CustomDateFormatPipe, decorators: [{
983
+ type: Pipe,
984
+ args: [{
985
+ name: 'customDateFormat',
986
+ standalone: true,
987
+ }]
988
+ }] });
989
+
990
+ class UserMailboxComponent {
991
+ constructor() {
992
+ this.closeMailDialogBox = output();
993
+ this.ListOfUserAssingedMails = [];
994
+ this.destroyRef = inject(DestroyRef);
995
+ this.ref = null;
996
+ this.showVaultBtn = false;
997
+ this.SSHFileName = 'ppk';
998
+ this.hasUserAssignedMails = true;
999
+ //Pagintion
1000
+ this.currentPgNo = 1;
1001
+ this.perPgRows = 10;
1002
+ this.totalCount = 0;
1003
+ this.NoServiceMsgText = '';
1004
+ this.isContentLoaded = false;
1005
+ this.repeatLoader = Array.from({ length: this.perPgRows }).map((_, i) => `Item #${i}`);
1006
+ this.apiURL = input('', ...(ngDevMode ? [{ debugName: "apiURL" }] : []));
1007
+ this.cdr = inject(ChangeDetectorRef);
1008
+ this.dialogService = inject(DialogService);
1009
+ this._eventService = inject(EventService);
1010
+ this.translate = inject(TranslateService);
1011
+ this.httpCommonService = inject(HttpCommonService);
1012
+ }
1013
+ ngOnInit() {
1014
+ this.onLoadMethods();
1015
+ }
1016
+ /* Require Methods on PageLoad */
1017
+ onLoadMethods() {
1018
+ this.getUserEmails();
1019
+ this.getglobalConfigDetails();
1020
+ this._eventService
1021
+ .listenerUserEmail()
1022
+ .pipe(takeUntilDestroyed(this.destroyRef))
1023
+ .subscribe((data) => {
1024
+ if (data && data['component'] === 'view-pwd') {
1025
+ if (data['refreshGrid']) {
1026
+ this.ref?.close();
1027
+ }
1028
+ }
1029
+ });
1030
+ }
1031
+ openViewPasswordPanel(mailDetails) {
1032
+ this.ref = this.dialogService.open(ViewpasswordPopupComponent, {
1033
+ header: mailDetails.sshkey_isenabled
1034
+ ? this.translate.instant('Generic_lib.SSHKey')
1035
+ : this.translate.instant('Generic_lib.Password'),
1036
+ styleClass: 'view-pass-details',
1037
+ // DynamicDialog defaults resizable to true (undefined !== false), which
1038
+ // renders PrimeNG's .p-resizable-handle. Explicitly disable it.
1039
+ resizable: false,
1040
+ closable: true,
1041
+ data: {
1042
+ payload: mailDetails,
1043
+ btnStatus: this.showVaultBtn,
1044
+ SSHfileType: this.SSHFileName,
1045
+ },
1046
+ });
1047
+ // Handle the close event here
1048
+ this.ref?.onClose
1049
+ .pipe(takeUntilDestroyed(this.destroyRef))
1050
+ .subscribe((_result) => {
1051
+ this.getUserEmails();
1052
+ });
1053
+ }
1054
+ /*Action : Fetching user Emails from a API */
1055
+ getUserEmails() {
1056
+ this.isContentLoaded = false;
1057
+ let payload = {
1058
+ pageSize: this.perPgRows,
1059
+ pageNumber: this.currentPgNo,
1060
+ };
1061
+ this.httpCommonService
1062
+ .getUserAssignedMails(payload)
1063
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
1064
+ this.isContentLoaded = true;
1065
+ this.cdr.markForCheck();
1066
+ }))
1067
+ .subscribe((response) => {
1068
+ this.ListOfUserAssingedMails = response;
1069
+ if (this.ListOfUserAssingedMails.length > 0) {
1070
+ this.hasUserAssignedMails = true;
1071
+ this.getTotalNoOfRecords();
1072
+ }
1073
+ else {
1074
+ this.hasUserAssignedMails = false;
1075
+ this.NoServiceMsgText = errorMsg.NOMAILFOUND;
1076
+ }
1077
+ this.cdr.markForCheck();
1078
+ });
1079
+ }
1080
+ //Note: Get Total No of Records for Pagination
1081
+ getTotalNoOfRecords() {
1082
+ if (this.ListOfUserAssingedMails.length > 0 &&
1083
+ this.ListOfUserAssingedMails[0]['totalRecords'] != null) {
1084
+ this.totalCount = this.ListOfUserAssingedMails[0]['totalRecords'];
1085
+ }
1086
+ }
1087
+ /*Method : POST
1088
+ Action : Get configuration ID based on to show hide Vault Btn*/
1089
+ getglobalConfigDetails() {
1090
+ this.httpCommonService
1091
+ .getglobalConfigDetails('1', [247, 338])
1092
+ .pipe(takeUntilDestroyed(this.destroyRef))
1093
+ .subscribe((data) => {
1094
+ if (data && data.length > 0) {
1095
+ data.forEach((element) => {
1096
+ //For Vault Btn
1097
+ if (element && element['id'] === 247 && element['value'] === '0') {
1098
+ this.showVaultBtn = false;
1099
+ }
1100
+ else {
1101
+ this.showVaultBtn = true;
1102
+ }
1103
+ //For Vault Btn
1104
+ if (element && element['id'] === 338 && element['value'] === '1') {
1105
+ this.SSHFileName = 'pem';
1106
+ }
1107
+ else {
1108
+ this.SSHFileName = 'ppk';
1109
+ }
1110
+ });
1111
+ }
1112
+ this.cdr.markForCheck();
1113
+ });
1114
+ }
1115
+ //Method: Fetch User Assigned Email based on PageNo
1116
+ updateDataOnPageChange(pageDetails) {
1117
+ this.currentPgNo = pageDetails['currentPgNo'];
1118
+ this.perPgRows = pageDetails['perPgRows'];
1119
+ this.getUserEmails();
1120
+ }
1121
+ closeMailBox() {
1122
+ this.closeMailDialogBox.emit();
1123
+ }
1124
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: UserMailboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1125
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: UserMailboxComponent, isStandalone: true, selector: "app-user-mailbox", inputs: { apiURL: { classPropertyName: "apiURL", publicName: "apiURL", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closeMailDialogBox: "closeMailDialogBox" }, providers: [DialogService], ngImport: i0, template: "<div class=\"mail-content\">\r\n <div\r\n class=\"box-title my-3 d-flex justify-content-between align-items-center w-100\"\r\n >\r\n <div>\r\n {{ \"Generic_lib.MailBox\" | translate }}\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"common-bn tertiary-btn ms-auto\"\r\n aria-label=\"{{ 'Generic_lib.Close' | translate }}\"\r\n (click)=\"closeMailBox()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/close.svg\"\r\n class=\"imgs\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n title=\"Close\"\r\n loading=\"lazy\"\r\n />\r\n </button>\r\n </div>\r\n\r\n <div class=\"mail-table\">\r\n @if (isContentLoaded && hasUserAssignedMails) {\r\n <p-table\r\n [value]=\"ListOfUserAssingedMails\"\r\n selectionMode=\"multiple\"\r\n dataKey=\"code\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th scope=\"col\">\r\n {{ \"Generic_lib.From\" | translate }}\r\n </th>\r\n\r\n <th scope=\"col\">\r\n {{ \"Generic_lib.Subject\" | translate }}\r\n </th>\r\n\r\n <th scope=\"col\">\r\n {{ \"Generic_lib.ViewFrom\" | translate }}\r\n </th>\r\n\r\n <th scope=\"col\"></th>\r\n\r\n <th scope=\"col\">\r\n {{ \"Generic_lib.Action\" | translate }}\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-userMail>\r\n <tr\r\n [class.markasRead]=\"userMail.smi_sms_id != 1\"\r\n [attr.aria-label]=\"\r\n (userMail.smi_sms_id != 1 ? 'Read' : 'Unread') +\r\n ': ' +\r\n userMail.smi_MailSubject\r\n \"\r\n >\r\n <td class=\"form-colm\">{{ userMail.smi_From_Details }}</td>\r\n <td>\r\n <div class=\"subject-colm\" title=\"{{ userMail.smi_MailSubject }}\">\r\n {{ userMail.smi_MailSubject }}\r\n </div>\r\n </td>\r\n <td class=\"view-colm\">\r\n {{ userMail.smi_Received_On | customDateFormat }}\r\n </td>\r\n <td>\r\n <div class=\"icon-colm\">\r\n <div>\r\n <img\r\n src=\"assets/common-header-lib/images/mail-icon.svg\"\r\n alt=\"Mail\"\r\n />\r\n </div>\r\n <div>\r\n <img\r\n src=\"assets/common-header-lib/images/flag1.svg\"\r\n alt=\"Flagged\"\r\n />\r\n </div>\r\n <div>\r\n <img\r\n src=\"assets/common-header-lib/images/lock1.svg\"\r\n alt=\"Protected\"\r\n class=\"\"\r\n />\r\n </div>\r\n </div>\r\n </td>\r\n <td class=\"action-colm\">\r\n <button\r\n [disabled]=\"userMail.password_status === 'Close'\"\r\n (click)=\"openViewPasswordPanel(userMail)\"\r\n class=\"view-label\"\r\n >\r\n {{ \"Generic_lib.ViewPassword\" | translate }}\r\n </button>\r\n </td>\r\n </tr></ng-template\r\n >\r\n </p-table>\r\n }\r\n @if (!isContentLoaded) {\r\n <p-table\r\n [value]=\"repeatLoader\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n responsiveLayout=\"scroll\"\r\n aria-hidden=\"true\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th scope=\"col\">{{ \"Generic_lib.From\" | translate }}</th>\r\n <th scope=\"col\">{{ \"Generic_lib.Subject\" | translate }}</th>\r\n <th scope=\"col\">{{ \"Generic_lib.ViewFrom\" | translate }}</th>\r\n <th scope=\"col\"></th>\r\n <th scope=\"col\">{{ \"Generic_lib.Action\" | translate }}</th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-data>\r\n <tr>\r\n <td><p-skeleton height=\"1rem\" width=\"100%\"></p-skeleton></td>\r\n <td><p-skeleton height=\"1rem\" width=\"100%\"></p-skeleton></td>\r\n <td><p-skeleton height=\"1rem\" width=\"100%\"></p-skeleton></td>\r\n <td><p-skeleton height=\"1rem\" width=\"100%\"></p-skeleton></td>\r\n <td><p-skeleton height=\"1rem\" width=\"100%\"></p-skeleton></td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n <!-- When There is No Data Present -->\r\n @if (!hasUserAssignedMails) {\r\n <app-no-service-my-access-pg\r\n [heading]=\"NoServiceMsgText\"\r\n ></app-no-service-my-access-pg>\r\n }\r\n </div>\r\n <!-- ---Pagination -->\r\n <div class=\"mail-pagination\">\r\n <app-grid-pagination\r\n [totalRecords]=\"totalCount\"\r\n (onPgChange)=\"updateDataOnPageChange($event)\"\r\n ></app-grid-pagination>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.mail-content{padding:0 22px;height:calc(100vh - 42px);overflow:auto;background-color:#fff}.mail-content .mail-body{background-color:#000}.mail-content .box-title{color:var(--primary-text);font-size:20px;line-height:30px;font-weight:600}.mail-content .view-label{border:none;color:var(--dodger-blue);font-size:13px!important;font-weight:600;cursor:pointer;padding-right:25px}.mail-content .icon-trending{position:relative;left:5px;cursor:pointer}.mail-content .disable-click{pointer-events:none}.mail-content .disable-click:hover,.mail-content .disable-click:focus{cursor:not-allowed}.subject-colm{text-overflow:ellipsis;overflow:hidden;width:500px}.markasRead{border-left:2px solid #3b82f6!important;color:#676879!important;border-bottom:1px solid #dee2e6!important;font-weight:600}.icon-colm div{display:inline-flex;width:30px;height:30px;border-radius:50%;align-items:center;justify-content:center;vertical-align:middle;margin-right:4px;cursor:pointer}.icon-colm div img{width:16px;height:16px}.icon-colm div:hover{background-color:var(--white-color)}.icon-colm div:hover img{filter:invert(0%) sepia(4%) saturate(0%) hue-rotate(324deg) brightness(55%) contrast(105%)}.view-label{background:url(assets/common-header-lib/images/east.svg) no-repeat 99% 5px}button:disabled{cursor:not-allowed!important;opacity:50%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i1$3.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: NoServiceMyAccessPgComponent, selector: "app-no-service-my-access-pg", inputs: ["heading", "subHeading"] }, { kind: "component", type: GridPaginationComponent, selector: "app-grid-pagination", inputs: ["totalRecords"], outputs: ["onPgChange"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: CustomDateFormatPipe, name: "customDateFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1126
+ }
1127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: UserMailboxComponent, decorators: [{
1128
+ type: Component,
1129
+ args: [{ selector: 'app-user-mailbox', providers: [DialogService], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, TableModule, SkeletonModule, TranslateModule, NoServiceMyAccessPgComponent, GridPaginationComponent, CustomDateFormatPipe], template: "<div class=\"mail-content\">\r\n <div\r\n class=\"box-title my-3 d-flex justify-content-between align-items-center w-100\"\r\n >\r\n <div>\r\n {{ \"Generic_lib.MailBox\" | translate }}\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"common-bn tertiary-btn ms-auto\"\r\n aria-label=\"{{ 'Generic_lib.Close' | translate }}\"\r\n (click)=\"closeMailBox()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/close.svg\"\r\n class=\"imgs\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n title=\"Close\"\r\n loading=\"lazy\"\r\n />\r\n </button>\r\n </div>\r\n\r\n <div class=\"mail-table\">\r\n @if (isContentLoaded && hasUserAssignedMails) {\r\n <p-table\r\n [value]=\"ListOfUserAssingedMails\"\r\n selectionMode=\"multiple\"\r\n dataKey=\"code\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th scope=\"col\">\r\n {{ \"Generic_lib.From\" | translate }}\r\n </th>\r\n\r\n <th scope=\"col\">\r\n {{ \"Generic_lib.Subject\" | translate }}\r\n </th>\r\n\r\n <th scope=\"col\">\r\n {{ \"Generic_lib.ViewFrom\" | translate }}\r\n </th>\r\n\r\n <th scope=\"col\"></th>\r\n\r\n <th scope=\"col\">\r\n {{ \"Generic_lib.Action\" | translate }}\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-userMail>\r\n <tr\r\n [class.markasRead]=\"userMail.smi_sms_id != 1\"\r\n [attr.aria-label]=\"\r\n (userMail.smi_sms_id != 1 ? 'Read' : 'Unread') +\r\n ': ' +\r\n userMail.smi_MailSubject\r\n \"\r\n >\r\n <td class=\"form-colm\">{{ userMail.smi_From_Details }}</td>\r\n <td>\r\n <div class=\"subject-colm\" title=\"{{ userMail.smi_MailSubject }}\">\r\n {{ userMail.smi_MailSubject }}\r\n </div>\r\n </td>\r\n <td class=\"view-colm\">\r\n {{ userMail.smi_Received_On | customDateFormat }}\r\n </td>\r\n <td>\r\n <div class=\"icon-colm\">\r\n <div>\r\n <img\r\n src=\"assets/common-header-lib/images/mail-icon.svg\"\r\n alt=\"Mail\"\r\n />\r\n </div>\r\n <div>\r\n <img\r\n src=\"assets/common-header-lib/images/flag1.svg\"\r\n alt=\"Flagged\"\r\n />\r\n </div>\r\n <div>\r\n <img\r\n src=\"assets/common-header-lib/images/lock1.svg\"\r\n alt=\"Protected\"\r\n class=\"\"\r\n />\r\n </div>\r\n </div>\r\n </td>\r\n <td class=\"action-colm\">\r\n <button\r\n [disabled]=\"userMail.password_status === 'Close'\"\r\n (click)=\"openViewPasswordPanel(userMail)\"\r\n class=\"view-label\"\r\n >\r\n {{ \"Generic_lib.ViewPassword\" | translate }}\r\n </button>\r\n </td>\r\n </tr></ng-template\r\n >\r\n </p-table>\r\n }\r\n @if (!isContentLoaded) {\r\n <p-table\r\n [value]=\"repeatLoader\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n responsiveLayout=\"scroll\"\r\n aria-hidden=\"true\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th scope=\"col\">{{ \"Generic_lib.From\" | translate }}</th>\r\n <th scope=\"col\">{{ \"Generic_lib.Subject\" | translate }}</th>\r\n <th scope=\"col\">{{ \"Generic_lib.ViewFrom\" | translate }}</th>\r\n <th scope=\"col\"></th>\r\n <th scope=\"col\">{{ \"Generic_lib.Action\" | translate }}</th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-data>\r\n <tr>\r\n <td><p-skeleton height=\"1rem\" width=\"100%\"></p-skeleton></td>\r\n <td><p-skeleton height=\"1rem\" width=\"100%\"></p-skeleton></td>\r\n <td><p-skeleton height=\"1rem\" width=\"100%\"></p-skeleton></td>\r\n <td><p-skeleton height=\"1rem\" width=\"100%\"></p-skeleton></td>\r\n <td><p-skeleton height=\"1rem\" width=\"100%\"></p-skeleton></td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n <!-- When There is No Data Present -->\r\n @if (!hasUserAssignedMails) {\r\n <app-no-service-my-access-pg\r\n [heading]=\"NoServiceMsgText\"\r\n ></app-no-service-my-access-pg>\r\n }\r\n </div>\r\n <!-- ---Pagination -->\r\n <div class=\"mail-pagination\">\r\n <app-grid-pagination\r\n [totalRecords]=\"totalCount\"\r\n (onPgChange)=\"updateDataOnPageChange($event)\"\r\n ></app-grid-pagination>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.mail-content{padding:0 22px;height:calc(100vh - 42px);overflow:auto;background-color:#fff}.mail-content .mail-body{background-color:#000}.mail-content .box-title{color:var(--primary-text);font-size:20px;line-height:30px;font-weight:600}.mail-content .view-label{border:none;color:var(--dodger-blue);font-size:13px!important;font-weight:600;cursor:pointer;padding-right:25px}.mail-content .icon-trending{position:relative;left:5px;cursor:pointer}.mail-content .disable-click{pointer-events:none}.mail-content .disable-click:hover,.mail-content .disable-click:focus{cursor:not-allowed}.subject-colm{text-overflow:ellipsis;overflow:hidden;width:500px}.markasRead{border-left:2px solid #3b82f6!important;color:#676879!important;border-bottom:1px solid #dee2e6!important;font-weight:600}.icon-colm div{display:inline-flex;width:30px;height:30px;border-radius:50%;align-items:center;justify-content:center;vertical-align:middle;margin-right:4px;cursor:pointer}.icon-colm div img{width:16px;height:16px}.icon-colm div:hover{background-color:var(--white-color)}.icon-colm div:hover img{filter:invert(0%) sepia(4%) saturate(0%) hue-rotate(324deg) brightness(55%) contrast(105%)}.view-label{background:url(assets/common-header-lib/images/east.svg) no-repeat 99% 5px}button:disabled{cursor:not-allowed!important;opacity:50%}\n"] }]
1130
+ }], propDecorators: { closeMailDialogBox: [{ type: i0.Output, args: ["closeMailDialogBox"] }], apiURL: [{ type: i0.Input, args: [{ isSignal: true, alias: "apiURL", required: false }] }] } });
1131
+
1132
+ class SidePopupComponent {
1133
+ constructor() {
1134
+ this.closeDialogBox = output();
1135
+ this.visible = model(false, ...(ngDevMode ? [{ debugName: "visible" }] : []));
1136
+ this.position = input('right', ...(ngDevMode ? [{ debugName: "position" }] : []));
1137
+ this.header = input('Details', ...(ngDevMode ? [{ debugName: "header" }] : []));
1138
+ }
1139
+ //Method: Close the Side Panel
1140
+ getcloseDialogBox() {
1141
+ this.visible.set(false);
1142
+ this.closeDialogBox.emit(true);
1143
+ }
1144
+ ngOnDestroy() {
1145
+ this.visible.set(false);
1146
+ }
1147
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SidePopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1148
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: SidePopupComponent, isStandalone: true, selector: "app-side-popup", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closeDialogBox: "closeDialogBox", visible: "visibleChange" }, ngImport: i0, template: "<p-dialog\r\n [header]=\"header()\"\r\n [resizable]=\"false\"\r\n (onHide)=\"getcloseDialogBox()\"\r\n [modal]=\"true\"\r\n [draggable]=\"false\"\r\n [visible]=\"visible()\"\r\n (visibleChange)=\"visible.set($event)\"\r\n [position]=\"position()\"\r\n [style]=\"{\r\n width: '40vw',\r\n minHeight: '100vh',\r\n right: '-15px',\r\n position: 'absolute',\r\n }\"\r\n>\r\n <!-- Dynamically Change the Content of Sidebar -->\r\n <ng-content></ng-content>\r\n</p-dialog>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "component", type: i1$4.Dialog, selector: "p-dialog", inputs: ["hostName", "header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1149
+ }
1150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SidePopupComponent, decorators: [{
1151
+ type: Component,
1152
+ args: [{ selector: 'app-side-popup', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [DialogModule], template: "<p-dialog\r\n [header]=\"header()\"\r\n [resizable]=\"false\"\r\n (onHide)=\"getcloseDialogBox()\"\r\n [modal]=\"true\"\r\n [draggable]=\"false\"\r\n [visible]=\"visible()\"\r\n (visibleChange)=\"visible.set($event)\"\r\n [position]=\"position()\"\r\n [style]=\"{\r\n width: '40vw',\r\n minHeight: '100vh',\r\n right: '-15px',\r\n position: 'absolute',\r\n }\"\r\n>\r\n <!-- Dynamically Change the Content of Sidebar -->\r\n <ng-content></ng-content>\r\n</p-dialog>\r\n" }]
1153
+ }], propDecorators: { closeDialogBox: [{ type: i0.Output, args: ["closeDialogBox"] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }] } });
1154
+
1155
+ class CookieStorageManagerService {
1156
+ constructor() {
1157
+ this.cookie = inject(CookieService);
1158
+ }
1159
+ //Check if cookies is set or not
1160
+ checksetCookies(cookiesParam1) {
1161
+ let status = this.cookie.check(cookiesParam1);
1162
+ if (status) {
1163
+ return true;
1164
+ }
1165
+ else {
1166
+ return false;
1167
+ }
1168
+ }
1169
+ //get cookies value
1170
+ getCookieValue(cookiesParam) {
1171
+ let status = this.cookie.check(cookiesParam);
1172
+ if (status) {
1173
+ let cookieValue = this.cookie.get(cookiesParam);
1174
+ return cookieValue;
1175
+ }
1176
+ //What if cookies not found
1177
+ else {
1178
+ return '';
1179
+ }
1180
+ }
1181
+ //Set cookies value
1182
+ setCookiesValue(key, value) {
1183
+ this.cookie.set(key, value);
1184
+ }
1185
+ //Delete a specific cookie
1186
+ deleteCookie(cookieKey) {
1187
+ this.cookie.delete(cookieKey);
1188
+ }
1189
+ //Delete All cookie
1190
+ clearAllCookies() {
1191
+ const cookies = this.cookie.getAll();
1192
+ for (const cookieName in cookies) {
1193
+ if (cookies.hasOwnProperty(cookieName)) {
1194
+ this.cookie.delete(cookieName);
1195
+ }
1196
+ }
1197
+ }
1198
+ //Set Long cookies
1199
+ setLongCookie(name, value, maxChunkSize) {
1200
+ for (let i = 0; i < Math.ceil(value.length / maxChunkSize); i++) {
1201
+ const chunk = value.substring(i * maxChunkSize, (i + 1) * maxChunkSize);
1202
+ this.setCookiesValue(`${name}_${i}`, chunk);
1203
+ }
1204
+ }
1205
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CookieStorageManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1206
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CookieStorageManagerService, providedIn: 'root' }); }
1207
+ }
1208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CookieStorageManagerService, decorators: [{
1209
+ type: Injectable,
1210
+ args: [{
1211
+ providedIn: 'root',
1212
+ }]
1213
+ }] });
1214
+
1215
+ class EncrydecryRSAdataService {
1216
+ generateAESKey() {
1217
+ const publicKey = this.getPublicKey();
1218
+ const symmetricKey = this.generateKeyAndIV();
1219
+ const gkey = symmetricKey.key.toString();
1220
+ const giv = symmetricKey.iv.toString();
1221
+ const encryptedSymmetricKey = this.encryptSymmetricKey(gkey, publicKey);
1222
+ const encryptedSymmetriciv = this.encryptSymmetricKey(giv, publicKey);
1223
+ return String(encryptedSymmetricKey + ',' + encryptedSymmetriciv);
1224
+ }
1225
+ encryptViaRSA(simpleText) {
1226
+ const { symmKey, symmIV } = this.getRSAsymmetricKeyIV();
1227
+ const encryptedText = this.encryptText(simpleText, symmKey, symmIV);
1228
+ return encryptedText;
1229
+ }
1230
+ decryptViaRSA(encrpyText) {
1231
+ const { symmKey, symmIV } = this.getRSAsymmetricKeyIV();
1232
+ const decryptedText = this.decryptText(encrpyText, symmKey, symmIV);
1233
+ return decryptedText;
1234
+ }
1235
+ generateKeyAndIV() {
1236
+ const key = CryptoJS.lib.WordArray.random(32); // 32 bytes for AES-256
1237
+ const iv = CryptoJS.lib.WordArray.random(16); // 16 bytes IV
1238
+ return { key, iv };
1239
+ }
1240
+ encryptText(plaintext, hkey, hiv) {
1241
+ //* If the data is Object then converting the object into JSON.stringify()
1242
+ if (typeof plaintext === 'object' && plaintext !== null) {
1243
+ plaintext = JSON.stringify(plaintext);
1244
+ }
1245
+ const key = CryptoJS.enc.Hex.parse(hkey);
1246
+ const iv = CryptoJS.enc.Hex.parse(hiv);
1247
+ const encrypted = CryptoJS.AES.encrypt(plaintext, key, {
1248
+ iv: iv,
1249
+ mode: CryptoJS.mode.CBC,
1250
+ padding: CryptoJS.pad.Pkcs7,
1251
+ });
1252
+ return encrypted.toString();
1253
+ }
1254
+ encryptSymmetricKey(key, publicKey) {
1255
+ try {
1256
+ const rsa = new JSEncrypt();
1257
+ rsa.setPublicKey(publicKey);
1258
+ const encryptedKey = rsa.encrypt(key);
1259
+ if (!encryptedKey)
1260
+ throw new Error('Encryption failed. The key might be improperly formatted.');
1261
+ return encryptedKey;
1262
+ }
1263
+ catch (error) {
1264
+ return '';
1265
+ }
1266
+ }
1267
+ decryptText(encryptedBase64, hkey, hiv) {
1268
+ const key = CryptoJS.enc.Hex.parse(hkey);
1269
+ const iv = CryptoJS.enc.Hex.parse(hiv);
1270
+ const decrypted = CryptoJS.AES.decrypt(encryptedBase64, key, {
1271
+ iv: iv,
1272
+ mode: CryptoJS.mode.CBC,
1273
+ padding: CryptoJS.pad.Pkcs7,
1274
+ });
1275
+ return decrypted.toString(CryptoJS.enc.Utf8);
1276
+ }
1277
+ getPublicKey() {
1278
+ const publicKey = this.base64ToPem(localStorage.getItem('001-SAC-GEC') || '');
1279
+ return publicKey;
1280
+ }
1281
+ getRSAsymmetricKeyIV() {
1282
+ let symmKey = '';
1283
+ let symmIV = '';
1284
+ const key = localStorage.getItem('001-SAC-GEC');
1285
+ if (key?.includes(',')) {
1286
+ const syymArr = key.split(',');
1287
+ symmKey = syymArr[0];
1288
+ symmIV = syymArr[1];
1289
+ }
1290
+ return { symmKey, symmIV };
1291
+ }
1292
+ base64ToPem(base64Key) {
1293
+ const pemHeader = '-----BEGIN PUBLIC KEY-----';
1294
+ const pemFooter = '-----END PUBLIC KEY-----';
1295
+ const chunkSize = 64; // Standard line length for PEM files
1296
+ const formattedKey = base64Key.match(new RegExp(`.{1,${chunkSize}}`, 'g'))?.join('\n') || '';
1297
+ return `${pemHeader}\n${formattedKey}\n${pemFooter}`;
1298
+ }
1299
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EncrydecryRSAdataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1300
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EncrydecryRSAdataService, providedIn: 'root' }); }
1301
+ }
1302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EncrydecryRSAdataService, decorators: [{
1303
+ type: Injectable,
1304
+ args: [{
1305
+ providedIn: 'root',
1306
+ }]
1307
+ }] });
1308
+
1309
+ class RESTLoginFormService {
1310
+ constructor() {
1311
+ this._http = inject(HttpClient);
1312
+ this.cookieService = inject(CookieStorageManagerService);
1313
+ }
1314
+ /*Method : GET
1315
+ Action : Fetch Domain List */
1316
+ fetchDomainList() {
1317
+ return this._http
1318
+ .get(GlobalConstants.baseURL + 'meta/api/Metadata/Domains')
1319
+ .pipe(map$1((response) => {
1320
+ if (response['statusCode'] === 200) {
1321
+ if (response['result'].length > 0) {
1322
+ let result = response['result'];
1323
+ return result;
1324
+ }
1325
+ else {
1326
+ return [];
1327
+ }
1328
+ }
1329
+ }), catchError$1((e) => throwError(() => e)));
1330
+ }
1331
+ /*Method : POST
1332
+ Parameter : subID , id
1333
+ Action : Get configuration ID based on to show hide DOMAIN dropdown
1334
+ */
1335
+ getglobalConfigDetails(subid, id) {
1336
+ return this._http
1337
+ .post(GlobalConstants.baseURL +
1338
+ 'meta/api/Metadata/GetArcosConfigsValues?subId=' +
1339
+ subid, id)
1340
+ .pipe(map$1((response) => {
1341
+ if (response['statusCode'] === 200) {
1342
+ let result = response['result'];
1343
+ return result;
1344
+ }
1345
+ }), catchError$1((e) => throwError(() => e)));
1346
+ }
1347
+ /*Method : POST
1348
+ Action : RESET Password for First Time User
1349
+ */
1350
+ setNewpassword(loggedInUserDetails) {
1351
+ return this._http
1352
+ .post(GlobalConstants.baseURL +
1353
+ 'xaccess/api/SecureAccess/ChangeUserArcXwdManually', loggedInUserDetails)
1354
+ .pipe(catchError$1((e) => throwError(() => e)));
1355
+ }
1356
+ /*Method : POST
1357
+ Action :Will validate User entered PWD as
1358
+ per Password Policy Set
1359
+ */
1360
+ validatePassword(userDetails) {
1361
+ return this._http
1362
+ .post(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/ValidatePassword', userDetails)
1363
+ .pipe(catchError$1((e) => throwError(() => e)));
1364
+ }
1365
+ /*Method : POST
1366
+ Action : Get Public Key for encryption of Data */
1367
+ getPrivateKey(params) {
1368
+ return this._http
1369
+ .post(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/XKEDSync', params)
1370
+ .pipe(catchError$1((e) => throwError(() => e)));
1371
+ }
1372
+ /* Method : POST
1373
+ Action : Send request for OTP of MFA Authenticator */
1374
+ sendMFAOTPRequest(mfaDetails) {
1375
+ return this._http
1376
+ .post(GlobalConstants.baseURL + 'xmfa/api/Mfa/mfa', mfaDetails)
1377
+ .pipe(map$1((response) => {
1378
+ if (response['success']) {
1379
+ let result = response['result'];
1380
+ return result;
1381
+ }
1382
+ }), catchError$1((e) => throwError(() => e)));
1383
+ }
1384
+ /* Method : POST
1385
+ Action : Submit User Enter OTP of MFA Authenticator */
1386
+ submitOtpForMfaVerification(mfaDetails) {
1387
+ return this._http
1388
+ .post(GlobalConstants.baseURL + 'xmfa/api/Mfa/mfavalidation', mfaDetails)
1389
+ .pipe(map$1((response) => {
1390
+ if (response['success']) {
1391
+ let result = response['result'];
1392
+ return result;
1393
+ }
1394
+ }), catchError$1((e) => throwError(() => e)));
1395
+ }
1396
+ /*Method : POST
1397
+ Action : It will provide Token which used for multiple Application access */
1398
+ getAuthToken(userDetails) {
1399
+ return this._http
1400
+ .post(GlobalConstants.baseURL + 'xauth/api/Token/GenerateJwtTokenApplication', userDetails)
1401
+ .pipe(map$1((response) => {
1402
+ if (response) {
1403
+ return response;
1404
+ }
1405
+ else {
1406
+ return '';
1407
+ }
1408
+ }), catchError$1((e) => throwError(() => e)));
1409
+ }
1410
+ /* Method : POST
1411
+ Action : Unlock User to enable login process */
1412
+ unlockUserAccount(userDetails) {
1413
+ return this._http
1414
+ .post(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/ValidateUser', userDetails)
1415
+ .pipe(map$1((result) => {
1416
+ return result;
1417
+ }), catchError$1((e) => throwError(() => e)));
1418
+ }
1419
+ /*Method : GET
1420
+ Action : Get User Background Image and Logo */
1421
+ getUserBackgroundImageAndLogo() {
1422
+ return this._http
1423
+ .get(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/GetBackgroundImage')
1424
+ .pipe(map$1((response) => {
1425
+ return response;
1426
+ }), catchError$1((error) => throwError(() => error)));
1427
+ }
1428
+ deleteCookieData(payload) {
1429
+ const url = this.cookieService.getCookieValue('baseurl');
1430
+ const delCookieEndpoint = `${url}xaccess/api/SecureAccess/cookiesUpdation`;
1431
+ return this._http.post(delCookieEndpoint, payload);
1432
+ }
1433
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: RESTLoginFormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1434
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: RESTLoginFormService, providedIn: 'root' }); }
1435
+ }
1436
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: RESTLoginFormService, decorators: [{
1437
+ type: Injectable,
1438
+ args: [{
1439
+ providedIn: 'root',
1440
+ }]
1441
+ }] });
1442
+
1443
+ class ASYNCPasswordcheckService {
1444
+ constructor() {
1445
+ this.pwdErrorMsg = '';
1446
+ this.pwdValidation = new Subject();
1447
+ this.httpCommonService = inject(HttpCommonService);
1448
+ this.encryptService = inject(EncrydecryRSAdataService);
1449
+ }
1450
+ createValidator() {
1451
+ return (control) => {
1452
+ //For AES Encrp/Dec
1453
+ const userPassword = this.encryptService.encryptViaRSA(control.value);
1454
+ let useDetails = {
1455
+ userARCXWD: userPassword,
1456
+ };
1457
+ return control.valueChanges.pipe(debounceTime(500), take(1), switchMap((_) => this.httpCommonService.validatePassword(useDetails).pipe(map$1((data) => {
1458
+ if (data['success']) {
1459
+ this.pwdErrorMsg = data['message'];
1460
+ this.emitValidationMsg(this.pwdErrorMsg);
1461
+ return null;
1462
+ }
1463
+ else {
1464
+ this.pwdErrorMsg = data['errorMessage'];
1465
+ this.emitValidationMsg(this.pwdErrorMsg);
1466
+ return { pwdInvalid: true };
1467
+ }
1468
+ }), catchError$1(() => of({ pwdInvalid: true })))));
1469
+ };
1470
+ }
1471
+ emitValidationMsg(msg) {
1472
+ this.pwdValidation.next(msg);
1473
+ }
1474
+ listValidationMsg() {
1475
+ return this.pwdValidation.asObservable();
1476
+ }
1477
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ASYNCPasswordcheckService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1478
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ASYNCPasswordcheckService, providedIn: 'root' }); }
1479
+ }
1480
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ASYNCPasswordcheckService, decorators: [{
1481
+ type: Injectable,
1482
+ args: [{
1483
+ providedIn: 'root',
1484
+ }]
1485
+ }] });
1486
+ function ConfirmedValidator(controlName, matchingControlName) {
1487
+ return (formGroup) => {
1488
+ const control = formGroup.controls[controlName];
1489
+ const matchingControl = formGroup.controls[matchingControlName];
1490
+ if (matchingControl.errors &&
1491
+ !matchingControl.errors['confirmedValidator']) {
1492
+ return;
1493
+ }
1494
+ if (control.value !== matchingControl.value) {
1495
+ matchingControl.setErrors({ confirmedValidator: true });
1496
+ }
1497
+ else {
1498
+ matchingControl.setErrors(null);
1499
+ }
1500
+ };
1501
+ }
1502
+
1503
+ class VaptValidationService {
1504
+ hasUnsafeInput(formData) {
1505
+ const dangerousPattern = /<\s*(script|iframe|object|embed|link|style)\b[^>]*>(.*?)<\s*\/\s*\1\s*>|<\s*(script|iframe|object|embed|link|style)\b[^>]*\/?>|<[^>]+>/gi;
1506
+ function checkValue(value) {
1507
+ if (typeof value === 'string') {
1508
+ return dangerousPattern.test(value);
1509
+ }
1510
+ if (Array.isArray(value)) {
1511
+ return value.some(checkValue);
1512
+ }
1513
+ if (typeof value === 'object' && value !== null) {
1514
+ return Object.values(value).some(checkValue);
1515
+ }
1516
+ // If it's a number, boolean, null, or undefined, ignore
1517
+ return false;
1518
+ }
1519
+ return checkValue(formData);
1520
+ }
1521
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: VaptValidationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1522
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: VaptValidationService, providedIn: 'root' }); }
1523
+ }
1524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: VaptValidationService, decorators: [{
1525
+ type: Injectable,
1526
+ args: [{
1527
+ providedIn: 'root'
1528
+ }]
1529
+ }] });
1530
+
1531
+ function noSpaceAllowed() {
1532
+ return (control) => {
1533
+ const value = control.value;
1534
+ if (!value) {
1535
+ return null; // No value is not an error here
1536
+ }
1537
+ // Check if the value starts with a space or contains any space
1538
+ const hasLeadingSpace = value.startsWith(' ');
1539
+ if (hasLeadingSpace) {
1540
+ return { noSpace: true };
1541
+ }
1542
+ return null;
1543
+ };
1544
+ }
1545
+
1546
+ class HttpGeneralConfigurationService {
1547
+ constructor() {
1548
+ this.xPageRefAPIUrl = '/xaccess/api/PagePreference/';
1549
+ this.http = inject(HttpClient);
1550
+ }
1551
+ getUserPreferredAssetTypeDetails() {
1552
+ return this.http
1553
+ .get(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}GetAssetTypeDetails`)
1554
+ .pipe(map((response) => {
1555
+ if (response && response['success']) {
1556
+ return response['result'];
1557
+ }
1558
+ else {
1559
+ return [];
1560
+ }
1561
+ }), catchError((e) => throwError(() => e)));
1562
+ }
1563
+ getUserPreferredAssetName(payload) {
1564
+ return this.http
1565
+ .post(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}GetAssetName`, payload)
1566
+ .pipe(map((response) => {
1567
+ if (response && response['success']) {
1568
+ return response['result'];
1569
+ }
1570
+ else {
1571
+ return [];
1572
+ }
1573
+ }), catchError((e) => throwError(() => e)));
1574
+ }
1575
+ getServiceNameByAssetTypeEvent(payload) {
1576
+ return this.http
1577
+ .post(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}GetServiceDetails`, payload)
1578
+ .pipe(map((response) => {
1579
+ if (response && response['success']) {
1580
+ return response['result'];
1581
+ }
1582
+ else {
1583
+ return [];
1584
+ }
1585
+ }), catchError((e) => throwError(() => e)));
1586
+ }
1587
+ getPreferencePathDetails(payload) {
1588
+ return this.http
1589
+ .post(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}CurrentPreferencepathDetails`, payload)
1590
+ .pipe(map((response) => {
1591
+ if (response && response['success']) {
1592
+ return response['result'];
1593
+ }
1594
+ else {
1595
+ return {};
1596
+ }
1597
+ }), catchError((e) => throwError(() => e)));
1598
+ }
1599
+ updatePreferencePath(payload) {
1600
+ return this.http
1601
+ .post(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}UpdatePreferencePath`, payload)
1602
+ .pipe(map((response) => {
1603
+ if (response && response['success']) {
1604
+ return true;
1605
+ }
1606
+ else {
1607
+ return false;
1608
+ }
1609
+ }), catchError((e) => throwError(() => e)));
1610
+ }
1611
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HttpGeneralConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1612
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HttpGeneralConfigurationService, providedIn: 'root' }); }
1613
+ }
1614
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HttpGeneralConfigurationService, decorators: [{
1615
+ type: Injectable,
1616
+ args: [{
1617
+ providedIn: 'root',
1618
+ }]
1619
+ }] });
1620
+
1621
+ class LandingpgConfigComponent {
1622
+ constructor() {
1623
+ this.ListofApplicationNames = [];
1624
+ this.isAppNameLoading = false;
1625
+ this.isAppNameUpdate = false;
1626
+ this.updateSuccess = errorMsg.LANDINGPGSUCCESS;
1627
+ this.updateError = errorMsg.LANDINGPGERROR;
1628
+ this.userConfiguredApp = {};
1629
+ this.destroyRef = inject(DestroyRef);
1630
+ this.apiUrl = '';
1631
+ this.cdr = inject(ChangeDetectorRef);
1632
+ this.fb = inject(FormBuilder);
1633
+ this.msgService = inject(ToastMsgService);
1634
+ this.translateService = inject(TranslateService);
1635
+ this._encryptRSAService = inject(EncrydecryRSAdataService);
1636
+ this.httpCommonService = inject(HttpCommonService);
1637
+ }
1638
+ ngAfterViewInit() {
1639
+ this.getTranslateContent();
1640
+ }
1641
+ ngOnInit() {
1642
+ this.getListofApplications();
1643
+ this.getInitalizeForm();
1644
+ }
1645
+ getInitalizeForm() {
1646
+ this.AppNameForm = this.fb.group({
1647
+ userApp: [null, Validators.required],
1648
+ });
1649
+ }
1650
+ //Method: Convert text one Lang. to another
1651
+ getTranslateContent() {
1652
+ this.translateService
1653
+ .get([
1654
+ 'Generic_lib.LandingPageSuccessMsg',
1655
+ 'Generic_lib.LandingPageErrorMsg',
1656
+ ])
1657
+ .pipe(takeUntilDestroyed(this.destroyRef))
1658
+ .subscribe((trans) => {
1659
+ this.updateSuccess = trans['Generic_lib.LandingPageSuccessMsg'];
1660
+ this.updateError = trans['Generic_lib.LandingPageErrorMsg'];
1661
+ });
1662
+ }
1663
+ /*Method : GET
1664
+ Action : Get List of User Assign Application*/
1665
+ getListofApplications() {
1666
+ this.isAppNameLoading = true;
1667
+ this.httpCommonService
1668
+ .getUserAssignedApps()
1669
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
1670
+ this.isAppNameLoading = false;
1671
+ this.cdr.markForCheck();
1672
+ }))
1673
+ .subscribe((response) => {
1674
+ this.ListofApplicationNames = response;
1675
+ this.userConfiguredApp = this.ListofApplicationNames.find((app) => app.isAssignedLanding);
1676
+ this.setPostLoginModuleOption(this.userConfiguredApp);
1677
+ this.cdr.markForCheck();
1678
+ });
1679
+ }
1680
+ /*Method : POST
1681
+ Action : Used to Update User Preferred Landing App Name*/
1682
+ getUpdateLandingPgPreference() {
1683
+ const userApp = this.AppNameForm.get('userApp')?.value;
1684
+ const moduleId = this._encryptRSAService.encryptViaRSA(userApp['appCode']);
1685
+ this.showBtnLoadder(true);
1686
+ this.httpCommonService
1687
+ .setLandingPgPreference(moduleId)
1688
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
1689
+ this.showBtnLoadder(false);
1690
+ this.cdr.markForCheck();
1691
+ }))
1692
+ .subscribe((result) => {
1693
+ if (result) {
1694
+ setTimeout(() => {
1695
+ this.setPostLoginModuleOption(userApp);
1696
+ this.cdr.markForCheck();
1697
+ }, 10);
1698
+ this.msgService.success(this.updateSuccess);
1699
+ this.AppNameForm.reset();
1700
+ }
1701
+ else {
1702
+ this.msgService.error(this.updateError);
1703
+ }
1704
+ this.cdr.markForCheck();
1705
+ });
1706
+ }
1707
+ setPostLoginModuleOption(userConfiguredApp) {
1708
+ if (userConfiguredApp) {
1709
+ this.AppNameForm.get('userApp')?.setValue(userConfiguredApp);
1710
+ }
1711
+ }
1712
+ showBtnLoadder(flag) {
1713
+ this.isAppNameUpdate = flag;
1714
+ }
1715
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: LandingpgConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1716
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: LandingpgConfigComponent, isStandalone: true, selector: "app-landingpg-config", ngImport: i0, template: "<div class=\"preference-container\">\r\n <form [formGroup]=\"AppNameForm\">\r\n <div class=\"mt-2\">\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.LandingPageConfig\" | translate }}\r\n </div>\r\n <abbr\r\n class=\"madontary-icon\"\r\n [title]=\"'Generic_lib.RequiredField' | translate\"\r\n [attr.aria-label]=\"'Generic_lib.Required' | translate\"\r\n >*</abbr\r\n >\r\n </div>\r\n <div class=\"timezone-dropdown\">\r\n <p-select\r\n [options]=\"ListofApplicationNames\"\r\n ariaLabel=\"{{ 'Generic_lib.LandingPageConfig' | translate }}\"\r\n placeholder=\"{{ 'Generic_lib.LandingPagePlaceHolder' | translate }}\"\r\n filterPlaceholder=\"{{ 'Generic_lib.Search' | translate }}\"\r\n formControlName=\"userApp\"\r\n [filter]=\"!isAppNameLoading ? true : false\"\r\n optionLabel=\"applicationName\"\r\n filterBy=\"applicationName\"\r\n [showClear]=\"false\"\r\n panelStyleClass=\"{'dropdown-loader': isAppNameLoading}\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n @if (isAppNameLoading) {\r\n <div class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n }\r\n </ng-template>\r\n </p-select>\r\n </div>\r\n @if (\r\n AppNameForm.get(\"userApp\")?.invalid &&\r\n AppNameForm.get(\"userApp\")?.touched\r\n ) {\r\n <span id=\"userapp-error\" role=\"alert\" class=\"error-msg mt-1\">{{\r\n \"Generic_lib.LandingPageValidation\" | translate\r\n }}</span>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"mt-2 update-btn\">\r\n <p-button\r\n class=\"submit-btn\"\r\n label=\"{{ 'Generic_lib.Update' | translate }}\"\r\n [disabled]=\"AppNameForm.invalid\"\r\n iconPos=\"right\"\r\n [loading]=\"isAppNameUpdate\"\r\n (onClick)=\"getUpdateLandingPgPreference()\"\r\n ></p-button>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [".preference-container .path-title{font-size:20px;color:#292f4c}.preference-container .form-group{margin-bottom:15px}.preference-container .label-name{font-size:12px;color:#292f4c;line-height:26px;font-weight:600}.preference-container .cur-text{font-size:12px;color:#676879;line-height:26px;font-weight:600}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i2.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i4.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1717
+ }
1718
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: LandingpgConfigComponent, decorators: [{
1719
+ type: Component,
1720
+ args: [{ selector: 'app-landingpg-config', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, ReactiveFormsModule, SelectModule, ButtonModule, TranslateModule], template: "<div class=\"preference-container\">\r\n <form [formGroup]=\"AppNameForm\">\r\n <div class=\"mt-2\">\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.LandingPageConfig\" | translate }}\r\n </div>\r\n <abbr\r\n class=\"madontary-icon\"\r\n [title]=\"'Generic_lib.RequiredField' | translate\"\r\n [attr.aria-label]=\"'Generic_lib.Required' | translate\"\r\n >*</abbr\r\n >\r\n </div>\r\n <div class=\"timezone-dropdown\">\r\n <p-select\r\n [options]=\"ListofApplicationNames\"\r\n ariaLabel=\"{{ 'Generic_lib.LandingPageConfig' | translate }}\"\r\n placeholder=\"{{ 'Generic_lib.LandingPagePlaceHolder' | translate }}\"\r\n filterPlaceholder=\"{{ 'Generic_lib.Search' | translate }}\"\r\n formControlName=\"userApp\"\r\n [filter]=\"!isAppNameLoading ? true : false\"\r\n optionLabel=\"applicationName\"\r\n filterBy=\"applicationName\"\r\n [showClear]=\"false\"\r\n panelStyleClass=\"{'dropdown-loader': isAppNameLoading}\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n @if (isAppNameLoading) {\r\n <div class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n }\r\n </ng-template>\r\n </p-select>\r\n </div>\r\n @if (\r\n AppNameForm.get(\"userApp\")?.invalid &&\r\n AppNameForm.get(\"userApp\")?.touched\r\n ) {\r\n <span id=\"userapp-error\" role=\"alert\" class=\"error-msg mt-1\">{{\r\n \"Generic_lib.LandingPageValidation\" | translate\r\n }}</span>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"mt-2 update-btn\">\r\n <p-button\r\n class=\"submit-btn\"\r\n label=\"{{ 'Generic_lib.Update' | translate }}\"\r\n [disabled]=\"AppNameForm.invalid\"\r\n iconPos=\"right\"\r\n [loading]=\"isAppNameUpdate\"\r\n (onClick)=\"getUpdateLandingPgPreference()\"\r\n ></p-button>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [".preference-container .path-title{font-size:20px;color:#292f4c}.preference-container .form-group{margin-bottom:15px}.preference-container .label-name{font-size:12px;color:#292f4c;line-height:26px;font-weight:600}.preference-container .cur-text{font-size:12px;color:#676879;line-height:26px;font-weight:600}\n"] }]
1721
+ }] });
1722
+
1723
+ class StorageService {
1724
+ saveData(key, value) {
1725
+ localStorage.setItem(key, value);
1726
+ }
1727
+ getData(key) {
1728
+ return localStorage.getItem(key);
1729
+ }
1730
+ removeData(key) {
1731
+ localStorage.removeItem(key);
1732
+ }
1733
+ clearData() {
1734
+ localStorage.clear();
1735
+ }
1736
+ checkData(key) {
1737
+ return !!localStorage.getItem(key);
1738
+ }
1739
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1740
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StorageService, providedIn: 'root' }); }
1741
+ }
1742
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StorageService, decorators: [{
1743
+ type: Injectable,
1744
+ args: [{
1745
+ providedIn: 'root',
1746
+ }]
1747
+ }] });
1748
+
1749
+ class TimezoneConfigurationComponent {
1750
+ constructor() {
1751
+ this.ListOfTimeZones = [];
1752
+ this.isTimezoneLoading = false;
1753
+ this.isTimezoneupdate = false;
1754
+ this.destroyRef = inject(DestroyRef);
1755
+ this.tzSuccessMsg = errorMsg.TIMEZONESUCCESS;
1756
+ this.tzErrorMsg = errorMsg.TIMEZONERROR;
1757
+ this.apiUrl = '';
1758
+ this.closepopup = output();
1759
+ this.cdr = inject(ChangeDetectorRef);
1760
+ this.fb = inject(FormBuilder);
1761
+ this.msgService = inject(ToastMsgService);
1762
+ this._storageService = inject(StorageService);
1763
+ this._eventService = inject(EventService);
1764
+ this.translateService = inject(TranslateService);
1765
+ this.httpCommonService = inject(HttpCommonService);
1766
+ }
1767
+ ngAfterViewInit() {
1768
+ this.getTranslateContent();
1769
+ }
1770
+ ngOnInit() {
1771
+ this.getListofTimeZones();
1772
+ this.getInitalizeForm();
1773
+ }
1774
+ getInitalizeForm() {
1775
+ this.timeZoneForm = this.fb.group({
1776
+ timezone: [null, Validators.required], // Add Validators.required
1777
+ });
1778
+ }
1779
+ //Method: Convert text one Lang. to another
1780
+ getTranslateContent() {
1781
+ this.translateService
1782
+ .get(['Generic_lib.TimeZoneSuccessMsg', 'Generic_lib.TimeZoneErrorMsg'])
1783
+ .pipe(takeUntilDestroyed(this.destroyRef))
1784
+ .subscribe((trans) => {
1785
+ this.tzSuccessMsg = trans['Generic_lib.TimeZoneSuccessMsg'];
1786
+ this.tzErrorMsg = trans['Generic_lib.TimeZoneErrorMsg'];
1787
+ });
1788
+ }
1789
+ /*Method : GET
1790
+ Action : Get List of Time Zone*/
1791
+ getListofTimeZones() {
1792
+ this.isTimezoneLoading = true;
1793
+ this.httpCommonService
1794
+ .getGlobalTimeZone()
1795
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
1796
+ this.isTimezoneLoading = false;
1797
+ this.cdr.markForCheck();
1798
+ }))
1799
+ .subscribe((result) => {
1800
+ if (result && result['timelist']) {
1801
+ this.ListOfTimeZones = result['timelist'];
1802
+ }
1803
+ if (result && result['userTimeZone']) {
1804
+ let userTz = result['userTimeZone'];
1805
+ const selectedTZ = this.ListOfTimeZones.find((tz) => tz.id === userTz);
1806
+ this.setTimezoneOptionValue(selectedTZ);
1807
+ }
1808
+ this.cdr.markForCheck();
1809
+ });
1810
+ }
1811
+ /*Method : POST
1812
+ Action : Used to Update User Selected TimeZone*/
1813
+ setUserTimeZone() {
1814
+ const tz = this.timeZoneForm.get('timezone')?.value;
1815
+ let tzName = tz['id'];
1816
+ this.showBtnLoadder(true);
1817
+ this.httpCommonService
1818
+ .updateUserTimeZone(tzName)
1819
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
1820
+ this.showBtnLoadder(false);
1821
+ this.cdr.markForCheck();
1822
+ }))
1823
+ .subscribe((result) => {
1824
+ if (result) {
1825
+ setTimeout(() => {
1826
+ this.setTimezoneOptionValue(tz);
1827
+ this.cdr.markForCheck();
1828
+ }, 10);
1829
+ this.msgService.success(this.tzSuccessMsg);
1830
+ this._storageService.removeData(COOKIECONSTANT.NEWUSER);
1831
+ this._eventService.emitTimezone({
1832
+ component: 'timezone',
1833
+ usertimezoneAbbreviations: result,
1834
+ userTimeZoneFullForm: '',
1835
+ id: tz['id'],
1836
+ timelist: this.ListOfTimeZones,
1837
+ });
1838
+ this.closepopup.emit(true);
1839
+ this.timeZoneForm.reset();
1840
+ }
1841
+ else {
1842
+ this.msgService.error(this.tzErrorMsg);
1843
+ }
1844
+ this.cdr.markForCheck();
1845
+ });
1846
+ }
1847
+ setTimezoneOptionValue(selectedTZ) {
1848
+ if (selectedTZ) {
1849
+ this.selectedTimeZone = selectedTZ;
1850
+ this.timeZoneForm.get('timezone')?.setValue(this.selectedTimeZone);
1851
+ }
1852
+ }
1853
+ showBtnLoadder(flag) {
1854
+ this.isTimezoneupdate = flag;
1855
+ }
1856
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TimezoneConfigurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1857
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TimezoneConfigurationComponent, isStandalone: true, selector: "app-timezone-configuration", outputs: { closepopup: "closepopup" }, ngImport: i0, template: "<div class=\"preference-container\">\r\n <form [formGroup]=\"timeZoneForm\">\r\n <div class=\"mt-2\">\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">{{\"Generic_lib.PreferredTimezone\" | translate }}</div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div class=\" timezone-dropdown\">\r\n <p-select [options]=\"ListOfTimeZones\"\r\n ariaLabel=\"{{ 'Generic_lib.PreferredTimezone' | translate }}\" filterPlaceholder='{{ \"Generic_lib.Search\" | translate }}'\r\n placeholder='{{\"Generic_lib.TimeZonePlaceHolder\" | translate}}' formControlName=\"timezone\"\r\n [(ngModel)]=\"selectedTimeZone\" [filter]=\"!isTimezoneLoading ? true:false\" optionLabel=\"displayName\"\r\n filterBy=\"displayName\" [showClear]=\"false\" panelStyleClass=\"{'dropdown-loader': isTimezoneLoading}\">\r\n\r\n <ng-template pTemplate=\"header\">\r\n @if (isTimezoneLoading) {\r\n <div class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n }\r\n </ng-template></p-select>\r\n </div>\r\n @if (\r\n timeZoneForm.get('timezone')?.invalid &&\r\n timeZoneForm.get('timezone')?.touched\r\n ) {\r\n <span id=\"timezone-error\" role=\"alert\" class=\"error-msg mt-1\">{{'Generic_lib.TimeZoneFieldValidation' | translate}}</span>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"mt-2 update-btn\">\r\n <p-button class=\"submit-btn\" label=\"{{'Generic_lib.Update' | translate}}\" [disabled]=\"timeZoneForm.invalid\"\r\n iconPos=\"right\" [loading]=\"isTimezoneupdate\" (onClick)=\"setUserTimeZone()\"></p-button>\r\n </div>\r\n </form>\r\n</div>", styles: [".preference-container .path-title{font-size:20px;color:#292f4c}.preference-container .form-group{margin-bottom:15px}.preference-container .label-name{font-size:12px;color:#292f4c;line-height:26px;font-weight:600}.preference-container .cur-text{font-size:12px;color:#676879;line-height:26px;font-weight:600}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i2.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i4.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1858
+ }
1859
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TimezoneConfigurationComponent, decorators: [{
1860
+ type: Component,
1861
+ args: [{ selector: 'app-timezone-configuration', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, FormsModule, ReactiveFormsModule, SelectModule, ButtonModule, TranslateModule], template: "<div class=\"preference-container\">\r\n <form [formGroup]=\"timeZoneForm\">\r\n <div class=\"mt-2\">\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">{{\"Generic_lib.PreferredTimezone\" | translate }}</div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div class=\" timezone-dropdown\">\r\n <p-select [options]=\"ListOfTimeZones\"\r\n ariaLabel=\"{{ 'Generic_lib.PreferredTimezone' | translate }}\" filterPlaceholder='{{ \"Generic_lib.Search\" | translate }}'\r\n placeholder='{{\"Generic_lib.TimeZonePlaceHolder\" | translate}}' formControlName=\"timezone\"\r\n [(ngModel)]=\"selectedTimeZone\" [filter]=\"!isTimezoneLoading ? true:false\" optionLabel=\"displayName\"\r\n filterBy=\"displayName\" [showClear]=\"false\" panelStyleClass=\"{'dropdown-loader': isTimezoneLoading}\">\r\n\r\n <ng-template pTemplate=\"header\">\r\n @if (isTimezoneLoading) {\r\n <div class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n }\r\n </ng-template></p-select>\r\n </div>\r\n @if (\r\n timeZoneForm.get('timezone')?.invalid &&\r\n timeZoneForm.get('timezone')?.touched\r\n ) {\r\n <span id=\"timezone-error\" role=\"alert\" class=\"error-msg mt-1\">{{'Generic_lib.TimeZoneFieldValidation' | translate}}</span>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"mt-2 update-btn\">\r\n <p-button class=\"submit-btn\" label=\"{{'Generic_lib.Update' | translate}}\" [disabled]=\"timeZoneForm.invalid\"\r\n iconPos=\"right\" [loading]=\"isTimezoneupdate\" (onClick)=\"setUserTimeZone()\"></p-button>\r\n </div>\r\n </form>\r\n</div>", styles: [".preference-container .path-title{font-size:20px;color:#292f4c}.preference-container .form-group{margin-bottom:15px}.preference-container .label-name{font-size:12px;color:#292f4c;line-height:26px;font-weight:600}.preference-container .cur-text{font-size:12px;color:#676879;line-height:26px;font-weight:600}\n"] }]
1862
+ }], propDecorators: { closepopup: [{ type: i0.Output, args: ["closepopup"] }] } });
1863
+
1864
+ class GeneralConfigurationComponent {
1865
+ constructor() {
1866
+ this.ShowPreferencePathScreen = true;
1867
+ this.ShowChangePasswordScreen = false;
1868
+ this.ShowTimeZoneScreen = false;
1869
+ this.ShowLandinPgScreen = false;
1870
+ this.ShowTimeZoneBtn = false;
1871
+ this.showStatus = false;
1872
+ this.userAssetTypeList = [];
1873
+ this.userAssetNameList = [];
1874
+ this.userServiceList = [];
1875
+ this.userSelectedTimezone = '';
1876
+ this.filePathName = '';
1877
+ this.lastUpdatedFileStatus = '';
1878
+ this.destroyRef = inject(DestroyRef);
1879
+ this.cdr = inject(ChangeDetectorRef);
1880
+ this.fb = inject(FormBuilder);
1881
+ this.msgService = inject(ToastMsgService);
1882
+ this.encryptService = inject(EncrydecryRSAdataService);
1883
+ this.loginService = inject(RESTLoginFormService);
1884
+ this._validatePwdService = inject(ASYNCPasswordcheckService);
1885
+ this.translateService = inject(TranslateService);
1886
+ this._vaptService = inject(VaptValidationService);
1887
+ this.config = inject(DynamicDialogConfig);
1888
+ this.httpCommonService = inject(HttpCommonService);
1889
+ this.httpGeneralConfigService = inject(HttpGeneralConfigurationService);
1890
+ this.makeNewPwdVisible = true;
1891
+ this.makeOldPwdVisible = true;
1892
+ this.makeCnfrmPwdVisible = true;
1893
+ this.isAssetTypeLoading = false;
1894
+ this.isAssetNameLoading = false;
1895
+ this.isConnectionMethodLoading = false;
1896
+ this.isPathUpdated = false;
1897
+ this.pwderrorMsg = '';
1898
+ this.AssetTypeEvent = 'AssetType';
1899
+ this.AssetNameEvent = 'AssetName';
1900
+ this.ConnectionMethodEvent = 'ConnectionMethod';
1901
+ this.pathSuccessMsg = errorMsg.PATHSUCCESS;
1902
+ this.pathErrorMsg = errorMsg.PATHERROR;
1903
+ this.apiURL = '';
1904
+ }
1905
+ ngOnInit() {
1906
+ //Get Initalize Form
1907
+ this.getInitalizeForm();
1908
+ this.OpenPreferencePathScreen();
1909
+ }
1910
+ ngAfterViewInit() {
1911
+ this.getTranslateContent();
1912
+ // Get PWD Validation MSg From Validation Service
1913
+ this._validatePwdService
1914
+ .listValidationMsg()
1915
+ .pipe(takeUntilDestroyed(this.destroyRef))
1916
+ .subscribe((msg) => {
1917
+ this.pwderrorMsg = msg;
1918
+ this.cdr.markForCheck();
1919
+ });
1920
+ }
1921
+ getInitalizeForm() {
1922
+ this.appSettingForm = this.fb.group({
1923
+ AssetType: ['', Validators.required],
1924
+ AssetName: ['', Validators.required],
1925
+ ServiceName: ['', Validators.required],
1926
+ filePathName: ['', [Validators.required, noSpaceAllowed()]],
1927
+ });
1928
+ this.timeZoneForm = this.fb.group({
1929
+ timezone: ['', Validators.required],
1930
+ });
1931
+ // Password Reset Form
1932
+ this.userResetPasswordForm = this.fb.group({
1933
+ oldUserARCXWD: ['', [Validators.required]],
1934
+ newUserARCXWD: [
1935
+ '',
1936
+ [Validators.required],
1937
+ [this._validatePwdService.createValidator()],
1938
+ ],
1939
+ crnmNewUserARCXWD: ['', [Validators.required]],
1940
+ }, {
1941
+ validator: ConfirmedValidator('newUserARCXWD', 'crnmNewUserARCXWD'),
1942
+ });
1943
+ }
1944
+ // //Method: Convert text one Lang. to another
1945
+ getTranslateContent() {
1946
+ this.translateService
1947
+ .get([
1948
+ 'Generic_lib.PreferencePathSuccessMsg',
1949
+ 'Generic_lib.PreferencePathErrorMsg',
1950
+ ])
1951
+ .pipe(takeUntilDestroyed(this.destroyRef))
1952
+ .subscribe((trans) => {
1953
+ this.pathSuccessMsg = trans['Generic_lib.PreferencePathSuccessMsg'];
1954
+ this.pathErrorMsg = trans['Generic_lib.PreferencePathErrorMsg'];
1955
+ });
1956
+ }
1957
+ OpenPreferencePathScreen() {
1958
+ this.closeAllScreen();
1959
+ setTimeout(() => {
1960
+ this.ShowPreferencePathScreen = true;
1961
+ this.appSettingForm.reset();
1962
+ this.userAssetTypeList = [];
1963
+ this.userAssetNameList = [];
1964
+ this.userServiceList = [];
1965
+ this.getServiceAssetDetails();
1966
+ this.cdr.markForCheck();
1967
+ }, 10);
1968
+ }
1969
+ OpenChangePasswordScreen() {
1970
+ this.closeAllScreen();
1971
+ this.ShowChangePasswordScreen = true;
1972
+ this.userResetPasswordForm.reset();
1973
+ }
1974
+ OpenTimezoneScreen() {
1975
+ this.closeAllScreen();
1976
+ this.ShowTimeZoneScreen = true;
1977
+ }
1978
+ OpenLandingPgConfig() {
1979
+ this.closeAllScreen();
1980
+ this.ShowLandinPgScreen = true;
1981
+ }
1982
+ closeAllScreen() {
1983
+ this.ShowPreferencePathScreen = false;
1984
+ this.ShowChangePasswordScreen = false;
1985
+ this.ShowTimeZoneScreen = false;
1986
+ this.ShowLandinPgScreen = false;
1987
+ }
1988
+ preferencePathValueChange(eventName) {
1989
+ if (eventName === this.AssetTypeEvent) {
1990
+ const assetType = this.appSettingForm.get('AssetType')?.value;
1991
+ this.showStatus = false;
1992
+ this.resetFormfields(['AssetName', 'ServiceName', 'filePathName']);
1993
+ this.userAssetNameList = [];
1994
+ this.userServiceList = [];
1995
+ this.getServiceAssetName(assetType['assetTypeID']);
1996
+ }
1997
+ else if (eventName === this.AssetNameEvent) {
1998
+ const assetName = this.appSettingForm.get('AssetName')?.value;
1999
+ this.showStatus = false;
2000
+ this.resetFormfields(['ServiceName', 'filePathName']);
2001
+ this.userServiceList = [];
2002
+ this.fetchServiceNameByAssetTypeEvent(assetName['assetName']);
2003
+ }
2004
+ else if (eventName === this.ConnectionMethodEvent) {
2005
+ const ServiceDetails = this.appSettingForm.get('ServiceName')?.value;
2006
+ this.showStatus = false;
2007
+ this.resetFormfields(['filePathName']);
2008
+ this.getFilePathDetails(ServiceDetails['serviceTypeId']);
2009
+ }
2010
+ }
2011
+ // /*Action : Used to Get Asset Type to update Prefrence Path of Connectors */
2012
+ getServiceAssetDetails() {
2013
+ this.isAssetTypeLoading = true;
2014
+ this.httpGeneralConfigService
2015
+ .getUserPreferredAssetTypeDetails()
2016
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
2017
+ this.isAssetTypeLoading = false;
2018
+ this.cdr.markForCheck();
2019
+ }))
2020
+ .subscribe((data) => {
2021
+ this.userAssetTypeList = data;
2022
+ this.cdr.markForCheck();
2023
+ });
2024
+ }
2025
+ // /*Action : Used to Get Asset Name to update Prefrence Path of that Asset's Connectors */
2026
+ getServiceAssetName(assetTypeID) {
2027
+ this.isAssetNameLoading = true;
2028
+ let payload = {
2029
+ assetTypeId: assetTypeID,
2030
+ };
2031
+ this.httpGeneralConfigService
2032
+ .getUserPreferredAssetName(payload)
2033
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
2034
+ this.isAssetNameLoading = false;
2035
+ this.cdr.markForCheck();
2036
+ }))
2037
+ .subscribe((data) => {
2038
+ this.userAssetNameList = data;
2039
+ this.cdr.markForCheck();
2040
+ });
2041
+ }
2042
+ // /*Method : GET
2043
+ // Action : get User Assigned ServiceName By AssetTypeEvent */
2044
+ fetchServiceNameByAssetTypeEvent(assetName) {
2045
+ this.isConnectionMethodLoading = true;
2046
+ let payload = {
2047
+ assetName: assetName,
2048
+ };
2049
+ this.httpGeneralConfigService
2050
+ .getServiceNameByAssetTypeEvent(payload)
2051
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
2052
+ this.isConnectionMethodLoading = false;
2053
+ this.cdr.markForCheck();
2054
+ }))
2055
+ .subscribe((data) => {
2056
+ this.userServiceList = data;
2057
+ this.cdr.markForCheck();
2058
+ });
2059
+ }
2060
+ // /*Method : GET
2061
+ // Action : Fetch User's File Path Details and Status already set or not */
2062
+ getFilePathDetails(serviceID) {
2063
+ let payload = {
2064
+ serviceTypeId: serviceID,
2065
+ };
2066
+ this.httpGeneralConfigService
2067
+ .getPreferencePathDetails(payload)
2068
+ .pipe(takeUntilDestroyed(this.destroyRef))
2069
+ .subscribe((res) => {
2070
+ this.preferencePathID = res['spmId'];
2071
+ if (res && res['currentSetting'] && res['lastUpdate']) {
2072
+ this.showStatus = true;
2073
+ this.filePathName = res['currentSetting'];
2074
+ this.lastUpdatedFileStatus = res['lastUpdate'];
2075
+ }
2076
+ else {
2077
+ this.filePathName = '';
2078
+ this.showStatus = false;
2079
+ this.lastUpdatedFileStatus = '';
2080
+ }
2081
+ this.cdr.markForCheck();
2082
+ });
2083
+ }
2084
+ // /*Action : It saves or updates a preference path of user */
2085
+ setUserPreferencePath(appSettingForm) {
2086
+ this.toggleBtnLoadder(true);
2087
+ const userpath = String(appSettingForm.value['filePathName']).trim();
2088
+ let payload = {
2089
+ serviceTypeId: appSettingForm.value['ServiceName']['serviceTypeId'],
2090
+ supDescription: userpath,
2091
+ spmId: this.preferencePathID,
2092
+ };
2093
+ this.httpGeneralConfigService
2094
+ .updatePreferencePath(payload)
2095
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
2096
+ this.toggleBtnLoadder(false);
2097
+ this.cdr.markForCheck();
2098
+ }))
2099
+ .subscribe((res) => {
2100
+ if (res) {
2101
+ this.resetForm();
2102
+ this.showStatus = false;
2103
+ this.msgService.success(this.pathSuccessMsg);
2104
+ }
2105
+ else {
2106
+ this.msgService.error(this.pathErrorMsg);
2107
+ }
2108
+ this.cdr.markForCheck();
2109
+ });
2110
+ }
2111
+ // //Method : Used to perform password reset of User
2112
+ resetLoggedInPwd() {
2113
+ if (this._vaptService.hasUnsafeInput(this.userResetPasswordForm.value)) {
2114
+ this.msgService.error(errorMsg.SCRIPTERROR);
2115
+ return;
2116
+ }
2117
+ this.userResetPasswordForm.markAllAsTouched();
2118
+ if (this.userResetPasswordForm.valid) {
2119
+ this.changeLoggedInPwd();
2120
+ }
2121
+ }
2122
+ // /*Method: will User New Password to API */
2123
+ changeLoggedInPwd() {
2124
+ //For Encrp/Dec
2125
+ let oldUserARCXWD = this.encryptService.encryptViaRSA(this.userResetPasswordForm.value['oldUserARCXWD']);
2126
+ //For Encrp/Dec
2127
+ let newUserARCXWD = this.encryptService.encryptViaRSA(this.userResetPasswordForm.value['newUserARCXWD']);
2128
+ let userPwdDetails = {
2129
+ ipAddress: '',
2130
+ oldUserARCXWD: oldUserARCXWD,
2131
+ newUserARCXWD: newUserARCXWD,
2132
+ authenticationType: 0,
2133
+ };
2134
+ this.toggleBtnLoadder(true);
2135
+ this.httpCommonService
2136
+ .setNewpassword(userPwdDetails)
2137
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
2138
+ this.toggleBtnLoadder(false);
2139
+ this.cdr.markForCheck();
2140
+ }))
2141
+ .subscribe((data) => {
2142
+ if (data['success']) {
2143
+ this.msgService.success(data['message']);
2144
+ this.userResetPasswordForm.reset();
2145
+ }
2146
+ else if (!data['success']) {
2147
+ this.msgService.error(data['errorMessage']);
2148
+ }
2149
+ this.cdr.markForCheck();
2150
+ });
2151
+ }
2152
+ // /*Method:
2153
+ // Action : Get Public Key for encryption of User Details */
2154
+ getEncryptKey() {
2155
+ let params = {
2156
+ type: 0,
2157
+ };
2158
+ this.loginService
2159
+ .getPrivateKey(params)
2160
+ .pipe(takeUntilDestroyed(this.destroyRef))
2161
+ .subscribe((data) => {
2162
+ if (data['success'] === true) {
2163
+ LoggedInUserInfo.privateKey = data['result'];
2164
+ }
2165
+ else if (data['success'] === false) {
2166
+ this.msgService.error(this.translateService.instant('Generic_lib.SessionTokenError'));
2167
+ }
2168
+ });
2169
+ }
2170
+ // /*Method : POST
2171
+ // Action : Get configuration ID based on to show hide Time Zone*/
2172
+ getglobalConfigDetails() {
2173
+ this.loginService
2174
+ .getglobalConfigDetails('1', [336])
2175
+ .pipe(takeUntilDestroyed(this.destroyRef))
2176
+ .subscribe((data) => {
2177
+ if (data && data.length > 0) {
2178
+ data.forEach((element) => {
2179
+ if (element && element['id'] === 336 && element['value'] === '0') {
2180
+ this.ShowTimeZoneBtn = true;
2181
+ }
2182
+ else {
2183
+ this.ShowTimeZoneBtn = false;
2184
+ }
2185
+ });
2186
+ }
2187
+ });
2188
+ }
2189
+ // // Show/Hide Password Fileds of Change Pwd form
2190
+ togglePasswordVisibility(flag) {
2191
+ if (flag === 1) {
2192
+ this.makeOldPwdVisible = !this.makeOldPwdVisible;
2193
+ }
2194
+ else if (flag === 2) {
2195
+ this.makeNewPwdVisible = !this.makeNewPwdVisible;
2196
+ }
2197
+ else if (flag === 3) {
2198
+ this.makeCnfrmPwdVisible = !this.makeCnfrmPwdVisible;
2199
+ }
2200
+ }
2201
+ resetForm() {
2202
+ this.appSettingForm.reset();
2203
+ }
2204
+ resetFormfields(fields) {
2205
+ fields.forEach((fieldsName) => {
2206
+ this.appSettingForm.get(fieldsName)?.reset();
2207
+ });
2208
+ }
2209
+ toggleBtnLoadder(flag) {
2210
+ this.isPathUpdated = flag;
2211
+ }
2212
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: GeneralConfigurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2213
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: GeneralConfigurationComponent, isStandalone: true, selector: "app-general-configuration", providers: [DialogService], ngImport: i0, template: "<div class=\"row my-3\">\r\n <!-- Left_Card_Started -->\r\n <div class=\"col-lg-4 pl-0\">\r\n <div class=\"left-card\">\r\n <div class=\"p-3\">\r\n <div class=\"profile-card\" [class.active]=\"ShowPreferencePathScreen\">\r\n <button type=\"button\" class=\"tertiary-btn w-100 text-start\"\r\n (click)=\"OpenPreferencePathScreen()\">\r\n <div class=\"p-2\">\r\n <div class=\"profile-label\">\r\n {{ \"Generic_lib.PreferencePath\" | translate }}\r\n </div>\r\n </div>\r\n </button>\r\n </div>\r\n <div class=\"profile-card\" [class.active]=\"ShowChangePasswordScreen\">\r\n <button type=\"button\" class=\"tertiary-btn w-100 text-start\"\r\n (click)=\"OpenChangePasswordScreen()\">\r\n <div class=\"p-2\">\r\n <div class=\"profile-label\">\r\n {{ \"Generic_lib.ChangePassword\" | translate }}\r\n </div>\r\n </div>\r\n </button>\r\n </div>\r\n <div class=\"profile-card\" [class.active]=\"ShowTimeZoneScreen\">\r\n <button type=\"button\" class=\"tertiary-btn w-100 text-start\"\r\n (click)=\"OpenTimezoneScreen()\">\r\n <div class=\"p-2\">\r\n <div class=\"profile-label\">\r\n {{ \"Generic_lib.PreferredTimezone\" | translate }}\r\n </div>\r\n </div>\r\n </button>\r\n </div>\r\n <div class=\"profile-card\" [class.active]=\"ShowLandinPgScreen\">\r\n <button type=\"button\" class=\"tertiary-btn w-100 text-start\"\r\n (click)=\"OpenLandingPgConfig()\">\r\n <div class=\"p-2\">\r\n <div class=\"profile-label\">\r\n {{ \"Generic_lib.LandingPageConfig\" | translate }}\r\n </div>\r\n </div>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Left_Card_Ended -->\r\n\r\n <!-- Preference PathScreen -->\r\n <ng-container>\r\n <div class=\"col-lg-6\" [hidden]=\"!ShowPreferencePathScreen\">\r\n <div class=\"preference-container\">\r\n <div class=\"mt-3\">\r\n <form [formGroup]=\"appSettingForm\">\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.AssetType\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div class=\"assets-dropdown\">\r\n <p-select\r\n [options]=\"userAssetTypeList\"\r\n formControlName=\"AssetType\"\r\n ariaLabel=\"{{ 'Generic_lib.AssetType' | translate }}\"\r\n placeholder=\"{{\r\n 'Generic_lib.AssetTypePlaceholder' | translate\r\n }}\"\r\n filterPlaceholder=\"{{ 'Generic_lib.Search' | translate }}\"\r\n (onChange)=\"preferencePathValueChange(AssetTypeEvent)\"\r\n optionLabel=\"assetType\"\r\n [filter]=\"!isAssetTypeLoading ? true : false\"\r\n filterBy=\"assetType\"\r\n [showClear]=\"false\"\r\n [resetFilterOnHide]=\"true\"\r\n panelStyleClass=\"{'dropdown-loader': isAssetTypeLoading}\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n @if (isAssetTypeLoading) {\r\n <div class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n }\r\n </ng-template>\r\n </p-select>\r\n </div>\r\n @if (\r\n appSettingForm.get('AssetType')?.invalid &&\r\n appSettingForm.get('AssetType')?.touched\r\n ) {\r\n <span id=\"assettype-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.AssetTypeFieldValidation\" | translate\r\n }}</span>\r\n }\r\n </div>\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.AssetName\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div class=\"assets-dropdown\">\r\n <p-select\r\n [options]=\"userAssetNameList\"\r\n formControlName=\"AssetName\"\r\n ariaLabel=\"{{ 'Generic_lib.AssetName' | translate }}\"\r\n placeholder=\"{{\r\n 'Generic_lib.AssetNamePlaceholder' | translate\r\n }}\"\r\n filterPlaceholder=\"{{ 'Generic_lib.Search' | translate }}\"\r\n optionLabel=\"assetName\"\r\n [filter]=\"!isAssetNameLoading ? true : false\"\r\n filterBy=\"assetType\"\r\n (onChange)=\"preferencePathValueChange(AssetNameEvent)\"\r\n filterBy=\"assetName\"\r\n panelStyleClass=\"{'dropdown-loader': isAssetNameLoading}\"\r\n [showClear]=\"false\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n @if (isAssetNameLoading) {\r\n <div class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n }\r\n </ng-template>\r\n </p-select>\r\n </div>\r\n @if (\r\n appSettingForm.get('AssetName')?.invalid &&\r\n appSettingForm.get('AssetName')?.touched\r\n ) {\r\n <span id=\"assetname-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.AssetNameFieldValidation\" | translate\r\n }}</span>\r\n }\r\n </div>\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.ConnectionMethod\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div class=\"assets-dropdown\">\r\n <p-select\r\n [options]=\"userServiceList\"\r\n formControlName=\"ServiceName\"\r\n ariaLabel=\"{{ 'Generic_lib.ConnectionMethod' | translate }}\"\r\n filterPlaceholder=\"{{ 'Generic_lib.Search' | translate }}\"\r\n placeholder=\"{{\r\n 'Generic_lib.ConnectionMethodPlaceholder' | translate\r\n }}\"\r\n optionLabel=\"tbvDescrption\"\r\n [filter]=\"true\"\r\n filterBy=\"tbvDescrption\"\r\n (onChange)=\"preferencePathValueChange(ConnectionMethodEvent)\"\r\n [filter]=\"!isConnectionMethodLoading ? true : false\"\r\n [showClear]=\"false\"\r\n panelStyleClass=\"{'dropdown-loader': isConnectionMethodLoading}\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n @if (isConnectionMethodLoading) {\r\n <div class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n } </ng-template\r\n ></p-select>\r\n </div>\r\n @if (\r\n appSettingForm.get('ServiceName')?.invalid &&\r\n appSettingForm.get('ServiceName')?.touched\r\n ) {\r\n <span id=\"servicename-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.ConnectionMethodFieldValidation\" | translate\r\n }}</span>\r\n }\r\n </div>\r\n <div class=\"form-group position-relative\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.PreferencePath\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div class=\"input-dropdown d-flex align-items-center\">\r\n <input\r\n type=\"text\"\r\n placeholder=\"{{ 'Generic_lib.PreferencePath' | translate }}\"\r\n aria-label=\"{{ 'Generic_lib.PreferencePath' | translate }}\"\r\n aria-describedby=\"filepath-required-error filepath-space-error\"\r\n pInputText\r\n formControlName=\"filePathName\"\r\n id=\"filepath\"\r\n name=\"filepath\"\r\n autocomplete=\"off\"\r\n />\r\n <img\r\n src=\"assets/common-header-lib/images/filepath.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n class=\"position-absolute mx-2 img-lock ext\"\r\n />\r\n </div>\r\n @if (\r\n appSettingForm.get('filePathName')?.invalid &&\r\n (appSettingForm.get('filePathName')?.touched ||\r\n appSettingForm.get('filePathName')?.dirty)\r\n ) {\r\n @if (\r\n appSettingForm.controls['filePathName'].errors?.['required']\r\n ) {\r\n <span id=\"filepath-required-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.PreferencePathFieldValidation\" | translate\r\n }}</span>\r\n }\r\n @if (\r\n appSettingForm.controls['filePathName'].errors?.['noSpace']\r\n ) {\r\n <span id=\"filepath-space-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.PreferencePathFieldSpaceValidation\" | translate\r\n }}</span>\r\n }\r\n }\r\n </div>\r\n @if (showStatus) {\r\n <div class=\"form-group d-flex align-items-center\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.CurrentSetting\" | translate }} :\r\n </div>\r\n <div class=\"cur-text mx-2\">{{ filePathName }}</div>\r\n </div>\r\n <div class=\"form-group d-flex align-items-center\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.LastUpdated\" | translate }}\r\n </div>\r\n <div class=\"cur-text mx-2\">{{ lastUpdatedFileStatus }}</div>\r\n </div>\r\n }\r\n <div class=\"mt-4\">\r\n <p-button\r\n class=\"submit-btn\"\r\n label=\"{{ 'Generic_lib.Update' | translate }}\"\r\n [disabled]=\"appSettingForm.invalid\"\r\n (onClick)=\"setUserPreferencePath(appSettingForm)\"\r\n iconPos=\"right\"\r\n [loading]=\"isPathUpdated\"\r\n ></p-button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- TimeZone Screen -->\r\n @if (ShowTimeZoneScreen) {\r\n <div class=\"col-lg-6\">\r\n <app-timezone-configuration></app-timezone-configuration>\r\n </div>\r\n }\r\n\r\n <!-- LandingPg Config Screen -->\r\n @if (ShowLandinPgScreen) {\r\n <div class=\"col-lg-6\">\r\n <app-landingpg-config></app-landingpg-config>\r\n </div>\r\n }\r\n\r\n <!--Change Password Screen -->\r\n <ng-container>\r\n <div class=\"col-lg-6\" [hidden]=\"!ShowChangePasswordScreen\">\r\n <div class=\"preference-container\">\r\n <div class=\"mt-3\">\r\n <form [formGroup]=\"userResetPasswordForm\">\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.CurrentPassword\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div\r\n class=\"input-dropdown d-flex align-items-center position-relative\"\r\n >\r\n <div class=\"password-checkbox-right\">\r\n <div class=\"checkbox-visibility-icon\">\r\n <input\r\n type=\"checkbox\"\r\n aria-label=\"Show current password\"\r\n (change)=\"togglePasswordVisibility(1)\"\r\n autocomplete=\"off\"\r\n />\r\n <span></span>\r\n </div>\r\n </div>\r\n <input\r\n type=\"{{ makeOldPwdVisible ? 'password' : 'text' }}\"\r\n placeholder=\"{{\r\n 'Generic_lib.PasswordPlaceholder' | translate\r\n }}\"\r\n pInputText\r\n formControlName=\"oldUserARCXWD\"\r\n autocomplete=\"off\"\r\n id=\"oldpwd\"\r\n name=\"oldpwd\"\r\n aria-describedby=\"oldpwd-error\"\r\n />\r\n\r\n <img\r\n src=\"assets/common-header-lib/images/lock-pass.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n class=\"position-absolute mx-2 img-lock\"\r\n />\r\n </div>\r\n @if (\r\n userResetPasswordForm.get('oldUserARCXWD')?.invalid &&\r\n userResetPasswordForm.get('oldUserARCXWD')?.touched\r\n ) {\r\n <span id=\"oldpwd-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.PasswordFieldValidation\" | translate\r\n }}</span>\r\n }\r\n </div>\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.NewPassword\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div\r\n class=\"input-dropdown d-flex align-items-center position-relative\"\r\n >\r\n <div class=\"password-checkbox-right\">\r\n <div class=\"checkbox-visibility-icon\">\r\n <input\r\n type=\"checkbox\"\r\n aria-label=\"Show new password\"\r\n (change)=\"togglePasswordVisibility(2)\"\r\n autocomplete=\"off\"\r\n />\r\n <span></span>\r\n </div>\r\n </div>\r\n <input\r\n type=\"{{ makeNewPwdVisible ? 'password' : 'text' }}\"\r\n placeholder=\"{{\r\n 'Generic_lib.NewPasswordPlaceholder' | translate\r\n }}\"\r\n pInputText\r\n formControlName=\"newUserARCXWD\"\r\n id=\"newpwd\"\r\n autocomplete=\"off\"\r\n name=\"newpwd\"\r\n aria-describedby=\"newpwd-required-error newpwd-invalid-error\"\r\n />\r\n\r\n <img\r\n src=\"assets/common-header-lib/images/lock-pass.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n class=\"position-absolute mx-2 img-lock\"\r\n />\r\n </div>\r\n @if (\r\n userResetPasswordForm\r\n .get('newUserARCXWD')\r\n ?.hasError('required') &&\r\n userResetPasswordForm.get('newUserARCXWD')?.touched\r\n ) {\r\n <span id=\"newpwd-required-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.NewPasswordFieldValidation\" | translate\r\n }}</span>\r\n }\r\n @if (\r\n userResetPasswordForm\r\n .get('newUserARCXWD')\r\n ?.hasError('pwdInvalid') &&\r\n userResetPasswordForm.get('newUserARCXWD')?.touched\r\n ) {\r\n <span id=\"newpwd-invalid-error\" role=\"alert\" class=\"error-msg mt-2\">{{ pwderrorMsg }}</span>\r\n }\r\n </div>\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.ConfirmPassword\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div\r\n class=\"input-dropdown d-flex align-items-center position-relative\"\r\n >\r\n <div class=\"password-checkbox-right\">\r\n <div class=\"checkbox-visibility-icon\">\r\n <input\r\n type=\"checkbox\"\r\n aria-label=\"Show confirm password\"\r\n (change)=\"togglePasswordVisibility(3)\"\r\n autocomplete=\"off\"\r\n />\r\n <span></span>\r\n </div>\r\n </div>\r\n <input\r\n type=\"{{ makeCnfrmPwdVisible ? 'password' : 'text' }}\"\r\n placeholder=\"{{\r\n 'Generic_lib.ConfirmPasswordPlaceholder' | translate\r\n }}\"\r\n pInputText\r\n formControlName=\"crnmNewUserARCXWD\"\r\n autocomplete=\"off\"\r\n id=\"crnmnewpwd\"\r\n name=\"crnmnewpwd\"\r\n aria-describedby=\"crnmpwd-required-error crnmpwd-confirm-error\"\r\n />\r\n\r\n <img\r\n src=\"assets/common-header-lib/images/lock-pass.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n class=\"position-absolute mx-2 img-lock\"\r\n />\r\n </div>\r\n @if (\r\n userResetPasswordForm\r\n .get('crnmNewUserARCXWD')\r\n ?.hasError('required') &&\r\n userResetPasswordForm.get('crnmNewUserARCXWD')?.touched\r\n ) {\r\n <span id=\"crnmpwd-required-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.ConfirmPasswordFieldValidation\" | translate\r\n }}</span>\r\n }\r\n @if (\r\n userResetPasswordForm\r\n .get('crnmNewUserARCXWD')\r\n ?.hasError('confirmedValidator')\r\n ) {\r\n <span id=\"crnmpwd-confirm-error\" role=\"alert\" class=\"error-msg mt-2\">\r\n {{\r\n \"Generic_lib.ConfirmPasswordFieldNewValidation\" | translate\r\n }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <div class=\"mt-4\">\r\n <p-button\r\n class=\"submit-btn\"\r\n label=\"{{ 'Generic_lib.Update' | translate }}\"\r\n iconPos=\"right\"\r\n [loading]=\"isPathUpdated\"\r\n label=\"Update\"\r\n (onClick)=\"resetLoggedInPwd()\"\r\n ></p-button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: [".pl{padding-left:0!important}.left-card{height:450px!important;background:var(--ag-header-background-color)!important;border-radius:8px!important}.left-card .profile-label{font-size:13px!important;color:#292f4c!important;font-weight:600!important}.left-card .profile-text{color:#676879!important;font-size:12px!important;font-weight:400!important;line-height:20px!important}.initial-text{width:50px;height:50px;display:flex;align-items:center;justify-content:center;font-size:15px;border-radius:50%;color:var(--white-color);background-color:#8e562e}.preference-container .path-title{font-size:20px;color:#292f4c}.preference-container .form-group{margin-bottom:15px}.preference-container .label-name{font-size:12px;color:#292f4c;line-height:26px;font-weight:600}.preference-container .cur-text{font-size:12px;color:#676879;line-height:26px;font-weight:600}.checkbox-visibility-icon{position:relative}.checkbox-visibility-icon input[type=checkbox]{opacity:0;position:absolute;top:4px;left:5px;transform:scale(1.7);z-index:2;cursor:pointer}.checkbox-visibility-icon input[type=checkbox]:checked+span{background:url(assets/common-header-lib/images/login-bg/visibility.svg) no-repeat 0px;height:12px;width:18px;display:block;background-size:17px}@media(min-width:992px){.checkbox-visibility-icon input[type=checkbox]:checked+span{height:12px;width:18px;background-size:17px}}.checkbox-visibility-icon input[type=checkbox]+span{background:url(assets/common-header-lib/images/login-bg/visibility_off.svg) no-repeat 0px;height:12px;width:18px;display:block;background-size:17px}@media(min-width:992px){.checkbox-visibility-icon input[type=checkbox]+span{height:24px;width:18px;background-size:17px}}.input-dropdown .p-inputtext{width:100%!important;border-radius:4px!important;font-size:12px!important;padding-left:28px!important;height:38px!important;border:1px solid #ced4da!important}.p-select-filter{border:1px solid #ced4da!important}.profile-card{cursor:pointer}.profile-card:hover{background:#e9ecef;color:#292f4c;border-radius:4px}.profile-card.active{border-radius:4px;cursor:pointer;background:#dcdfec url(assets/common-header-lib/images/grey-arrow.svg) no-repeat 96%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i2.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i4.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: LandingpgConfigComponent, selector: "app-landingpg-config" }, { kind: "component", type: TimezoneConfigurationComponent, selector: "app-timezone-configuration", outputs: ["closepopup"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2214
+ }
2215
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: GeneralConfigurationComponent, decorators: [{
2216
+ type: Component,
2217
+ args: [{ selector: 'app-general-configuration', providers: [DialogService], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, ReactiveFormsModule, InputTextModule, SelectModule, ButtonModule, TranslateModule, LandingpgConfigComponent, TimezoneConfigurationComponent], template: "<div class=\"row my-3\">\r\n <!-- Left_Card_Started -->\r\n <div class=\"col-lg-4 pl-0\">\r\n <div class=\"left-card\">\r\n <div class=\"p-3\">\r\n <div class=\"profile-card\" [class.active]=\"ShowPreferencePathScreen\">\r\n <button type=\"button\" class=\"tertiary-btn w-100 text-start\"\r\n (click)=\"OpenPreferencePathScreen()\">\r\n <div class=\"p-2\">\r\n <div class=\"profile-label\">\r\n {{ \"Generic_lib.PreferencePath\" | translate }}\r\n </div>\r\n </div>\r\n </button>\r\n </div>\r\n <div class=\"profile-card\" [class.active]=\"ShowChangePasswordScreen\">\r\n <button type=\"button\" class=\"tertiary-btn w-100 text-start\"\r\n (click)=\"OpenChangePasswordScreen()\">\r\n <div class=\"p-2\">\r\n <div class=\"profile-label\">\r\n {{ \"Generic_lib.ChangePassword\" | translate }}\r\n </div>\r\n </div>\r\n </button>\r\n </div>\r\n <div class=\"profile-card\" [class.active]=\"ShowTimeZoneScreen\">\r\n <button type=\"button\" class=\"tertiary-btn w-100 text-start\"\r\n (click)=\"OpenTimezoneScreen()\">\r\n <div class=\"p-2\">\r\n <div class=\"profile-label\">\r\n {{ \"Generic_lib.PreferredTimezone\" | translate }}\r\n </div>\r\n </div>\r\n </button>\r\n </div>\r\n <div class=\"profile-card\" [class.active]=\"ShowLandinPgScreen\">\r\n <button type=\"button\" class=\"tertiary-btn w-100 text-start\"\r\n (click)=\"OpenLandingPgConfig()\">\r\n <div class=\"p-2\">\r\n <div class=\"profile-label\">\r\n {{ \"Generic_lib.LandingPageConfig\" | translate }}\r\n </div>\r\n </div>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Left_Card_Ended -->\r\n\r\n <!-- Preference PathScreen -->\r\n <ng-container>\r\n <div class=\"col-lg-6\" [hidden]=\"!ShowPreferencePathScreen\">\r\n <div class=\"preference-container\">\r\n <div class=\"mt-3\">\r\n <form [formGroup]=\"appSettingForm\">\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.AssetType\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div class=\"assets-dropdown\">\r\n <p-select\r\n [options]=\"userAssetTypeList\"\r\n formControlName=\"AssetType\"\r\n ariaLabel=\"{{ 'Generic_lib.AssetType' | translate }}\"\r\n placeholder=\"{{\r\n 'Generic_lib.AssetTypePlaceholder' | translate\r\n }}\"\r\n filterPlaceholder=\"{{ 'Generic_lib.Search' | translate }}\"\r\n (onChange)=\"preferencePathValueChange(AssetTypeEvent)\"\r\n optionLabel=\"assetType\"\r\n [filter]=\"!isAssetTypeLoading ? true : false\"\r\n filterBy=\"assetType\"\r\n [showClear]=\"false\"\r\n [resetFilterOnHide]=\"true\"\r\n panelStyleClass=\"{'dropdown-loader': isAssetTypeLoading}\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n @if (isAssetTypeLoading) {\r\n <div class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n }\r\n </ng-template>\r\n </p-select>\r\n </div>\r\n @if (\r\n appSettingForm.get('AssetType')?.invalid &&\r\n appSettingForm.get('AssetType')?.touched\r\n ) {\r\n <span id=\"assettype-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.AssetTypeFieldValidation\" | translate\r\n }}</span>\r\n }\r\n </div>\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.AssetName\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div class=\"assets-dropdown\">\r\n <p-select\r\n [options]=\"userAssetNameList\"\r\n formControlName=\"AssetName\"\r\n ariaLabel=\"{{ 'Generic_lib.AssetName' | translate }}\"\r\n placeholder=\"{{\r\n 'Generic_lib.AssetNamePlaceholder' | translate\r\n }}\"\r\n filterPlaceholder=\"{{ 'Generic_lib.Search' | translate }}\"\r\n optionLabel=\"assetName\"\r\n [filter]=\"!isAssetNameLoading ? true : false\"\r\n filterBy=\"assetType\"\r\n (onChange)=\"preferencePathValueChange(AssetNameEvent)\"\r\n filterBy=\"assetName\"\r\n panelStyleClass=\"{'dropdown-loader': isAssetNameLoading}\"\r\n [showClear]=\"false\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n @if (isAssetNameLoading) {\r\n <div class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n }\r\n </ng-template>\r\n </p-select>\r\n </div>\r\n @if (\r\n appSettingForm.get('AssetName')?.invalid &&\r\n appSettingForm.get('AssetName')?.touched\r\n ) {\r\n <span id=\"assetname-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.AssetNameFieldValidation\" | translate\r\n }}</span>\r\n }\r\n </div>\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.ConnectionMethod\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div class=\"assets-dropdown\">\r\n <p-select\r\n [options]=\"userServiceList\"\r\n formControlName=\"ServiceName\"\r\n ariaLabel=\"{{ 'Generic_lib.ConnectionMethod' | translate }}\"\r\n filterPlaceholder=\"{{ 'Generic_lib.Search' | translate }}\"\r\n placeholder=\"{{\r\n 'Generic_lib.ConnectionMethodPlaceholder' | translate\r\n }}\"\r\n optionLabel=\"tbvDescrption\"\r\n [filter]=\"true\"\r\n filterBy=\"tbvDescrption\"\r\n (onChange)=\"preferencePathValueChange(ConnectionMethodEvent)\"\r\n [filter]=\"!isConnectionMethodLoading ? true : false\"\r\n [showClear]=\"false\"\r\n panelStyleClass=\"{'dropdown-loader': isConnectionMethodLoading}\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n @if (isConnectionMethodLoading) {\r\n <div class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n } </ng-template\r\n ></p-select>\r\n </div>\r\n @if (\r\n appSettingForm.get('ServiceName')?.invalid &&\r\n appSettingForm.get('ServiceName')?.touched\r\n ) {\r\n <span id=\"servicename-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.ConnectionMethodFieldValidation\" | translate\r\n }}</span>\r\n }\r\n </div>\r\n <div class=\"form-group position-relative\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.PreferencePath\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div class=\"input-dropdown d-flex align-items-center\">\r\n <input\r\n type=\"text\"\r\n placeholder=\"{{ 'Generic_lib.PreferencePath' | translate }}\"\r\n aria-label=\"{{ 'Generic_lib.PreferencePath' | translate }}\"\r\n aria-describedby=\"filepath-required-error filepath-space-error\"\r\n pInputText\r\n formControlName=\"filePathName\"\r\n id=\"filepath\"\r\n name=\"filepath\"\r\n autocomplete=\"off\"\r\n />\r\n <img\r\n src=\"assets/common-header-lib/images/filepath.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n class=\"position-absolute mx-2 img-lock ext\"\r\n />\r\n </div>\r\n @if (\r\n appSettingForm.get('filePathName')?.invalid &&\r\n (appSettingForm.get('filePathName')?.touched ||\r\n appSettingForm.get('filePathName')?.dirty)\r\n ) {\r\n @if (\r\n appSettingForm.controls['filePathName'].errors?.['required']\r\n ) {\r\n <span id=\"filepath-required-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.PreferencePathFieldValidation\" | translate\r\n }}</span>\r\n }\r\n @if (\r\n appSettingForm.controls['filePathName'].errors?.['noSpace']\r\n ) {\r\n <span id=\"filepath-space-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.PreferencePathFieldSpaceValidation\" | translate\r\n }}</span>\r\n }\r\n }\r\n </div>\r\n @if (showStatus) {\r\n <div class=\"form-group d-flex align-items-center\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.CurrentSetting\" | translate }} :\r\n </div>\r\n <div class=\"cur-text mx-2\">{{ filePathName }}</div>\r\n </div>\r\n <div class=\"form-group d-flex align-items-center\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.LastUpdated\" | translate }}\r\n </div>\r\n <div class=\"cur-text mx-2\">{{ lastUpdatedFileStatus }}</div>\r\n </div>\r\n }\r\n <div class=\"mt-4\">\r\n <p-button\r\n class=\"submit-btn\"\r\n label=\"{{ 'Generic_lib.Update' | translate }}\"\r\n [disabled]=\"appSettingForm.invalid\"\r\n (onClick)=\"setUserPreferencePath(appSettingForm)\"\r\n iconPos=\"right\"\r\n [loading]=\"isPathUpdated\"\r\n ></p-button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- TimeZone Screen -->\r\n @if (ShowTimeZoneScreen) {\r\n <div class=\"col-lg-6\">\r\n <app-timezone-configuration></app-timezone-configuration>\r\n </div>\r\n }\r\n\r\n <!-- LandingPg Config Screen -->\r\n @if (ShowLandinPgScreen) {\r\n <div class=\"col-lg-6\">\r\n <app-landingpg-config></app-landingpg-config>\r\n </div>\r\n }\r\n\r\n <!--Change Password Screen -->\r\n <ng-container>\r\n <div class=\"col-lg-6\" [hidden]=\"!ShowChangePasswordScreen\">\r\n <div class=\"preference-container\">\r\n <div class=\"mt-3\">\r\n <form [formGroup]=\"userResetPasswordForm\">\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.CurrentPassword\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div\r\n class=\"input-dropdown d-flex align-items-center position-relative\"\r\n >\r\n <div class=\"password-checkbox-right\">\r\n <div class=\"checkbox-visibility-icon\">\r\n <input\r\n type=\"checkbox\"\r\n aria-label=\"Show current password\"\r\n (change)=\"togglePasswordVisibility(1)\"\r\n autocomplete=\"off\"\r\n />\r\n <span></span>\r\n </div>\r\n </div>\r\n <input\r\n type=\"{{ makeOldPwdVisible ? 'password' : 'text' }}\"\r\n placeholder=\"{{\r\n 'Generic_lib.PasswordPlaceholder' | translate\r\n }}\"\r\n pInputText\r\n formControlName=\"oldUserARCXWD\"\r\n autocomplete=\"off\"\r\n id=\"oldpwd\"\r\n name=\"oldpwd\"\r\n aria-describedby=\"oldpwd-error\"\r\n />\r\n\r\n <img\r\n src=\"assets/common-header-lib/images/lock-pass.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n class=\"position-absolute mx-2 img-lock\"\r\n />\r\n </div>\r\n @if (\r\n userResetPasswordForm.get('oldUserARCXWD')?.invalid &&\r\n userResetPasswordForm.get('oldUserARCXWD')?.touched\r\n ) {\r\n <span id=\"oldpwd-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.PasswordFieldValidation\" | translate\r\n }}</span>\r\n }\r\n </div>\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.NewPassword\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div\r\n class=\"input-dropdown d-flex align-items-center position-relative\"\r\n >\r\n <div class=\"password-checkbox-right\">\r\n <div class=\"checkbox-visibility-icon\">\r\n <input\r\n type=\"checkbox\"\r\n aria-label=\"Show new password\"\r\n (change)=\"togglePasswordVisibility(2)\"\r\n autocomplete=\"off\"\r\n />\r\n <span></span>\r\n </div>\r\n </div>\r\n <input\r\n type=\"{{ makeNewPwdVisible ? 'password' : 'text' }}\"\r\n placeholder=\"{{\r\n 'Generic_lib.NewPasswordPlaceholder' | translate\r\n }}\"\r\n pInputText\r\n formControlName=\"newUserARCXWD\"\r\n id=\"newpwd\"\r\n autocomplete=\"off\"\r\n name=\"newpwd\"\r\n aria-describedby=\"newpwd-required-error newpwd-invalid-error\"\r\n />\r\n\r\n <img\r\n src=\"assets/common-header-lib/images/lock-pass.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n class=\"position-absolute mx-2 img-lock\"\r\n />\r\n </div>\r\n @if (\r\n userResetPasswordForm\r\n .get('newUserARCXWD')\r\n ?.hasError('required') &&\r\n userResetPasswordForm.get('newUserARCXWD')?.touched\r\n ) {\r\n <span id=\"newpwd-required-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.NewPasswordFieldValidation\" | translate\r\n }}</span>\r\n }\r\n @if (\r\n userResetPasswordForm\r\n .get('newUserARCXWD')\r\n ?.hasError('pwdInvalid') &&\r\n userResetPasswordForm.get('newUserARCXWD')?.touched\r\n ) {\r\n <span id=\"newpwd-invalid-error\" role=\"alert\" class=\"error-msg mt-2\">{{ pwderrorMsg }}</span>\r\n }\r\n </div>\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.ConfirmPassword\" | translate }}\r\n </div>\r\n <abbr class=\"madontary-icon\" [title]=\"'Generic_lib.RequiredField' | translate\" [attr.aria-label]=\"'Generic_lib.Required' | translate\">*</abbr>\r\n </div>\r\n <div\r\n class=\"input-dropdown d-flex align-items-center position-relative\"\r\n >\r\n <div class=\"password-checkbox-right\">\r\n <div class=\"checkbox-visibility-icon\">\r\n <input\r\n type=\"checkbox\"\r\n aria-label=\"Show confirm password\"\r\n (change)=\"togglePasswordVisibility(3)\"\r\n autocomplete=\"off\"\r\n />\r\n <span></span>\r\n </div>\r\n </div>\r\n <input\r\n type=\"{{ makeCnfrmPwdVisible ? 'password' : 'text' }}\"\r\n placeholder=\"{{\r\n 'Generic_lib.ConfirmPasswordPlaceholder' | translate\r\n }}\"\r\n pInputText\r\n formControlName=\"crnmNewUserARCXWD\"\r\n autocomplete=\"off\"\r\n id=\"crnmnewpwd\"\r\n name=\"crnmnewpwd\"\r\n aria-describedby=\"crnmpwd-required-error crnmpwd-confirm-error\"\r\n />\r\n\r\n <img\r\n src=\"assets/common-header-lib/images/lock-pass.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n class=\"position-absolute mx-2 img-lock\"\r\n />\r\n </div>\r\n @if (\r\n userResetPasswordForm\r\n .get('crnmNewUserARCXWD')\r\n ?.hasError('required') &&\r\n userResetPasswordForm.get('crnmNewUserARCXWD')?.touched\r\n ) {\r\n <span id=\"crnmpwd-required-error\" role=\"alert\" class=\"error-msg mt-2\">{{\r\n \"Generic_lib.ConfirmPasswordFieldValidation\" | translate\r\n }}</span>\r\n }\r\n @if (\r\n userResetPasswordForm\r\n .get('crnmNewUserARCXWD')\r\n ?.hasError('confirmedValidator')\r\n ) {\r\n <span id=\"crnmpwd-confirm-error\" role=\"alert\" class=\"error-msg mt-2\">\r\n {{\r\n \"Generic_lib.ConfirmPasswordFieldNewValidation\" | translate\r\n }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <div class=\"mt-4\">\r\n <p-button\r\n class=\"submit-btn\"\r\n label=\"{{ 'Generic_lib.Update' | translate }}\"\r\n iconPos=\"right\"\r\n [loading]=\"isPathUpdated\"\r\n label=\"Update\"\r\n (onClick)=\"resetLoggedInPwd()\"\r\n ></p-button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: [".pl{padding-left:0!important}.left-card{height:450px!important;background:var(--ag-header-background-color)!important;border-radius:8px!important}.left-card .profile-label{font-size:13px!important;color:#292f4c!important;font-weight:600!important}.left-card .profile-text{color:#676879!important;font-size:12px!important;font-weight:400!important;line-height:20px!important}.initial-text{width:50px;height:50px;display:flex;align-items:center;justify-content:center;font-size:15px;border-radius:50%;color:var(--white-color);background-color:#8e562e}.preference-container .path-title{font-size:20px;color:#292f4c}.preference-container .form-group{margin-bottom:15px}.preference-container .label-name{font-size:12px;color:#292f4c;line-height:26px;font-weight:600}.preference-container .cur-text{font-size:12px;color:#676879;line-height:26px;font-weight:600}.checkbox-visibility-icon{position:relative}.checkbox-visibility-icon input[type=checkbox]{opacity:0;position:absolute;top:4px;left:5px;transform:scale(1.7);z-index:2;cursor:pointer}.checkbox-visibility-icon input[type=checkbox]:checked+span{background:url(assets/common-header-lib/images/login-bg/visibility.svg) no-repeat 0px;height:12px;width:18px;display:block;background-size:17px}@media(min-width:992px){.checkbox-visibility-icon input[type=checkbox]:checked+span{height:12px;width:18px;background-size:17px}}.checkbox-visibility-icon input[type=checkbox]+span{background:url(assets/common-header-lib/images/login-bg/visibility_off.svg) no-repeat 0px;height:12px;width:18px;display:block;background-size:17px}@media(min-width:992px){.checkbox-visibility-icon input[type=checkbox]+span{height:24px;width:18px;background-size:17px}}.input-dropdown .p-inputtext{width:100%!important;border-radius:4px!important;font-size:12px!important;padding-left:28px!important;height:38px!important;border:1px solid #ced4da!important}.p-select-filter{border:1px solid #ced4da!important}.profile-card{cursor:pointer}.profile-card:hover{background:#e9ecef;color:#292f4c;border-radius:4px}.profile-card.active{border-radius:4px;cursor:pointer;background:#dcdfec url(assets/common-header-lib/images/grey-arrow.svg) no-repeat 96%}\n"] }]
2218
+ }] });
2219
+
2220
+ class NgTranslationComponent {
2221
+ constructor() {
2222
+ /* Languages provided by the host app (single source of truth — populated
2223
+ from languages.json by the host's app initializer and forwarded down
2224
+ through <lib-app-header> → <app-user-sidebar> → here).
2225
+ Falls back to GlobalConstants.USERFILTEREDLANGUAGES when not supplied
2226
+ so the component remains usable in legacy contexts. */
2227
+ this.languages = input([], ...(ngDevMode ? [{ debugName: "languages" }] : []));
2228
+ /* Effective list bound to the template; derived from the languages input
2229
+ with a fallback to GlobalConstants for legacy contexts. */
2230
+ this.languageList = [];
2231
+ this.selectedLang = GlobalConstants.DEFAULTLANG;
2232
+ this._translate = inject(TranslateService);
2233
+ this._localstorage = inject(StorageService);
2234
+ this.msgService = inject(ToastMsgService);
2235
+ // Signal inputs do not trigger ngOnChanges; mirror the previous
2236
+ // "reload on subsequent languages changes" behaviour with an effect
2237
+ // (ngOnInit still performs the initial load, so skip the first run).
2238
+ let isFirst = true;
2239
+ effect(() => {
2240
+ this.languages(); // track changes to the languages input
2241
+ if (isFirst) {
2242
+ isFirst = false;
2243
+ return;
2244
+ }
2245
+ this.loadLanguages();
2246
+ });
2247
+ }
2248
+ ngOnInit() {
2249
+ this.loadLanguages();
2250
+ }
2251
+ loadLanguages() {
2252
+ /* 1. Use languages input if provided; fall back to GlobalConstants
2253
+ for backward compatibility. */
2254
+ const langs = this.languages();
2255
+ this.languageList =
2256
+ !langs || langs.length === 0
2257
+ ? GlobalConstants.USERFILTEREDLANGUAGES || []
2258
+ : langs;
2259
+ /* 2. Read saved language */
2260
+ const savedLang = this._localstorage.getData(COOKIECONSTANT.USERLANG);
2261
+ if (savedLang) {
2262
+ try {
2263
+ const parsed = JSON.parse(savedLang);
2264
+ const validLang = this.languageList.find((x) => x.langKey === parsed?.langKey);
2265
+ this.selectedLang = validLang || GlobalConstants.DEFAULTLANG;
2266
+ }
2267
+ catch {
2268
+ this.selectedLang = GlobalConstants.DEFAULTLANG;
2269
+ }
2270
+ }
2271
+ else {
2272
+ this.selectedLang = GlobalConstants.DEFAULTLANG;
2273
+ }
2274
+ }
2275
+ /* Language Change */
2276
+ selectLang(event) {
2277
+ this.selectedLang = event?.value;
2278
+ this.useTranslate(this.selectedLang);
2279
+ }
2280
+ useTranslate(selectedLang) {
2281
+ this._translate.use(selectedLang.langKey).subscribe({
2282
+ next: () => {
2283
+ this.saveUserLanguage(selectedLang);
2284
+ },
2285
+ error: () => {
2286
+ this.msgService.error(this._translate.instant('Generic_lib.FailedToLoadLanguageFile'));
2287
+ },
2288
+ });
2289
+ }
2290
+ saveUserLanguage(lang) {
2291
+ this._localstorage.saveData(COOKIECONSTANT.USERLANG, JSON.stringify(lang));
2292
+ }
2293
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NgTranslationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2294
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: NgTranslationComponent, isStandalone: true, selector: "ng-translation", inputs: { languages: { classPropertyName: "languages", publicName: "languages", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<p-select [options]=\"languageList\" optionLabel=\"langName\"\r\n ariaLabel=\"{{ 'Generic_lib.SelectLanguage' | translate }}\"\r\n placeholder='{{ \"Generic_lib.SelectLanguage\" | translate }}'\r\n (onChange)=\"selectLang($event)\" [filter]=\"true\" filterBy=\"langName\"\r\n filterPlaceholder='{{ \"Generic_lib.Search\" | translate }}' [showClear]=\"false\"\r\n [(ngModel)]=\"selectedLang\"></p-select>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: SelectModule }, { kind: "component", type: i2.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2295
+ }
2296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NgTranslationComponent, decorators: [{
2297
+ type: Component,
2298
+ args: [{ selector: 'ng-translation', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [SelectModule, FormsModule, TranslateModule], template: "<p-select [options]=\"languageList\" optionLabel=\"langName\"\r\n ariaLabel=\"{{ 'Generic_lib.SelectLanguage' | translate }}\"\r\n placeholder='{{ \"Generic_lib.SelectLanguage\" | translate }}'\r\n (onChange)=\"selectLang($event)\" [filter]=\"true\" filterBy=\"langName\"\r\n filterPlaceholder='{{ \"Generic_lib.Search\" | translate }}' [showClear]=\"false\"\r\n [(ngModel)]=\"selectedLang\"></p-select>\r\n" }]
2299
+ }], ctorParameters: () => [], propDecorators: { languages: [{ type: i0.Input, args: [{ isSignal: true, alias: "languages", required: false }] }] } });
2300
+
2301
+ class UserSidebarComponent {
2302
+ constructor() {
2303
+ this.userDetails = {};
2304
+ this.showProfile = false;
2305
+ this.userdisplayName = '';
2306
+ this.userFirstName = '';
2307
+ this.userLastName = '';
2308
+ this.userLastLoggedIn = '';
2309
+ this.destroyRef = inject(DestroyRef);
2310
+ this.cdr = inject(ChangeDetectorRef);
2311
+ this.dialogService = inject(DialogService);
2312
+ this._cookieService = inject(CookieStorageManagerService);
2313
+ this.route = inject(Router);
2314
+ this.msgService = inject(ToastMsgService);
2315
+ this._localStorage = inject(StorageService);
2316
+ this.translateService = inject(TranslateService);
2317
+ this.httpCommonService = inject(HttpCommonService);
2318
+ /* Forwarded down to <ng-translation> so the language list is sourced
2319
+ from the host app instead of a separate library API call. */
2320
+ this.languages = input([], ...(ngDevMode ? [{ debugName: "languages" }] : []));
2321
+ this.closeDialogBox = output();
2322
+ this.ref = null;
2323
+ this.sec = 1;
2324
+ this.min = 2;
2325
+ this.Hr = 30;
2326
+ this.isOpenSidePopup = false;
2327
+ this.showUserDetails = false;
2328
+ }
2329
+ ngOnInit() {
2330
+ this.getLoggedInuserDteils();
2331
+ }
2332
+ //Method: Open User Setting Panel
2333
+ openUserSettingPanel() {
2334
+ this.ref = this.dialogService.open(GeneralConfigurationComponent, {
2335
+ header: this.translateService.instant('Generic_lib.GeneralConfiguration'),
2336
+ styleClass: 'general-configuration',
2337
+ closable: true, // ✅ FORCE enable
2338
+ closeOnEscape: true, // optional
2339
+ // DynamicDialog defaults resizable to true (undefined !== false), which
2340
+ // renders PrimeNG's .p-resizable-handle. Explicitly disable it.
2341
+ resizable: false,
2342
+ });
2343
+ }
2344
+ getLoggedInuserDteils() {
2345
+ this.httpCommonService
2346
+ .getLoggedInUserDetails()
2347
+ .pipe(takeUntilDestroyed(this.destroyRef))
2348
+ .subscribe((result) => {
2349
+ if (result && result['success'] && result['result']) {
2350
+ this.userDetails = result['result'];
2351
+ this.userdisplayName = this.userDetails['userDisplayName'];
2352
+ this.showProfile = true;
2353
+ this.getTotalSessionTime();
2354
+ this.setLoggedInUserName(this.userdisplayName);
2355
+ }
2356
+ else {
2357
+ this.showProfile = false;
2358
+ this.userDetails = {};
2359
+ }
2360
+ this.cdr.markForCheck();
2361
+ });
2362
+ }
2363
+ setLoggedInUserName(userdisplayName) {
2364
+ if (userdisplayName && userdisplayName.includes(' ')) {
2365
+ let splitStringArr = userdisplayName.split(' ');
2366
+ this.userFirstName = splitStringArr[0];
2367
+ this.userLastName = splitStringArr[1];
2368
+ }
2369
+ else {
2370
+ this.userdisplayName = userdisplayName;
2371
+ }
2372
+ }
2373
+ getcloseDialogBox() {
2374
+ this.closeDialogBox.emit(true);
2375
+ }
2376
+ getUserLoggedInTime() {
2377
+ let LastLoggedIn = this.convertUTCToLocal(this.userDetails['lastLogIn']);
2378
+ let LastLoggedInDate = new Date(LastLoggedIn);
2379
+ this.userLastLoggedIn = LastLoggedInDate.toLocaleString();
2380
+ }
2381
+ logoutCurrentUser() {
2382
+ this.httpCommonService
2383
+ .getInitiateUserLogout()
2384
+ .pipe()
2385
+ .subscribe((res) => {
2386
+ if (res) {
2387
+ this._cookieService.clearAllCookies();
2388
+ this._localStorage.clearData();
2389
+ if (res && res['spLogoutUrls'] && res['spLogoutUrls'].length > 0) {
2390
+ this.destoryAllSessions(res['spLogoutUrls']);
2391
+ }
2392
+ if (res?.['identity']) {
2393
+ this.userWithWindowAuthentication();
2394
+ }
2395
+ else {
2396
+ const path = '/' + RoutePaths.LOGINPG_PATH;
2397
+ const urlnew = globalThis.location.origin + '/#' + path;
2398
+ globalThis.location.href = urlnew;
2399
+ }
2400
+ }
2401
+ else {
2402
+ this.msgService.error(errorMsg.LOGOUTERROR);
2403
+ }
2404
+ });
2405
+ }
2406
+ /**
2407
+ * This function destroys all user sessions by opening multiple SAML logout URLs in new browser tabs.
2408
+ */
2409
+ destoryAllSessions(samlUrls) {
2410
+ samlUrls.forEach((url) => {
2411
+ globalThis.open(url, '_blank');
2412
+ });
2413
+ }
2414
+ userWithWindowAuthentication() {
2415
+ const path = '/' + RoutePaths.LOGOUT_PATH;
2416
+ this.route.navigateByUrl(path);
2417
+ }
2418
+ getTotalSessionTime() {
2419
+ let loginTime = this.convertUTCToLocal(this.userDetails['currentLogIn']);
2420
+ let loginTimeDate = new Date(loginTime);
2421
+ let currentTime = new Date();
2422
+ let milliseconds = currentTime.valueOf() - loginTimeDate.valueOf();
2423
+ let seconds = Math.floor(milliseconds / 1000);
2424
+ let minutes = Math.floor(seconds / 60);
2425
+ let hours = Math.floor(minutes / 60);
2426
+ seconds = seconds % 60;
2427
+ minutes = minutes % 60;
2428
+ this.Hr = hours;
2429
+ this.min = minutes;
2430
+ this.sec = seconds;
2431
+ // Clear any existing timer before starting a new one to avoid duplicates.
2432
+ if (this.sessionTimerInterval) {
2433
+ clearInterval(this.sessionTimerInterval);
2434
+ }
2435
+ this.sessionTimerInterval = setInterval(() => {
2436
+ this.updateTimer();
2437
+ }, 1000);
2438
+ }
2439
+ updateTimer() {
2440
+ if (this.sec < 59) {
2441
+ this.sec += 1;
2442
+ }
2443
+ else {
2444
+ this.sec = 0;
2445
+ if (this.min < 59) {
2446
+ this.min += 1;
2447
+ }
2448
+ else {
2449
+ this.min = 0;
2450
+ this.Hr += 1;
2451
+ }
2452
+ }
2453
+ this.cdr.markForCheck();
2454
+ }
2455
+ convertUTCToLocal(newdate) {
2456
+ let localDate = newdate + 'Z';
2457
+ localDate = localDate.toLocaleString();
2458
+ return localDate;
2459
+ }
2460
+ OpenArconLearningCenter() {
2461
+ const helpPageURL = localStorage.getItem('_WAU');
2462
+ if (helpPageURL?.trim()) {
2463
+ try {
2464
+ const baseUrl = new URL(helpPageURL.trim());
2465
+ const finalUrl = `${baseUrl.origin}/helppageui/`;
2466
+ GlobalConstants.PlugInDownloadURL = finalUrl;
2467
+ window.open(finalUrl, '_blank');
2468
+ }
2469
+ catch (e) {
2470
+ }
2471
+ }
2472
+ else {
2473
+ }
2474
+ }
2475
+ //close Popup
2476
+ closeUserSettingPanel() {
2477
+ if (this.ref) {
2478
+ this.ref.close();
2479
+ }
2480
+ }
2481
+ ngOnDestroy() {
2482
+ this.closeUserSettingPanel();
2483
+ if (this.sessionTimerInterval) {
2484
+ clearInterval(this.sessionTimerInterval);
2485
+ }
2486
+ }
2487
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: UserSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2488
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: UserSidebarComponent, isStandalone: true, selector: "app-user-sidebar", inputs: { languages: { classPropertyName: "languages", publicName: "languages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closeDialogBox: "closeDialogBox" }, providers: [DialogService], ngImport: i0, template: "<div class=\"white-bg\">\r\n <div class=\"sidebar-outer white-bg\">\r\n <div class=\"sidebar-header grey-background\">\r\n <div class=\"sh-top\">\r\n <div class=\"sh-top-left d-flex\">\r\n <img\r\n src=\"assets/common-header-lib/images/logout.svg\"\r\n class=\"imgs\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n <button\r\n type=\"button\"\r\n class=\"tertiary-btn mx-2 log-text p-0\"\r\n (click)=\"logoutCurrentUser()\"\r\n >\r\n {{ \"Generic_lib.Logout\" | translate }}\r\n </button>\r\n </div>\r\n <div class=\"sh-top-right\">\r\n <button\r\n type=\"button\"\r\n class=\"common-bn tertiary-btn\"\r\n aria-label=\"{{ 'Generic_lib.Close' | translate }}\"\r\n (click)=\"getcloseDialogBox()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/close.svg\"\r\n class=\"imgs\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n title=\"Close\"\r\n />\r\n </button>\r\n </div>\r\n </div>\r\n @if (showProfile) {\r\n <div class=\"sh-bottom d-flex pt-3\">\r\n @if (userdisplayName && userdisplayName.length > 0) {\r\n <div class=\"initial-text\">\r\n {{ userdisplayName | sliceToTwo }}\r\n </div>\r\n } @else {\r\n <div class=\"initial-text\">\r\n {{ \"NA\" }}\r\n </div>\r\n }\r\n <div class=\"sh-bottom-content\">\r\n <h4 class=\"title\">{{ userDetails[\"userDisplayName\"] }}</h4>\r\n <p>{{ userDetails[\"emailID\"] }}</p>\r\n <div class=\"sh-bottom-content-ls\">\r\n @if (\r\n userDetails[\"lastLogIn\"] &&\r\n !userDetails[\"lastLogIn\"].includes(\"NA\")\r\n ) {\r\n <p style=\"margin-right: 5px\">\r\n {{ \"Generic_lib.LastSession\" | translate }} :\r\n </p>\r\n <p>{{ userDetails[\"lastLogIn\"] }}</p>\r\n } @else {\r\n <p style=\"margin-right: 5px\">\r\n {{ \"Generic_lib.LastSession\" | translate }} :\r\n </p>\r\n <p>NA</p>\r\n }\r\n </div>\r\n <div class=\"sh-bottom-content-ls session-content\">\r\n <p style=\"margin-right: 5px\">\r\n {{ \"Generic_lib.CurrentSession\" | translate }} :\r\n </p>\r\n <p>\r\n {{ Hr }} {{ \"Generic_lib.hrs\" | translate }} {{ min }}\r\n {{ \"Generic_lib.min\" | translate }} {{ sec }}\r\n {{ \"Generic_lib.secs\" | translate }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"loading-skeleton d-flex p-3\" aria-hidden=\"true\">\r\n <p-skeleton shape=\"circle\" size=\"4rem\" styleClass=\"mr-2\"></p-skeleton>\r\n <div class=\"ms-1\">\r\n <p-skeleton width=\"10rem\" styleClass=\"mb-2\"></p-skeleton>\r\n <p-skeleton\r\n width=\"8rem\"\r\n height=\".7rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton width=\"5rem\" styleClass=\"mb-2\"></p-skeleton>\r\n <p-skeleton height=\".5rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"sidebar-body\">\r\n <div class=\"sb-list pb-20px\">\r\n <ul>\r\n <li class=\"grey-bg-hover\">\r\n <img\r\n src=\"assets/common-header-lib/images/domain_img.svg\"\r\n loading=\"lazy\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n <div class=\"mx-2 lang-dropdown\">\r\n <ng-translation [languages]=\"languages()\"></ng-translation>\r\n </div>\r\n </li>\r\n <li class=\"grey-bg-hover\">\r\n <img\r\n src=\"assets/common-header-lib/images/local.svg\"\r\n class=\"imgs\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n <button\r\n type=\"button\"\r\n class=\"tertiary-btn tertiary-btn-profile mx-2\"\r\n (click)=\"OpenArconLearningCenter()\"\r\n >\r\n {{ \"Generic_lib.ArconLearningCenter\" | translate }}\r\n </button>\r\n </li>\r\n\r\n <li class=\"grey-bg-hover\">\r\n <img\r\n src=\"assets/common-header-lib/images/settings.svg\"\r\n class=\"imgs\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n <button\r\n type=\"button\"\r\n class=\"tertiary-btn tertiary-btn-profile mx-2\"\r\n (click)=\"openUserSettingPanel()\"\r\n >\r\n {{ \"Generic_lib.GeneralConfiguration\" | translate }}\r\n </button>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".white-bg{background-color:var(--white-color)!important;width:100%!important}.grey-background{background-color:var(--ag-header-background-color, #f6f7fb)!important}.imgs{width:20px!important}.cursor-pointer{cursor:pointer}.sidebar-outer{width:100%!important;float:left!important}.sidebar-outer .sidebar-header{padding:12px 15px!important}.sidebar-outer .sidebar-header .sh-top{display:flex!important;align-items:center!important;justify-content:space-between!important}.sidebar-outer .sidebar-header .sh-top .sh-top-left{display:flex!important;align-items:center!important}.sidebar-outer .sidebar-header .sh-top .sh-top-left .log-text{font-size:14px!important;font-weight:500!important;cursor:pointer!important}.sidebar-outer .sidebar-header .sh-top .sh-top-right button{height:24px!important;border:none!important;background-color:transparent!important}.sidebar-outer .sidebar-header .sh-bottom{display:flex!important;padding-top:16px!important}.sidebar-outer .sidebar-header .sh-bottom .initial-text{width:40px;height:40px;display:flex;align-items:center;justify-content:center;font-size:15px;border-radius:50%;color:var(--white-color);background-color:#8e562e}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content{padding-left:14px!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .title{font-size:17px!important;font-weight:600!important;height:21px!important;margin-bottom:2px!important;line-height:26px!important;color:#292f4c!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content p{font-size:14px!important;line-height:22px!important;color:#676879!important;margin-bottom:0!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .sh-bottom-content-ls{display:flex!important;align-items:center!important;font-size:12px!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .session-content{position:relative!important;bottom:2px!important}.sidebar-outer .sidebar-body{padding:12px 20px!important;width:100%!important}.sidebar-outer .sidebar-body .sb-list{width:100%!important}.sidebar-outer .sidebar-body .sb-list ul{width:100%!important;list-style:none;padding-left:0;margin:0}.sidebar-outer .sidebar-body .sb-list ul li{display:flex!important;align-items:center!important;padding:8px 2px!important;cursor:pointer!important}.sidebar-outer .sidebar-body .sb-list ul li img{width:18px}.sidebar-outer .sidebar-body .sb-list ul li p{margin:0 0 0 8px!important;font-size:14px!important}.sidebar-outer .sidebar-body .sb-list ul li .lang-dropdown{margin-left:8px!important}.accessibility-container{background-color:var(--white-smoke-6);padding:7px 20px}.accessibility-container .btn{align-content:center;align-items:center;border:1px solid var(--dark-grey-color);color:var(--dim-grey-color);display:flex;font-size:10px;height:20px;justify-content:center;padding:0;width:20px;margin-right:5px;overflow:hidden}.accessibility-container .btn:last-child{margin-right:0}.accessibility-container .btn .theme{display:block;height:100%;margin-left:-50%;width:60%}.accessibility-container .btn .theme-red{background-color:var(--primary-color)}.accessibility-container .btn .theme-black{background-color:var(--black-color)}.accessibility-container .btn .theme-blue{background-color:var(--theme-blue)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: NgTranslationComponent, selector: "ng-translation", inputs: ["languages"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: SliceToTwoPipe, name: "sliceToTwo" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2489
+ }
2490
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: UserSidebarComponent, decorators: [{
2491
+ type: Component,
2492
+ args: [{ selector: 'app-user-sidebar', providers: [DialogService], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SkeletonModule, TranslateModule, NgTranslationComponent, SliceToTwoPipe], template: "<div class=\"white-bg\">\r\n <div class=\"sidebar-outer white-bg\">\r\n <div class=\"sidebar-header grey-background\">\r\n <div class=\"sh-top\">\r\n <div class=\"sh-top-left d-flex\">\r\n <img\r\n src=\"assets/common-header-lib/images/logout.svg\"\r\n class=\"imgs\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n <button\r\n type=\"button\"\r\n class=\"tertiary-btn mx-2 log-text p-0\"\r\n (click)=\"logoutCurrentUser()\"\r\n >\r\n {{ \"Generic_lib.Logout\" | translate }}\r\n </button>\r\n </div>\r\n <div class=\"sh-top-right\">\r\n <button\r\n type=\"button\"\r\n class=\"common-bn tertiary-btn\"\r\n aria-label=\"{{ 'Generic_lib.Close' | translate }}\"\r\n (click)=\"getcloseDialogBox()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/close.svg\"\r\n class=\"imgs\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n title=\"Close\"\r\n />\r\n </button>\r\n </div>\r\n </div>\r\n @if (showProfile) {\r\n <div class=\"sh-bottom d-flex pt-3\">\r\n @if (userdisplayName && userdisplayName.length > 0) {\r\n <div class=\"initial-text\">\r\n {{ userdisplayName | sliceToTwo }}\r\n </div>\r\n } @else {\r\n <div class=\"initial-text\">\r\n {{ \"NA\" }}\r\n </div>\r\n }\r\n <div class=\"sh-bottom-content\">\r\n <h4 class=\"title\">{{ userDetails[\"userDisplayName\"] }}</h4>\r\n <p>{{ userDetails[\"emailID\"] }}</p>\r\n <div class=\"sh-bottom-content-ls\">\r\n @if (\r\n userDetails[\"lastLogIn\"] &&\r\n !userDetails[\"lastLogIn\"].includes(\"NA\")\r\n ) {\r\n <p style=\"margin-right: 5px\">\r\n {{ \"Generic_lib.LastSession\" | translate }} :\r\n </p>\r\n <p>{{ userDetails[\"lastLogIn\"] }}</p>\r\n } @else {\r\n <p style=\"margin-right: 5px\">\r\n {{ \"Generic_lib.LastSession\" | translate }} :\r\n </p>\r\n <p>NA</p>\r\n }\r\n </div>\r\n <div class=\"sh-bottom-content-ls session-content\">\r\n <p style=\"margin-right: 5px\">\r\n {{ \"Generic_lib.CurrentSession\" | translate }} :\r\n </p>\r\n <p>\r\n {{ Hr }} {{ \"Generic_lib.hrs\" | translate }} {{ min }}\r\n {{ \"Generic_lib.min\" | translate }} {{ sec }}\r\n {{ \"Generic_lib.secs\" | translate }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"loading-skeleton d-flex p-3\" aria-hidden=\"true\">\r\n <p-skeleton shape=\"circle\" size=\"4rem\" styleClass=\"mr-2\"></p-skeleton>\r\n <div class=\"ms-1\">\r\n <p-skeleton width=\"10rem\" styleClass=\"mb-2\"></p-skeleton>\r\n <p-skeleton\r\n width=\"8rem\"\r\n height=\".7rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton width=\"5rem\" styleClass=\"mb-2\"></p-skeleton>\r\n <p-skeleton height=\".5rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"sidebar-body\">\r\n <div class=\"sb-list pb-20px\">\r\n <ul>\r\n <li class=\"grey-bg-hover\">\r\n <img\r\n src=\"assets/common-header-lib/images/domain_img.svg\"\r\n loading=\"lazy\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n <div class=\"mx-2 lang-dropdown\">\r\n <ng-translation [languages]=\"languages()\"></ng-translation>\r\n </div>\r\n </li>\r\n <li class=\"grey-bg-hover\">\r\n <img\r\n src=\"assets/common-header-lib/images/local.svg\"\r\n class=\"imgs\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n <button\r\n type=\"button\"\r\n class=\"tertiary-btn tertiary-btn-profile mx-2\"\r\n (click)=\"OpenArconLearningCenter()\"\r\n >\r\n {{ \"Generic_lib.ArconLearningCenter\" | translate }}\r\n </button>\r\n </li>\r\n\r\n <li class=\"grey-bg-hover\">\r\n <img\r\n src=\"assets/common-header-lib/images/settings.svg\"\r\n class=\"imgs\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n <button\r\n type=\"button\"\r\n class=\"tertiary-btn tertiary-btn-profile mx-2\"\r\n (click)=\"openUserSettingPanel()\"\r\n >\r\n {{ \"Generic_lib.GeneralConfiguration\" | translate }}\r\n </button>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".white-bg{background-color:var(--white-color)!important;width:100%!important}.grey-background{background-color:var(--ag-header-background-color, #f6f7fb)!important}.imgs{width:20px!important}.cursor-pointer{cursor:pointer}.sidebar-outer{width:100%!important;float:left!important}.sidebar-outer .sidebar-header{padding:12px 15px!important}.sidebar-outer .sidebar-header .sh-top{display:flex!important;align-items:center!important;justify-content:space-between!important}.sidebar-outer .sidebar-header .sh-top .sh-top-left{display:flex!important;align-items:center!important}.sidebar-outer .sidebar-header .sh-top .sh-top-left .log-text{font-size:14px!important;font-weight:500!important;cursor:pointer!important}.sidebar-outer .sidebar-header .sh-top .sh-top-right button{height:24px!important;border:none!important;background-color:transparent!important}.sidebar-outer .sidebar-header .sh-bottom{display:flex!important;padding-top:16px!important}.sidebar-outer .sidebar-header .sh-bottom .initial-text{width:40px;height:40px;display:flex;align-items:center;justify-content:center;font-size:15px;border-radius:50%;color:var(--white-color);background-color:#8e562e}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content{padding-left:14px!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .title{font-size:17px!important;font-weight:600!important;height:21px!important;margin-bottom:2px!important;line-height:26px!important;color:#292f4c!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content p{font-size:14px!important;line-height:22px!important;color:#676879!important;margin-bottom:0!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .sh-bottom-content-ls{display:flex!important;align-items:center!important;font-size:12px!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .session-content{position:relative!important;bottom:2px!important}.sidebar-outer .sidebar-body{padding:12px 20px!important;width:100%!important}.sidebar-outer .sidebar-body .sb-list{width:100%!important}.sidebar-outer .sidebar-body .sb-list ul{width:100%!important;list-style:none;padding-left:0;margin:0}.sidebar-outer .sidebar-body .sb-list ul li{display:flex!important;align-items:center!important;padding:8px 2px!important;cursor:pointer!important}.sidebar-outer .sidebar-body .sb-list ul li img{width:18px}.sidebar-outer .sidebar-body .sb-list ul li p{margin:0 0 0 8px!important;font-size:14px!important}.sidebar-outer .sidebar-body .sb-list ul li .lang-dropdown{margin-left:8px!important}.accessibility-container{background-color:var(--white-smoke-6);padding:7px 20px}.accessibility-container .btn{align-content:center;align-items:center;border:1px solid var(--dark-grey-color);color:var(--dim-grey-color);display:flex;font-size:10px;height:20px;justify-content:center;padding:0;width:20px;margin-right:5px;overflow:hidden}.accessibility-container .btn:last-child{margin-right:0}.accessibility-container .btn .theme{display:block;height:100%;margin-left:-50%;width:60%}.accessibility-container .btn .theme-red{background-color:var(--primary-color)}.accessibility-container .btn .theme-black{background-color:var(--black-color)}.accessibility-container .btn .theme-blue{background-color:var(--theme-blue)}\n"] }]
2493
+ }], propDecorators: { languages: [{ type: i0.Input, args: [{ isSignal: true, alias: "languages", required: false }] }], closeDialogBox: [{ type: i0.Output, args: ["closeDialogBox"] }] } });
2494
+
2495
+ /**
2496
+ * 9-dots waffle panel — shows the list of applications the logged-in user can access.
2497
+ *
2498
+ * Extracted from CommonHeaderLibComponent to remove the God class smell.
2499
+ * Responsibilities:
2500
+ * - Toggle the PrimeNG popover on the 9-dots button click
2501
+ * - Lazily load the app list on first open (avoids an API call if never opened)
2502
+ * - Run pre-connection checks for specific apps before launching them
2503
+ */
2504
+ class AppPanelComponent {
2505
+ constructor() {
2506
+ this.httpCommonService = inject(HttpCommonService);
2507
+ this.msgService = inject(ToastMsgService);
2508
+ this.destroyRef = inject(DestroyRef);
2509
+ this.cdRef = inject(ChangeDetectorRef);
2510
+ this.popoverRef = viewChild.required('appPopover');
2511
+ this.APP_PANEL_SKELETON_COUNT = 12;
2512
+ /** List of apps the user is privileged to access. */
2513
+ this.ListOfUserPrivillegedApp = [];
2514
+ /** Controls skeleton loader while the app list is being fetched. */
2515
+ this.userAppLoaderLoadder = true;
2516
+ this.repeatLoader = new Array(this.APP_PANEL_SKELETON_COUNT).fill(0);
2517
+ // Some apps require a pre-launch validation before the URL is opened.
2518
+ // Only APP032 (MFA) and APP033 (internal config) have checks.
2519
+ // All other apps open directly without any pre-validation.
2520
+ this.APP_CONNECTION_CHECKS = {
2521
+ APP032: { check: () => this.httpCommonService.checkMFAConfiguration() },
2522
+ APP033: { check: () => this.httpCommonService.getInternalAppConfig('app033') },
2523
+ };
2524
+ }
2525
+ /** Toggles the popover and fetches the app list the first time it opens. */
2526
+ toggle(event) {
2527
+ this.popoverRef().toggle(event);
2528
+ if (this.ListOfUserPrivillegedApp.length === 0) {
2529
+ this.getUserAssignedApp();
2530
+ }
2531
+ }
2532
+ /** Fetches the apps assigned to the current user. */
2533
+ getUserAssignedApp() {
2534
+ this.ListOfUserPrivillegedApp = [];
2535
+ this.userAppLoaderLoadder = true;
2536
+ this.httpCommonService
2537
+ .getUserAssignedApps()
2538
+ .pipe(takeUntilDestroyed(this.destroyRef))
2539
+ .subscribe((result) => {
2540
+ this.userAppLoaderLoadder = false;
2541
+ this.ListOfUserPrivillegedApp = result;
2542
+ this.cdRef.markForCheck();
2543
+ });
2544
+ }
2545
+ /** Handles a click on an app tile.
2546
+ * Apps with special pre-validation (MFA, internal config) are checked first;
2547
+ * all other apps open immediately. */
2548
+ getConnectionofApplication(appCode) {
2549
+ this.popoverRef()?.hide();
2550
+ const appCheck = this.APP_CONNECTION_CHECKS[appCode];
2551
+ const commonError = 'Unable to verify the application configuration.';
2552
+ if (!appCheck) {
2553
+ // No pre-validation needed — open the app directly
2554
+ this.httpCommonService.openAppConnection(appCode);
2555
+ return;
2556
+ }
2557
+ appCheck
2558
+ .check()
2559
+ .pipe(takeUntilDestroyed(this.destroyRef))
2560
+ .subscribe({
2561
+ next: (response) => {
2562
+ if (response?.isValid) {
2563
+ this.httpCommonService.openAppConnection(appCode);
2564
+ }
2565
+ else {
2566
+ this.msgService.error(response?.errorMessage || commonError);
2567
+ }
2568
+ },
2569
+ error: () => {
2570
+ this.msgService.error(commonError);
2571
+ },
2572
+ });
2573
+ }
2574
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2575
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AppPanelComponent, isStandalone: true, selector: "app-panel", viewQueries: [{ propertyName: "popoverRef", first: true, predicate: ["appPopover"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Waffle (9-dots) popover \u2014 anchored to the button that calls toggle() -->\r\n<p-popover #appPopover class=\"pt-0\" styleClass=\"app-panel\">\r\n\r\n @if (!userAppLoaderLoadder) {\r\n <!-- App grid: one tile per application the user is assigned to -->\r\n <div class=\"custom-popover-content\">\r\n <div class=\"waffle-align\">\r\n @for (appDetails of ListOfUserPrivillegedApp; track appDetails.appCode) {\r\n <button\r\n type=\"button\"\r\n class=\"waffle-popup\"\r\n [title]=\"appDetails['applicationName']\"\r\n [attr.aria-label]=\"appDetails['applicationName']\"\r\n (click)=\"getConnectionofApplication(appDetails['appCode'])\"\r\n >\r\n <!-- App icon loaded from assets using the app code as the filename -->\r\n @if (appDetails?.appCode) {\r\n <img\r\n src=\"assets/common-header-lib/images/{{\r\n appDetails.appCode\r\n }}.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n }\r\n <div class=\"waffle-text\">{{ appDetails[\"applicationName\"] }}</div>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n\r\n } @else {\r\n <!-- Skeleton placeholders shown while the app list is loading -->\r\n <div class=\"custom-popover-content skeleton-popover\">\r\n @for (item of repeatLoader; track $index) {\r\n <div\r\n class=\"d-flex flex-column align-items-center justify-content-center gap-2\"\r\n >\r\n <p-skeleton size=\"3rem\" aria-hidden=\"true\"></p-skeleton>\r\n <p-skeleton height=\".3rem\" width=\"35px\" aria-hidden=\"true\"></p-skeleton>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n</p-popover>\r\n", styles: ["@charset \"UTF-8\";.p-popover-content{padding:18px!important}.app-panel{--p-popover-arrow-left: -4px !important}.custom-popover-content{padding:10px;right:-5px;top:0;position:absolute;background:#fff;border-radius:8px;box-shadow:0 0 6px #9d9d9d}.custom-popover-content.skeleton-popover{width:313px;display:grid;grid-template-columns:auto auto auto;gap:10px}.waffle-align{display:grid;grid-template-columns:auto auto auto}.waffle{cursor:pointer;margin-right:16px}.waffle-popup{background:none;border:none;width:89px!important;margin-top:0;padding:8px 0 4px;display:flex;align-items:center;justify-content:center;flex-direction:column;cursor:pointer}.waffle-popup:hover{background:var(--primary-notification-bg);border-radius:10px}.waffle-popup img{height:40px}.waffle-text{font-size:11px;text-align:center;width:70px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;margin-top:-3px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i1$6.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2576
+ }
2577
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppPanelComponent, decorators: [{
2578
+ type: Component,
2579
+ args: [{ selector: 'app-panel', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, PopoverModule, SkeletonModule], template: "<!-- Waffle (9-dots) popover \u2014 anchored to the button that calls toggle() -->\r\n<p-popover #appPopover class=\"pt-0\" styleClass=\"app-panel\">\r\n\r\n @if (!userAppLoaderLoadder) {\r\n <!-- App grid: one tile per application the user is assigned to -->\r\n <div class=\"custom-popover-content\">\r\n <div class=\"waffle-align\">\r\n @for (appDetails of ListOfUserPrivillegedApp; track appDetails.appCode) {\r\n <button\r\n type=\"button\"\r\n class=\"waffle-popup\"\r\n [title]=\"appDetails['applicationName']\"\r\n [attr.aria-label]=\"appDetails['applicationName']\"\r\n (click)=\"getConnectionofApplication(appDetails['appCode'])\"\r\n >\r\n <!-- App icon loaded from assets using the app code as the filename -->\r\n @if (appDetails?.appCode) {\r\n <img\r\n src=\"assets/common-header-lib/images/{{\r\n appDetails.appCode\r\n }}.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n }\r\n <div class=\"waffle-text\">{{ appDetails[\"applicationName\"] }}</div>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n\r\n } @else {\r\n <!-- Skeleton placeholders shown while the app list is loading -->\r\n <div class=\"custom-popover-content skeleton-popover\">\r\n @for (item of repeatLoader; track $index) {\r\n <div\r\n class=\"d-flex flex-column align-items-center justify-content-center gap-2\"\r\n >\r\n <p-skeleton size=\"3rem\" aria-hidden=\"true\"></p-skeleton>\r\n <p-skeleton height=\".3rem\" width=\"35px\" aria-hidden=\"true\"></p-skeleton>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n</p-popover>\r\n", styles: ["@charset \"UTF-8\";.p-popover-content{padding:18px!important}.app-panel{--p-popover-arrow-left: -4px !important}.custom-popover-content{padding:10px;right:-5px;top:0;position:absolute;background:#fff;border-radius:8px;box-shadow:0 0 6px #9d9d9d}.custom-popover-content.skeleton-popover{width:313px;display:grid;grid-template-columns:auto auto auto;gap:10px}.waffle-align{display:grid;grid-template-columns:auto auto auto}.waffle{cursor:pointer;margin-right:16px}.waffle-popup{background:none;border:none;width:89px!important;margin-top:0;padding:8px 0 4px;display:flex;align-items:center;justify-content:center;flex-direction:column;cursor:pointer}.waffle-popup:hover{background:var(--primary-notification-bg);border-radius:10px}.waffle-popup img{height:40px}.waffle-text{font-size:11px;text-align:center;width:70px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;margin-top:-3px}\n"] }]
2580
+ }], propDecorators: { popoverRef: [{ type: i0.ViewChild, args: ['appPopover', { isSignal: true }] }] } });
2581
+
2582
+ /**
2583
+ * Notification side panel — shows event-wise pending ticket counts.
2584
+ *
2585
+ * Extracted from CommonHeaderLibComponent to remove the God class smell.
2586
+ * Responsibilities:
2587
+ * - Fetch event-wise notification counts from the API on open (ngOnInit)
2588
+ * - Accept real-time SignalR updates from the parent via the signalREvents input
2589
+ * - Allow the user to manually refresh the notification list
2590
+ * - Expose a two-way `visible` model so the parent can open/close the panel
2591
+ *
2592
+ * The @if (EnableNotifications()) guard in the parent template ensures this component
2593
+ * is never created (and therefore never calls the API) when notifications are disabled.
2594
+ */
2595
+ class NotificationPanelComponent {
2596
+ constructor() {
2597
+ /** Two-way binding — parent sets this to true to open the panel. */
2598
+ this.visible = model(false, ...(ngDevMode ? [{ debugName: "visible" }] : []));
2599
+ /** Formatted total notification count string shown in the panel header. */
2600
+ this.notificationCount = input('', ...(ngDevMode ? [{ debugName: "notificationCount" }] : []));
2601
+ /** Real-time event data pushed by SignalR from HeaderDataService via the parent.
2602
+ * null means no SignalR push has arrived yet. */
2603
+ this.signalREvents = input(null, ...(ngDevMode ? [{ debugName: "signalREvents" }] : []));
2604
+ this.httpCommonService = inject(HttpCommonService);
2605
+ this.destroyRef = inject(DestroyRef);
2606
+ this.cdRef = inject(ChangeDetectorRef);
2607
+ this.NOTIFICATION_SKELETON_COUNT = 9;
2608
+ /** Event-wise list displayed in the panel (one row per event type). */
2609
+ this.eventwiseNotificationCount = [];
2610
+ /** Controls skeleton loader while the API call is in progress. */
2611
+ this.notificationLoadder = true;
2612
+ /** True when the API returns an error or an empty list. */
2613
+ this.isErrorFound = false;
2614
+ this.repeatLoader = new Array(this.NOTIFICATION_SKELETON_COUNT).fill(0);
2615
+ // When the parent pushes new SignalR data, update the list immediately
2616
+ // without waiting for the next manual API call or refresh.
2617
+ effect(() => {
2618
+ const events = this.signalREvents();
2619
+ if (events !== null) {
2620
+ this.eventwiseNotificationCount = events;
2621
+ this.isErrorFound = false;
2622
+ this.notificationLoadder = false;
2623
+ this.cdRef.markForCheck();
2624
+ }
2625
+ });
2626
+ }
2627
+ ngOnInit() {
2628
+ // Load the notification list as soon as the panel is created
2629
+ this.getEventwiseNotificationCount();
2630
+ }
2631
+ /** Fetches pending ticket counts grouped by workflow event type.
2632
+ * Also called by the Refresh button in the template. */
2633
+ getEventwiseNotificationCount() {
2634
+ const payload = {
2635
+ ApplicationName: GlobalConstants.applicationName,
2636
+ UserId: '',
2637
+ };
2638
+ this.notificationLoadder = true;
2639
+ this.httpCommonService
2640
+ .getWorkFlowTicketEventwiseCount(payload)
2641
+ .pipe(takeUntilDestroyed(this.destroyRef),
2642
+ // Always hide the loader when the request ends, even on error
2643
+ finalize$1(() => {
2644
+ this.notificationLoadder = false;
2645
+ this.cdRef.markForCheck();
2646
+ }))
2647
+ .subscribe({
2648
+ next: (data) => {
2649
+ this.isErrorFound = data.length === 0;
2650
+ this.eventwiseNotificationCount = data;
2651
+ this.cdRef.markForCheck();
2652
+ },
2653
+ error: () => {
2654
+ this.isErrorFound = true;
2655
+ this.cdRef.markForCheck();
2656
+ },
2657
+ });
2658
+ }
2659
+ /** Closes the panel by resetting the visible model. */
2660
+ closePanel() {
2661
+ this.visible.set(false);
2662
+ }
2663
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NotificationPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2664
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: NotificationPanelComponent, isStandalone: true, selector: "app-notification-panel", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, notificationCount: { classPropertyName: "notificationCount", publicName: "notificationCount", isSignal: true, isRequired: false, transformFunction: null }, signalREvents: { classPropertyName: "signalREvents", publicName: "signalREvents", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange" }, ngImport: i0, template: "<!-- Notification side panel \u2014 wrapped in SidePopupComponent (PrimeNG p-dialog) -->\r\n<app-side-popup\r\n [(visible)]=\"visible\"\r\n [position]=\"'right'\"\r\n [header]=\"'Generic_lib.Notification' | translate\"\r\n (closeDialogBox)=\"closePanel()\"\r\n class=\"notification-panel\"\r\n>\r\n <div class=\"sidebar-body\">\r\n <!-- Panel header: total count + manual refresh button -->\r\n <div class=\"d-flex justify-content-between align-items-center mb-2 mt-2\">\r\n <div class=\"noti-text\">\r\n {{\r\n \"Generic_lib.YouHaveNNotifications\"\r\n | translate: { count: notificationCount() }\r\n }}\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"d-flex align-items-center gap-1 refresh-icon tertiary-btn\"\r\n aria-label=\"{{ 'Generic_lib.Refresh' | translate }}\"\r\n (click)=\"getEventwiseNotificationCount()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/refresh-1.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n <div class=\"refresh-text\">\r\n {{ \"Generic_lib.Refresh\" | translate }}\r\n </div>\r\n </button>\r\n </div>\r\n\r\n <!-- Notification list / skeleton / error state -->\r\n <div class=\"mt-3\">\r\n @if (!isErrorFound && !notificationLoadder) {\r\n <!-- One row per workflow event type showing pending count -->\r\n @for (event of eventwiseNotificationCount; track $index) {\r\n <div class=\"notify-border\">\r\n <div class=\"d-flex align-items-center gap-3\">\r\n <div class=\"initial-text initial-text-1 mx-1\" aria-hidden=\"true\">\r\n <img\r\n src=\"assets/common-header-lib/images/noti_ticket.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n </div>\r\n <div>\r\n <div>\r\n <span class=\"service-count\"\r\n >{{ event[\"PendingCount\"] }} New\r\n </span>\r\n <span class=\"service-request\"\r\n >{{ event[\"EventName\"] }} Event requests</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"grey-borders mt-2\"></div>\r\n </div>\r\n }\r\n } @else {\r\n @if (notificationLoadder) {\r\n <!-- Skeleton rows shown while the API call is in progress -->\r\n @for (item of repeatLoader; track $index) {\r\n <div class=\"d-flex align-items-center gap-3\" aria-hidden=\"true\">\r\n <p-skeleton\r\n shape=\"circle\"\r\n size=\"60px\"\r\n styleClass=\"my-2\"\r\n ></p-skeleton>\r\n <div class=\"ms-1\">\r\n <p-skeleton width=\"200%\" styleClass=\"mb-2\"></p-skeleton>\r\n <p-skeleton width=\"150px\" height=\"1rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n }\r\n } @else {\r\n <!-- Error or empty state \u2014 shown when API fails or returns no records -->\r\n <app-no-service-my-access-pg\r\n heading=\"{{ 'Generic_lib.CommonError' | translate }}\"\r\n ></app-no-service-my-access-pg>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</app-side-popup>\r\n", styles: ["@charset \"UTF-8\";.notification-panel .p-dialog-header{padding:10px 20px!important;background:var(--ag-header-background-color)!important;height:45px;border-top-right-radius:0!important;border-top-left-radius:0!important;border-bottom:0!important}.notification-panel .p-dialog{width:420px!important;border-radius:0!important}.notification-panel .p-dialog-content{overflow-y:auto;padding:5px 3px 10px 22px!important}.notification-panel .tertiary-btn{margin-right:8px!important}.initial-text-1{background-color:#f2edfa}.sidebar-body .noti-text{color:#292f4c;font-size:13px;font-weight:600;line-height:24px}.sidebar-body .refresh-icon{cursor:pointer}.sidebar-body .refresh-text{color:#676879;font-size:12px;line-height:24px}.sidebar-body .notify-border{padding:8px 8px 0 6px;cursor:pointer}.sidebar-body .notify-border:hover{background-color:#dcdfec;border-radius:8px}.sidebar-body .notify-border .initial-text{width:40px;height:40px;display:flex;align-items:center;justify-content:center;font-size:11px;border-radius:50%;color:var(--white-color);background-color:#f2edfa}.sidebar-body .notify-border .service-count{color:#323238;font-weight:600;font-size:13px}.sidebar-body .notify-border .service-request{color:#676879;font-size:12px;font-weight:500}.sidebar-body .notify-border .time-text{color:#676879;font-size:12px}.sidebar-body .notify-border .grey-borders{border-bottom:1px solid #d0d4e4}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: SidePopupComponent, selector: "app-side-popup", inputs: ["visible", "position", "header"], outputs: ["closeDialogBox", "visibleChange"] }, { kind: "component", type: NoServiceMyAccessPgComponent, selector: "app-no-service-my-access-pg", inputs: ["heading", "subHeading"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2665
+ }
2666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NotificationPanelComponent, decorators: [{
2667
+ type: Component,
2668
+ args: [{ selector: 'app-notification-panel', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
2669
+ CommonModule,
2670
+ TranslateModule,
2671
+ SkeletonModule,
2672
+ SidePopupComponent,
2673
+ NoServiceMyAccessPgComponent,
2674
+ ], template: "<!-- Notification side panel \u2014 wrapped in SidePopupComponent (PrimeNG p-dialog) -->\r\n<app-side-popup\r\n [(visible)]=\"visible\"\r\n [position]=\"'right'\"\r\n [header]=\"'Generic_lib.Notification' | translate\"\r\n (closeDialogBox)=\"closePanel()\"\r\n class=\"notification-panel\"\r\n>\r\n <div class=\"sidebar-body\">\r\n <!-- Panel header: total count + manual refresh button -->\r\n <div class=\"d-flex justify-content-between align-items-center mb-2 mt-2\">\r\n <div class=\"noti-text\">\r\n {{\r\n \"Generic_lib.YouHaveNNotifications\"\r\n | translate: { count: notificationCount() }\r\n }}\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"d-flex align-items-center gap-1 refresh-icon tertiary-btn\"\r\n aria-label=\"{{ 'Generic_lib.Refresh' | translate }}\"\r\n (click)=\"getEventwiseNotificationCount()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/refresh-1.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n <div class=\"refresh-text\">\r\n {{ \"Generic_lib.Refresh\" | translate }}\r\n </div>\r\n </button>\r\n </div>\r\n\r\n <!-- Notification list / skeleton / error state -->\r\n <div class=\"mt-3\">\r\n @if (!isErrorFound && !notificationLoadder) {\r\n <!-- One row per workflow event type showing pending count -->\r\n @for (event of eventwiseNotificationCount; track $index) {\r\n <div class=\"notify-border\">\r\n <div class=\"d-flex align-items-center gap-3\">\r\n <div class=\"initial-text initial-text-1 mx-1\" aria-hidden=\"true\">\r\n <img\r\n src=\"assets/common-header-lib/images/noti_ticket.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n </div>\r\n <div>\r\n <div>\r\n <span class=\"service-count\"\r\n >{{ event[\"PendingCount\"] }} New\r\n </span>\r\n <span class=\"service-request\"\r\n >{{ event[\"EventName\"] }} Event requests</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"grey-borders mt-2\"></div>\r\n </div>\r\n }\r\n } @else {\r\n @if (notificationLoadder) {\r\n <!-- Skeleton rows shown while the API call is in progress -->\r\n @for (item of repeatLoader; track $index) {\r\n <div class=\"d-flex align-items-center gap-3\" aria-hidden=\"true\">\r\n <p-skeleton\r\n shape=\"circle\"\r\n size=\"60px\"\r\n styleClass=\"my-2\"\r\n ></p-skeleton>\r\n <div class=\"ms-1\">\r\n <p-skeleton width=\"200%\" styleClass=\"mb-2\"></p-skeleton>\r\n <p-skeleton width=\"150px\" height=\"1rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n }\r\n } @else {\r\n <!-- Error or empty state \u2014 shown when API fails or returns no records -->\r\n <app-no-service-my-access-pg\r\n heading=\"{{ 'Generic_lib.CommonError' | translate }}\"\r\n ></app-no-service-my-access-pg>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</app-side-popup>\r\n", styles: ["@charset \"UTF-8\";.notification-panel .p-dialog-header{padding:10px 20px!important;background:var(--ag-header-background-color)!important;height:45px;border-top-right-radius:0!important;border-top-left-radius:0!important;border-bottom:0!important}.notification-panel .p-dialog{width:420px!important;border-radius:0!important}.notification-panel .p-dialog-content{overflow-y:auto;padding:5px 3px 10px 22px!important}.notification-panel .tertiary-btn{margin-right:8px!important}.initial-text-1{background-color:#f2edfa}.sidebar-body .noti-text{color:#292f4c;font-size:13px;font-weight:600;line-height:24px}.sidebar-body .refresh-icon{cursor:pointer}.sidebar-body .refresh-text{color:#676879;font-size:12px;line-height:24px}.sidebar-body .notify-border{padding:8px 8px 0 6px;cursor:pointer}.sidebar-body .notify-border:hover{background-color:#dcdfec;border-radius:8px}.sidebar-body .notify-border .initial-text{width:40px;height:40px;display:flex;align-items:center;justify-content:center;font-size:11px;border-radius:50%;color:var(--white-color);background-color:#f2edfa}.sidebar-body .notify-border .service-count{color:#323238;font-weight:600;font-size:13px}.sidebar-body .notify-border .service-request{color:#676879;font-size:12px;font-weight:500}.sidebar-body .notify-border .time-text{color:#676879;font-size:12px}.sidebar-body .notify-border .grey-borders{border-bottom:1px solid #d0d4e4}\n"] }]
2675
+ }], ctorParameters: () => [], propDecorators: { visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], notificationCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "notificationCount", required: false }] }], signalREvents: [{ type: i0.Input, args: [{ isSignal: true, alias: "signalREvents", required: false }] }] } });
2676
+
2677
+ class EncrpdataService {
2678
+ constructor() {
2679
+ this.privateKey = "";
2680
+ }
2681
+ getASCIIValue(text) {
2682
+ let charCodeArr = [];
2683
+ for (let i = 0; i < text.length; i++) {
2684
+ let code = text.charCodeAt(i);
2685
+ charCodeArr.push(BigInt(code));
2686
+ }
2687
+ return charCodeArr;
2688
+ }
2689
+ getModuleValue(arr, num1, num2) {
2690
+ let numArr = [];
2691
+ for (let i = 0; i < arr.length; i++) {
2692
+ let code = arr[i] ** num2 % num1;
2693
+ numArr.push(code);
2694
+ }
2695
+ return numArr;
2696
+ }
2697
+ getEncrpytedData(text) {
2698
+ this.privateKey = LoggedInUserInfo.privateKey;
2699
+ let key = this.privateKey.split(',');
2700
+ const num1 = BigInt(key[0]);
2701
+ const num2 = BigInt(key[1]);
2702
+ //1. Convert string to phiN
2703
+ let asciiValue = this.getASCIIValue(text);
2704
+ //2. Get Mod of All Value
2705
+ let ModValue = this.getModuleValue(asciiValue, num1, num2);
2706
+ //3. Convert Arr to String
2707
+ const encodedText = ModValue.map(b => b.toString()).join('-');
2708
+ return encodedText;
2709
+ }
2710
+ encodeToBase64(text) {
2711
+ return btoa(text);
2712
+ }
2713
+ decodeToBase64(text) {
2714
+ return atob(text);
2715
+ }
2716
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EncrpdataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2717
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EncrpdataService, providedIn: 'root' }); }
2718
+ }
2719
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EncrpdataService, decorators: [{
2720
+ type: Injectable,
2721
+ args: [{
2722
+ providedIn: 'root',
2723
+ }]
2724
+ }] });
2725
+
2726
+ class RestSignalRService {
2727
+ constructor() {
2728
+ this.eventMsg = new BehaviorSubject({});
2729
+ this.AuthToken = '';
2730
+ this.hubURLS = [];
2731
+ this._localStorage = inject(StorageService);
2732
+ this._encrpdataService = inject(EncrpdataService);
2733
+ //Method: Established the Connection With SignalR to get RealTime Data
2734
+ this.establishedConnection = async () => {
2735
+ this.hubConnection = new signalR.HubConnectionBuilder()
2736
+ .withUrl(`${GlobalConstants.signalRURL}/chatHub`, {
2737
+ skipNegotiation: true,
2738
+ transport: signalR.HttpTransportType.WebSockets,
2739
+ headers: { Authorization: `Bearer ${this.AuthToken}` },
2740
+ })
2741
+ .build();
2742
+ try {
2743
+ await this.hubConnection.start();
2744
+ //* SignalR connection established successfully
2745
+ this.addMessageListener();
2746
+ }
2747
+ catch (error) {
2748
+ throw error;
2749
+ }
2750
+ };
2751
+ }
2752
+ async initializeSignalRConnection() {
2753
+ if (!GlobalConstants.signalRURL) {
2754
+ throw new Error('No hub URLs provided');
2755
+ }
2756
+ this.hubURLS = GlobalConstants.signalRURL
2757
+ ? GlobalConstants.signalRURL.split(',')
2758
+ : [];
2759
+ if (this.hubURLS.length === 1) {
2760
+ GlobalConstants.signalRURL = this.hubURLS[0];
2761
+ await this.establishedConnection();
2762
+ return;
2763
+ }
2764
+ let lastUsedIndex = this.getLastUsedIndex();
2765
+ for (let i = 0; i < this.hubURLS.length; i++) {
2766
+ const index = (lastUsedIndex + i) % this.hubURLS.length;
2767
+ GlobalConstants.signalRURL = this.hubURLS[index];
2768
+ try {
2769
+ await this.establishedConnection();
2770
+ this.setLastUsedIndex(index + 1); // Update for next round
2771
+ break; // Exit the loop if connection is successful
2772
+ }
2773
+ catch (error) {
2774
+ }
2775
+ }
2776
+ if (!this.hubConnection) {
2777
+ throw new Error('All SignalR connections failed');
2778
+ }
2779
+ }
2780
+ addMessageListener() {
2781
+ this.hubConnection.on('ReceiveMessage', (user, data) => {
2782
+ data = JSON.parse(data);
2783
+ this.emitEventMsg(data);
2784
+ });
2785
+ }
2786
+ emitEventMsg(data) {
2787
+ this.eventMsg.next(data);
2788
+ }
2789
+ listenerEventMsg() {
2790
+ return this.eventMsg.asObservable();
2791
+ }
2792
+ getLastUsedIndex() {
2793
+ const lastIndex = this._localStorage.getData(COOKIECONSTANT.SIGNALR_INDEX);
2794
+ return lastIndex
2795
+ ? Number(this._encrpdataService.decodeToBase64(lastIndex)) || 0
2796
+ : 0;
2797
+ }
2798
+ setLastUsedIndex(index) {
2799
+ const lastIndex = this._encrpdataService.encodeToBase64(index.toString());
2800
+ this._localStorage.saveData(COOKIECONSTANT.SIGNALR_INDEX, lastIndex);
2801
+ }
2802
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: RestSignalRService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2803
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: RestSignalRService, providedIn: 'root' }); }
2804
+ }
2805
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: RestSignalRService, decorators: [{
2806
+ type: Injectable,
2807
+ args: [{
2808
+ providedIn: 'root',
2809
+ }]
2810
+ }] });
2811
+
2812
+ /**
2813
+ * Handles all data loading and real-time state for the header.
2814
+ *
2815
+ * Extracted from CommonHeaderLibComponent to remove the God class smell.
2816
+ * Responsibilities:
2817
+ * - Load header data on init via a single forkJoin (notifications, user info, timezone, email count)
2818
+ * - Listen for real-time updates: SignalR notifications, timezone changes, email count, language
2819
+ * - Expose all results as signals so the template re-renders automatically
2820
+ *
2821
+ * Provided at the component level (not root) so each header instance gets its own state
2822
+ * and the service lifetime is tied to the component.
2823
+ */
2824
+ class HeaderDataService {
2825
+ constructor() {
2826
+ this.http = inject(HttpCommonService);
2827
+ this.signalR = inject(RestSignalRService);
2828
+ this.eventService = inject(EventService);
2829
+ this.translate = inject(TranslateService);
2830
+ this.destroyRef = inject(DestroyRef);
2831
+ // -- Public signals read directly by the component template --
2832
+ /** Base64-encoded header logo string (set after loadLogo() completes) */
2833
+ this.headerLogo = signal('', ...(ngDevMode ? [{ debugName: "headerLogo" }] : []));
2834
+ /** True once the forkJoin in loadAll() has finished (success or error) */
2835
+ this.isHeaderContentLoaded = signal(false, ...(ngDevMode ? [{ debugName: "isHeaderContentLoaded" }] : []));
2836
+ /** Logged-in user's display name */
2837
+ this.userdisplayName = signal('', ...(ngDevMode ? [{ debugName: "userdisplayName" }] : []));
2838
+ /** Formatted notification count string (e.g. "5", "99+", or "" when zero) */
2839
+ this.userNotificationCount = signal('', ...(ngDevMode ? [{ debugName: "userNotificationCount" }] : []));
2840
+ /** User's preferred timezone abbreviation (e.g. "IST") */
2841
+ this.userTimeZoneAbbreviations = signal('', ...(ngDevMode ? [{ debugName: "userTimeZoneAbbreviations" }] : []));
2842
+ /** User's full timezone name shown as a tooltip */
2843
+ this.userTimeZoneFullForm = signal('', ...(ngDevMode ? [{ debugName: "userTimeZoneFullForm" }] : []));
2844
+ /** Formatted unread email count string */
2845
+ this.totalEmails = signal('', ...(ngDevMode ? [{ debugName: "totalEmails" }] : []));
2846
+ /** Event-wise notification data pushed by SignalR; null until first push */
2847
+ this.signalREventwiseData = signal(null, ...(ngDevMode ? [{ debugName: "signalREventwiseData" }] : []));
2848
+ // -- Bridge signals watched by component effects to emit Angular outputs --
2849
+ // The service cannot call Angular output() functions directly, so it updates
2850
+ // these signals and the component uses effect() to emit the corresponding outputs.
2851
+ /** Set whenever a timezone update arrives (initial load or live change) */
2852
+ this.timezoneEmitValue = signal(null, ...(ngDevMode ? [{ debugName: "timezoneEmitValue" }] : []));
2853
+ /** Set after the logo API returns; carries the raw response for getBgImage output */
2854
+ this.bgImageEmitValue = signal(null, ...(ngDevMode ? [{ debugName: "bgImageEmitValue" }] : []));
2855
+ this.userNotificationCountObj = {};
2856
+ // accessTypes is kept for translate refresh — not exposed to the template
2857
+ this.accessTypes = [
2858
+ { id: 1, name: 'Permanent' },
2859
+ { id: 2, name: 'OneTime' },
2860
+ { id: 3, name: 'TimeBased' },
2861
+ ];
2862
+ this.translateKeys = [
2863
+ 'Generic_lib.Permanent',
2864
+ 'Generic_lib.OneTime',
2865
+ 'Generic_lib.TimeBased',
2866
+ ];
2867
+ }
2868
+ /** Fetches the header logo and sets headerLogo + bgImageEmitValue signals. */
2869
+ loadLogo() {
2870
+ this.http
2871
+ .getLogo()
2872
+ .pipe(takeUntilDestroyed(this.destroyRef))
2873
+ .subscribe((img) => {
2874
+ this.bgImageEmitValue.set(img);
2875
+ this.headerLogo.set('data:image/png;base64,' + img['logoImg']);
2876
+ });
2877
+ }
2878
+ /** Runs all enabled header APIs in parallel using forkJoin.
2879
+ * Only the APIs the host app has enabled are included in the request batch,
2880
+ * so disabled features never make unnecessary network calls. */
2881
+ loadAll(options) {
2882
+ const responseSet = {};
2883
+ const notificationPayload = {
2884
+ ApplicationName: GlobalConstants.applicationName,
2885
+ UserId: options.userId,
2886
+ };
2887
+ if (options.enableNotifications) {
2888
+ // catchError keeps forkJoin alive if the notifications API fails
2889
+ responseSet.notifications = this.http
2890
+ .getWorkFlowTicketCount(notificationPayload)
2891
+ .pipe(catchError$1(() => of(null)));
2892
+ }
2893
+ if (options.enableProfile) {
2894
+ responseSet.userinfo = this.http.getLoggedInUserDetails();
2895
+ }
2896
+ if (options.enableTimeZone) {
2897
+ responseSet.timeZone = this.http.getGlobalTimeZone();
2898
+ }
2899
+ if (options.enableMail) {
2900
+ responseSet.emailCount = this.http.getUnreadUserEmailsCount();
2901
+ }
2902
+ forkJoin(responseSet)
2903
+ .pipe(takeUntilDestroyed(this.destroyRef),
2904
+ // Mark loading complete whether the APIs succeed or fail
2905
+ finalize$1(() => this.isHeaderContentLoaded.set(true)))
2906
+ .subscribe((response) => {
2907
+ if (response.notifications)
2908
+ this.processNotifications(response.notifications);
2909
+ if (response.userinfo)
2910
+ this.processUserInfo(response.userinfo);
2911
+ if (response.timeZone)
2912
+ this.processTimeZone(response.timeZone);
2913
+ if (response.emailCount)
2914
+ this.totalEmails.set(this.formatCount(response.emailCount));
2915
+ });
2916
+ }
2917
+ /** Registers all real-time listeners. Call once from ngOnInit.
2918
+ * All subscriptions clean up automatically when the component is destroyed. */
2919
+ initListeners() {
2920
+ // SignalR: update notification count and event list on every push
2921
+ this.signalR
2922
+ .listenerEventMsg()
2923
+ .pipe(takeUntilDestroyed(this.destroyRef))
2924
+ .subscribe((data) => {
2925
+ if (data?.['application'] && data?.['events']) {
2926
+ this.userNotificationCountObj = data['application'];
2927
+ this.userNotificationCount.set(this.formatCount(Number(this.userNotificationCountObj['PendingCount'])));
2928
+ this.signalREventwiseData.set(data['events']);
2929
+ }
2930
+ });
2931
+ // Timezone change: user updates their preferred timezone in settings
2932
+ this.eventService
2933
+ .listenerTimezone()
2934
+ .pipe(takeUntilDestroyed(this.destroyRef))
2935
+ .subscribe((response) => {
2936
+ if (response?.['component'] === 'timezone') {
2937
+ this.userTimeZoneAbbreviations.set(response['usertimezoneAbbreviations'] ?? '');
2938
+ this.userTimeZoneFullForm.set(response['userTimeZoneFullForm'] ?? '');
2939
+ // Bridge signal triggers the component effect to emit timezoneDetails output
2940
+ this.timezoneEmitValue.set({
2941
+ abbreviations: response['usertimezoneAbbreviations'],
2942
+ userTimeZone: response['id'],
2943
+ timelist: response['timelist'],
2944
+ });
2945
+ }
2946
+ });
2947
+ // Email count change: user reads a mail, count decreases
2948
+ this.eventService
2949
+ .listenerUserEmail()
2950
+ .pipe(takeUntilDestroyed(this.destroyRef))
2951
+ .subscribe((data) => {
2952
+ if (data?.['component'] === 'email-count') {
2953
+ this.totalEmails.set(data?.['mailCount'] ?? '');
2954
+ }
2955
+ });
2956
+ // Language change: refresh translated access type names
2957
+ this.translate.onLangChange
2958
+ .pipe(takeUntilDestroyed(this.destroyRef))
2959
+ .subscribe(() => this.refreshTranslations());
2960
+ }
2961
+ /** Returns "" for zero/negative counts, "99+" for counts above 99. */
2962
+ formatCount(count) {
2963
+ if (!count || count <= 0)
2964
+ return '';
2965
+ return count > 99 ? '99+' : String(count);
2966
+ }
2967
+ // -- Private processing helpers --
2968
+ processNotifications(data) {
2969
+ this.userNotificationCountObj = data || {};
2970
+ this.userNotificationCount.set(this.formatCount(Number(this.userNotificationCountObj['PendingCount'])));
2971
+ }
2972
+ processUserInfo(response) {
2973
+ if (response?.['success'] && response?.['result']) {
2974
+ this.userdisplayName.set(response['result']['userDisplayName']);
2975
+ }
2976
+ }
2977
+ /** Updates timezone signals and sets the bridge signal for the output emit. */
2978
+ processTimeZone(result) {
2979
+ if (result?.['abbreviations']) {
2980
+ this.userTimeZoneAbbreviations.set(result['abbreviations']);
2981
+ this.userTimeZoneFullForm.set(result['userTimeZone']);
2982
+ this.timezoneEmitValue.set(result);
2983
+ }
2984
+ }
2985
+ refreshTranslations() {
2986
+ this.translate.get(this.translateKeys).subscribe((trans) => {
2987
+ this.accessTypes.forEach((item, index) => {
2988
+ item['name'] = trans[this.translateKeys[index]];
2989
+ });
2990
+ });
2991
+ }
2992
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HeaderDataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2993
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HeaderDataService }); }
2994
+ }
2995
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HeaderDataService, decorators: [{
2996
+ type: Injectable
2997
+ }] });
2998
+
2999
+ /**
3000
+ * Manages Line of Business (LOB) state and selection logic for the header.
3001
+ *
3002
+ * Extracted from CommonHeaderLibComponent to remove the God class smell.
3003
+ * Responsibilities:
3004
+ * - Fetch the LOB list from the API
3005
+ * - Restore the previously selected LOB from localStorage on load
3006
+ * - Persist the confirmed LOB selection back to localStorage
3007
+ * - Revert the dropdown to the last confirmed LOB when the user cancels
3008
+ * - Validate LOB IDs set programmatically by the host app
3009
+ *
3010
+ * Provided at the component level so each header instance has isolated LOB state.
3011
+ */
3012
+ class LobService {
3013
+ constructor() {
3014
+ this.http = inject(HttpCommonService);
3015
+ this.msgService = inject(ToastMsgService);
3016
+ this.translate = inject(TranslateService);
3017
+ this.destroyRef = inject(DestroyRef);
3018
+ /** Full LOB list used as options for the dropdown. */
3019
+ this.userLOBList = [];
3020
+ /** Controls the skeleton loader shown while the LOB list is being fetched. */
3021
+ this.showLobLoader = true;
3022
+ }
3023
+ /** Fetches the LOB list and resolves the initial selection.
3024
+ * - If localStorage has a valid pre-selected LOB, it is restored.
3025
+ * - Otherwise the first item in the list is selected and saved to localStorage. */
3026
+ loadLOBs(showAllLOB) {
3027
+ this.showLobLoader = true;
3028
+ return this.http.getLOBList().pipe(takeUntilDestroyed(this.destroyRef), map((res) => {
3029
+ this.showLobLoader = false;
3030
+ this.userLOBList = res.result;
3031
+ // Prepend "All LOB" option when the host app enables it
3032
+ if (showAllLOB) {
3033
+ this.userLOBList.unshift({ lobId: -1, lobName: 'All LOB' });
3034
+ }
3035
+ let initialLobSelected = this.getLobById(this.userLOBList, this.userLOBList[0]?.lobId);
3036
+ const preSelectedLob = JSON.parse(localStorage.getItem('XOB') || 'null');
3037
+ // Check if the stored LOB still exists in the current list (it may have been removed)
3038
+ const isInList = this.userLOBList.some((lob) => Number(lob.lobId) === Number(preSelectedLob?.LOBId));
3039
+ let selectedLobId;
3040
+ if (preSelectedLob && Number(preSelectedLob.LOBId) && isInList) {
3041
+ // Restore the previously selected LOB from localStorage
3042
+ selectedLobId = preSelectedLob.LOBId;
3043
+ this.tempSelectedLobId = preSelectedLob.LOBId;
3044
+ initialLobSelected = this.getLobById(this.userLOBList, selectedLobId);
3045
+ }
3046
+ else {
3047
+ // No valid stored LOB — default to the first item and save it
3048
+ selectedLobId = this.userLOBList[0]?.lobId;
3049
+ this.tempSelectedLobId = this.userLOBList[0]?.lobId;
3050
+ localStorage.setItem('XOB', JSON.stringify(initialLobSelected));
3051
+ }
3052
+ return { initialLobSelected, selectedLobId };
3053
+ }));
3054
+ }
3055
+ /** Called when the user confirms the LOB change dialog.
3056
+ * Updates the temp reference and persists the new selection to localStorage. */
3057
+ confirmChange(selectedLobId) {
3058
+ this.tempSelectedLobId = selectedLobId;
3059
+ const lob = this.getLobById(this.userLOBList, selectedLobId);
3060
+ localStorage.setItem('XOB', JSON.stringify(lob));
3061
+ return lob;
3062
+ }
3063
+ /** Called when the user cancels the LOB change dialog.
3064
+ * Returns the last confirmed LOB ID so the dropdown can be reverted. */
3065
+ revertChange() {
3066
+ return this.tempSelectedLobId;
3067
+ }
3068
+ /** Validates a LOB ID set programmatically by the host app (via setCustomLobId).
3069
+ * Shows an error toast if the ID does not exist in the current list. */
3070
+ validateCustomLobId(lobId) {
3071
+ const lob = this.getLobById(this.userLOBList, lobId);
3072
+ if (Object.keys(lob).length === 0) {
3073
+ this.msgService.error(this.translate.instant('Generic_lib.SettingInvalidLobIdMsg'));
3074
+ return null;
3075
+ }
3076
+ // Mark as externally set so the host app knows this was a forced selection
3077
+ lob['CustomLOBSetByParent'] = true;
3078
+ localStorage.setItem('XOB', JSON.stringify(lob));
3079
+ return lob;
3080
+ }
3081
+ /** Finds a LOB in the list by its ID and returns a normalised LobItem.
3082
+ * Returns an empty object cast as LobItem when no match is found. */
3083
+ getLobById(list, id) {
3084
+ const item = list.find((x) => x.lobId === id);
3085
+ if (!item)
3086
+ return {};
3087
+ return { LOBId: item.lobId, LOBName: item.lobName, CustomLOBSetByParent: false };
3088
+ }
3089
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: LobService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3090
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: LobService }); }
3091
+ }
3092
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: LobService, decorators: [{
3093
+ type: Injectable
3094
+ }] });
3095
+
3096
+ /**
3097
+ * Main header component — acts as a thin coordinator.
3098
+ *
3099
+ * Responsibilities kept here:
3100
+ * - Declare signal inputs and outputs (public API for the host app)
3101
+ * - Toggle UI panels (mailbox, user profile, notifications)
3102
+ * - Coordinate LOB selection + confirmation dialog
3103
+ * - Wire service signals to Angular outputs via effects
3104
+ *
3105
+ * Heavy logic is delegated to:
3106
+ * - HeaderDataService — data loading, SignalR/event listeners, state signals
3107
+ * - LobService — LOB list loading, selection persistence, validation
3108
+ * - AppPanelComponent — 9-dots waffle panel (app list + connection checks)
3109
+ * - NotificationPanelComponent — notification sidebar (event counts, refresh)
3110
+ */
3111
+ class CommonHeaderLibComponent {
3112
+ constructor() {
3113
+ // -- Inputs (host app configures which header features are active) --
3114
+ this.EnableLogo = input(true, ...(ngDevMode ? [{ debugName: "EnableLogo" }] : []));
3115
+ this.moduleName = input('', ...(ngDevMode ? [{ debugName: "moduleName" }] : []));
3116
+ this.EnableTimeZone = input(true, ...(ngDevMode ? [{ debugName: "EnableTimeZone" }] : []));
3117
+ this.EnableLOB = input(true, ...(ngDevMode ? [{ debugName: "EnableLOB" }] : []));
3118
+ this.showAllLOB = input(false, ...(ngDevMode ? [{ debugName: "showAllLOB" }] : []));
3119
+ this.EnableMail = input(true, ...(ngDevMode ? [{ debugName: "EnableMail" }] : []));
3120
+ this.EnableNotifications = input(true, ...(ngDevMode ? [{ debugName: "EnableNotifications" }] : []));
3121
+ this.EnableMoreApps = input(true, ...(ngDevMode ? [{ debugName: "EnableMoreApps" }] : []));
3122
+ this.EnableProfile = input(true, ...(ngDevMode ? [{ debugName: "EnableProfile" }] : []));
3123
+ /* Supported languages forwarded down to <ng-translation>. The host app
3124
+ loads languages.json once (via its app initializer) and binds the
3125
+ resulting list here, eliminating a duplicate fetch from the library. */
3126
+ this.languages = input([], ...(ngDevMode ? [{ debugName: "languages" }] : []));
3127
+ // -- Outputs (events the host app can subscribe to) --
3128
+ this.timezoneDetails = output();
3129
+ this.lobSelected = output();
3130
+ this.getBgImage = output();
3131
+ this.langChange = output();
3132
+ this.overlayStateChange = output();
3133
+ // -- View references --
3134
+ this.confirmDialog = viewChild.required('confirmDialog');
3135
+ this.appPanelRef = viewChild.required('appPanel');
3136
+ // Services are public so the template can read their signals directly
3137
+ // (e.g. headerData.userNotificationCount(), lobService.userLOBList)
3138
+ this.headerData = inject(HeaderDataService);
3139
+ this.lobService = inject(LobService);
3140
+ this.isOpenSidePopup = false;
3141
+ this.showUserDetails = false;
3142
+ this.showMailboxScreenflag = false;
3143
+ this.isNotificationPanelOpen = false;
3144
+ this.cdRef = inject(ChangeDetectorRef);
3145
+ this.setWebAPIURL();
3146
+ // EnableLOB is a signal input — reload the LOB list whenever it becomes true.
3147
+ // untracked() prevents reads inside getListofLOB from becoming dependencies
3148
+ // of this effect, which would cause infinite re-execution.
3149
+ effect(() => {
3150
+ if (this.EnableLOB() === true) {
3151
+ untracked(() => this.getListofLOB());
3152
+ }
3153
+ });
3154
+ // HeaderDataService cannot emit Angular outputs directly, so it exposes
3155
+ // bridge signals that the component watches here and emits as outputs.
3156
+ effect(() => {
3157
+ const tz = this.headerData.timezoneEmitValue();
3158
+ if (tz !== null)
3159
+ this.timezoneDetails.emit(tz);
3160
+ });
3161
+ effect(() => {
3162
+ const img = this.headerData.bgImageEmitValue();
3163
+ if (img !== null)
3164
+ this.getBgImage.emit(img);
3165
+ });
3166
+ }
3167
+ ngOnInit() {
3168
+ this.overlayStateChange.emit(false);
3169
+ if (this.EnableLogo())
3170
+ this.headerData.loadLogo();
3171
+ // Load all header data (user info, notifications, timezone, email count) in parallel
3172
+ this.headerData.loadAll({
3173
+ enableNotifications: this.EnableNotifications(),
3174
+ enableProfile: this.EnableProfile(),
3175
+ enableTimeZone: this.EnableTimeZone(),
3176
+ enableMail: this.EnableMail(),
3177
+ userId: '',
3178
+ });
3179
+ // Start listening for real-time updates (SignalR, timezone change, email count, language)
3180
+ this.headerData.initListeners();
3181
+ }
3182
+ // -- Mailbox panel --
3183
+ showMailBoxScreen() {
3184
+ this.showMailboxScreenflag = true;
3185
+ this.overlayStateChange.emit(true);
3186
+ }
3187
+ hideMailBoxScreen() {
3188
+ this.showMailboxScreenflag = false;
3189
+ this.overlayStateChange.emit(false);
3190
+ }
3191
+ // -- Language change --
3192
+ languageChange(event) {
3193
+ if (!event)
3194
+ return;
3195
+ this.langChange.emit(event);
3196
+ }
3197
+ // -- 9-dots app panel --
3198
+ showUserAppsPanel(event) {
3199
+ this.appPanelRef().toggle(event);
3200
+ }
3201
+ // -- User profile sidebar --
3202
+ showUserDetailsPanel() {
3203
+ this.isOpenSidePopup = true;
3204
+ this.showUserDetails = true;
3205
+ }
3206
+ closeSidePopup() {
3207
+ this.showUserDetails = false;
3208
+ this.isOpenSidePopup = false;
3209
+ }
3210
+ // -- Notification panel --
3211
+ OpenNotificationModal() {
3212
+ this.isNotificationPanelOpen = true;
3213
+ this.cdRef.markForCheck();
3214
+ }
3215
+ closeModal() {
3216
+ this.isNotificationPanelOpen = false;
3217
+ this.cdRef.markForCheck();
3218
+ }
3219
+ // -- LOB (Line of Business) selection --
3220
+ /** Called when the user picks a different LOB from the dropdown.
3221
+ * Stores the new value and opens the confirmation dialog before committing. */
3222
+ onLobChangeEvent(event) {
3223
+ this.selectedLOBId = event.value;
3224
+ this.confirmDialog().openConfirmModal(event);
3225
+ }
3226
+ /** Called when the user confirms the LOB change dialog.
3227
+ * Persists the new selection and emits it to the host app. */
3228
+ confirmLobChange() {
3229
+ const lob = this.lobService.confirmChange(this.selectedLOBId);
3230
+ this.lobSelected.emit(lob);
3231
+ }
3232
+ /** Called when the user cancels the LOB change dialog.
3233
+ * Reverts the dropdown back to the previously confirmed LOB. */
3234
+ revertLobChange() {
3235
+ this.selectedLOBId = this.lobService.revertChange();
3236
+ }
3237
+ /** Public API — allows the host app to force-select a specific LOB by ID. */
3238
+ setCustomLobId(lobId) {
3239
+ const lob = this.lobService.validateCustomLobId(lobId);
3240
+ if (lob) {
3241
+ this.selectedLOBId = lobId;
3242
+ this.lobSelected.emit(lob);
3243
+ }
3244
+ }
3245
+ // -- Initialization helpers --
3246
+ /** Sets the base API URL once. Falls back to the current browser origin
3247
+ * if no URL has been stored in localStorage under '_WAU'. */
3248
+ setWebAPIURL() {
3249
+ if (GlobalConstants.baseURL === undefined) {
3250
+ const storedURL = localStorage.getItem('_WAU');
3251
+ GlobalConstants.baseURL = storedURL?.trim() ? storedURL : globalThis.location.origin;
3252
+ }
3253
+ }
3254
+ /** Loads the LOB list and emits the initially selected LOB to the host app.
3255
+ * detectChanges() is used (not markForCheck) because lobService properties
3256
+ * are plain values, not signals — we need an immediate re-render after the
3257
+ * subscription updates showLobLoader and userLOBList on the service. */
3258
+ getListofLOB() {
3259
+ this.lobService.loadLOBs(this.showAllLOB()).subscribe(({ initialLobSelected, selectedLobId }) => {
3260
+ this.selectedLOBId = selectedLobId;
3261
+ this.lobSelected.emit(initialLobSelected);
3262
+ this.cdRef.detectChanges();
3263
+ });
3264
+ }
3265
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CommonHeaderLibComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3266
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: CommonHeaderLibComponent, isStandalone: true, selector: "lib-app-header", inputs: { EnableLogo: { classPropertyName: "EnableLogo", publicName: "EnableLogo", isSignal: true, isRequired: false, transformFunction: null }, moduleName: { classPropertyName: "moduleName", publicName: "moduleName", isSignal: true, isRequired: false, transformFunction: null }, EnableTimeZone: { classPropertyName: "EnableTimeZone", publicName: "EnableTimeZone", isSignal: true, isRequired: false, transformFunction: null }, EnableLOB: { classPropertyName: "EnableLOB", publicName: "EnableLOB", isSignal: true, isRequired: false, transformFunction: null }, showAllLOB: { classPropertyName: "showAllLOB", publicName: "showAllLOB", isSignal: true, isRequired: false, transformFunction: null }, EnableMail: { classPropertyName: "EnableMail", publicName: "EnableMail", isSignal: true, isRequired: false, transformFunction: null }, EnableNotifications: { classPropertyName: "EnableNotifications", publicName: "EnableNotifications", isSignal: true, isRequired: false, transformFunction: null }, EnableMoreApps: { classPropertyName: "EnableMoreApps", publicName: "EnableMoreApps", isSignal: true, isRequired: false, transformFunction: null }, EnableProfile: { classPropertyName: "EnableProfile", publicName: "EnableProfile", isSignal: true, isRequired: false, transformFunction: null }, languages: { classPropertyName: "languages", publicName: "languages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { timezoneDetails: "timezoneDetails", lobSelected: "lobSelected", getBgImage: "getBgImage", langChange: "langChange", overlayStateChange: "overlayStateChange" }, providers: [HeaderDataService, LobService], viewQueries: [{ propertyName: "confirmDialog", first: true, predicate: ["confirmDialog"], descendants: true, isSignal: true }, { propertyName: "appPanelRef", first: true, predicate: ["appPanel"], descendants: true, isSignal: true }], ngImport: i0, template: "<header class=\"app-header ext\">\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"d-flex\">\r\n <!-- Logo: shown only when EnableLogo input is true -->\r\n @if (EnableLogo()) {\r\n <div class=\"logo gap-4\">\r\n <!-- Show logo once the base64 string is loaded; skeleton while waiting -->\r\n @if (EnableLogo() && headerData.headerLogo()) {\r\n <img\r\n class=\"logo-size\"\r\n title=\"Logo\"\r\n alt=\"Logo\"\r\n [src]=\"headerData.headerLogo()\"\r\n loading=\"lazy\"\r\n />\r\n }\r\n @if (!headerData.headerLogo()) {\r\n <p-skeleton\r\n height=\"1.5rem\"\r\n width=\"5rem\"\r\n aria-hidden=\"true\"\r\n ></p-skeleton>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Module / application name shown in the centre of the header -->\r\n <div class=\"projName\">\r\n <h1 class=\"modname\">{{ moduleName() }}</h1>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-end align-items-center\">\r\n\r\n <!-- Timezone: shows abbreviated timezone once loaded from HeaderDataService -->\r\n @if (EnableTimeZone() && headerData.userTimeZoneAbbreviations()) {\r\n <div class=\"timezone\">\r\n <img\r\n src=\"assets/common-header-lib/images/schedule.svg\"\r\n class=\"mb-1\"\r\n alt=\"Timezone schedule\"\r\n />\r\n <span class=\"timezone-text\"\r\n >{{ \"Generic_lib.PreferredTimezone\" | translate }} :\r\n </span>\r\n @if (headerData.userTimeZoneAbbreviations()) {\r\n <!-- Full timezone name appears as a tooltip on hover -->\r\n <span class=\"user-tz\" [title]=\"headerData.userTimeZoneFullForm()\">{{\r\n headerData.userTimeZoneAbbreviations()\r\n }}</span>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- LOB dropdown: skeleton shown while LobService is loading the list -->\r\n @if (EnableLOB()) {\r\n @if (EnableLOB() && !lobService.showLobLoader) {\r\n <div class=\"main-left d-flex\">\r\n <img\r\n src=\"assets/common-header-lib/images/marker-pin.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n\r\n <!-- Note: Removed [virtualScroll] and [itemSize] from p-dropdown because it caused\r\n filtered search results to appear empty until scrolling.\r\n Not needed as LOB list size is small. -->\r\n <p-select\r\n filterPlaceholder=\"{{ 'Generic_lib.Search' | translate }}\"\r\n [options]=\"lobService.userLOBList\"\r\n (onChange)=\"onLobChangeEvent($event)\"\r\n optionLabel=\"lobName\"\r\n optionValue=\"lobId\"\r\n [(ngModel)]=\"selectedLOBId\"\r\n [filter]=\"true\"\r\n filterBy=\"lobName\"\r\n [showClear]=\"false\"\r\n [style]=\"{ width: '150px', height: '30px' }\"\r\n [resetFilterOnHide]=\"true\"\r\n [lazy]=\"false\"\r\n name=\"lob\"\r\n class=\"loblist-drpdwn\"\r\n panelStyleClass=\"loblist-drpdwn-panel\"\r\n ariaLabel=\"{{ 'Generic_lib.LineOfBusiness' | translate }}\"\r\n >\r\n <ng-template let-loblist pTemplate=\"item\">\r\n <div class=\"flex align-items-center gap-2\">\r\n <div title=\"{{ loblist.lobName }}\" class=\"header-drpdwn\">\r\n {{ loblist.lobName }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n </p-select>\r\n </div>\r\n } @else {\r\n <p-skeleton\r\n height=\"1.5rem\"\r\n width=\"10rem\"\r\n aria-hidden=\"true\"\r\n ></p-skeleton>\r\n }\r\n }\r\n\r\n <!-- Action icons: shown once forkJoin in HeaderDataService has completed;\r\n skeletons are displayed while the initial data load is in progress -->\r\n @if (headerData.isHeaderContentLoaded()) {\r\n\r\n <!-- Mailbox icon -->\r\n @if (EnableMail()) {\r\n <button\r\n type=\"button\"\r\n class=\"header-left-icon\"\r\n aria-label=\"{{ 'Generic_lib.MailBox' | translate }}\"\r\n (click)=\"showMailBoxScreen()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/mail-icon.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n class=\"headeright-icon\"\r\n />\r\n </button>\r\n }\r\n <!-- Badge showing unread mail count; hidden when count is zero -->\r\n @if (EnableMail() && headerData.totalEmails().length > 0) {\r\n <div class=\"badge-notify\">\r\n <div pBadge [value]=\"headerData.totalEmails()\"></div>\r\n <span class=\"visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\"\r\n >{{ headerData.totalEmails() }} unread mails</span\r\n >\r\n </div>\r\n }\r\n\r\n <!-- Notification bell icon -->\r\n @if (EnableNotifications()) {\r\n <button\r\n type=\"button\"\r\n class=\"header-left-icon\"\r\n aria-label=\"{{ 'Generic_lib.Notification' | translate }}\"\r\n (click)=\"OpenNotificationModal()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/bell-icon.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n class=\"headeright-icon\"\r\n />\r\n </button>\r\n }\r\n\r\n <!-- Badge showing pending notification count; hidden when count is zero -->\r\n @if (EnableNotifications() && headerData.userNotificationCount().length > 0) {\r\n <div class=\"badge-notify\">\r\n <div pBadge [value]=\"headerData.userNotificationCount()\"></div>\r\n <span class=\"visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\"\r\n >{{ headerData.userNotificationCount() }} notifications</span\r\n >\r\n </div>\r\n }\r\n\r\n <!-- 9-dots (waffle) icon \u2014 opens the app switcher panel -->\r\n @if (EnableMoreApps()) {\r\n <button\r\n type=\"button\"\r\n class=\"header-left-icon\"\r\n aria-label=\"Control Center\"\r\n (click)=\"showUserAppsPanel($event)\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/apps-1.svg\"\r\n class=\"apps-icon\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n </button>\r\n }\r\n\r\n <!-- User avatar button showing initials \u2014 opens the profile sidebar -->\r\n @if (EnableProfile()) {\r\n <button\r\n type=\"button\"\r\n class=\"main-right\"\r\n [attr.aria-label]=\"headerData.userdisplayName()\"\r\n (click)=\"showUserDetailsPanel()\"\r\n >\r\n <div class=\"initial-text\">\r\n {{ headerData.userdisplayName() | sliceToTwo }}\r\n </div>\r\n </button>\r\n }\r\n\r\n } @else {\r\n <!-- Skeleton placeholders while header data is loading -->\r\n <p-skeleton shape=\"circle\" size=\"1.3rem\" styleClass=\"mx-2\" aria-hidden=\"true\"></p-skeleton>\r\n <p-skeleton shape=\"circle\" size=\"1.3rem\" styleClass=\"mx-2\" aria-hidden=\"true\"></p-skeleton>\r\n <p-skeleton size=\"1.5rem\" styleClass=\"mx-2\" aria-hidden=\"true\"></p-skeleton>\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mx-2\" aria-hidden=\"true\"></p-skeleton>\r\n }\r\n\r\n </div>\r\n </div>\r\n</header>\r\n\r\n<!-- 9-dots app switcher panel (AppPanelComponent manages its own popover + data) -->\r\n<app-panel #appPanel></app-panel>\r\n\r\n<!-- Mailbox details overlay -->\r\n@if (showMailboxScreenflag) {\r\n <div class=\"changingContent\">\r\n <app-user-mailbox\r\n (closeMailDialogBox)=\"hideMailBoxScreen()\"\r\n ></app-user-mailbox>\r\n </div>\r\n}\r\n\r\n<!-- User profile sidebar -->\r\n<div class=\"profile-sidebar\">\r\n @if (isOpenSidePopup) {\r\n <app-side-popup\r\n [visible]=\"true\"\r\n [position]=\"'right'\"\r\n (closeDialogBox)=\"closeSidePopup()\"\r\n >\r\n @if (showUserDetails) {\r\n <app-user-sidebar\r\n [languages]=\"languages()\"\r\n (closeDialogBox)=\"closeSidePopup()\"\r\n ></app-user-sidebar>\r\n }\r\n </app-side-popup>\r\n }\r\n</div>\r\n\r\n<!-- Notification side panel (NotificationPanelComponent manages its own API + SignalR sync).\r\n Wrapping @if ensures the component is not created (no API call) when notifications are off. -->\r\n@if (EnableNotifications()) {\r\n <app-notification-panel\r\n [(visible)]=\"isNotificationPanelOpen\"\r\n [notificationCount]=\"headerData.userNotificationCount()\"\r\n [signalREvents]=\"headerData.signalREventwiseData()\"\r\n ></app-notification-panel>\r\n}\r\n\r\n<!-- LOB change confirmation dialog.\r\n Fires lobChangeConfirmation(true) on confirm, lobChangeConfirmation(false) on cancel. -->\r\n<confirm-dialog\r\n class=\"rm-invalid-border\"\r\n #confirmDialog\r\n header=\"{{ 'Generic_lib.ChangeLOB' | translate }}\"\r\n message=\"{{ 'Generic_lib.DoYouWantToChangeTheCurrentLOB' | translate }}\"\r\n (result)=\"$event ? confirmLobChange() : revertLobChange()\"\r\n></confirm-dialog>\r\n", styles: ["@charset \"UTF-8\";:root{--theme-red: #d4231d;--theme-black: #212121;--theme-blue: #4d91ea;--success: #06a211;--success-1: #00c853;--error: #e6323a;--white-color: #ffffff;--white-smoke: #f6f6f6;--white-smoke-2: #f2f2f2;--white-smoke-4: #f4f4f4;--white-smoke-5: #f5f5f5;--white-smoke-6: #eeeeee;--gainsboro-white-color: #e0e0e0;--gainsboro-white-color-1: #e1e1e1;--gainsboro-white-color-6: #e6e6e6;--black-color: #212121;--silver-color: #bdbdbd;--jaguar-black-color: #212121;--dark-grey-color: #9e9e9e;--empress-grey-color: #757575;--light-grey-color: #d0d0d0;--dim-grey-color: #707070;--dim-grey-color-2: #616161;--very-light-grey-color: #cccccc;--suva-grey-color: #888888;--charcoal-grey-color: #424242;--curious-blue: #337ab7;--dodger-blue: #2196f3;--royal-blue: #2680eb;--solitude-blue: #e9ecf1;--azure-blue: #f0fdff;--lavender-blush: #ffebee;--magenta-violet: #ff00e6;--dark-orange: #fb8c00;--fruit-salad-green: #4caf50;--flau-red: #440808;--ag-header-background-color: #f6f7fb;--primary-color: #d4231d;--body-background-color: #eeeeee;--primary-notification-bg: #ffebee}.grey-background{background-color:var(--ag-header-background-color)}.white-bg{background:var(--white-color);width:420px;overflow:hidden}.log-text{font-size:16px;color:#292f4c;font-weight:600}.imgs{width:20px}.tertiary-btn{border:none;background-color:transparent}.tertiary-btn-profile{padding-left:0;font-size:14px!important;color:#495057}.sidebar-outer{height:100vh}.sidebar-outer .sidebar-header{padding:12px 15px}.sidebar-outer .sidebar-header .sh-top{display:flex;align-items:center;justify-content:space-between}.sidebar-outer .sidebar-header .sh-top button{height:24px}.sidebar-outer .sidebar-body{padding:12px 20px;float:left;width:100%;overflow:auto;height:calc(100vh - 70px)}.sidebar-outer .sidebar-body .sb-list ul{float:left;width:100%;list-style:none;padding-left:0}.sidebar-outer .sidebar-body .sb-list ul li{display:flex;padding:8px 2px;cursor:pointer}.sidebar-outer .sidebar-body .sb-list ul li span{margin-right:12px}.sidebar-body{overflow:auto;height:calc(100vh - 70px);width:100%}.mail-pagination .p-paginator,.mail-table .p-paginator{justify-content:flex-start!important;padding-left:0!important}.mail-pagination .p-paginator .p-paginator-current,.mail-table .p-paginator .p-paginator-current{font-size:12px;height:1rem!important}.mail-pagination .p-paginator .p-paginator-pages .p-paginator-page,.mail-table .p-paginator .p-paginator-pages .p-paginator-page{min-width:30px!important;height:30px!important;font-size:12px}.mail-pagination .p-paginator .p-select,.mail-table .p-paginator .p-select{height:30px!important;margin-top:0;border:0}.mail-pagination .p-paginator .p-select .p-select-label,.mail-table .p-paginator .p-select .p-select-label{padding:4px 5px 0 10px!important;font-size:14px}.mail-pagination .p-paginator .p-select .p-select-dropdown,.mail-table .p-paginator .p-select .p-select-dropdown{width:1.5rem!important}.mail-pagination .p-paginator .p-select .p-select-dropdown .pi,.mail-table .p-paginator .p-select .p-select-dropdown .pi{font-size:13px!important}.mail-table{height:calc(100vh - 196px);overflow:auto}.mail-table .p-datatable .p-datatable-thead>tr{border:1px solid #dee2e6;border-radius:24px}.mail-table .p-datatable .p-datatable-thead>tr th{padding:0 8px;height:36px;font-size:13px;color:var(--primary-text);font-weight:600;background:var(--white-color)}.mail-table .p-datatable .p-datatable-tbody>tr{border:1px solid #dee2e6;border-radius:24px}.mail-table .p-datatable .p-datatable-tbody>tr td{padding:0 25px 0 8px;height:38px;font-size:13px;color:var(--secondary-text);white-space:nowrap}.mail-table .p-datatable .p-sortable-column:hover{background-color:var(--white-color)!important;color:#000!important}.mail-table .p-datatable .p-sortable-column:focus{box-shadow:none!important}.mail-table .p-datatable .p-sortable-column .p-sortable-column-icon{font-size:12px}.mail-table .p-checkbox{height:18px;width:18px}.mail-table .p-checkbox .p-checkbox-box{height:16px;width:16px;border-radius:4px;border:1px solid var(--ui-border)}.mail-table .p-checkbox .p-checkbox-box:hover{border:1px solid var(--ui-border)!important}.mail-table .p-checkbox .p-checkbox-icon{font-size:10px!important}.mail-table .p-select-overlay .p-select-list{padding:0}.mail-table .p-select-overlay .p-select-list .p-select-option{font-size:13px!important;padding:10px 15px}.mail-table .p-paginator{position:fixed;bottom:0}.mail-pagination .p-paginator{height:47px;width:100%}.mail-pagination .p-paginator .p-paginator-current{padding-left:0;padding-right:12px}.mail-pagination .p-paginator .p-paginator-first,.mail-pagination .p-paginator .p-paginator-prev,.mail-pagination .p-paginator .p-paginator-next,.mail-pagination .p-paginator .p-paginator-last{min-width:30px!important;height:30px!important}.p-datatable-table{border-collapse:collapse!important}.p-paginator-page.p-paginator-page-selected{background:#eff6ff!important;border-color:#eff6ff;color:#1d4ed8!important}.modal-dialog{margin-right:0;margin-top:0;margin-bottom:0}.view-pass-details{width:600px!important}.view-pass-details .p-dialog-content:last-of-type{border-bottom-right-radius:4px!important;border-bottom-left-radius:4px!important;padding:0}.p-confirmdialog{border-radius:4px!important}.p-confirmdialog .p-dialog-content{align-items:center;padding-top:24px;padding-right:20px;font-size:var(--base-font-size);position:relative;right:45px}.p-confirmdialog .p-button{font-size:var(--base-font-size);background-color:var(--primary-color);border-color:var(--primary-color);padding:6px 28px}.p-confirmdialog .p-button .p-button-secondary .p-button-outlined{background-color:var(--white-color);border:1px solid var(--primary-color);color:var(--primary-color)}.p-confirmdialog .p-button .p-button-secondary .p-button-outlined:enabled:hover{background-color:var(--white-color)}.p-confirmdialog .p-button:enabled:hover{border:1px solid var(--primary-color);background-color:var(--primary-color)}.p-confirmdialog .p-button.p-button-secondary.p-button-outlined{color:var(--primary-color);border:1px solid var(--primary-color);background-color:var(--white-color)}.p-confirmdialog .p-button.p-button-secondary.p-button-outlined:enabled:hover{color:var(--primary-color);border:1px solid var(--primary-color);background-color:var(--white-color)}.p-confirmdialog .p-dialog-footer{padding:20px!important}.p-confirmdialog.p-dialog .p-resizable-handle{display:none}.p-dialog{border:0px!important}.p-dialog.general-configuration{width:100%;height:100vh;max-height:100vh;border-radius:0!important}.p-dialog.general-configuration .p-dialog-header{padding:10px 21px!important}.p-dialog .p-dialog-header{padding:10px 14px 10px 21px!important;background:var(--white-color)!important;height:45px;border-top-right-radius:4px!important;border-top-left-radius:4px!important;border-bottom:1px solid var(--primary-color)!important}.p-dialog .p-dialog-header .p-dialog-title{font-weight:600;font-size:var(--base-font-size)}.general-configuration .p-dialog-header{border-bottom:1px solid #d0d4e4!important;background:var(--white-color)!important}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.initial-text{width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:11px;border-radius:50%;color:var(--white-color);background-color:#8e562e}.form-group{margin-bottom:5px}.form-group .error-msg{position:relative}.madontary-icon{color:var(--primary-color);font-weight:500;padding:5px 0 0 5px;text-decoration:none!important;border-bottom:none}.img-lock{width:12px;margin-bottom:1px}.img-lock.ext{width:16px;margin-bottom:0}.img-lock.ext2{width:18px;margin-bottom:0}.submit-btn .p-button{height:30px;font-size:14px;border-radius:4px;border:1px solid var(--primary-color);background-color:var(--primary-color);border-color:var(--primary-color)}.submit-btn .p-button:enabled:hover{border:1px solid var(--primary-color);background-color:var(--primary-color);border-color:var(--primary-color)}.submit-btn .p-button .p-button-label{font-weight:400;font-size:13px}.error-msg{font-size:12px;font-weight:600;width:100%;position:absolute;bottom:4px;left:0;display:flex;align-items:flex-end;color:#d83a52;font-family:-apple-system,BlinkMacSystemFont,Roboto,Segoe UI,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol!important}.error-msg .error-icon{font-size:18px;margin-right:4px;position:relative;top:-1px}::-webkit-scrollbar{background-color:#eee;width:5px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background-color:#888;border-radius:5px}::-webkit-scrollbar-thumb:hover{background-color:#888}.p-select .p-select-dropdown{width:32px!important}.pi-chevron-down:before{content:\"\\e902\";font-size:11px}.p-select-header{position:relative}.p-select-header input{border:1px solid #ced4da!important}.p-select-list-container{max-height:120px!important}.p-select-list-container .p-select-list{padding:0!important}.p-select-list-container .p-select-list .p-select-empty-message{padding:10px 18px;font-size:12px;color:#495057!important;background:transparent!important}.p-select-list-container .p-select-list .p-select-option{border-radius:0!important;padding:6px 16px}.p-select-list-container .p-select-list .p-select-option.p-select-option-selected,.p-select-list-container .p-select-list .p-select-option:not(.p-select-option-selected):not(.p-disabled).p-focus{color:var(--jaguar-black-color);background-color:var(--solitude-blue)}.lang-dropdown .p-select{border:1px solid #dee2e6!important;height:26px!important;border-radius:4px!important;min-width:calc(40vh - 92px)!important;padding:0 4px 0 12px!important;display:flex!important;align-items:center!important;justify-content:space-between!important}.lang-dropdown .p-select .pi{position:relative;bottom:2px;left:7px}.lang-dropdown .p-select-overlay{background:var(--white-color)!important;color:#495057!important;border:0px!important;box-shadow:0 2px 12px #0000001a!important}.lang-dropdown .p-select-overlay .p-select-header{padding:4px 8px!important;border-radius:0!important}.lang-dropdown .p-select-overlay .p-select-header .p-select-filter-icon{position:relative;bottom:13px;font-size:13px}.lang-dropdown .p-select-overlay .p-select-list{font-size:12px;padding:0!important}.lang-dropdown .p-select-overlay .p-select-list .p-select-option{padding:2px 14px;font-size:12px}.lang-dropdown .p-select-list-container{max-height:140px!important}.lang-dropdown .p-select-list-container ::-webkit-scrollbar{width:5px!important}.lang-dropdown .p-select .p-select-header .p-select-filter{height:26px!important;border-radius:4px!important;font-size:12px!important;border:1px solid #ced4da!important;padding-left:12px!important}.lang-dropdown .p-select-label{margin:0;text-align:start;font-size:13px;padding:0!important}.lang-dropdown .p-select-list-container .p-select-list{font-size:12px!important;padding:0!important}.lang-dropdown .p-select-list-container .p-select-list .p-select-option{padding:2px 14px!important}.loblist-drpdwn-panel .p-select-header{padding:5px 10px!important;border-bottom:1px solid #dee2e6!important;background:#f8f9fa!important;color:#343a40!important;margin:0!important}.loblist-drpdwn-panel .p-select-header .p-select-filter{height:28px;border-radius:4px;font-size:12px}.loblist-drpdwn-panel .p-select-header .p-select-filter-icon{position:absolute;left:82%;top:50%;transform:translateY(-50%);color:#6c757d}.loblist-drpdwn-panel .p-select-header .p-inputtext{background:var(--white-color);padding:6px;height:28px!important;border-radius:4px;font-size:12px!important}.loblist-drpdwn-panel .p-select-list .p-select-option{margin-bottom:1px;padding:6px 16px;border:0;color:#495057;background:transparent;transition:box-shadow .2s;border-radius:0;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.loblist-drpdwn-panel .p-select-list .p-select-empty-message{padding:6px 12px;color:#495057!important;background:transparent!important;font-size:12px}.loblist-drpdwn{border:none!important;border-radius:0;width:140px!important;box-shadow:none!important}.loblist-drpdwn .p-icon{height:12px!important;color:#6c757d}.loblist-drpdwn .p-select-label{font-size:13px;background:transparent;border:0 none;display:flex;align-items:center}.assets-dropdown .p-select{height:38px!important;width:100%!important;border-radius:4px!important}.assets-dropdown .p-select:hover{border:1px solid #ced4da!important}.assets-dropdown .p-select-label{width:100%;border-radius:4px;height:36px;font-size:13px!important}.assets-dropdown .p-select-overlay .p-select-header{padding:10px!important}.assets-dropdown .p-select-overlay .p-select-header .p-select-filter-icon{left:96%;color:#6c757d;font-size:13px;top:15px!important}.assets-dropdown .p-select-overlay .p-select-list .p-select-empty-message{font-size:13px!important;padding:8px 20px!important}.assets-dropdown .p-select-list-container{max-height:100px!important}.assets-dropdown .p-select-list-container .p-select-list .p-select-option{padding:5px 20px!important;font-size:13px!important;font-weight:400!important}.assets-dropdown .p-select-list-container .p-select-list .p-select-option:not(.p-select-option-selected):not(.p-disabled).p-focus{background:#e9ecef!important}.timezone-dropdown .p-select-label{font-size:13px}.timezone-dropdown .p-select{width:100%;border:1px solid #ced4da!important;border-radius:4px;height:38px}.timezone-dropdown .p-select:hover{border:1px solid #ced4da!important}.timezone-dropdown .p-select-overlay .p-select-header{padding:10px!important}.timezone-dropdown .p-select-overlay .p-select-header .p-select-filter-icon{left:96%;color:#6c757d;font-size:13px;top:15px!important}.timezone-dropdown .p-select-overlay .p-select-list .p-select-option{padding:5px 20px!important;font-size:13px!important;font-weight:400!important}.timezone-dropdown .p-select-overlay .p-select-list .p-select-empty-message{font-size:13px!important;padding:8px 20px!important}.timezone-dropdown .p-inputtext{width:100%;border-radius:4px;height:30px;font-size:13px!important}.timezone-dropdowntimezone-dropdown .p-select-list-container{max-height:100px!important}.input-dropdown .password-checkbox-right{position:absolute;width:24px;right:8px}.p-drawer-content{padding:0!important}.p-drawer-right{top:42px!important;width:520px!important}.p-drawer-header{height:42px;padding:0 14px 0 20px!important;border-bottom:1px solid var(--primary-color)!important}.p-drawer-title{font-size:var(--font-size-medium)!important;font-weight:600!important;color:var(--black-color)}.p-icon{height:16px!important}.p-button-icon-only{padding-inline-start:23px!important}.p-button-text.p-button-secondary:not(:disabled):hover{background:none!important}.p-inputtext{color:#000;height:30px!important;font-size:var(--base-font-size)!important}.p-inputtext:enabled:focus,.p-inputtext:enabled:hover,.p-multiselect:not(.p-disabled):hover{border-color:var(--silver-color)!important}.p-multiselect:not(.p-disabled).p-focus,.p-inputtext:enabled:focus{border-color:var(--silver-color)!important;box-shadow:none!important}.app-form input[type=text]{height:30px!important;width:100%!important}.p-autocomplete-list{height:30px;overflow:hidden;font-size:var(--font-size-small);margin:0 0 4px -4px!important;padding:0!important}.p-multiselect{height:28px;font-size:var(--base-font-size);border-radius:4px!important}.p-multiselect-label{padding:4px 10px!important}.p-multiselect-header{padding:6px 8px!important}.p-multiselect-empty-message{padding:6px 8px!important;font-size:var(--base-font-size)}.p-multiselect-list{padding:0!important}.p-multiselect-option{padding:5px 8px!important;font-size:var(--base-font-size)!important}.p-multiselect-option span{width:175px;overflow:hidden;text-overflow:ellipsis}.p-multiselect-option.p-multiselect-option-selected{background:none!important;color:#000!important}.p-checkbox{top:7px!important}.p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box{border-color:var(--primary-color)!important}.p-checkbox-box{width:12px!important;height:12px!important;border-radius:2px!important}.p-checkbox-checked .p-checkbox-box{border-color:var(--primary-color)!important;background:var(--primary-color)!important}.p-overlay .p-select-overlay{left:-1px!important;width:65px!important}.p-select:not(.p-disabled).p-focus{border-color:var(--silver-color)!important}.p-dialog-header-actions .p-button{padding:0!important;width:24px!important;height:24px!important;display:flex;justify-content:center;align-items:center}.sh-top-right .common-bn,.mail-content .common-bn{padding:0!important;width:24px!important;height:24px!important;display:flex;justify-content:center;align-items:center;border-radius:50%}.ngx-toastr{width:400px!important;margin-top:10px!important}.toast-warning,.toast-info,.toast-error,.toast-success{background-color:var(--white-color)!important;border-radius:4px!important;background-repeat:no-repeat}.toast-warning .toast-title,.toast-info .toast-title,.toast-error .toast-title,.toast-success .toast-title{font-weight:700;font-size:16px}.toast-warning .toast-message,.toast-info .toast-message,.toast-error .toast-message,.toast-success .toast-message{color:#676879!important;font-size:14px!important}.toast-success{border-bottom:3px solid #258750;background-image:url(assets/common-header-lib/images/toast-success.svg)!important}.toast-success .toast-title{color:#258750!important}.toast-success .toast-message{padding-top:2px}.toast-success .toast-progress{color:#258750!important}.toast-error{border-bottom:3px solid #d83a52;background-image:url(assets/common-header-lib/images/toast-error.svg)!important}.toast-error .toast-title{color:#d83a52!important}.toast-error .toast-message{padding-top:2px}.toast-info{border-bottom:3px solid #0073ea;background-image:url(assets/common-header-lib/images/toast-info.svg)!important}.toast-info .toast-title{color:#0073ea!important}.toast-info .toast-message{padding-top:3px}.toast-warning{border-bottom:3px solid #fdab3d;background-image:url(assets/common-header-lib/images/toast-alert.svg)!important}.toast-warning .toast-title{color:#fdab3d!important}.toast-warning .toast-message{padding-top:3px}.toast-close-button{right:4px!important;top:0;font-size:20px;font-weight:700;text-shadow:0 1px 0 var(--white-color);background-color:transparent;border:0px;color:#676879;position:absolute;cursor:pointer}.toast-container{position:fixed;z-index:2147483647!important;pointer-events:auto!important}.toast-container .ngx-toastr{position:relative;overflow:hidden;margin:0 0 6px;padding:15px 40px 15px 50px;width:300px;border-radius:8px!important;background-position:15px 15px;background-repeat:no-repeat;background-size:24px;box-shadow:0 0 9px #99999980;color:var(--white-color)}.toast-top-center{top:0;right:0;width:100%}.toast-top-right{right:15px;top:40px}.toast-container.toast-top-center .ngx-toastr,.toast-container.toast-bottom-center .ngx-toastr{margin-left:auto;margin-right:auto}.skip-link{position:absolute;top:-100%;left:0;z-index:9999;padding:8px 12px;background:var(--white-color);color:var(--primary-color);font-size:13px;text-decoration:none;border:1px solid var(--primary-color);border-radius:0 0 4px}.skip-link:focus-visible{top:0}.app-header{padding:4px 10px 10px;height:42px;border-bottom:1px solid #d0d4e4}.logo{display:flex;align-items:center}.main-right{display:flex;align-items:center;cursor:pointer;border-radius:50%}.main-right:is(button){padding:0;border:none;background:transparent;color:inherit;font:inherit}.logo-icon{width:0;height:0;border-left:14px solid transparent;border-right:14px solid transparent;position:relative}.logo-icon:after{width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;position:absolute;content:\"\";top:7px;left:-7px}.p-inputtext.p-inputtext-sm{padding:4px 5px 4px 33px!important}.pi-search:before{font-size:13px;position:absolute;top:2px}.overlay-text{font-size:13px;line-height:18px;color:#676879;font-weight:400}:focus-visible{outline:1px solid #007eff!important;outline-offset:0px;box-shadow:0 0 0 .1rem #bfdbfe!important}.main-left .p-select{border:none;border-radius:0;width:140px!important}.main-left .p-select-overlay .p-select-list{padding:0!important;max-height:110px}.main-left .p-select .p-inputtext:focus-visible{outline:none!important}.main-left .p-scroller{overflow-x:hidden;height:120px!important}.header-drpdwn{width:120px!important;font-size:11px!important;text-overflow:ellipsis;overflow:hidden}.logs{gap:70px;margin-top:5px}.head-search{position:fixed;top:4px;left:275px}.head-search input{width:calc(30vw - 40px)!important;border:1px solid #c3c6d4;background-color:var(--ag-header-background-color, #f6f7fb);height:32px;border-radius:0 4px 4px 0;border-left:none;font-size:13px!important;padding-left:30px!important;padding-right:54px}.head-search.active input{width:555px!important}@media screen and (min-width:1920px){.head-search.active input{width:900px!important}}.header-left-icon{height:32px;width:32px;cursor:pointer;display:flex;justify-content:center;align-items:center;transition:all .5s;border-radius:50%;margin-right:4px;position:relative}.header-left-icon:is(button){padding:0;border:none;background:transparent;color:inherit;font:inherit}.header-left-icon:hover{background:#dcdfec}.header-left-icon img:hover{filter:invert(0%) sepia(4%) saturate(0%) hue-rotate(324deg) brightness(55%) contrast(105%)}.apps-icon{width:21px}.logo-img{width:80px}.lob-img{padding-bottom:4px}.session-app:hover{background:#dcdfec;border-radius:10px}.app-col{cursor:pointer;padding:8px 0}.app-text{font-size:12px;color:#676879;white-space:nowrap;padding-top:8px;text-align:center;text-overflow:ellipsis;overflow:hidden;width:100px}.filter-search{position:relative;right:50px;bottom:2px;cursor:pointer}.filter-search .cross-search{width:23px}.filter-search .search-filter{width:19px}.headeright-icon{width:17px;height:17px;filter:invert(44%) sepia(3%) saturate(1698%) hue-rotate(199deg) brightness(92%) contrast(93%)}.pl-0{padding-left:0}.form-control-sm{border:none;border-bottom:1px solid #c3c6d4;border-radius:0}.overlay-footer .common-btn{width:110px;height:32px;padding:11px 12px;border-radius:4px;font-size:13px;cursor:pointer;background:var(--white-color)}.overlay-footer .primary-btn{padding:8px 12px 11px 14px;border-radius:4px;height:32px;width:65px;font-size:13px;cursor:pointer}.filter-popup{position:relative;left:10px}.timezone{margin-right:12px}.timezone-icon{font-size:16px}.timezone-text{padding-left:6px;font-size:13px;color:#495057;font-weight:400}.user-tz{font-size:13px;color:var(--empress-grey-color);font-weight:400;text-overflow:ellipsis;overflow:hidden;width:30px;white-space:normal}.profile-sidebar .p-dialog .p-dialog-content{padding:0}.profile-sidebar .p-dialog-header{display:none}.modname{font-size:18px;margin-bottom:0}.logo-size{max-height:32px;max-width:92px}.logo-size-1{width:80px;height:30px}.badge-notify:hover{border-radius:50%;background:#dcdfec}.badge-notify .p-badge{min-width:16px;height:16px;line-height:15px}.badge-notify .p-overlay-badge .p-badge{background-color:var(--primary-color)!important;position:absolute;top:-7px;right:12px;font-size:9px;padding:0 2px;cursor:pointer}.changingContent{overflow:hidden;width:100%}.changingContent .intro-text{background-image:linear-gradient(145deg,#f1eaec,#f8e3e7,#f7e1f8,#ebeeff,#e8eef3);position:relative;height:135px}.changingContent .inner-garient{padding:50px 20px 115px 30px}.changingContent .table-heading{padding:0 20px 1px 30px}.changingContent .table-selection{padding:3px 20px 0 30px}.rm-invalid-border .card{border:0px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i2.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "directive", type: i5$1.BadgeDirective, selector: "[pBadge]", inputs: ["ptBadgeDirective", "badgeDisabled", "badgeSize", "size", "severity", "value", "badgeStyle", "badgeStyleClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: UserMailboxComponent, selector: "app-user-mailbox", inputs: ["apiURL"], outputs: ["closeMailDialogBox"] }, { kind: "component", type: SidePopupComponent, selector: "app-side-popup", inputs: ["visible", "position", "header"], outputs: ["closeDialogBox", "visibleChange"] }, { kind: "component", type: UserSidebarComponent, selector: "app-user-sidebar", inputs: ["languages"], outputs: ["closeDialogBox"] }, { kind: "component", type: AppPanelComponent, selector: "app-panel" }, { kind: "component", type: NotificationPanelComponent, selector: "app-notification-panel", inputs: ["visible", "notificationCount", "signalREvents"], outputs: ["visibleChange"] }, { kind: "component", type: ConfirmDialogComponent, selector: "confirm-dialog", inputs: ["header", "message"], outputs: ["result"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: SliceToTwoPipe, name: "sliceToTwo" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
3267
+ }
3268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CommonHeaderLibComponent, decorators: [{
3269
+ type: Component,
3270
+ args: [{ selector: 'lib-app-header', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, providers: [HeaderDataService, LobService], imports: [
3271
+ CommonModule,
3272
+ FormsModule,
3273
+ SelectModule,
3274
+ SkeletonModule,
3275
+ BadgeModule,
3276
+ TranslateModule,
3277
+ SliceToTwoPipe,
3278
+ UserMailboxComponent,
3279
+ SidePopupComponent,
3280
+ UserSidebarComponent,
3281
+ AppPanelComponent,
3282
+ NotificationPanelComponent,
3283
+ ConfirmDialogComponent,
3284
+ ], template: "<header class=\"app-header ext\">\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"d-flex\">\r\n <!-- Logo: shown only when EnableLogo input is true -->\r\n @if (EnableLogo()) {\r\n <div class=\"logo gap-4\">\r\n <!-- Show logo once the base64 string is loaded; skeleton while waiting -->\r\n @if (EnableLogo() && headerData.headerLogo()) {\r\n <img\r\n class=\"logo-size\"\r\n title=\"Logo\"\r\n alt=\"Logo\"\r\n [src]=\"headerData.headerLogo()\"\r\n loading=\"lazy\"\r\n />\r\n }\r\n @if (!headerData.headerLogo()) {\r\n <p-skeleton\r\n height=\"1.5rem\"\r\n width=\"5rem\"\r\n aria-hidden=\"true\"\r\n ></p-skeleton>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Module / application name shown in the centre of the header -->\r\n <div class=\"projName\">\r\n <h1 class=\"modname\">{{ moduleName() }}</h1>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-end align-items-center\">\r\n\r\n <!-- Timezone: shows abbreviated timezone once loaded from HeaderDataService -->\r\n @if (EnableTimeZone() && headerData.userTimeZoneAbbreviations()) {\r\n <div class=\"timezone\">\r\n <img\r\n src=\"assets/common-header-lib/images/schedule.svg\"\r\n class=\"mb-1\"\r\n alt=\"Timezone schedule\"\r\n />\r\n <span class=\"timezone-text\"\r\n >{{ \"Generic_lib.PreferredTimezone\" | translate }} :\r\n </span>\r\n @if (headerData.userTimeZoneAbbreviations()) {\r\n <!-- Full timezone name appears as a tooltip on hover -->\r\n <span class=\"user-tz\" [title]=\"headerData.userTimeZoneFullForm()\">{{\r\n headerData.userTimeZoneAbbreviations()\r\n }}</span>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- LOB dropdown: skeleton shown while LobService is loading the list -->\r\n @if (EnableLOB()) {\r\n @if (EnableLOB() && !lobService.showLobLoader) {\r\n <div class=\"main-left d-flex\">\r\n <img\r\n src=\"assets/common-header-lib/images/marker-pin.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n\r\n <!-- Note: Removed [virtualScroll] and [itemSize] from p-dropdown because it caused\r\n filtered search results to appear empty until scrolling.\r\n Not needed as LOB list size is small. -->\r\n <p-select\r\n filterPlaceholder=\"{{ 'Generic_lib.Search' | translate }}\"\r\n [options]=\"lobService.userLOBList\"\r\n (onChange)=\"onLobChangeEvent($event)\"\r\n optionLabel=\"lobName\"\r\n optionValue=\"lobId\"\r\n [(ngModel)]=\"selectedLOBId\"\r\n [filter]=\"true\"\r\n filterBy=\"lobName\"\r\n [showClear]=\"false\"\r\n [style]=\"{ width: '150px', height: '30px' }\"\r\n [resetFilterOnHide]=\"true\"\r\n [lazy]=\"false\"\r\n name=\"lob\"\r\n class=\"loblist-drpdwn\"\r\n panelStyleClass=\"loblist-drpdwn-panel\"\r\n ariaLabel=\"{{ 'Generic_lib.LineOfBusiness' | translate }}\"\r\n >\r\n <ng-template let-loblist pTemplate=\"item\">\r\n <div class=\"flex align-items-center gap-2\">\r\n <div title=\"{{ loblist.lobName }}\" class=\"header-drpdwn\">\r\n {{ loblist.lobName }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n </p-select>\r\n </div>\r\n } @else {\r\n <p-skeleton\r\n height=\"1.5rem\"\r\n width=\"10rem\"\r\n aria-hidden=\"true\"\r\n ></p-skeleton>\r\n }\r\n }\r\n\r\n <!-- Action icons: shown once forkJoin in HeaderDataService has completed;\r\n skeletons are displayed while the initial data load is in progress -->\r\n @if (headerData.isHeaderContentLoaded()) {\r\n\r\n <!-- Mailbox icon -->\r\n @if (EnableMail()) {\r\n <button\r\n type=\"button\"\r\n class=\"header-left-icon\"\r\n aria-label=\"{{ 'Generic_lib.MailBox' | translate }}\"\r\n (click)=\"showMailBoxScreen()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/mail-icon.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n class=\"headeright-icon\"\r\n />\r\n </button>\r\n }\r\n <!-- Badge showing unread mail count; hidden when count is zero -->\r\n @if (EnableMail() && headerData.totalEmails().length > 0) {\r\n <div class=\"badge-notify\">\r\n <div pBadge [value]=\"headerData.totalEmails()\"></div>\r\n <span class=\"visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\"\r\n >{{ headerData.totalEmails() }} unread mails</span\r\n >\r\n </div>\r\n }\r\n\r\n <!-- Notification bell icon -->\r\n @if (EnableNotifications()) {\r\n <button\r\n type=\"button\"\r\n class=\"header-left-icon\"\r\n aria-label=\"{{ 'Generic_lib.Notification' | translate }}\"\r\n (click)=\"OpenNotificationModal()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/bell-icon.svg\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n class=\"headeright-icon\"\r\n />\r\n </button>\r\n }\r\n\r\n <!-- Badge showing pending notification count; hidden when count is zero -->\r\n @if (EnableNotifications() && headerData.userNotificationCount().length > 0) {\r\n <div class=\"badge-notify\">\r\n <div pBadge [value]=\"headerData.userNotificationCount()\"></div>\r\n <span class=\"visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\"\r\n >{{ headerData.userNotificationCount() }} notifications</span\r\n >\r\n </div>\r\n }\r\n\r\n <!-- 9-dots (waffle) icon \u2014 opens the app switcher panel -->\r\n @if (EnableMoreApps()) {\r\n <button\r\n type=\"button\"\r\n class=\"header-left-icon\"\r\n aria-label=\"Control Center\"\r\n (click)=\"showUserAppsPanel($event)\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/apps-1.svg\"\r\n class=\"apps-icon\"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n </button>\r\n }\r\n\r\n <!-- User avatar button showing initials \u2014 opens the profile sidebar -->\r\n @if (EnableProfile()) {\r\n <button\r\n type=\"button\"\r\n class=\"main-right\"\r\n [attr.aria-label]=\"headerData.userdisplayName()\"\r\n (click)=\"showUserDetailsPanel()\"\r\n >\r\n <div class=\"initial-text\">\r\n {{ headerData.userdisplayName() | sliceToTwo }}\r\n </div>\r\n </button>\r\n }\r\n\r\n } @else {\r\n <!-- Skeleton placeholders while header data is loading -->\r\n <p-skeleton shape=\"circle\" size=\"1.3rem\" styleClass=\"mx-2\" aria-hidden=\"true\"></p-skeleton>\r\n <p-skeleton shape=\"circle\" size=\"1.3rem\" styleClass=\"mx-2\" aria-hidden=\"true\"></p-skeleton>\r\n <p-skeleton size=\"1.5rem\" styleClass=\"mx-2\" aria-hidden=\"true\"></p-skeleton>\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mx-2\" aria-hidden=\"true\"></p-skeleton>\r\n }\r\n\r\n </div>\r\n </div>\r\n</header>\r\n\r\n<!-- 9-dots app switcher panel (AppPanelComponent manages its own popover + data) -->\r\n<app-panel #appPanel></app-panel>\r\n\r\n<!-- Mailbox details overlay -->\r\n@if (showMailboxScreenflag) {\r\n <div class=\"changingContent\">\r\n <app-user-mailbox\r\n (closeMailDialogBox)=\"hideMailBoxScreen()\"\r\n ></app-user-mailbox>\r\n </div>\r\n}\r\n\r\n<!-- User profile sidebar -->\r\n<div class=\"profile-sidebar\">\r\n @if (isOpenSidePopup) {\r\n <app-side-popup\r\n [visible]=\"true\"\r\n [position]=\"'right'\"\r\n (closeDialogBox)=\"closeSidePopup()\"\r\n >\r\n @if (showUserDetails) {\r\n <app-user-sidebar\r\n [languages]=\"languages()\"\r\n (closeDialogBox)=\"closeSidePopup()\"\r\n ></app-user-sidebar>\r\n }\r\n </app-side-popup>\r\n }\r\n</div>\r\n\r\n<!-- Notification side panel (NotificationPanelComponent manages its own API + SignalR sync).\r\n Wrapping @if ensures the component is not created (no API call) when notifications are off. -->\r\n@if (EnableNotifications()) {\r\n <app-notification-panel\r\n [(visible)]=\"isNotificationPanelOpen\"\r\n [notificationCount]=\"headerData.userNotificationCount()\"\r\n [signalREvents]=\"headerData.signalREventwiseData()\"\r\n ></app-notification-panel>\r\n}\r\n\r\n<!-- LOB change confirmation dialog.\r\n Fires lobChangeConfirmation(true) on confirm, lobChangeConfirmation(false) on cancel. -->\r\n<confirm-dialog\r\n class=\"rm-invalid-border\"\r\n #confirmDialog\r\n header=\"{{ 'Generic_lib.ChangeLOB' | translate }}\"\r\n message=\"{{ 'Generic_lib.DoYouWantToChangeTheCurrentLOB' | translate }}\"\r\n (result)=\"$event ? confirmLobChange() : revertLobChange()\"\r\n></confirm-dialog>\r\n", styles: ["@charset \"UTF-8\";:root{--theme-red: #d4231d;--theme-black: #212121;--theme-blue: #4d91ea;--success: #06a211;--success-1: #00c853;--error: #e6323a;--white-color: #ffffff;--white-smoke: #f6f6f6;--white-smoke-2: #f2f2f2;--white-smoke-4: #f4f4f4;--white-smoke-5: #f5f5f5;--white-smoke-6: #eeeeee;--gainsboro-white-color: #e0e0e0;--gainsboro-white-color-1: #e1e1e1;--gainsboro-white-color-6: #e6e6e6;--black-color: #212121;--silver-color: #bdbdbd;--jaguar-black-color: #212121;--dark-grey-color: #9e9e9e;--empress-grey-color: #757575;--light-grey-color: #d0d0d0;--dim-grey-color: #707070;--dim-grey-color-2: #616161;--very-light-grey-color: #cccccc;--suva-grey-color: #888888;--charcoal-grey-color: #424242;--curious-blue: #337ab7;--dodger-blue: #2196f3;--royal-blue: #2680eb;--solitude-blue: #e9ecf1;--azure-blue: #f0fdff;--lavender-blush: #ffebee;--magenta-violet: #ff00e6;--dark-orange: #fb8c00;--fruit-salad-green: #4caf50;--flau-red: #440808;--ag-header-background-color: #f6f7fb;--primary-color: #d4231d;--body-background-color: #eeeeee;--primary-notification-bg: #ffebee}.grey-background{background-color:var(--ag-header-background-color)}.white-bg{background:var(--white-color);width:420px;overflow:hidden}.log-text{font-size:16px;color:#292f4c;font-weight:600}.imgs{width:20px}.tertiary-btn{border:none;background-color:transparent}.tertiary-btn-profile{padding-left:0;font-size:14px!important;color:#495057}.sidebar-outer{height:100vh}.sidebar-outer .sidebar-header{padding:12px 15px}.sidebar-outer .sidebar-header .sh-top{display:flex;align-items:center;justify-content:space-between}.sidebar-outer .sidebar-header .sh-top button{height:24px}.sidebar-outer .sidebar-body{padding:12px 20px;float:left;width:100%;overflow:auto;height:calc(100vh - 70px)}.sidebar-outer .sidebar-body .sb-list ul{float:left;width:100%;list-style:none;padding-left:0}.sidebar-outer .sidebar-body .sb-list ul li{display:flex;padding:8px 2px;cursor:pointer}.sidebar-outer .sidebar-body .sb-list ul li span{margin-right:12px}.sidebar-body{overflow:auto;height:calc(100vh - 70px);width:100%}.mail-pagination .p-paginator,.mail-table .p-paginator{justify-content:flex-start!important;padding-left:0!important}.mail-pagination .p-paginator .p-paginator-current,.mail-table .p-paginator .p-paginator-current{font-size:12px;height:1rem!important}.mail-pagination .p-paginator .p-paginator-pages .p-paginator-page,.mail-table .p-paginator .p-paginator-pages .p-paginator-page{min-width:30px!important;height:30px!important;font-size:12px}.mail-pagination .p-paginator .p-select,.mail-table .p-paginator .p-select{height:30px!important;margin-top:0;border:0}.mail-pagination .p-paginator .p-select .p-select-label,.mail-table .p-paginator .p-select .p-select-label{padding:4px 5px 0 10px!important;font-size:14px}.mail-pagination .p-paginator .p-select .p-select-dropdown,.mail-table .p-paginator .p-select .p-select-dropdown{width:1.5rem!important}.mail-pagination .p-paginator .p-select .p-select-dropdown .pi,.mail-table .p-paginator .p-select .p-select-dropdown .pi{font-size:13px!important}.mail-table{height:calc(100vh - 196px);overflow:auto}.mail-table .p-datatable .p-datatable-thead>tr{border:1px solid #dee2e6;border-radius:24px}.mail-table .p-datatable .p-datatable-thead>tr th{padding:0 8px;height:36px;font-size:13px;color:var(--primary-text);font-weight:600;background:var(--white-color)}.mail-table .p-datatable .p-datatable-tbody>tr{border:1px solid #dee2e6;border-radius:24px}.mail-table .p-datatable .p-datatable-tbody>tr td{padding:0 25px 0 8px;height:38px;font-size:13px;color:var(--secondary-text);white-space:nowrap}.mail-table .p-datatable .p-sortable-column:hover{background-color:var(--white-color)!important;color:#000!important}.mail-table .p-datatable .p-sortable-column:focus{box-shadow:none!important}.mail-table .p-datatable .p-sortable-column .p-sortable-column-icon{font-size:12px}.mail-table .p-checkbox{height:18px;width:18px}.mail-table .p-checkbox .p-checkbox-box{height:16px;width:16px;border-radius:4px;border:1px solid var(--ui-border)}.mail-table .p-checkbox .p-checkbox-box:hover{border:1px solid var(--ui-border)!important}.mail-table .p-checkbox .p-checkbox-icon{font-size:10px!important}.mail-table .p-select-overlay .p-select-list{padding:0}.mail-table .p-select-overlay .p-select-list .p-select-option{font-size:13px!important;padding:10px 15px}.mail-table .p-paginator{position:fixed;bottom:0}.mail-pagination .p-paginator{height:47px;width:100%}.mail-pagination .p-paginator .p-paginator-current{padding-left:0;padding-right:12px}.mail-pagination .p-paginator .p-paginator-first,.mail-pagination .p-paginator .p-paginator-prev,.mail-pagination .p-paginator .p-paginator-next,.mail-pagination .p-paginator .p-paginator-last{min-width:30px!important;height:30px!important}.p-datatable-table{border-collapse:collapse!important}.p-paginator-page.p-paginator-page-selected{background:#eff6ff!important;border-color:#eff6ff;color:#1d4ed8!important}.modal-dialog{margin-right:0;margin-top:0;margin-bottom:0}.view-pass-details{width:600px!important}.view-pass-details .p-dialog-content:last-of-type{border-bottom-right-radius:4px!important;border-bottom-left-radius:4px!important;padding:0}.p-confirmdialog{border-radius:4px!important}.p-confirmdialog .p-dialog-content{align-items:center;padding-top:24px;padding-right:20px;font-size:var(--base-font-size);position:relative;right:45px}.p-confirmdialog .p-button{font-size:var(--base-font-size);background-color:var(--primary-color);border-color:var(--primary-color);padding:6px 28px}.p-confirmdialog .p-button .p-button-secondary .p-button-outlined{background-color:var(--white-color);border:1px solid var(--primary-color);color:var(--primary-color)}.p-confirmdialog .p-button .p-button-secondary .p-button-outlined:enabled:hover{background-color:var(--white-color)}.p-confirmdialog .p-button:enabled:hover{border:1px solid var(--primary-color);background-color:var(--primary-color)}.p-confirmdialog .p-button.p-button-secondary.p-button-outlined{color:var(--primary-color);border:1px solid var(--primary-color);background-color:var(--white-color)}.p-confirmdialog .p-button.p-button-secondary.p-button-outlined:enabled:hover{color:var(--primary-color);border:1px solid var(--primary-color);background-color:var(--white-color)}.p-confirmdialog .p-dialog-footer{padding:20px!important}.p-confirmdialog.p-dialog .p-resizable-handle{display:none}.p-dialog{border:0px!important}.p-dialog.general-configuration{width:100%;height:100vh;max-height:100vh;border-radius:0!important}.p-dialog.general-configuration .p-dialog-header{padding:10px 21px!important}.p-dialog .p-dialog-header{padding:10px 14px 10px 21px!important;background:var(--white-color)!important;height:45px;border-top-right-radius:4px!important;border-top-left-radius:4px!important;border-bottom:1px solid var(--primary-color)!important}.p-dialog .p-dialog-header .p-dialog-title{font-weight:600;font-size:var(--base-font-size)}.general-configuration .p-dialog-header{border-bottom:1px solid #d0d4e4!important;background:var(--white-color)!important}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.initial-text{width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:11px;border-radius:50%;color:var(--white-color);background-color:#8e562e}.form-group{margin-bottom:5px}.form-group .error-msg{position:relative}.madontary-icon{color:var(--primary-color);font-weight:500;padding:5px 0 0 5px;text-decoration:none!important;border-bottom:none}.img-lock{width:12px;margin-bottom:1px}.img-lock.ext{width:16px;margin-bottom:0}.img-lock.ext2{width:18px;margin-bottom:0}.submit-btn .p-button{height:30px;font-size:14px;border-radius:4px;border:1px solid var(--primary-color);background-color:var(--primary-color);border-color:var(--primary-color)}.submit-btn .p-button:enabled:hover{border:1px solid var(--primary-color);background-color:var(--primary-color);border-color:var(--primary-color)}.submit-btn .p-button .p-button-label{font-weight:400;font-size:13px}.error-msg{font-size:12px;font-weight:600;width:100%;position:absolute;bottom:4px;left:0;display:flex;align-items:flex-end;color:#d83a52;font-family:-apple-system,BlinkMacSystemFont,Roboto,Segoe UI,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol!important}.error-msg .error-icon{font-size:18px;margin-right:4px;position:relative;top:-1px}::-webkit-scrollbar{background-color:#eee;width:5px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background-color:#888;border-radius:5px}::-webkit-scrollbar-thumb:hover{background-color:#888}.p-select .p-select-dropdown{width:32px!important}.pi-chevron-down:before{content:\"\\e902\";font-size:11px}.p-select-header{position:relative}.p-select-header input{border:1px solid #ced4da!important}.p-select-list-container{max-height:120px!important}.p-select-list-container .p-select-list{padding:0!important}.p-select-list-container .p-select-list .p-select-empty-message{padding:10px 18px;font-size:12px;color:#495057!important;background:transparent!important}.p-select-list-container .p-select-list .p-select-option{border-radius:0!important;padding:6px 16px}.p-select-list-container .p-select-list .p-select-option.p-select-option-selected,.p-select-list-container .p-select-list .p-select-option:not(.p-select-option-selected):not(.p-disabled).p-focus{color:var(--jaguar-black-color);background-color:var(--solitude-blue)}.lang-dropdown .p-select{border:1px solid #dee2e6!important;height:26px!important;border-radius:4px!important;min-width:calc(40vh - 92px)!important;padding:0 4px 0 12px!important;display:flex!important;align-items:center!important;justify-content:space-between!important}.lang-dropdown .p-select .pi{position:relative;bottom:2px;left:7px}.lang-dropdown .p-select-overlay{background:var(--white-color)!important;color:#495057!important;border:0px!important;box-shadow:0 2px 12px #0000001a!important}.lang-dropdown .p-select-overlay .p-select-header{padding:4px 8px!important;border-radius:0!important}.lang-dropdown .p-select-overlay .p-select-header .p-select-filter-icon{position:relative;bottom:13px;font-size:13px}.lang-dropdown .p-select-overlay .p-select-list{font-size:12px;padding:0!important}.lang-dropdown .p-select-overlay .p-select-list .p-select-option{padding:2px 14px;font-size:12px}.lang-dropdown .p-select-list-container{max-height:140px!important}.lang-dropdown .p-select-list-container ::-webkit-scrollbar{width:5px!important}.lang-dropdown .p-select .p-select-header .p-select-filter{height:26px!important;border-radius:4px!important;font-size:12px!important;border:1px solid #ced4da!important;padding-left:12px!important}.lang-dropdown .p-select-label{margin:0;text-align:start;font-size:13px;padding:0!important}.lang-dropdown .p-select-list-container .p-select-list{font-size:12px!important;padding:0!important}.lang-dropdown .p-select-list-container .p-select-list .p-select-option{padding:2px 14px!important}.loblist-drpdwn-panel .p-select-header{padding:5px 10px!important;border-bottom:1px solid #dee2e6!important;background:#f8f9fa!important;color:#343a40!important;margin:0!important}.loblist-drpdwn-panel .p-select-header .p-select-filter{height:28px;border-radius:4px;font-size:12px}.loblist-drpdwn-panel .p-select-header .p-select-filter-icon{position:absolute;left:82%;top:50%;transform:translateY(-50%);color:#6c757d}.loblist-drpdwn-panel .p-select-header .p-inputtext{background:var(--white-color);padding:6px;height:28px!important;border-radius:4px;font-size:12px!important}.loblist-drpdwn-panel .p-select-list .p-select-option{margin-bottom:1px;padding:6px 16px;border:0;color:#495057;background:transparent;transition:box-shadow .2s;border-radius:0;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.loblist-drpdwn-panel .p-select-list .p-select-empty-message{padding:6px 12px;color:#495057!important;background:transparent!important;font-size:12px}.loblist-drpdwn{border:none!important;border-radius:0;width:140px!important;box-shadow:none!important}.loblist-drpdwn .p-icon{height:12px!important;color:#6c757d}.loblist-drpdwn .p-select-label{font-size:13px;background:transparent;border:0 none;display:flex;align-items:center}.assets-dropdown .p-select{height:38px!important;width:100%!important;border-radius:4px!important}.assets-dropdown .p-select:hover{border:1px solid #ced4da!important}.assets-dropdown .p-select-label{width:100%;border-radius:4px;height:36px;font-size:13px!important}.assets-dropdown .p-select-overlay .p-select-header{padding:10px!important}.assets-dropdown .p-select-overlay .p-select-header .p-select-filter-icon{left:96%;color:#6c757d;font-size:13px;top:15px!important}.assets-dropdown .p-select-overlay .p-select-list .p-select-empty-message{font-size:13px!important;padding:8px 20px!important}.assets-dropdown .p-select-list-container{max-height:100px!important}.assets-dropdown .p-select-list-container .p-select-list .p-select-option{padding:5px 20px!important;font-size:13px!important;font-weight:400!important}.assets-dropdown .p-select-list-container .p-select-list .p-select-option:not(.p-select-option-selected):not(.p-disabled).p-focus{background:#e9ecef!important}.timezone-dropdown .p-select-label{font-size:13px}.timezone-dropdown .p-select{width:100%;border:1px solid #ced4da!important;border-radius:4px;height:38px}.timezone-dropdown .p-select:hover{border:1px solid #ced4da!important}.timezone-dropdown .p-select-overlay .p-select-header{padding:10px!important}.timezone-dropdown .p-select-overlay .p-select-header .p-select-filter-icon{left:96%;color:#6c757d;font-size:13px;top:15px!important}.timezone-dropdown .p-select-overlay .p-select-list .p-select-option{padding:5px 20px!important;font-size:13px!important;font-weight:400!important}.timezone-dropdown .p-select-overlay .p-select-list .p-select-empty-message{font-size:13px!important;padding:8px 20px!important}.timezone-dropdown .p-inputtext{width:100%;border-radius:4px;height:30px;font-size:13px!important}.timezone-dropdowntimezone-dropdown .p-select-list-container{max-height:100px!important}.input-dropdown .password-checkbox-right{position:absolute;width:24px;right:8px}.p-drawer-content{padding:0!important}.p-drawer-right{top:42px!important;width:520px!important}.p-drawer-header{height:42px;padding:0 14px 0 20px!important;border-bottom:1px solid var(--primary-color)!important}.p-drawer-title{font-size:var(--font-size-medium)!important;font-weight:600!important;color:var(--black-color)}.p-icon{height:16px!important}.p-button-icon-only{padding-inline-start:23px!important}.p-button-text.p-button-secondary:not(:disabled):hover{background:none!important}.p-inputtext{color:#000;height:30px!important;font-size:var(--base-font-size)!important}.p-inputtext:enabled:focus,.p-inputtext:enabled:hover,.p-multiselect:not(.p-disabled):hover{border-color:var(--silver-color)!important}.p-multiselect:not(.p-disabled).p-focus,.p-inputtext:enabled:focus{border-color:var(--silver-color)!important;box-shadow:none!important}.app-form input[type=text]{height:30px!important;width:100%!important}.p-autocomplete-list{height:30px;overflow:hidden;font-size:var(--font-size-small);margin:0 0 4px -4px!important;padding:0!important}.p-multiselect{height:28px;font-size:var(--base-font-size);border-radius:4px!important}.p-multiselect-label{padding:4px 10px!important}.p-multiselect-header{padding:6px 8px!important}.p-multiselect-empty-message{padding:6px 8px!important;font-size:var(--base-font-size)}.p-multiselect-list{padding:0!important}.p-multiselect-option{padding:5px 8px!important;font-size:var(--base-font-size)!important}.p-multiselect-option span{width:175px;overflow:hidden;text-overflow:ellipsis}.p-multiselect-option.p-multiselect-option-selected{background:none!important;color:#000!important}.p-checkbox{top:7px!important}.p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box{border-color:var(--primary-color)!important}.p-checkbox-box{width:12px!important;height:12px!important;border-radius:2px!important}.p-checkbox-checked .p-checkbox-box{border-color:var(--primary-color)!important;background:var(--primary-color)!important}.p-overlay .p-select-overlay{left:-1px!important;width:65px!important}.p-select:not(.p-disabled).p-focus{border-color:var(--silver-color)!important}.p-dialog-header-actions .p-button{padding:0!important;width:24px!important;height:24px!important;display:flex;justify-content:center;align-items:center}.sh-top-right .common-bn,.mail-content .common-bn{padding:0!important;width:24px!important;height:24px!important;display:flex;justify-content:center;align-items:center;border-radius:50%}.ngx-toastr{width:400px!important;margin-top:10px!important}.toast-warning,.toast-info,.toast-error,.toast-success{background-color:var(--white-color)!important;border-radius:4px!important;background-repeat:no-repeat}.toast-warning .toast-title,.toast-info .toast-title,.toast-error .toast-title,.toast-success .toast-title{font-weight:700;font-size:16px}.toast-warning .toast-message,.toast-info .toast-message,.toast-error .toast-message,.toast-success .toast-message{color:#676879!important;font-size:14px!important}.toast-success{border-bottom:3px solid #258750;background-image:url(assets/common-header-lib/images/toast-success.svg)!important}.toast-success .toast-title{color:#258750!important}.toast-success .toast-message{padding-top:2px}.toast-success .toast-progress{color:#258750!important}.toast-error{border-bottom:3px solid #d83a52;background-image:url(assets/common-header-lib/images/toast-error.svg)!important}.toast-error .toast-title{color:#d83a52!important}.toast-error .toast-message{padding-top:2px}.toast-info{border-bottom:3px solid #0073ea;background-image:url(assets/common-header-lib/images/toast-info.svg)!important}.toast-info .toast-title{color:#0073ea!important}.toast-info .toast-message{padding-top:3px}.toast-warning{border-bottom:3px solid #fdab3d;background-image:url(assets/common-header-lib/images/toast-alert.svg)!important}.toast-warning .toast-title{color:#fdab3d!important}.toast-warning .toast-message{padding-top:3px}.toast-close-button{right:4px!important;top:0;font-size:20px;font-weight:700;text-shadow:0 1px 0 var(--white-color);background-color:transparent;border:0px;color:#676879;position:absolute;cursor:pointer}.toast-container{position:fixed;z-index:2147483647!important;pointer-events:auto!important}.toast-container .ngx-toastr{position:relative;overflow:hidden;margin:0 0 6px;padding:15px 40px 15px 50px;width:300px;border-radius:8px!important;background-position:15px 15px;background-repeat:no-repeat;background-size:24px;box-shadow:0 0 9px #99999980;color:var(--white-color)}.toast-top-center{top:0;right:0;width:100%}.toast-top-right{right:15px;top:40px}.toast-container.toast-top-center .ngx-toastr,.toast-container.toast-bottom-center .ngx-toastr{margin-left:auto;margin-right:auto}.skip-link{position:absolute;top:-100%;left:0;z-index:9999;padding:8px 12px;background:var(--white-color);color:var(--primary-color);font-size:13px;text-decoration:none;border:1px solid var(--primary-color);border-radius:0 0 4px}.skip-link:focus-visible{top:0}.app-header{padding:4px 10px 10px;height:42px;border-bottom:1px solid #d0d4e4}.logo{display:flex;align-items:center}.main-right{display:flex;align-items:center;cursor:pointer;border-radius:50%}.main-right:is(button){padding:0;border:none;background:transparent;color:inherit;font:inherit}.logo-icon{width:0;height:0;border-left:14px solid transparent;border-right:14px solid transparent;position:relative}.logo-icon:after{width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;position:absolute;content:\"\";top:7px;left:-7px}.p-inputtext.p-inputtext-sm{padding:4px 5px 4px 33px!important}.pi-search:before{font-size:13px;position:absolute;top:2px}.overlay-text{font-size:13px;line-height:18px;color:#676879;font-weight:400}:focus-visible{outline:1px solid #007eff!important;outline-offset:0px;box-shadow:0 0 0 .1rem #bfdbfe!important}.main-left .p-select{border:none;border-radius:0;width:140px!important}.main-left .p-select-overlay .p-select-list{padding:0!important;max-height:110px}.main-left .p-select .p-inputtext:focus-visible{outline:none!important}.main-left .p-scroller{overflow-x:hidden;height:120px!important}.header-drpdwn{width:120px!important;font-size:11px!important;text-overflow:ellipsis;overflow:hidden}.logs{gap:70px;margin-top:5px}.head-search{position:fixed;top:4px;left:275px}.head-search input{width:calc(30vw - 40px)!important;border:1px solid #c3c6d4;background-color:var(--ag-header-background-color, #f6f7fb);height:32px;border-radius:0 4px 4px 0;border-left:none;font-size:13px!important;padding-left:30px!important;padding-right:54px}.head-search.active input{width:555px!important}@media screen and (min-width:1920px){.head-search.active input{width:900px!important}}.header-left-icon{height:32px;width:32px;cursor:pointer;display:flex;justify-content:center;align-items:center;transition:all .5s;border-radius:50%;margin-right:4px;position:relative}.header-left-icon:is(button){padding:0;border:none;background:transparent;color:inherit;font:inherit}.header-left-icon:hover{background:#dcdfec}.header-left-icon img:hover{filter:invert(0%) sepia(4%) saturate(0%) hue-rotate(324deg) brightness(55%) contrast(105%)}.apps-icon{width:21px}.logo-img{width:80px}.lob-img{padding-bottom:4px}.session-app:hover{background:#dcdfec;border-radius:10px}.app-col{cursor:pointer;padding:8px 0}.app-text{font-size:12px;color:#676879;white-space:nowrap;padding-top:8px;text-align:center;text-overflow:ellipsis;overflow:hidden;width:100px}.filter-search{position:relative;right:50px;bottom:2px;cursor:pointer}.filter-search .cross-search{width:23px}.filter-search .search-filter{width:19px}.headeright-icon{width:17px;height:17px;filter:invert(44%) sepia(3%) saturate(1698%) hue-rotate(199deg) brightness(92%) contrast(93%)}.pl-0{padding-left:0}.form-control-sm{border:none;border-bottom:1px solid #c3c6d4;border-radius:0}.overlay-footer .common-btn{width:110px;height:32px;padding:11px 12px;border-radius:4px;font-size:13px;cursor:pointer;background:var(--white-color)}.overlay-footer .primary-btn{padding:8px 12px 11px 14px;border-radius:4px;height:32px;width:65px;font-size:13px;cursor:pointer}.filter-popup{position:relative;left:10px}.timezone{margin-right:12px}.timezone-icon{font-size:16px}.timezone-text{padding-left:6px;font-size:13px;color:#495057;font-weight:400}.user-tz{font-size:13px;color:var(--empress-grey-color);font-weight:400;text-overflow:ellipsis;overflow:hidden;width:30px;white-space:normal}.profile-sidebar .p-dialog .p-dialog-content{padding:0}.profile-sidebar .p-dialog-header{display:none}.modname{font-size:18px;margin-bottom:0}.logo-size{max-height:32px;max-width:92px}.logo-size-1{width:80px;height:30px}.badge-notify:hover{border-radius:50%;background:#dcdfec}.badge-notify .p-badge{min-width:16px;height:16px;line-height:15px}.badge-notify .p-overlay-badge .p-badge{background-color:var(--primary-color)!important;position:absolute;top:-7px;right:12px;font-size:9px;padding:0 2px;cursor:pointer}.changingContent{overflow:hidden;width:100%}.changingContent .intro-text{background-image:linear-gradient(145deg,#f1eaec,#f8e3e7,#f7e1f8,#ebeeff,#e8eef3);position:relative;height:135px}.changingContent .inner-garient{padding:50px 20px 115px 30px}.changingContent .table-heading{padding:0 20px 1px 30px}.changingContent .table-selection{padding:3px 20px 0 30px}.rm-invalid-border .card{border:0px}\n"] }]
3285
+ }], ctorParameters: () => [], propDecorators: { EnableLogo: [{ type: i0.Input, args: [{ isSignal: true, alias: "EnableLogo", required: false }] }], moduleName: [{ type: i0.Input, args: [{ isSignal: true, alias: "moduleName", required: false }] }], EnableTimeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "EnableTimeZone", required: false }] }], EnableLOB: [{ type: i0.Input, args: [{ isSignal: true, alias: "EnableLOB", required: false }] }], showAllLOB: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAllLOB", required: false }] }], EnableMail: [{ type: i0.Input, args: [{ isSignal: true, alias: "EnableMail", required: false }] }], EnableNotifications: [{ type: i0.Input, args: [{ isSignal: true, alias: "EnableNotifications", required: false }] }], EnableMoreApps: [{ type: i0.Input, args: [{ isSignal: true, alias: "EnableMoreApps", required: false }] }], EnableProfile: [{ type: i0.Input, args: [{ isSignal: true, alias: "EnableProfile", required: false }] }], languages: [{ type: i0.Input, args: [{ isSignal: true, alias: "languages", required: false }] }], timezoneDetails: [{ type: i0.Output, args: ["timezoneDetails"] }], lobSelected: [{ type: i0.Output, args: ["lobSelected"] }], getBgImage: [{ type: i0.Output, args: ["getBgImage"] }], langChange: [{ type: i0.Output, args: ["langChange"] }], overlayStateChange: [{ type: i0.Output, args: ["overlayStateChange"] }], confirmDialog: [{ type: i0.ViewChild, args: ['confirmDialog', { isSignal: true }] }], appPanelRef: [{ type: i0.ViewChild, args: ['appPanel', { isSignal: true }] }] } });
3286
+
3287
+ /**
3288
+ * Thin re-export wrapper for NgModule-based host apps.
3289
+ *
3290
+ * All components and pipes are now standalone. This module simply imports and
3291
+ * re-exports the public API so that existing NgModule consumers can continue
3292
+ * using `CommonHeaderLibModule` without changes.
3293
+ *
3294
+ * Translation initialization (app initializer, languages.json validation,
3295
+ * fallback chain, language-file loading) is OWNED BY THE CONSUMING APP.
3296
+ * TranslateModule is re-exported here so that consumers get access to the
3297
+ * translate pipe. Do NOT use forChild({ isolate: true }) — library components
3298
+ * share the host app's TranslateService singleton.
3299
+ */
3300
+ class CommonHeaderLibModule {
3301
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CommonHeaderLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3302
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: CommonHeaderLibModule, imports: [CommonHeaderLibComponent,
3303
+ SliceToTwoPipe,
3304
+ CustomDateFormatPipe,
3305
+ DateDiffPipe,
3306
+ ConfirmDialogComponent,
3307
+ ViewpasswordPopupComponent,
3308
+ TranslateModule], exports: [CommonHeaderLibComponent,
3309
+ SliceToTwoPipe,
3310
+ DateDiffPipe,
3311
+ CustomDateFormatPipe,
3312
+ ConfirmDialogComponent,
3313
+ ViewpasswordPopupComponent,
3314
+ TranslateModule] }); }
3315
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CommonHeaderLibModule, imports: [CommonHeaderLibComponent,
3316
+ ConfirmDialogComponent,
3317
+ ViewpasswordPopupComponent,
3318
+ TranslateModule, TranslateModule] }); }
3319
+ }
3320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CommonHeaderLibModule, decorators: [{
3321
+ type: NgModule,
3322
+ args: [{
3323
+ imports: [
3324
+ CommonHeaderLibComponent,
3325
+ SliceToTwoPipe,
3326
+ CustomDateFormatPipe,
3327
+ DateDiffPipe,
3328
+ ConfirmDialogComponent,
3329
+ ViewpasswordPopupComponent,
3330
+ TranslateModule,
3331
+ ],
3332
+ exports: [
3333
+ CommonHeaderLibComponent,
3334
+ SliceToTwoPipe,
3335
+ DateDiffPipe,
3336
+ CustomDateFormatPipe,
3337
+ ConfirmDialogComponent,
3338
+ ViewpasswordPopupComponent,
3339
+ TranslateModule,
3340
+ ],
3341
+ }]
3342
+ }] });
3343
+
3344
+ const httpErrorInterceptor = (req, next) => {
3345
+ const encryptService = inject(EncrydecryRSAdataService);
3346
+ if (!isAuthorized()) {
3347
+ return throwError(() => new Error('Unauthorized - Session not found'));
3348
+ }
3349
+ const encryptedTime = generateEncryptedToken(encryptService);
3350
+ const securedReq = encryptedTime
3351
+ ? req.clone({ setHeaders: { encht: encryptedTime } })
3352
+ : req;
3353
+ return next(securedReq).pipe(catchError$1((error) => throwError(() => error)));
3354
+ };
3355
+ function isAuthorized() {
3356
+ return !!localStorage.getItem('001-SAC-GEC');
3357
+ }
3358
+ function generateEncryptedToken(encryptService) {
3359
+ GlobalConstants.ErrorCode = localStorage.getItem('001-SAC-GEC') || '';
3360
+ const timeStamp = convertLocalTimeToUTCTime(new Date(), GlobalConstants.TimeForEncToken);
3361
+ const encryptedTime = encryptService.encryptViaRSA(timeStamp.toISOString());
3362
+ GlobalConstants.token = encryptedTime;
3363
+ return encryptedTime;
3364
+ }
3365
+ function convertLocalTimeToUTCTime(localDateTime, extraSeconds) {
3366
+ const localDate = new Date(localDateTime);
3367
+ localDate.setSeconds(localDate.getSeconds() + extraSeconds);
3368
+ return new Date(Date.UTC(localDate.getUTCFullYear(), localDate.getUTCMonth(), localDate.getUTCDate(), localDate.getUTCHours(), localDate.getUTCMinutes(), localDate.getUTCSeconds()));
3369
+ }
3370
+
3371
+ /*
3372
+ * Public API Surface of common-header-lib
3373
+ */
3374
+
3375
+ /**
3376
+ * Generated bundle index. Do not edit.
3377
+ */
3378
+
3379
+ export { COOKIECONSTANT, CommonHeaderLibComponent, CommonHeaderLibModule, ConfirmDialogComponent, CustomDateFormatPipe, DateDiffPipe, GlobalConstants, SliceToTwoPipe, StorageService, ToastMsgService, ViewpasswordPopupComponent, httpErrorInterceptor };
3380
+ //# sourceMappingURL=common-header-lib.mjs.map