common-header-lib 0.5.15 → 0.20.2

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 (112) hide show
  1. package/README.md +143 -24
  2. package/assets/i18n/ar.json +21 -1
  3. package/assets/i18n/de.json +21 -1
  4. package/assets/i18n/en.json +21 -2
  5. package/assets/i18n/es.json +21 -1
  6. package/assets/i18n/fr.json +21 -1
  7. package/assets/i18n/hi.json +21 -1
  8. package/assets/i18n/ja.json +21 -1
  9. package/assets/i18n/ko.json +21 -1
  10. package/assets/images/APP033.svg +12 -0
  11. package/assets/images/check.svg +3 -0
  12. package/assets/images/copy-success.svg +4 -0
  13. package/assets/images/copy.svg +3 -0
  14. package/assets/images/download-blue.svg +3 -0
  15. package/assets/images/generate.svg +3 -0
  16. package/assets/images/regenerate.svg +3 -0
  17. package/fesm2022/common-header-lib.mjs +3612 -0
  18. package/fesm2022/common-header-lib.mjs.map +1 -0
  19. package/index.d.ts +461 -5
  20. package/package.json +20 -31
  21. package/src/assets/i18n/ar.json +21 -1
  22. package/src/assets/i18n/de.json +21 -1
  23. package/src/assets/i18n/en.json +21 -2
  24. package/src/assets/i18n/es.json +21 -1
  25. package/src/assets/i18n/fr.json +21 -1
  26. package/src/assets/i18n/hi.json +21 -1
  27. package/src/assets/i18n/ja.json +21 -1
  28. package/src/assets/i18n/ko.json +21 -1
  29. package/src/assets/images/APP033.svg +12 -0
  30. package/src/assets/images/check.svg +3 -0
  31. package/src/assets/images/copy-success.svg +4 -0
  32. package/src/assets/images/copy.svg +3 -0
  33. package/src/assets/images/download-blue.svg +3 -0
  34. package/src/assets/images/generate.svg +3 -0
  35. package/src/assets/images/regenerate.svg +3 -0
  36. package/assets/scss/_sidebar.scss +0 -267
  37. package/assets/scss/styles.scss +0 -577
  38. package/esm2020/common-header-lib.mjs +0 -5
  39. package/esm2020/lib/Validators/noSpaceAllowed.mjs +0 -16
  40. package/esm2020/lib/common-header-lib.component.mjs +0 -595
  41. package/esm2020/lib/common-header-lib.module.mjs +0 -208
  42. package/esm2020/lib/common-header-lib.service.mjs +0 -200
  43. package/esm2020/lib/components/confirm-dialog/confirm-dialog.component.mjs +0 -49
  44. package/esm2020/lib/components/general-configuration/general-configuration.component.mjs +0 -399
  45. package/esm2020/lib/components/general-configuration/landingpg-config/landingpg-config.component.mjs +0 -124
  46. package/esm2020/lib/components/general-configuration/timezone-configuration/timezone-configuration.component.mjs +0 -137
  47. package/esm2020/lib/components/grid-pagination/grid-pagination.component.mjs +0 -38
  48. package/esm2020/lib/components/ng-translation/ng-translation.component.mjs +0 -61
  49. package/esm2020/lib/components/no-service-my-access-pg/no-service-my-access-pg.component.mjs +0 -19
  50. package/esm2020/lib/components/notification-sidebar/notification-sidebar.component.mjs +0 -40
  51. package/esm2020/lib/components/side-popup/side-popup.component.mjs +0 -34
  52. package/esm2020/lib/components/user-mailbox/user-mailbox.component.mjs +0 -168
  53. package/esm2020/lib/components/user-sidebar/user-sidebar.component.mjs +0 -249
  54. package/esm2020/lib/components/viewpassword-popup/viewpassword-popup.component.mjs +0 -196
  55. package/esm2020/lib/model/data_model.mjs +0 -217
  56. package/esm2020/lib/pipes/custome-dateformat.pipe.mjs +0 -27
  57. package/esm2020/lib/pipes/date-diff.pipe.mjs +0 -55
  58. package/esm2020/lib/pipes/slice-to-two.pipe.mjs +0 -34
  59. package/esm2020/lib/services/EncrypDecryp_RSA.service.mjs +0 -100
  60. package/esm2020/lib/services/async-passwordcheck.service.mjs +0 -70
  61. package/esm2020/lib/services/cookie-storage-manager.service.mjs +0 -78
  62. package/esm2020/lib/services/encrpdata.service.mjs +0 -55
  63. package/esm2020/lib/services/encrydecrydata.service.mjs +0 -205
  64. package/esm2020/lib/services/event.service.mjs +0 -132
  65. package/esm2020/lib/services/http/http-common.service.mjs +0 -228
  66. package/esm2020/lib/services/http/http-general-config.service.mjs +0 -84
  67. package/esm2020/lib/services/rest-login-form.service.mjs +0 -294
  68. package/esm2020/lib/services/rest-signalr.service.mjs +0 -104
  69. package/esm2020/lib/services/storage.service.mjs +0 -33
  70. package/esm2020/lib/services/toast-msg.service.mjs +0 -101
  71. package/esm2020/lib/services/vapt-validation.service.mjs +0 -31
  72. package/esm2020/public-api.mjs +0 -13
  73. package/fesm2015/common-header-lib.mjs +0 -4121
  74. package/fesm2015/common-header-lib.mjs.map +0 -1
  75. package/fesm2020/common-header-lib.mjs +0 -4102
  76. package/fesm2020/common-header-lib.mjs.map +0 -1
  77. package/lib/Validators/noSpaceAllowed.d.ts +0 -2
  78. package/lib/common-header-lib.component.d.ts +0 -147
  79. package/lib/common-header-lib.module.d.ts +0 -43
  80. package/lib/common-header-lib.service.d.ts +0 -25
  81. package/lib/components/confirm-dialog/confirm-dialog.component.d.ts +0 -13
  82. package/lib/components/general-configuration/general-configuration.component.d.ts +0 -86
  83. package/lib/components/general-configuration/landingpg-config/landingpg-config.component.d.ts +0 -37
  84. package/lib/components/general-configuration/timezone-configuration/timezone-configuration.component.d.ts +0 -38
  85. package/lib/components/grid-pagination/grid-pagination.component.d.ts +0 -20
  86. package/lib/components/ng-translation/ng-translation.component.d.ts +0 -22
  87. package/lib/components/no-service-my-access-pg/no-service-my-access-pg.component.d.ts +0 -8
  88. package/lib/components/notification-sidebar/notification-sidebar.component.d.ts +0 -16
  89. package/lib/components/side-popup/side-popup.component.d.ts +0 -14
  90. package/lib/components/user-mailbox/user-mailbox.component.d.ts +0 -40
  91. package/lib/components/user-sidebar/user-sidebar.component.d.ts +0 -59
  92. package/lib/components/viewpassword-popup/viewpassword-popup.component.d.ts +0 -47
  93. package/lib/model/data_model.d.ts +0 -184
  94. package/lib/pipes/custome-dateformat.pipe.d.ts +0 -8
  95. package/lib/pipes/date-diff.pipe.d.ts +0 -9
  96. package/lib/pipes/slice-to-two.pipe.d.ts +0 -7
  97. package/lib/services/EncrypDecryp_RSA.service.d.ts +0 -15
  98. package/lib/services/async-passwordcheck.service.d.ts +0 -18
  99. package/lib/services/cookie-storage-manager.service.d.ts +0 -16
  100. package/lib/services/encrpdata.service.d.ts +0 -12
  101. package/lib/services/encrydecrydata.service.d.ts +0 -33
  102. package/lib/services/event.service.d.ts +0 -30
  103. package/lib/services/http/http-common.service.d.ts +0 -31
  104. package/lib/services/http/http-general-config.service.d.ts +0 -15
  105. package/lib/services/rest-login-form.service.d.ts +0 -39
  106. package/lib/services/rest-signalr.service.d.ts +0 -23
  107. package/lib/services/storage.service.d.ts +0 -11
  108. package/lib/services/toast-msg.service.d.ts +0 -23
  109. package/lib/services/vapt-validation.service.d.ts +0 -7
  110. package/public-api.d.ts +0 -8
  111. package/src/assets/scss/_sidebar.scss +0 -267
  112. package/src/assets/scss/styles.scss +0 -577
@@ -0,0 +1,3612 @@
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 * as i4$1 from '@angular/common';
10
+ import { CommonModule, DatePipe } from '@angular/common';
11
+ import * as i1$5 from '@angular/forms';
12
+ import { FormBuilder, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
13
+ import * as i2 from 'primeng/select';
14
+ import { SelectModule } from 'primeng/select';
15
+ import * as i1$1 from 'primeng/skeleton';
16
+ import { SkeletonModule } from 'primeng/skeleton';
17
+ import * as i5$1 from 'primeng/badge';
18
+ import { BadgeModule } from 'primeng/badge';
19
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
20
+ import { DynamicDialogConfig, DialogService } from 'primeng/dynamicdialog';
21
+ import { finalize as finalize$1, map as map$1, catchError as catchError$1, debounceTime, take, switchMap } from 'rxjs/operators';
22
+ import { HttpClient, HttpParams } from '@angular/common/http';
23
+ import { map, catchError, throwError, BehaviorSubject, Subject, finalize, of, forkJoin } from 'rxjs';
24
+ import { CookieService } from 'ngx-cookie-service';
25
+ import { ToastrService } from 'ngx-toastr';
26
+ import * as i4 from 'primeng/button';
27
+ import { ButtonModule } from 'primeng/button';
28
+ import * as i1$3 from 'primeng/table';
29
+ import { TableModule } from 'primeng/table';
30
+ import * as i1$2 from 'primeng/paginator';
31
+ import { PaginatorModule } from 'primeng/paginator';
32
+ import * as i1$4 from 'primeng/dialog';
33
+ import { DialogModule } from 'primeng/dialog';
34
+ import { Router } from '@angular/router';
35
+ import * as CryptoJS from 'crypto-js';
36
+ import JSEncrypt from 'jsencrypt';
37
+ import { decode } from '@msgpack/msgpack';
38
+ import * as i2$1 from 'primeng/inputtext';
39
+ import { InputTextModule } from 'primeng/inputtext';
40
+ import * as i3$1 from 'primeng/tooltip';
41
+ import { TooltipModule } from 'primeng/tooltip';
42
+ import * as i1$6 from 'primeng/popover';
43
+ import { PopoverModule } from 'primeng/popover';
44
+ import * as signalR from '@microsoft/signalr';
45
+
46
+ class ConfirmDialogComponent {
47
+ constructor() {
48
+ this.header = input('', ...(ngDevMode ? [{ debugName: "header" }] : []));
49
+ this.message = input('', ...(ngDevMode ? [{ debugName: "message" }] : []));
50
+ this.result = output();
51
+ this.confirmationService = inject(ConfirmationService);
52
+ }
53
+ openConfirmModal(event) {
54
+ this.confirmationService.confirm({
55
+ target: event.target ?? undefined,
56
+ message: this.message(),
57
+ header: this.header(),
58
+ closeOnEscape: true,
59
+ // PrimeNG button config
60
+ acceptLabel: 'Yes',
61
+ rejectLabel: 'No',
62
+ acceptButtonStyleClass: 'p-button-primary',
63
+ rejectButtonStyleClass: 'p-button-secondary p-button-outlined',
64
+ accept: () => {
65
+ this.result.emit(true);
66
+ },
67
+ reject: () => {
68
+ this.result.emit(false);
69
+ },
70
+ });
71
+ }
72
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
73
+ 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 }); }
74
+ }
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
76
+ type: Component,
77
+ 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" }]
78
+ }], 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"] }] } });
79
+
80
+ class GlobalConstants {
81
+ static { this.COOKIEDELETEVENT = 'd'; }
82
+ static { this.ALLCOOKIEDELET = '-100'; }
83
+ static { this.TimeForEncToken = 30; }
84
+ static { this.AgGridPaginationSize = 50; }
85
+ static { this.reconcileServiceLimit = 100; }
86
+ static { this.applicationName = 'Converged IAM'; }
87
+ static { this.publicKey = ''; }
88
+ static { this.PAMPluginURL = 'http://localhost:55755/'; }
89
+ static { this.APPName = 'workspace'; }
90
+ static { this.cipluginversion = ''; }
91
+ static { this.localInstalledCIPluginVersion = ''; } // to store installed CI plugin version
92
+ static { this.PCI_DSS_Standard = false; }
93
+ static { this.TOKENTIME = 30; }
94
+ static { this.LOGOUTIMER = 60; }
95
+ static { this.PAGEROW = 10; }
96
+ static { this.CONFIGCONNECTORS = false; }
97
+ static { this.USERLANGUAGES = [
98
+ { langKey: 'en', langName: 'English' },
99
+ { langKey: 'hi', langName: 'हिन्दी' },
100
+ { langKey: 'mr', langName: 'मराठी' },
101
+ { langKey: 'ar', langName: 'العربية' },
102
+ { langKey: 'fr', langName: 'Français' },
103
+ { langKey: 'es', langName: 'Español' },
104
+ { langKey: 'de', langName: 'Deutsch' },
105
+ { langKey: 'ja', langName: '日本語' },
106
+ { langKey: 'ko', langName: '한국어' },
107
+ { langKey: 'zh', langName: '中文' },
108
+ { langKey: 'ru', langName: 'Русский' },
109
+ { langKey: 'pt', langName: 'Português' },
110
+ { langKey: 'it', langName: 'Italiano' },
111
+ { langKey: 'nl', langName: 'Nederlands' },
112
+ { langKey: 'tr', langName: 'Türkçe' },
113
+ { langKey: 'sv', langName: 'Svenska' },
114
+ { langKey: 'pl', langName: 'Polski' },
115
+ { langKey: 'th', langName: 'ไทย' },
116
+ { langKey: 'vi', langName: 'Tiếng Việt' },
117
+ ]; }
118
+ static { this.USERFILTEREDLANGUAGES = []; }
119
+ static { this.DEFAULTLANG = { langKey: 'en', langName: 'English' }; }
120
+ static { this.DEFAULTLANGKEY = 'en'; }
121
+ static { this.DEFAULT_IMGPATH = 'assets/images/'; }
122
+ static { this.DEFAULT_BGIMG = `${GlobalConstants.DEFAULT_IMGPATH}login-bg/default_bg.svg`; }
123
+ static { this.DEFAULT_LOGO = `${GlobalConstants.DEFAULT_IMGPATH}default_logo.svg`; }
124
+ static { this.IMG_CODE = 'data:image/png;base64,'; }
125
+ static { this.DYNAMIC_LOGO = ''; }
126
+ static { this.DYNAMIC_BGIMG = ''; }
127
+ static { this.APP_VERSION = ''; }
128
+ }
129
+ class LoggedInUserInfo {
130
+ static { this.domainName = null; }
131
+ static { this.domainId = 0; }
132
+ static setPrivateKeyFromBigInts(arr) {
133
+ this.privateKey = arr.map((b) => b.toString()).join(',');
134
+ }
135
+ }
136
+ class RoutePaths {
137
+ static { this.LOGINPG_PATH = 'login'; }
138
+ static { this.WINDOW_AUTH = 'domainauth'; }
139
+ static { this.OTHER_METHODS_PATH = 'othermethods'; }
140
+ static { this.MY_ACCESS_PATH = 'my-access'; }
141
+ static { this.FORGOT_PASSWORD_PATH = 'forgotpassword'; }
142
+ static { this.AUTH_STATUS_PATH = 'auth-status'; }
143
+ static { this.LOGOUT_PATH = 'logout'; }
144
+ static { this.PAGE_NOT_FOUND_PATH = 'page-not-found'; }
145
+ static { this.INTERNAL_SERVER_ERROR_PATH = 'internal-server-error'; }
146
+ static { this.ERROR_PATH = 'error'; }
147
+ static { this.AUTH_LOADING = 'session-verify'; }
148
+ }
149
+ class errorMsg {
150
+ static { this.NOASSET = `No assets have been assigned to the user in the selected LOB. Please select a different LOB.`; }
151
+ static { this.NORECENTASSET = `No recently accessed Asset found.`; }
152
+ 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'`; }
153
+ static { this.NOMAILFOUND = `We couldn't find any mails assigned to you`; }
154
+ static { this.SERVERDOWN = `Something Went Wrong, Please Try Again later`; }
155
+ static { this.NOCIPLUGIN = `Install the CI Plugin or Contact Administrator`; }
156
+ static { this.CIPLUGINVERSIONISSUE = `Kindly Install latest version of CI Plugin`; }
157
+ static { this.ADMINMSG = `Kindly Contact Administrator`; }
158
+ static { this.PLUGINMSG = `Kindly check below link for downloadables.`; }
159
+ static { this.PAMPLUGINBTN = `Install the CI Plugin or Contact Administrator`; }
160
+ static { this.USERNOTFOUND = `Invalid User Details`; }
161
+ static { this.TIMEZONESUCCESS = `Time Zone Updated SuccessFully`; }
162
+ static { this.TIMEZONERROR = `Time Zone Updated Couldn't Update`; }
163
+ static { this.LOGOUTERROR = 'Logout Attempt Failed'; }
164
+ static { this.ASSETSTATUS = 'Asset Under Maintenance'; }
165
+ static { this.REFERENCEPOPUPTITLE = 'Reference Case ID for Accessing Asset'; }
166
+ static { this.DICREDENTIALINFO = 'Digital Identity Credentials Updated Successfully'; }
167
+ static { this.DICREDENTIALERROR = "Digital Identity Credentials Couldn't updated"; }
168
+ static { this.PATHSUCCESS = 'Preference Path Updated SuccessFully'; }
169
+ static { this.PATHERROR = "Preference Path Couldn't Update"; }
170
+ static { this.USERCREDENIALERROR = 'Configure Credentials'; }
171
+ static { this.CREDENIALERROR = 'Kindly Configure Credentials'; }
172
+ static { this.ADMINCREDENIALERROR = 'The credentials have yet to be configured by the Admin'; }
173
+ static { this.COMMONError = 'Something Went Wrong !'; }
174
+ static { this.NODIGITALIDENTITES = 'There are no digital identities assigned. Kindly contact administrator.'; }
175
+ static { this.SEARCHTEXT = 'Search Results'; }
176
+ static { this.MFACONFIGUREERROR = 'MFA is not configured for the user, Please contact the system administrator'; }
177
+ static { this.SESSIONIDERROR = 'Session Service ID not found'; }
178
+ static { this.CHROMEEXTENSIONERROR = 'Kindly Install the CI Extension or Contact Administrator'; }
179
+ static { this.WINDOW_DOMAIN_LOGINERR = 'Please wait, Domain Authentication is in progress for your login'; }
180
+ static { this.LANDINGPGSUCCESS = `Landing Page Configured SuccessFully`; }
181
+ static { this.LANDINGPGERROR = `Landing Page Configuration Couldn't Update`; }
182
+ static { this.SCRIPTERROR = `Unexpected Script Detected`; }
183
+ }
184
+ class COOKIECONSTANT {
185
+ static { this.LOBNAME = 'lobdata'; }
186
+ static { this.DOMAINAME = 'domainname'; }
187
+ static { this.DOMAINID = 'domainid'; }
188
+ static { this.USERDETAILS = 'UserDetail'; }
189
+ static { this.SESSIONID = 'userSessionId'; }
190
+ static { this.USERNAME = 'username'; }
191
+ static { this.USERID = 'userId'; }
192
+ static { this._AT = '_AT'; }
193
+ static { this._RT = '_RT'; }
194
+ static { this.USERDISPLAYNAME = 'userDisplayName'; }
195
+ static { this.ENCRYPTEDKEY = 'EncryptedKey'; }
196
+ static { this.MFASTATUS = 'MFAStatus'; }
197
+ static { this.EVENTNAME = 'Event'; }
198
+ static { this.MACHINEDETAILS = 'machinedetails'; }
199
+ static { this.COOKIEDELETEVENT = 'd'; }
200
+ static { this.COOKIECREATEEVENT = 'c'; }
201
+ static { this.COOKIEUPDATEEVENT = 'c'; }
202
+ static { this.ALLCOOKIEDELET = '-100'; }
203
+ static { this.NEWUSER = '003-NU-GEC'; }
204
+ static { this.UNLOCKACC = 'Unlock'; }
205
+ static { this.ERRORCODE = '001-SAC-GEC'; }
206
+ static { this.PUBLICCODE = '001-PUB-GEC'; }
207
+ static { this.USERLANG = 'lang'; }
208
+ static { this.MFATIMEOUT = 180000; } //3 mins
209
+ static { this.MFASTATUSCHECK = '_ssmf'; }
210
+ static { this.MFASTATUSCHECKFAIL = '_ssmff'; }
211
+ static { this.MFACLI = '_SSIDMFACLI'; }
212
+ static { this.WINDOWAUTH_HEADER = 'Authentication-Window'; }
213
+ static { this.SIGNALR_INDEX = '002-SR-NO'; }
214
+ static { this.ONETIME_TOKEN = 'state'; }
215
+ static { this.THICKCLIENT_KEY = 'APP_VER'; }
216
+ }
217
+ const EXCLUDED_URLS = [
218
+ 'http://localhost:55755/',
219
+ 'workflow/api/Workflow/Workflow/GetWorkFlowTicketCount',
220
+ 'workflow/api/Workflow/Workflow/GetWorkFlowTicketCountEventWise',
221
+ 'xaccess/api/SecureAccess/GetBackgroundImage',
222
+ 'xaccess/api/SecureAccess/UpdateLogoutTimer',
223
+ ];
224
+ class MFAEvent {
225
+ static { this.ForgotPwd = 1; }
226
+ static { this.unlockAcc = 2; }
227
+ static { this.Login = 3; }
228
+ }
229
+ class BrowserName {
230
+ static { this.Chrome = 'Chrome'; }
231
+ static { this.Firefox = 'Firefox'; }
232
+ static { this.Edge = 'Edge'; }
233
+ static { this.Safari = 'Safari'; }
234
+ static { this.Opera = 'Opera'; }
235
+ static { this.InterNetExp = 'Internet Explorer'; }
236
+ }
237
+ class PAMParameter {
238
+ constructor() {
239
+ this.ipAddress = '';
240
+ this.macAddress = '';
241
+ this.processorID = '';
242
+ this.bIOSSerialID = '';
243
+ this.domainName = '';
244
+ this.hostname = '';
245
+ this.pAMPluginInstalledVersion = '';
246
+ }
247
+ }
248
+
249
+ class SliceToTwoPipe {
250
+ transform(textName) {
251
+ if (textName === null || textName === '') {
252
+ return 'NA';
253
+ }
254
+ textName = textName?.trim();
255
+ let result = '';
256
+ if (textName && textName.includes(' ')) {
257
+ let splitStringArr = textName.split(' ');
258
+ result =
259
+ splitStringArr[0][0] + splitStringArr[splitStringArr.length - 1][0];
260
+ }
261
+ else if (textName && textName.includes('_')) {
262
+ let splitStringArr = textName.split('_');
263
+ result =
264
+ splitStringArr[0][0] + splitStringArr[splitStringArr.length - 1][0];
265
+ }
266
+ else {
267
+ result = textName[0] + textName[1];
268
+ }
269
+ return result.toLocaleUpperCase();
270
+ }
271
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SliceToTwoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
272
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: SliceToTwoPipe, isStandalone: true, name: "sliceToTwo" }); }
273
+ }
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SliceToTwoPipe, decorators: [{
275
+ type: Pipe,
276
+ args: [{
277
+ name: 'sliceToTwo',
278
+ standalone: true,
279
+ }]
280
+ }] });
281
+
282
+ class HttpCommonService {
283
+ constructor() {
284
+ this.xAccessAPIUrl = '/xaccess/api/SecureAccess/';
285
+ this.metaAPIUrl = '/meta/api/metadata/';
286
+ this.metaAPIUrl1 = '/meta/api/Metadata/';
287
+ this.xServiceAPIUrl = '/xservice/api/CIInfraAsset/';
288
+ this.workflowAPIUrl = '/workflow/api/Workflow/Workflow/';
289
+ this.http = inject(HttpClient);
290
+ }
291
+ getLogo() {
292
+ return this.http
293
+ .get(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}BackgroundLogo`)
294
+ .pipe(map((response) => {
295
+ return response['result'];
296
+ }));
297
+ }
298
+ getGlobalTimeZone() {
299
+ return this.http
300
+ .get(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}GetSystemTimeZones`)
301
+ .pipe(map((response) => {
302
+ if (response && response['success']) {
303
+ return response['result'];
304
+ }
305
+ else {
306
+ return [];
307
+ }
308
+ }));
309
+ }
310
+ updateUserTimeZone(tz) {
311
+ const params = new HttpParams().set('timezone', tz);
312
+ return this.http
313
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}UpdateTimeZone`, {}, { params: params })
314
+ .pipe(map((response) => {
315
+ if (response && response['success']) {
316
+ return response['result'];
317
+ }
318
+ else {
319
+ return '';
320
+ }
321
+ }));
322
+ }
323
+ getLOBList() {
324
+ return this.http
325
+ .get(`${GlobalConstants.baseURL}${this.metaAPIUrl}Lobs`)
326
+ .pipe(map((response) => {
327
+ return response;
328
+ }));
329
+ }
330
+ getUnreadUserEmailsCount() {
331
+ return this.http
332
+ .get(`${GlobalConstants.baseURL}${this.xServiceAPIUrl}MailBoxCount`)
333
+ .pipe(map((response) => {
334
+ if (response && response['success'] && response['result'] > 0) {
335
+ return response['result'];
336
+ }
337
+ else {
338
+ return 0;
339
+ }
340
+ }));
341
+ }
342
+ getUserAssignedMails(userDetails) {
343
+ return this.http
344
+ .post(`${GlobalConstants.baseURL}${this.xServiceAPIUrl}MailBox`, userDetails)
345
+ .pipe(map((response) => {
346
+ if (response && response['success']) {
347
+ return response['result'];
348
+ }
349
+ else {
350
+ return [];
351
+ }
352
+ }));
353
+ }
354
+ /*Method : GET
355
+ Action : Get Application Password */
356
+ getAccessToViewServicePassword(mailDetails) {
357
+ return this.http
358
+ .post(`${GlobalConstants.baseURL}${this.xServiceAPIUrl}OpenServicePwd`, mailDetails)
359
+ .pipe(map((response) => {
360
+ if (response && response['success']) {
361
+ response['result'][1] = response['message'];
362
+ return response['result'];
363
+ }
364
+ else {
365
+ return [];
366
+ }
367
+ }), catchError((e) => throwError(() => e)));
368
+ }
369
+ getUserAssignedApps() {
370
+ return this.http
371
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}GetUserPriviledgesList`, {})
372
+ .pipe(map((response) => {
373
+ if (response && response['success']) {
374
+ return response['result'].filter((x) => x.appCode != null);
375
+ }
376
+ else {
377
+ return [];
378
+ }
379
+ }));
380
+ }
381
+ getLoggedInUserDetails() {
382
+ return this.http
383
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}GetUsersDetailsById`, {})
384
+ .pipe(map((response) => {
385
+ return response;
386
+ }));
387
+ }
388
+ //Method: Used to Total Notification count of user
389
+ //Action: It used get all notification count
390
+ getWorkFlowTicketCount(userDetails) {
391
+ return this.http
392
+ .post(`${GlobalConstants.baseURL}${this.workflowAPIUrl}GetWorkFlowTicketCount`, userDetails)
393
+ .pipe(map((response) => {
394
+ if (response && response[0]['Success']) {
395
+ if (response[0]['Data'][0]) {
396
+ return response[0]['Data'][0];
397
+ }
398
+ else {
399
+ return {};
400
+ }
401
+ }
402
+ else {
403
+ return {};
404
+ }
405
+ }), catchError((e) => throwError(() => e)));
406
+ }
407
+ getWorkFlowTicketEventwiseCount(userDetails) {
408
+ return this.http
409
+ .post(`${GlobalConstants.baseURL}${this.workflowAPIUrl}GetWorkFlowTicketCountEventWise`, userDetails)
410
+ .pipe(map((response) => {
411
+ if (response && response[0]['Success']) {
412
+ return response[0]['Data'];
413
+ }
414
+ else {
415
+ return [];
416
+ }
417
+ }));
418
+ }
419
+ setLandingPgPreference(moduleId) {
420
+ return this.http
421
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}SetLandingPage`, {
422
+ moduleId: moduleId,
423
+ })
424
+ .pipe(map((response) => {
425
+ if (response && response['success']) {
426
+ return response['result'];
427
+ }
428
+ else {
429
+ return '';
430
+ }
431
+ }));
432
+ }
433
+ /*Method : POST
434
+ Action :Will validate User entered PWD as
435
+ per Password Policy Set
436
+ */
437
+ validatePassword(userDetails) {
438
+ return this.http
439
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}ValidatePassword`, userDetails)
440
+ .pipe(catchError((e) => throwError(() => e)));
441
+ }
442
+ /*Method : POST
443
+ Action : RESET Password for First Time User
444
+ */
445
+ setNewpassword(loggedInUserDetails) {
446
+ return this.http
447
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}ChangeUserArcXwdManually`, loggedInUserDetails)
448
+ .pipe(catchError((e) => throwError(() => e)));
449
+ }
450
+ /*Method : GET
451
+ Action : Get hiding the password for a service. */
452
+ getProtectedServiceCredentials(mailDetails) {
453
+ return this.http
454
+ .post(`${GlobalConstants.baseURL}${this.xServiceAPIUrl}GetServicePasswordClose`, mailDetails)
455
+ .pipe(map((response) => {
456
+ if (response && response['success']) {
457
+ return response['result'];
458
+ }
459
+ else {
460
+ return false;
461
+ }
462
+ }), catchError((e) => throwError(() => e)));
463
+ }
464
+ /*Method : POST
465
+ Parameter : subID , id
466
+ Action : Get configuration ID based on to show hide DOMAIN dropdown
467
+ */
468
+ getglobalConfigDetails(subid, id) {
469
+ return this.http
470
+ .post(`${GlobalConstants.baseURL}${this.metaAPIUrl1}GetArcosConfigsValues?subId=${subid}`, id)
471
+ .pipe(map((response) => {
472
+ if (response['statusCode'] === 200) {
473
+ let result = response['result'];
474
+ return result;
475
+ }
476
+ }), catchError((e) => throwError(() => e)));
477
+ }
478
+ getInitiateUserLogout() {
479
+ return this.http
480
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}logout`, {})
481
+ .pipe(map((response) => {
482
+ if (response && response['success']) {
483
+ return response['result'];
484
+ }
485
+ else {
486
+ return {};
487
+ }
488
+ }), catchError((e) => throwError(() => e)));
489
+ }
490
+ //Method: Open the OAuth connection window for the given application
491
+ openAppConnection(appCode) {
492
+ const url = GlobalConstants.baseURL + '/xauth/api/Token/AppOAuth?appcode=' + appCode;
493
+ globalThis.open(url, '_blank');
494
+ }
495
+ //Method: Validate MFA / SAML configuration before establishing the APP032 connection
496
+ checkMFAConfiguration() {
497
+ return this.http
498
+ .get(`${GlobalConstants.baseURL}/xaccess/api/Token/getMfaSamlConfig`)
499
+ .pipe(catchError((e) => throwError(() => e)));
500
+ }
501
+ //Method: Validate internal SAML app configuration before establishing the connection (e.g. APP033)
502
+ getInternalAppConfig(appCode) {
503
+ return this.http
504
+ .get(`${GlobalConstants.baseURL}/xaccess/api/Token/getInternalAppConfig?appCode=${appCode}`)
505
+ .pipe(catchError((e) => throwError(() => e)));
506
+ }
507
+ /*Method : GET
508
+ Action : Fetch the existing Proxy Access Token, or generate/regenerate a new
509
+ one when generateNewToken is true. Returns the raw (encrypted) response when
510
+ an accessToken is present, otherwise an empty string. */
511
+ getProxyAccessToken(generateNewToken) {
512
+ let url = `${GlobalConstants.baseURL}${this.xAccessAPIUrl}generate-proxy-accesstoken`;
513
+ if (generateNewToken) {
514
+ url = `${url}?generateNew=true`;
515
+ }
516
+ return this.http.get(url).pipe(map((response) => {
517
+ if (response && response['accessToken']) {
518
+ return response;
519
+ }
520
+ else {
521
+ return '';
522
+ }
523
+ }), catchError((e) => throwError(() => e)));
524
+ }
525
+ /*Method : POST
526
+ Action : Download the SSL/TLS certificate bundle for the given database type.
527
+ Returns the full HTTP response (blob body + headers) so the caller can read
528
+ the content-disposition filename. */
529
+ downloadSSLCertificate(dbType) {
530
+ return this.http
531
+ .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}DownloadDbCertificates`, { dbType: dbType }, { responseType: 'blob', observe: 'response' })
532
+ .pipe(catchError((e) => throwError(() => e)));
533
+ }
534
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HttpCommonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
535
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HttpCommonService, providedIn: 'root' }); }
536
+ }
537
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HttpCommonService, decorators: [{
538
+ type: Injectable,
539
+ args: [{
540
+ providedIn: 'root',
541
+ }]
542
+ }] });
543
+
544
+ class EventService {
545
+ constructor() {
546
+ this.getUserLOB = new BehaviorSubject({});
547
+ this.getAssetType = new BehaviorSubject({});
548
+ this.refreshSidebar = new BehaviorSubject({});
549
+ this.filterRecords = new Subject();
550
+ this.AuthMethods = new BehaviorSubject([]);
551
+ this.refreshEmails = new BehaviorSubject({});
552
+ this.timeZone = new BehaviorSubject({});
553
+ this._cookie = inject(CookieService);
554
+ }
555
+ emitLOBEvent(data) {
556
+ this.getUserLOB.next(data);
557
+ }
558
+ listenerLOBEvent() {
559
+ return this.getUserLOB.asObservable();
560
+ }
561
+ emitAssetTypeEvent(data) {
562
+ this.getAssetType.next(data);
563
+ }
564
+ listenerAssetTypeEvent() {
565
+ return this.getAssetType.asObservable();
566
+ }
567
+ emitrefreshSidebar(data) {
568
+ this.refreshSidebar.next(data);
569
+ }
570
+ listenerrefreshSidebar() {
571
+ return this.refreshSidebar.asObservable();
572
+ }
573
+ emitFilterRecords(data) {
574
+ this.filterRecords.next(data);
575
+ }
576
+ listenerFilterEvent() {
577
+ return this.filterRecords.asObservable();
578
+ }
579
+ emitAuthMethod(data) {
580
+ this.AuthMethods.next(data);
581
+ }
582
+ listenerAuthMethod() {
583
+ return this.AuthMethods.asObservable();
584
+ }
585
+ emitUserEmail(data) {
586
+ this.refreshEmails.next(data);
587
+ }
588
+ listenerUserEmail() {
589
+ return this.refreshEmails.asObservable();
590
+ }
591
+ emitTimezone(data) {
592
+ this.timeZone.next(data);
593
+ }
594
+ listenerTimezone() {
595
+ return this.timeZone.asObservable();
596
+ }
597
+ checkMFA(mfaUrl) {
598
+ return new Promise((resolve, reject) => {
599
+ const params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,
600
+ width=600,height=500,left=350,top=150`;
601
+ const mfaWindow = globalThis.open(mfaUrl, 'CI Authentication', params);
602
+ if (!mfaWindow) {
603
+ reject(new Error('Failed to open MFA window. Popup blocked?'));
604
+ return;
605
+ }
606
+ // Polling interval to check cookie every second
607
+ const interval = setInterval(() => {
608
+ if (this._cookie.get(COOKIECONSTANT.MFASTATUSCHECK)) {
609
+ clearInterval(interval);
610
+ mfaWindow.close();
611
+ resolve(true);
612
+ }
613
+ else if (this._cookie.get(COOKIECONSTANT.MFASTATUSCHECKFAIL)) {
614
+ clearInterval(interval);
615
+ mfaWindow.close();
616
+ reject(false);
617
+ }
618
+ }, 1000);
619
+ // Detect manual close of popup window
620
+ const checkPopupClosed = setInterval(() => {
621
+ if (mfaWindow.closed) {
622
+ clearInterval(interval);
623
+ clearInterval(checkPopupClosed);
624
+ reject(false);
625
+ }
626
+ }, 500);
627
+ });
628
+ }
629
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
630
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EventService, providedIn: 'root' }); }
631
+ }
632
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EventService, decorators: [{
633
+ type: Injectable,
634
+ args: [{
635
+ providedIn: 'root',
636
+ }]
637
+ }] });
638
+
639
+ class ToastMsgService {
640
+ constructor() {
641
+ this.toastType_sucess = 'toast-success';
642
+ this.toastType_info = 'toast-info';
643
+ this.toastType_error = 'toast-error';
644
+ this.toastType_warning = 'toast-warn';
645
+ this.toastr = inject(ToastrService);
646
+ this.translateService = inject(TranslateService);
647
+ }
648
+ success(textMessage, title) {
649
+ const heading = title || this.translateService.instant('Generic_lib.Successful');
650
+ if (this.isToastMsgActive()) {
651
+ if (this.checkActiveToastMessagesByType(this.toastType_sucess)) {
652
+ this.updateActiveToastMessage(heading, textMessage, this.toastType_sucess);
653
+ }
654
+ else {
655
+ this.toastr.success(textMessage, heading);
656
+ }
657
+ }
658
+ else {
659
+ this.toastr.success(textMessage, heading);
660
+ }
661
+ }
662
+ error(textMessage, title) {
663
+ const heading = title || this.translateService.instant('Generic_lib.Error');
664
+ if (this.isToastMsgActive()) {
665
+ if (this.checkActiveToastMessagesByType(this.toastType_error)) {
666
+ this.updateActiveToastMessage(heading, textMessage, this.toastType_error);
667
+ }
668
+ else {
669
+ this.toastr.error(textMessage, heading);
670
+ }
671
+ }
672
+ else {
673
+ this.toastr.error(textMessage, heading);
674
+ }
675
+ }
676
+ info(textMessage, title) {
677
+ const heading = title || this.translateService.instant('Generic_lib.Information');
678
+ if (this.isToastMsgActive()) {
679
+ if (this.checkActiveToastMessagesByType(this.toastType_info)) {
680
+ this.updateActiveToastMessage(heading, textMessage, this.toastType_info);
681
+ }
682
+ else {
683
+ this.toastr.info(textMessage, heading);
684
+ }
685
+ }
686
+ else {
687
+ this.toastr.info(textMessage, heading);
688
+ }
689
+ }
690
+ warning(textMessage, title) {
691
+ const heading = title || this.translateService.instant('Generic_lib.Warning');
692
+ if (this.isToastMsgActive()) {
693
+ if (this.checkActiveToastMessagesByType(this.toastType_warning)) {
694
+ this.updateActiveToastMessage(heading, textMessage, this.toastType_warning);
695
+ }
696
+ else {
697
+ this.toastr.warning(textMessage, heading);
698
+ }
699
+ }
700
+ else {
701
+ this.toastr.warning(textMessage, heading);
702
+ }
703
+ }
704
+ updateActiveToastMessage(title, textMessage, ToastType) {
705
+ const activeToasts = this.getActiveToastMessagesByType(ToastType);
706
+ if (activeToasts.length > 0) {
707
+ const toastObj = activeToasts[0];
708
+ toastObj.toastRef.componentInstance.title = title;
709
+ toastObj.toastRef.componentInstance.message = textMessage;
710
+ }
711
+ }
712
+ isToastMsgActive() {
713
+ return !!this.toastr.currentlyActive;
714
+ }
715
+ getActiveToastMessagesByType(type) {
716
+ return this.toastr.toasts.filter((toastItem) => toastItem.toastRef.componentInstance.toastPackage.toastType.includes(type));
717
+ }
718
+ checkActiveToastMessagesByType(type) {
719
+ return this.toastr.toasts.some((toastItem) => toastItem.toastRef.componentInstance.toastPackage.toastType == type);
720
+ }
721
+ clear() {
722
+ this.toastr.clear();
723
+ }
724
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ToastMsgService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
725
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ToastMsgService, providedIn: 'root' }); }
726
+ }
727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ToastMsgService, decorators: [{
728
+ type: Injectable,
729
+ args: [{
730
+ providedIn: 'root',
731
+ }]
732
+ }] });
733
+
734
+ class DateDiffPipe {
735
+ transform(date) {
736
+ if (date != null) {
737
+ const localDate = this.convertUTCToLocal(date);
738
+ let date2 = new Date(localDate);
739
+ let date1 = new Date();
740
+ if (date2 > date1) {
741
+ // Calculate the absolute difference in milliseconds between the two dates
742
+ const diffTime = Math.abs(date2.getTime() - date1.getTime());
743
+ // Calculate the number of days
744
+ const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
745
+ // Calculate the remaining time after removing the days
746
+ const remainingTime = diffTime % (1000 * 60 * 60 * 24);
747
+ // Calculate the number of hours
748
+ const diffHours = Math.floor(remainingTime / (1000 * 60 * 60));
749
+ // Calculate the remaining time after removing the hours
750
+ const remainingMinutes = remainingTime % (1000 * 60 * 60);
751
+ // Calculate the number of minutes
752
+ const diffMinutes = Math.floor(remainingMinutes / (1000 * 60));
753
+ let result = '';
754
+ if (diffDays > 0) {
755
+ result += `${diffDays} days `;
756
+ }
757
+ if (diffHours > 0) {
758
+ result += `${diffHours} hours `;
759
+ }
760
+ if (diffMinutes > 0) {
761
+ result += `${diffMinutes} minutes`;
762
+ }
763
+ return result.trim();
764
+ }
765
+ else {
766
+ return '00:00:00';
767
+ }
768
+ }
769
+ return '';
770
+ }
771
+ convertUTCToLocal(newdate) {
772
+ let localDate = newdate + 'Z';
773
+ localDate = localDate.toLocaleString();
774
+ return localDate;
775
+ }
776
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DateDiffPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
777
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: DateDiffPipe, isStandalone: true, name: "dateDiff" }); }
778
+ }
779
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DateDiffPipe, decorators: [{
780
+ type: Pipe,
781
+ args: [{
782
+ name: 'dateDiff',
783
+ standalone: true,
784
+ }]
785
+ }] });
786
+
787
+ class ViewpasswordPopupComponent {
788
+ constructor() {
789
+ this.servicePassword = 'Password';
790
+ this.showVaultBtn = false;
791
+ this.isContentLoaded = false;
792
+ this.isValueUpdated = false;
793
+ this.OpenTillDate = '';
794
+ this.destroyRef = inject(DestroyRef);
795
+ this.cdr = inject(ChangeDetectorRef);
796
+ this.dialogService = inject(DynamicDialogConfig);
797
+ this.msgService = inject(ToastMsgService);
798
+ this._eventService = inject(EventService);
799
+ this.translateService = inject(TranslateService);
800
+ this.httpCommonService = inject(HttpCommonService);
801
+ this.totalEmails = '';
802
+ this.SSHFileType = '';
803
+ this.SSHFileName = '';
804
+ this.isSSHKey = false;
805
+ this.isPasswordVisible = true;
806
+ this.PasswordViewSuccessMsg = '';
807
+ this.SSHPasswordViewSuccessMsg = '';
808
+ this.SSHPasswordViewErrorMsg = '';
809
+ this.sshKeyForDownload = '';
810
+ this.getSelectedGridData(this.dialogService.data); //Getting Data from popup
811
+ }
812
+ ngAfterViewInit() {
813
+ this.getTranslateContent();
814
+ }
815
+ ngOnInit() {
816
+ this.getAccessServicePassword();
817
+ }
818
+ getSelectedGridData(gridData) {
819
+ if (gridData && gridData['payload']) {
820
+ this.mailDetails = gridData['payload'];
821
+ this.SSHFileType = gridData['SSHfileType'];
822
+ this.showVaultBtn = gridData['btnStatus'];
823
+ this.OpenTillDate = this.mailDetails['spv_Opentildate'];
824
+ this.isSSHKey = this.mailDetails['sshkey_isenabled'];
825
+ }
826
+ }
827
+ //Method: Convert text one Lang. to another
828
+ getTranslateContent() {
829
+ this.translateService
830
+ .get([
831
+ 'Generic_lib.PasswordViewSuccessMsg',
832
+ 'Generic_lib.SSHPasswordViewSuccessMsg',
833
+ 'Generic_lib.SSHPasswordViewErrorMsg',
834
+ ])
835
+ .pipe(takeUntilDestroyed(this.destroyRef))
836
+ .subscribe((trans) => {
837
+ this.PasswordViewSuccessMsg =
838
+ trans['Generic_lib.PasswordViewSuccessMsg'];
839
+ this.SSHPasswordViewSuccessMsg =
840
+ trans['Generic_lib.SSHPasswordViewSuccessMsg'];
841
+ this.SSHPasswordViewErrorMsg =
842
+ trans['Generic_lib.SSHPasswordViewErrorMsg'];
843
+ });
844
+ }
845
+ //Method: Grants access to the View password for a service
846
+ getAccessServicePassword() {
847
+ this.isContentLoaded = false;
848
+ let mailDetails = {
849
+ mailid: String(this.mailDetails['smi_SpvId']),
850
+ };
851
+ this.httpCommonService
852
+ .getAccessToViewServicePassword(mailDetails)
853
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => {
854
+ this.isContentLoaded = true;
855
+ this.cdr.markForCheck();
856
+ }))
857
+ .subscribe((result) => {
858
+ this.servicePassword = result?.sshKeyPassPhrase;
859
+ this.SSHFileName = result?.sshFileName;
860
+ this.sshKeyForDownload = result?.sshKey;
861
+ this.getCurrentEmailsCount();
862
+ this.cdr.markForCheck();
863
+ });
864
+ }
865
+ //Method: Hide password of a service
866
+ getHideServicePassword() {
867
+ this.isValueUpdated = true;
868
+ let mailDetails = {
869
+ spvId: String(this.mailDetails['smi_SpvId']),
870
+ };
871
+ this.httpCommonService
872
+ .getProtectedServiceCredentials(mailDetails)
873
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => {
874
+ this.isValueUpdated = false;
875
+ this.cdr.markForCheck();
876
+ }))
877
+ .subscribe((result) => {
878
+ if (result) {
879
+ this._eventService.emitUserEmail({
880
+ component: 'view-pwd',
881
+ refreshGrid: true,
882
+ });
883
+ }
884
+ });
885
+ }
886
+ /*Method : GET
887
+ Action : Fetch User Mails Count */
888
+ getCurrentEmailsCount() {
889
+ this.httpCommonService
890
+ .getUnreadUserEmailsCount()
891
+ .pipe(takeUntilDestroyed(this.destroyRef))
892
+ .subscribe((count) => {
893
+ if (count <= 0) {
894
+ this.totalEmails = '';
895
+ }
896
+ else if (count > 99) {
897
+ this.totalEmails = '99+';
898
+ }
899
+ else {
900
+ this.totalEmails = String(count);
901
+ }
902
+ this.updateMailCount();
903
+ });
904
+ }
905
+ getGenerateFile() {
906
+ this.generateSSHKeyFile();
907
+ this.getHideServicePassword();
908
+ }
909
+ generateSSHKeyFile() {
910
+ try {
911
+ const blob = new Blob([this.sshKeyForDownload], { type: '' });
912
+ const url = URL.createObjectURL(blob);
913
+ const a = document.createElement('a');
914
+ a.href = url;
915
+ a.download = `${this.SSHFileName}.${this.SSHFileType}`;
916
+ document.body.appendChild(a);
917
+ a.click();
918
+ document.body.removeChild(a);
919
+ URL.revokeObjectURL(url);
920
+ this.msgService.success(this.SSHPasswordViewSuccessMsg);
921
+ }
922
+ catch (error) {
923
+ this.msgService.error(this.SSHPasswordViewErrorMsg);
924
+ }
925
+ }
926
+ updateMailCount() {
927
+ this._eventService.emitUserEmail({
928
+ component: 'email-count',
929
+ mailCount: this.totalEmails,
930
+ });
931
+ }
932
+ copyToClipboard(text) {
933
+ navigator.clipboard
934
+ .writeText(text)
935
+ .then(() => {
936
+ this.msgService.success(this.PasswordViewSuccessMsg);
937
+ })
938
+ .catch((error) => {
939
+ });
940
+ }
941
+ togglePasswordVisibility() {
942
+ this.isPasswordVisible = !this.isPasswordVisible;
943
+ }
944
+ showPassword() {
945
+ if (this.isSSHKey && !this.servicePassword) {
946
+ return false;
947
+ }
948
+ return true;
949
+ }
950
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ViewpasswordPopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
951
+ 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 }); }
952
+ }
953
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ViewpasswordPopupComponent, decorators: [{
954
+ type: Component,
955
+ 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"] }]
956
+ }], ctorParameters: () => [] });
957
+
958
+ class NoServiceMyAccessPgComponent {
959
+ constructor() {
960
+ 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" }] : []));
961
+ this.subHeading = input('', ...(ngDevMode ? [{ debugName: "subHeading" }] : []));
962
+ }
963
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NoServiceMyAccessPgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
964
+ 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 }); }
965
+ }
966
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NoServiceMyAccessPgComponent, decorators: [{
967
+ type: Component,
968
+ 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"] }]
969
+ }], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], subHeading: [{ type: i0.Input, args: [{ isSignal: true, alias: "subHeading", required: false }] }] } });
970
+
971
+ class GridPaginationComponent {
972
+ constructor() {
973
+ this.first = 0;
974
+ this.currentPgNo = 0;
975
+ this.rows = GlobalConstants.PAGEROW;
976
+ this.totalRecords = input(0, ...(ngDevMode ? [{ debugName: "totalRecords" }] : []));
977
+ this.onPgChange = output();
978
+ }
979
+ onPageChange(event) {
980
+ const page = (event.page ?? 0) + 1; // PaginatorState.page is 0-indexed; add +1
981
+ this.currentPgNo = page;
982
+ this.rows = event.rows ?? GlobalConstants.PAGEROW;
983
+ this.onPgChange.emit({
984
+ currentPgNo: this.currentPgNo,
985
+ perPgRows: this.rows,
986
+ });
987
+ }
988
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: GridPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
989
+ 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 }); }
990
+ }
991
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: GridPaginationComponent, decorators: [{
992
+ type: Component,
993
+ 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" }]
994
+ }], propDecorators: { totalRecords: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalRecords", required: false }] }], onPgChange: [{ type: i0.Output, args: ["onPgChange"] }] } });
995
+
996
+ class CustomDateFormatPipe {
997
+ constructor() {
998
+ this.datePipe = new DatePipe('en-US');
999
+ }
1000
+ transform(value) {
1001
+ if (!value) {
1002
+ return 'Not Applicable';
1003
+ }
1004
+ const parsedDate = new Date(value);
1005
+ if (isNaN(parsedDate.getTime())) {
1006
+ return 'Invalid Date';
1007
+ }
1008
+ return this.datePipe.transform(parsedDate, 'dd-MMM-yyyy HH:mm:ss');
1009
+ }
1010
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CustomDateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1011
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: CustomDateFormatPipe, isStandalone: true, name: "customDateFormat" }); }
1012
+ }
1013
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CustomDateFormatPipe, decorators: [{
1014
+ type: Pipe,
1015
+ args: [{
1016
+ name: 'customDateFormat',
1017
+ standalone: true,
1018
+ }]
1019
+ }] });
1020
+
1021
+ class UserMailboxComponent {
1022
+ constructor() {
1023
+ this.closeMailDialogBox = output();
1024
+ this.ListOfUserAssingedMails = [];
1025
+ this.destroyRef = inject(DestroyRef);
1026
+ this.ref = null;
1027
+ this.showVaultBtn = false;
1028
+ this.SSHFileName = 'ppk';
1029
+ this.hasUserAssignedMails = true;
1030
+ //Pagintion
1031
+ this.currentPgNo = 1;
1032
+ this.perPgRows = 10;
1033
+ this.totalCount = 0;
1034
+ this.NoServiceMsgText = '';
1035
+ this.isContentLoaded = false;
1036
+ this.repeatLoader = Array.from({ length: this.perPgRows }).map((_, i) => `Item #${i}`);
1037
+ this.apiURL = input('', ...(ngDevMode ? [{ debugName: "apiURL" }] : []));
1038
+ this.cdr = inject(ChangeDetectorRef);
1039
+ this.dialogService = inject(DialogService);
1040
+ this._eventService = inject(EventService);
1041
+ this.translate = inject(TranslateService);
1042
+ this.httpCommonService = inject(HttpCommonService);
1043
+ }
1044
+ ngOnInit() {
1045
+ this.onLoadMethods();
1046
+ }
1047
+ /* Require Methods on PageLoad */
1048
+ onLoadMethods() {
1049
+ this.getUserEmails();
1050
+ this.getglobalConfigDetails();
1051
+ this._eventService
1052
+ .listenerUserEmail()
1053
+ .pipe(takeUntilDestroyed(this.destroyRef))
1054
+ .subscribe((data) => {
1055
+ if (data && data['component'] === 'view-pwd') {
1056
+ if (data['refreshGrid']) {
1057
+ this.ref?.close();
1058
+ }
1059
+ }
1060
+ });
1061
+ }
1062
+ openViewPasswordPanel(mailDetails) {
1063
+ this.ref = this.dialogService.open(ViewpasswordPopupComponent, {
1064
+ header: mailDetails.sshkey_isenabled
1065
+ ? this.translate.instant('Generic_lib.SSHKey')
1066
+ : this.translate.instant('Generic_lib.Password'),
1067
+ styleClass: 'view-pass-details',
1068
+ // DynamicDialog defaults resizable to true (undefined !== false), which
1069
+ // renders PrimeNG's .p-resizable-handle. Explicitly disable it.
1070
+ resizable: false,
1071
+ closable: true,
1072
+ data: {
1073
+ payload: mailDetails,
1074
+ btnStatus: this.showVaultBtn,
1075
+ SSHfileType: this.SSHFileName,
1076
+ },
1077
+ });
1078
+ // Handle the close event here
1079
+ this.ref?.onClose
1080
+ .pipe(takeUntilDestroyed(this.destroyRef))
1081
+ .subscribe((_result) => {
1082
+ this.getUserEmails();
1083
+ });
1084
+ }
1085
+ /*Action : Fetching user Emails from a API */
1086
+ getUserEmails() {
1087
+ this.isContentLoaded = false;
1088
+ let payload = {
1089
+ pageSize: this.perPgRows,
1090
+ pageNumber: this.currentPgNo,
1091
+ };
1092
+ this.httpCommonService
1093
+ .getUserAssignedMails(payload)
1094
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
1095
+ this.isContentLoaded = true;
1096
+ this.cdr.markForCheck();
1097
+ }))
1098
+ .subscribe((response) => {
1099
+ this.ListOfUserAssingedMails = response;
1100
+ if (this.ListOfUserAssingedMails.length > 0) {
1101
+ this.hasUserAssignedMails = true;
1102
+ this.getTotalNoOfRecords();
1103
+ }
1104
+ else {
1105
+ this.hasUserAssignedMails = false;
1106
+ this.NoServiceMsgText = errorMsg.NOMAILFOUND;
1107
+ }
1108
+ this.cdr.markForCheck();
1109
+ });
1110
+ }
1111
+ //Note: Get Total No of Records for Pagination
1112
+ getTotalNoOfRecords() {
1113
+ if (this.ListOfUserAssingedMails.length > 0 &&
1114
+ this.ListOfUserAssingedMails[0]['totalRecords'] != null) {
1115
+ this.totalCount = this.ListOfUserAssingedMails[0]['totalRecords'];
1116
+ }
1117
+ }
1118
+ /*Method : POST
1119
+ Action : Get configuration ID based on to show hide Vault Btn*/
1120
+ getglobalConfigDetails() {
1121
+ this.httpCommonService
1122
+ .getglobalConfigDetails('1', [247, 338])
1123
+ .pipe(takeUntilDestroyed(this.destroyRef))
1124
+ .subscribe((data) => {
1125
+ if (data && data.length > 0) {
1126
+ data.forEach((element) => {
1127
+ //For Vault Btn
1128
+ if (element && element['id'] === 247 && element['value'] === '0') {
1129
+ this.showVaultBtn = false;
1130
+ }
1131
+ else {
1132
+ this.showVaultBtn = true;
1133
+ }
1134
+ //For Vault Btn
1135
+ if (element && element['id'] === 338 && element['value'] === '1') {
1136
+ this.SSHFileName = 'pem';
1137
+ }
1138
+ else {
1139
+ this.SSHFileName = 'ppk';
1140
+ }
1141
+ });
1142
+ }
1143
+ this.cdr.markForCheck();
1144
+ });
1145
+ }
1146
+ //Method: Fetch User Assigned Email based on PageNo
1147
+ updateDataOnPageChange(pageDetails) {
1148
+ this.currentPgNo = pageDetails['currentPgNo'];
1149
+ this.perPgRows = pageDetails['perPgRows'];
1150
+ this.getUserEmails();
1151
+ }
1152
+ closeMailBox() {
1153
+ this.closeMailDialogBox.emit();
1154
+ }
1155
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: UserMailboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1156
+ 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 }); }
1157
+ }
1158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: UserMailboxComponent, decorators: [{
1159
+ type: Component,
1160
+ 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"] }]
1161
+ }], propDecorators: { closeMailDialogBox: [{ type: i0.Output, args: ["closeMailDialogBox"] }], apiURL: [{ type: i0.Input, args: [{ isSignal: true, alias: "apiURL", required: false }] }] } });
1162
+
1163
+ class SidePopupComponent {
1164
+ constructor() {
1165
+ this.closeDialogBox = output();
1166
+ this.visible = model(false, ...(ngDevMode ? [{ debugName: "visible" }] : []));
1167
+ this.position = input('right', ...(ngDevMode ? [{ debugName: "position" }] : []));
1168
+ this.header = input('Details', ...(ngDevMode ? [{ debugName: "header" }] : []));
1169
+ }
1170
+ //Method: Close the Side Panel
1171
+ getcloseDialogBox() {
1172
+ this.visible.set(false);
1173
+ this.closeDialogBox.emit(true);
1174
+ }
1175
+ ngOnDestroy() {
1176
+ this.visible.set(false);
1177
+ }
1178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SidePopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1179
+ 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 }); }
1180
+ }
1181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SidePopupComponent, decorators: [{
1182
+ type: Component,
1183
+ 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" }]
1184
+ }], 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 }] }] } });
1185
+
1186
+ class CookieStorageManagerService {
1187
+ constructor() {
1188
+ this.cookie = inject(CookieService);
1189
+ }
1190
+ //Check if cookies is set or not
1191
+ checksetCookies(cookiesParam1) {
1192
+ let status = this.cookie.check(cookiesParam1);
1193
+ if (status) {
1194
+ return true;
1195
+ }
1196
+ else {
1197
+ return false;
1198
+ }
1199
+ }
1200
+ //get cookies value
1201
+ getCookieValue(cookiesParam) {
1202
+ let status = this.cookie.check(cookiesParam);
1203
+ if (status) {
1204
+ let cookieValue = this.cookie.get(cookiesParam);
1205
+ return cookieValue;
1206
+ }
1207
+ //What if cookies not found
1208
+ else {
1209
+ return '';
1210
+ }
1211
+ }
1212
+ //Set cookies value
1213
+ setCookiesValue(key, value) {
1214
+ this.cookie.set(key, value);
1215
+ }
1216
+ //Delete a specific cookie
1217
+ deleteCookie(cookieKey) {
1218
+ this.cookie.delete(cookieKey);
1219
+ }
1220
+ //Delete All cookie
1221
+ clearAllCookies() {
1222
+ const cookies = this.cookie.getAll();
1223
+ for (const cookieName in cookies) {
1224
+ if (cookies.hasOwnProperty(cookieName)) {
1225
+ this.cookie.delete(cookieName);
1226
+ }
1227
+ }
1228
+ }
1229
+ //Set Long cookies
1230
+ setLongCookie(name, value, maxChunkSize) {
1231
+ for (let i = 0; i < Math.ceil(value.length / maxChunkSize); i++) {
1232
+ const chunk = value.substring(i * maxChunkSize, (i + 1) * maxChunkSize);
1233
+ this.setCookiesValue(`${name}_${i}`, chunk);
1234
+ }
1235
+ }
1236
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CookieStorageManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1237
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CookieStorageManagerService, providedIn: 'root' }); }
1238
+ }
1239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CookieStorageManagerService, decorators: [{
1240
+ type: Injectable,
1241
+ args: [{
1242
+ providedIn: 'root',
1243
+ }]
1244
+ }] });
1245
+
1246
+ class EncrydecryRSAdataService {
1247
+ generateAESKey() {
1248
+ const publicKey = this.getPublicKey();
1249
+ const symmetricKey = this.generateKeyAndIV();
1250
+ const gkey = symmetricKey.key.toString();
1251
+ const giv = symmetricKey.iv.toString();
1252
+ const encryptedSymmetricKey = this.encryptSymmetricKey(gkey, publicKey);
1253
+ const encryptedSymmetriciv = this.encryptSymmetricKey(giv, publicKey);
1254
+ return String(encryptedSymmetricKey + ',' + encryptedSymmetriciv);
1255
+ }
1256
+ encryptViaRSA(simpleText) {
1257
+ const { symmKey, symmIV } = this.getRSAsymmetricKeyIV();
1258
+ const encryptedText = this.encryptText(simpleText, symmKey, symmIV);
1259
+ return encryptedText;
1260
+ }
1261
+ decryptViaRSA(encrpyText) {
1262
+ const { symmKey, symmIV } = this.getRSAsymmetricKeyIV();
1263
+ const decryptedText = this.decryptText(encrpyText, symmKey, symmIV);
1264
+ return decryptedText;
1265
+ }
1266
+ /*Action : Decrypt an API cipher payload then MessagePack-decode it into its
1267
+ structured form (used by Proxy Access Token to unwrap the access token). */
1268
+ getDecryptAPIResponse(cipherText) {
1269
+ if (cipherText) {
1270
+ const responseString = this.decryptViaRSA(cipherText);
1271
+ const binary = Uint8Array.from(atob(responseString), (c) => c.codePointAt(0) ?? 0);
1272
+ const decodedArray = decode(binary);
1273
+ return decodedArray;
1274
+ }
1275
+ return {};
1276
+ }
1277
+ generateKeyAndIV() {
1278
+ const key = CryptoJS.lib.WordArray.random(32); // 32 bytes for AES-256
1279
+ const iv = CryptoJS.lib.WordArray.random(16); // 16 bytes IV
1280
+ return { key, iv };
1281
+ }
1282
+ encryptText(plaintext, hkey, hiv) {
1283
+ //* If the data is Object then converting the object into JSON.stringify()
1284
+ if (typeof plaintext === 'object' && plaintext !== null) {
1285
+ plaintext = JSON.stringify(plaintext);
1286
+ }
1287
+ const key = CryptoJS.enc.Hex.parse(hkey);
1288
+ const iv = CryptoJS.enc.Hex.parse(hiv);
1289
+ const encrypted = CryptoJS.AES.encrypt(plaintext, key, {
1290
+ iv: iv,
1291
+ mode: CryptoJS.mode.CBC,
1292
+ padding: CryptoJS.pad.Pkcs7,
1293
+ });
1294
+ return encrypted.toString();
1295
+ }
1296
+ encryptSymmetricKey(key, publicKey) {
1297
+ try {
1298
+ const rsa = new JSEncrypt();
1299
+ rsa.setPublicKey(publicKey);
1300
+ const encryptedKey = rsa.encrypt(key);
1301
+ if (!encryptedKey)
1302
+ throw new Error('Encryption failed. The key might be improperly formatted.');
1303
+ return encryptedKey;
1304
+ }
1305
+ catch (error) {
1306
+ return '';
1307
+ }
1308
+ }
1309
+ decryptText(encryptedBase64, hkey, hiv) {
1310
+ const key = CryptoJS.enc.Hex.parse(hkey);
1311
+ const iv = CryptoJS.enc.Hex.parse(hiv);
1312
+ const decrypted = CryptoJS.AES.decrypt(encryptedBase64, key, {
1313
+ iv: iv,
1314
+ mode: CryptoJS.mode.CBC,
1315
+ padding: CryptoJS.pad.Pkcs7,
1316
+ });
1317
+ return decrypted.toString(CryptoJS.enc.Utf8);
1318
+ }
1319
+ getPublicKey() {
1320
+ const publicKey = this.base64ToPem(localStorage.getItem('001-SAC-GEC') || '');
1321
+ return publicKey;
1322
+ }
1323
+ getRSAsymmetricKeyIV() {
1324
+ let symmKey = '';
1325
+ let symmIV = '';
1326
+ const key = localStorage.getItem('001-SAC-GEC');
1327
+ if (key?.includes(',')) {
1328
+ const syymArr = key.split(',');
1329
+ symmKey = syymArr[0];
1330
+ symmIV = syymArr[1];
1331
+ }
1332
+ return { symmKey, symmIV };
1333
+ }
1334
+ base64ToPem(base64Key) {
1335
+ const pemHeader = '-----BEGIN PUBLIC KEY-----';
1336
+ const pemFooter = '-----END PUBLIC KEY-----';
1337
+ const chunkSize = 64; // Standard line length for PEM files
1338
+ const formattedKey = base64Key.match(new RegExp(`.{1,${chunkSize}}`, 'g'))?.join('\n') || '';
1339
+ return `${pemHeader}\n${formattedKey}\n${pemFooter}`;
1340
+ }
1341
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EncrydecryRSAdataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1342
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EncrydecryRSAdataService, providedIn: 'root' }); }
1343
+ }
1344
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EncrydecryRSAdataService, decorators: [{
1345
+ type: Injectable,
1346
+ args: [{
1347
+ providedIn: 'root',
1348
+ }]
1349
+ }] });
1350
+
1351
+ class RESTLoginFormService {
1352
+ constructor() {
1353
+ this._http = inject(HttpClient);
1354
+ this.cookieService = inject(CookieStorageManagerService);
1355
+ }
1356
+ /*Method : GET
1357
+ Action : Fetch Domain List */
1358
+ fetchDomainList() {
1359
+ return this._http
1360
+ .get(GlobalConstants.baseURL + 'meta/api/Metadata/Domains')
1361
+ .pipe(map$1((response) => {
1362
+ if (response['statusCode'] === 200) {
1363
+ if (response['result'].length > 0) {
1364
+ let result = response['result'];
1365
+ return result;
1366
+ }
1367
+ else {
1368
+ return [];
1369
+ }
1370
+ }
1371
+ }), catchError$1((e) => throwError(() => e)));
1372
+ }
1373
+ /*Method : POST
1374
+ Parameter : subID , id
1375
+ Action : Get configuration ID based on to show hide DOMAIN dropdown
1376
+ */
1377
+ getglobalConfigDetails(subid, id) {
1378
+ return this._http
1379
+ .post(GlobalConstants.baseURL +
1380
+ 'meta/api/Metadata/GetArcosConfigsValues?subId=' +
1381
+ subid, id)
1382
+ .pipe(map$1((response) => {
1383
+ if (response['statusCode'] === 200) {
1384
+ let result = response['result'];
1385
+ return result;
1386
+ }
1387
+ }), catchError$1((e) => throwError(() => e)));
1388
+ }
1389
+ /*Method : POST
1390
+ Action : RESET Password for First Time User
1391
+ */
1392
+ setNewpassword(loggedInUserDetails) {
1393
+ return this._http
1394
+ .post(GlobalConstants.baseURL +
1395
+ 'xaccess/api/SecureAccess/ChangeUserArcXwdManually', loggedInUserDetails)
1396
+ .pipe(catchError$1((e) => throwError(() => e)));
1397
+ }
1398
+ /*Method : POST
1399
+ Action :Will validate User entered PWD as
1400
+ per Password Policy Set
1401
+ */
1402
+ validatePassword(userDetails) {
1403
+ return this._http
1404
+ .post(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/ValidatePassword', userDetails)
1405
+ .pipe(catchError$1((e) => throwError(() => e)));
1406
+ }
1407
+ /*Method : POST
1408
+ Action : Get Public Key for encryption of Data */
1409
+ getPrivateKey(params) {
1410
+ return this._http
1411
+ .post(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/XKEDSync', params)
1412
+ .pipe(catchError$1((e) => throwError(() => e)));
1413
+ }
1414
+ /* Method : POST
1415
+ Action : Send request for OTP of MFA Authenticator */
1416
+ sendMFAOTPRequest(mfaDetails) {
1417
+ return this._http
1418
+ .post(GlobalConstants.baseURL + 'xmfa/api/Mfa/mfa', mfaDetails)
1419
+ .pipe(map$1((response) => {
1420
+ if (response['success']) {
1421
+ let result = response['result'];
1422
+ return result;
1423
+ }
1424
+ }), catchError$1((e) => throwError(() => e)));
1425
+ }
1426
+ /* Method : POST
1427
+ Action : Submit User Enter OTP of MFA Authenticator */
1428
+ submitOtpForMfaVerification(mfaDetails) {
1429
+ return this._http
1430
+ .post(GlobalConstants.baseURL + 'xmfa/api/Mfa/mfavalidation', mfaDetails)
1431
+ .pipe(map$1((response) => {
1432
+ if (response['success']) {
1433
+ let result = response['result'];
1434
+ return result;
1435
+ }
1436
+ }), catchError$1((e) => throwError(() => e)));
1437
+ }
1438
+ /*Method : POST
1439
+ Action : It will provide Token which used for multiple Application access */
1440
+ getAuthToken(userDetails) {
1441
+ return this._http
1442
+ .post(GlobalConstants.baseURL + 'xauth/api/Token/GenerateJwtTokenApplication', userDetails)
1443
+ .pipe(map$1((response) => {
1444
+ if (response) {
1445
+ return response;
1446
+ }
1447
+ else {
1448
+ return '';
1449
+ }
1450
+ }), catchError$1((e) => throwError(() => e)));
1451
+ }
1452
+ /* Method : POST
1453
+ Action : Unlock User to enable login process */
1454
+ unlockUserAccount(userDetails) {
1455
+ return this._http
1456
+ .post(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/ValidateUser', userDetails)
1457
+ .pipe(map$1((result) => {
1458
+ return result;
1459
+ }), catchError$1((e) => throwError(() => e)));
1460
+ }
1461
+ /*Method : GET
1462
+ Action : Get User Background Image and Logo */
1463
+ getUserBackgroundImageAndLogo() {
1464
+ return this._http
1465
+ .get(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/GetBackgroundImage')
1466
+ .pipe(map$1((response) => {
1467
+ return response;
1468
+ }), catchError$1((error) => throwError(() => error)));
1469
+ }
1470
+ deleteCookieData(payload) {
1471
+ const url = this.cookieService.getCookieValue('baseurl');
1472
+ const delCookieEndpoint = `${url}xaccess/api/SecureAccess/cookiesUpdation`;
1473
+ return this._http.post(delCookieEndpoint, payload);
1474
+ }
1475
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: RESTLoginFormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1476
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: RESTLoginFormService, providedIn: 'root' }); }
1477
+ }
1478
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: RESTLoginFormService, decorators: [{
1479
+ type: Injectable,
1480
+ args: [{
1481
+ providedIn: 'root',
1482
+ }]
1483
+ }] });
1484
+
1485
+ class ASYNCPasswordcheckService {
1486
+ constructor() {
1487
+ this.pwdErrorMsg = '';
1488
+ this.pwdValidation = new Subject();
1489
+ this.httpCommonService = inject(HttpCommonService);
1490
+ this.encryptService = inject(EncrydecryRSAdataService);
1491
+ }
1492
+ createValidator() {
1493
+ return (control) => {
1494
+ //For AES Encrp/Dec
1495
+ const userPassword = this.encryptService.encryptViaRSA(control.value);
1496
+ let useDetails = {
1497
+ userARCXWD: userPassword,
1498
+ };
1499
+ return control.valueChanges.pipe(debounceTime(500), take(1), switchMap((_) => this.httpCommonService.validatePassword(useDetails).pipe(map$1((data) => {
1500
+ if (data['success']) {
1501
+ this.pwdErrorMsg = data['message'];
1502
+ this.emitValidationMsg(this.pwdErrorMsg);
1503
+ return null;
1504
+ }
1505
+ else {
1506
+ this.pwdErrorMsg = data['errorMessage'];
1507
+ this.emitValidationMsg(this.pwdErrorMsg);
1508
+ return { pwdInvalid: true };
1509
+ }
1510
+ }), catchError$1(() => of({ pwdInvalid: true })))));
1511
+ };
1512
+ }
1513
+ emitValidationMsg(msg) {
1514
+ this.pwdValidation.next(msg);
1515
+ }
1516
+ listValidationMsg() {
1517
+ return this.pwdValidation.asObservable();
1518
+ }
1519
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ASYNCPasswordcheckService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1520
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ASYNCPasswordcheckService, providedIn: 'root' }); }
1521
+ }
1522
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ASYNCPasswordcheckService, decorators: [{
1523
+ type: Injectable,
1524
+ args: [{
1525
+ providedIn: 'root',
1526
+ }]
1527
+ }] });
1528
+ function ConfirmedValidator(controlName, matchingControlName) {
1529
+ return (formGroup) => {
1530
+ const control = formGroup.controls[controlName];
1531
+ const matchingControl = formGroup.controls[matchingControlName];
1532
+ if (matchingControl.errors &&
1533
+ !matchingControl.errors['confirmedValidator']) {
1534
+ return;
1535
+ }
1536
+ if (control.value !== matchingControl.value) {
1537
+ matchingControl.setErrors({ confirmedValidator: true });
1538
+ }
1539
+ else {
1540
+ matchingControl.setErrors(null);
1541
+ }
1542
+ };
1543
+ }
1544
+
1545
+ class VaptValidationService {
1546
+ hasUnsafeInput(formData) {
1547
+ const dangerousPattern = /<\s*(script|iframe|object|embed|link|style)\b[^>]*>(.*?)<\s*\/\s*\1\s*>|<\s*(script|iframe|object|embed|link|style)\b[^>]*\/?>|<[^>]+>/gi;
1548
+ function checkValue(value) {
1549
+ if (typeof value === 'string') {
1550
+ return dangerousPattern.test(value);
1551
+ }
1552
+ if (Array.isArray(value)) {
1553
+ return value.some(checkValue);
1554
+ }
1555
+ if (typeof value === 'object' && value !== null) {
1556
+ return Object.values(value).some(checkValue);
1557
+ }
1558
+ // If it's a number, boolean, null, or undefined, ignore
1559
+ return false;
1560
+ }
1561
+ return checkValue(formData);
1562
+ }
1563
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: VaptValidationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1564
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: VaptValidationService, providedIn: 'root' }); }
1565
+ }
1566
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: VaptValidationService, decorators: [{
1567
+ type: Injectable,
1568
+ args: [{
1569
+ providedIn: 'root'
1570
+ }]
1571
+ }] });
1572
+
1573
+ function noSpaceAllowed() {
1574
+ return (control) => {
1575
+ const value = control.value;
1576
+ if (!value) {
1577
+ return null; // No value is not an error here
1578
+ }
1579
+ // Check if the value starts with a space or contains any space
1580
+ const hasLeadingSpace = value.startsWith(' ');
1581
+ if (hasLeadingSpace) {
1582
+ return { noSpace: true };
1583
+ }
1584
+ return null;
1585
+ };
1586
+ }
1587
+
1588
+ class HttpGeneralConfigurationService {
1589
+ constructor() {
1590
+ this.xPageRefAPIUrl = '/xaccess/api/PagePreference/';
1591
+ this.http = inject(HttpClient);
1592
+ }
1593
+ getUserPreferredAssetTypeDetails() {
1594
+ return this.http
1595
+ .get(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}GetAssetTypeDetails`)
1596
+ .pipe(map((response) => {
1597
+ if (response && response['success']) {
1598
+ return response['result'];
1599
+ }
1600
+ else {
1601
+ return [];
1602
+ }
1603
+ }), catchError((e) => throwError(() => e)));
1604
+ }
1605
+ getUserPreferredAssetName(payload) {
1606
+ return this.http
1607
+ .post(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}GetAssetName`, payload)
1608
+ .pipe(map((response) => {
1609
+ if (response && response['success']) {
1610
+ return response['result'];
1611
+ }
1612
+ else {
1613
+ return [];
1614
+ }
1615
+ }), catchError((e) => throwError(() => e)));
1616
+ }
1617
+ getServiceNameByAssetTypeEvent(payload) {
1618
+ return this.http
1619
+ .post(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}GetServiceDetails`, payload)
1620
+ .pipe(map((response) => {
1621
+ if (response && response['success']) {
1622
+ return response['result'];
1623
+ }
1624
+ else {
1625
+ return [];
1626
+ }
1627
+ }), catchError((e) => throwError(() => e)));
1628
+ }
1629
+ getPreferencePathDetails(payload) {
1630
+ return this.http
1631
+ .post(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}CurrentPreferencepathDetails`, payload)
1632
+ .pipe(map((response) => {
1633
+ if (response && response['success']) {
1634
+ return response['result'];
1635
+ }
1636
+ else {
1637
+ return {};
1638
+ }
1639
+ }), catchError((e) => throwError(() => e)));
1640
+ }
1641
+ updatePreferencePath(payload) {
1642
+ return this.http
1643
+ .post(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}UpdatePreferencePath`, payload)
1644
+ .pipe(map((response) => {
1645
+ if (response && response['success']) {
1646
+ return true;
1647
+ }
1648
+ else {
1649
+ return false;
1650
+ }
1651
+ }), catchError((e) => throwError(() => e)));
1652
+ }
1653
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HttpGeneralConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1654
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HttpGeneralConfigurationService, providedIn: 'root' }); }
1655
+ }
1656
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HttpGeneralConfigurationService, decorators: [{
1657
+ type: Injectable,
1658
+ args: [{
1659
+ providedIn: 'root',
1660
+ }]
1661
+ }] });
1662
+
1663
+ class LandingpgConfigComponent {
1664
+ constructor() {
1665
+ this.ListofApplicationNames = [];
1666
+ this.isAppNameLoading = false;
1667
+ this.isAppNameUpdate = false;
1668
+ this.updateSuccess = errorMsg.LANDINGPGSUCCESS;
1669
+ this.updateError = errorMsg.LANDINGPGERROR;
1670
+ this.userConfiguredApp = {};
1671
+ this.destroyRef = inject(DestroyRef);
1672
+ this.apiUrl = '';
1673
+ this.cdr = inject(ChangeDetectorRef);
1674
+ this.fb = inject(FormBuilder);
1675
+ this.msgService = inject(ToastMsgService);
1676
+ this.translateService = inject(TranslateService);
1677
+ this._encryptRSAService = inject(EncrydecryRSAdataService);
1678
+ this.httpCommonService = inject(HttpCommonService);
1679
+ }
1680
+ ngAfterViewInit() {
1681
+ this.getTranslateContent();
1682
+ }
1683
+ ngOnInit() {
1684
+ this.getListofApplications();
1685
+ this.getInitalizeForm();
1686
+ }
1687
+ getInitalizeForm() {
1688
+ this.AppNameForm = this.fb.group({
1689
+ userApp: [null, Validators.required],
1690
+ });
1691
+ }
1692
+ //Method: Convert text one Lang. to another
1693
+ getTranslateContent() {
1694
+ this.translateService
1695
+ .get([
1696
+ 'Generic_lib.LandingPageSuccessMsg',
1697
+ 'Generic_lib.LandingPageErrorMsg',
1698
+ ])
1699
+ .pipe(takeUntilDestroyed(this.destroyRef))
1700
+ .subscribe((trans) => {
1701
+ this.updateSuccess = trans['Generic_lib.LandingPageSuccessMsg'];
1702
+ this.updateError = trans['Generic_lib.LandingPageErrorMsg'];
1703
+ });
1704
+ }
1705
+ /*Method : GET
1706
+ Action : Get List of User Assign Application*/
1707
+ getListofApplications() {
1708
+ this.isAppNameLoading = true;
1709
+ this.httpCommonService
1710
+ .getUserAssignedApps()
1711
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
1712
+ this.isAppNameLoading = false;
1713
+ this.cdr.markForCheck();
1714
+ }))
1715
+ .subscribe((response) => {
1716
+ this.ListofApplicationNames = response;
1717
+ this.userConfiguredApp = this.ListofApplicationNames.find((app) => app.isAssignedLanding);
1718
+ this.setPostLoginModuleOption(this.userConfiguredApp);
1719
+ this.cdr.markForCheck();
1720
+ });
1721
+ }
1722
+ /*Method : POST
1723
+ Action : Used to Update User Preferred Landing App Name*/
1724
+ getUpdateLandingPgPreference() {
1725
+ const userApp = this.AppNameForm.get('userApp')?.value;
1726
+ const moduleId = this._encryptRSAService.encryptViaRSA(userApp['appCode']);
1727
+ this.showBtnLoadder(true);
1728
+ this.httpCommonService
1729
+ .setLandingPgPreference(moduleId)
1730
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
1731
+ this.showBtnLoadder(false);
1732
+ this.cdr.markForCheck();
1733
+ }))
1734
+ .subscribe((result) => {
1735
+ if (result) {
1736
+ setTimeout(() => {
1737
+ this.setPostLoginModuleOption(userApp);
1738
+ this.cdr.markForCheck();
1739
+ }, 10);
1740
+ this.msgService.success(this.updateSuccess);
1741
+ this.AppNameForm.reset();
1742
+ }
1743
+ else {
1744
+ this.msgService.error(this.updateError);
1745
+ }
1746
+ this.cdr.markForCheck();
1747
+ });
1748
+ }
1749
+ setPostLoginModuleOption(userConfiguredApp) {
1750
+ if (userConfiguredApp) {
1751
+ this.AppNameForm.get('userApp')?.setValue(userConfiguredApp);
1752
+ }
1753
+ }
1754
+ showBtnLoadder(flag) {
1755
+ this.isAppNameUpdate = flag;
1756
+ }
1757
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: LandingpgConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1758
+ 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 }); }
1759
+ }
1760
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: LandingpgConfigComponent, decorators: [{
1761
+ type: Component,
1762
+ 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"] }]
1763
+ }] });
1764
+
1765
+ class StorageService {
1766
+ saveData(key, value) {
1767
+ localStorage.setItem(key, value);
1768
+ }
1769
+ getData(key) {
1770
+ return localStorage.getItem(key);
1771
+ }
1772
+ removeData(key) {
1773
+ localStorage.removeItem(key);
1774
+ }
1775
+ clearData() {
1776
+ localStorage.clear();
1777
+ }
1778
+ checkData(key) {
1779
+ return !!localStorage.getItem(key);
1780
+ }
1781
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1782
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StorageService, providedIn: 'root' }); }
1783
+ }
1784
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StorageService, decorators: [{
1785
+ type: Injectable,
1786
+ args: [{
1787
+ providedIn: 'root',
1788
+ }]
1789
+ }] });
1790
+
1791
+ class TimezoneConfigurationComponent {
1792
+ constructor() {
1793
+ this.ListOfTimeZones = [];
1794
+ this.isTimezoneLoading = false;
1795
+ this.isTimezoneupdate = false;
1796
+ this.destroyRef = inject(DestroyRef);
1797
+ this.tzSuccessMsg = errorMsg.TIMEZONESUCCESS;
1798
+ this.tzErrorMsg = errorMsg.TIMEZONERROR;
1799
+ this.apiUrl = '';
1800
+ this.closepopup = output();
1801
+ this.cdr = inject(ChangeDetectorRef);
1802
+ this.fb = inject(FormBuilder);
1803
+ this.msgService = inject(ToastMsgService);
1804
+ this._storageService = inject(StorageService);
1805
+ this._eventService = inject(EventService);
1806
+ this.translateService = inject(TranslateService);
1807
+ this.httpCommonService = inject(HttpCommonService);
1808
+ }
1809
+ ngAfterViewInit() {
1810
+ this.getTranslateContent();
1811
+ }
1812
+ ngOnInit() {
1813
+ this.getListofTimeZones();
1814
+ this.getInitalizeForm();
1815
+ }
1816
+ getInitalizeForm() {
1817
+ this.timeZoneForm = this.fb.group({
1818
+ timezone: [null, Validators.required], // Add Validators.required
1819
+ });
1820
+ }
1821
+ //Method: Convert text one Lang. to another
1822
+ getTranslateContent() {
1823
+ this.translateService
1824
+ .get(['Generic_lib.TimeZoneSuccessMsg', 'Generic_lib.TimeZoneErrorMsg'])
1825
+ .pipe(takeUntilDestroyed(this.destroyRef))
1826
+ .subscribe((trans) => {
1827
+ this.tzSuccessMsg = trans['Generic_lib.TimeZoneSuccessMsg'];
1828
+ this.tzErrorMsg = trans['Generic_lib.TimeZoneErrorMsg'];
1829
+ });
1830
+ }
1831
+ /*Method : GET
1832
+ Action : Get List of Time Zone*/
1833
+ getListofTimeZones() {
1834
+ this.isTimezoneLoading = true;
1835
+ this.httpCommonService
1836
+ .getGlobalTimeZone()
1837
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
1838
+ this.isTimezoneLoading = false;
1839
+ this.cdr.markForCheck();
1840
+ }))
1841
+ .subscribe((result) => {
1842
+ if (result && result['timelist']) {
1843
+ this.ListOfTimeZones = result['timelist'];
1844
+ }
1845
+ if (result && result['userTimeZone']) {
1846
+ let userTz = result['userTimeZone'];
1847
+ const selectedTZ = this.ListOfTimeZones.find((tz) => tz.id === userTz);
1848
+ this.setTimezoneOptionValue(selectedTZ);
1849
+ }
1850
+ this.cdr.markForCheck();
1851
+ });
1852
+ }
1853
+ /*Method : POST
1854
+ Action : Used to Update User Selected TimeZone*/
1855
+ setUserTimeZone() {
1856
+ const tz = this.timeZoneForm.get('timezone')?.value;
1857
+ let tzName = tz['id'];
1858
+ this.showBtnLoadder(true);
1859
+ this.httpCommonService
1860
+ .updateUserTimeZone(tzName)
1861
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
1862
+ this.showBtnLoadder(false);
1863
+ this.cdr.markForCheck();
1864
+ }))
1865
+ .subscribe((result) => {
1866
+ if (result) {
1867
+ setTimeout(() => {
1868
+ this.setTimezoneOptionValue(tz);
1869
+ this.cdr.markForCheck();
1870
+ }, 10);
1871
+ this.msgService.success(this.tzSuccessMsg);
1872
+ this._storageService.removeData(COOKIECONSTANT.NEWUSER);
1873
+ this._eventService.emitTimezone({
1874
+ component: 'timezone',
1875
+ usertimezoneAbbreviations: result,
1876
+ userTimeZoneFullForm: '',
1877
+ id: tz['id'],
1878
+ timelist: this.ListOfTimeZones,
1879
+ });
1880
+ this.closepopup.emit(true);
1881
+ this.timeZoneForm.reset();
1882
+ }
1883
+ else {
1884
+ this.msgService.error(this.tzErrorMsg);
1885
+ }
1886
+ this.cdr.markForCheck();
1887
+ });
1888
+ }
1889
+ setTimezoneOptionValue(selectedTZ) {
1890
+ if (selectedTZ) {
1891
+ this.selectedTimeZone = selectedTZ;
1892
+ this.timeZoneForm.get('timezone')?.setValue(this.selectedTimeZone);
1893
+ }
1894
+ }
1895
+ showBtnLoadder(flag) {
1896
+ this.isTimezoneupdate = flag;
1897
+ }
1898
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TimezoneConfigurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1899
+ 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 }); }
1900
+ }
1901
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TimezoneConfigurationComponent, decorators: [{
1902
+ type: Component,
1903
+ 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"] }]
1904
+ }], propDecorators: { closepopup: [{ type: i0.Output, args: ["closepopup"] }] } });
1905
+
1906
+ class ProxyAccessTokenConfigurationComponent {
1907
+ constructor() {
1908
+ this.proxyAccessTokenSkeleton = true;
1909
+ this.proxyAccessToken = '';
1910
+ this.maskedProxyAccessToken = '';
1911
+ this.tokenGenerated = false;
1912
+ this.isCopied = false;
1913
+ this.expiryTime = '';
1914
+ this.dbTypes = [
1915
+ { key: 'MySQL', label: 'MySQL', downloading: false },
1916
+ { key: 'MariaDB', label: 'MariaDB', downloading: false },
1917
+ { key: 'PostgreSQL', label: 'PostgreSQL', downloading: false },
1918
+ { key: 'Cassandra', label: 'Cassandra', downloading: false },
1919
+ { key: 'MongoDB', label: 'MongoDB', downloading: false },
1920
+ { key: 'RedisDB', label: 'RedisDB', downloading: false },
1921
+ ];
1922
+ this.destroyRef = inject(DestroyRef);
1923
+ this.cdr = inject(ChangeDetectorRef);
1924
+ this.httpCommonService = inject(HttpCommonService);
1925
+ this._encryptRSAService = inject(EncrydecryRSAdataService);
1926
+ this.msgService = inject(ToastMsgService);
1927
+ this.translateService = inject(TranslateService);
1928
+ }
1929
+ ngOnInit() {
1930
+ this.checkProxyAccessToken();
1931
+ }
1932
+ /*Method : GET
1933
+ Action : Check whether a Proxy Access Token already exists for the user and,
1934
+ if so, decrypt/mask it for display. */
1935
+ checkProxyAccessToken() {
1936
+ this.httpCommonService
1937
+ .getProxyAccessToken(false)
1938
+ .pipe(takeUntilDestroyed(this.destroyRef))
1939
+ .subscribe((result) => {
1940
+ const token = result?.accessToken;
1941
+ const expiryTime = result?.expiryTime;
1942
+ const decryptedToken = this._encryptRSAService.getDecryptAPIResponse(token);
1943
+ if (token) {
1944
+ this.proxyAccessTokenSkeleton = false;
1945
+ this.proxyAccessToken = decryptedToken['accessToken'];
1946
+ this.expiryTime = expiryTime;
1947
+ this.maskedProxyAccessToken = this.maskToken(decryptedToken['accessToken']);
1948
+ this.tokenGenerated = true;
1949
+ }
1950
+ else {
1951
+ this.proxyAccessTokenSkeleton = false;
1952
+ }
1953
+ this.cdr.markForCheck();
1954
+ });
1955
+ }
1956
+ /*Method : GET
1957
+ Action : Generate (or regenerate) a Proxy Access Token. */
1958
+ generateProxyAccessToken() {
1959
+ this.httpCommonService
1960
+ .getProxyAccessToken(true)
1961
+ .pipe(takeUntilDestroyed(this.destroyRef))
1962
+ .subscribe((result) => {
1963
+ const token = result?.accessToken;
1964
+ const expiryTime = result?.expiryTime;
1965
+ const decryptedToken = this._encryptRSAService.getDecryptAPIResponse(token);
1966
+ if (token) {
1967
+ this.proxyAccessToken = decryptedToken['accessToken'];
1968
+ this.expiryTime = expiryTime;
1969
+ this.maskedProxyAccessToken = this.maskToken(decryptedToken['accessToken']);
1970
+ this.tokenGenerated = true;
1971
+ }
1972
+ else {
1973
+ this.msgService.error(this.translateService.instant('Generic_lib.FailedProxyAccessToken'));
1974
+ }
1975
+ this.cdr.markForCheck();
1976
+ });
1977
+ }
1978
+ // Mask token for display
1979
+ maskToken(token) {
1980
+ if (!token) {
1981
+ return '';
1982
+ }
1983
+ const lastFive = token.slice(-5);
1984
+ return '*******************' + lastFive;
1985
+ }
1986
+ // Copy full token
1987
+ copyProxyAccessToken() {
1988
+ navigator.clipboard.writeText(this.proxyAccessToken).then(() => {
1989
+ this.isCopied = true;
1990
+ this.cdr.markForCheck();
1991
+ setTimeout(() => {
1992
+ this.isCopied = false;
1993
+ this.cdr.markForCheck();
1994
+ }, 2000);
1995
+ });
1996
+ }
1997
+ downloadCertificate(db) {
1998
+ db.downloading = true;
1999
+ this.httpCommonService
2000
+ .downloadSSLCertificate(db.key)
2001
+ .pipe(takeUntilDestroyed(this.destroyRef))
2002
+ .subscribe({
2003
+ next: (response) => {
2004
+ const blob = response.body;
2005
+ const contentDisposition = response.headers.get('content-disposition');
2006
+ const fileName = this.extractFileName(contentDisposition, db.key);
2007
+ const url = window.URL.createObjectURL(blob);
2008
+ const anchor = document.createElement('a');
2009
+ anchor.href = url;
2010
+ anchor.download = fileName;
2011
+ document.body.appendChild(anchor);
2012
+ anchor.click();
2013
+ document.body.removeChild(anchor);
2014
+ window.URL.revokeObjectURL(url);
2015
+ db.downloading = false;
2016
+ this.cdr.markForCheck();
2017
+ },
2018
+ error: () => {
2019
+ this.msgService.error(this.translateService.instant('Generic_lib.FailedDownloadCertificate'));
2020
+ db.downloading = false;
2021
+ this.cdr.markForCheck();
2022
+ },
2023
+ });
2024
+ }
2025
+ extractFileName(contentDisposition, db) {
2026
+ if (!contentDisposition)
2027
+ return db + '_proxy_downloadables.zip';
2028
+ const utf8Match = contentDisposition.match(/filename\*\s*=\s*UTF-8''([^;]+)/i);
2029
+ if (utf8Match?.[1]) {
2030
+ return decodeURIComponent(utf8Match[1]);
2031
+ }
2032
+ const normalMatch = contentDisposition.match(/filename\s*=\s*"?([^";]+)"?/i);
2033
+ if (normalMatch?.[1]) {
2034
+ return normalMatch[1];
2035
+ }
2036
+ return 'download.zip';
2037
+ }
2038
+ // Regenerate token
2039
+ regenerateProxyAccessToken() {
2040
+ this.generateProxyAccessToken();
2041
+ }
2042
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ProxyAccessTokenConfigurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2043
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ProxyAccessTokenConfigurationComponent, isStandalone: true, selector: "app-proxy-access-token-configuration", ngImport: i0, template: "<div class=\"preference-container\">\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ 'Generic_lib.ProxyAccessToken' | translate }}\r\n </div>\r\n </div>\r\n <div class=\"d-flex\">\r\n <div class=\"sub-label-name\">\r\n {{ 'Generic_lib.ProxyAccessTokenSubLabel' | translate }}\r\n </div>\r\n </div>\r\n\r\n @if (!proxyAccessTokenSkeleton) {\r\n <!-- Generate button -->\r\n @if (!tokenGenerated) {\r\n <div class=\"mt-2\">\r\n <p-button\r\n label=\"{{ 'Generic_lib.Generate' | translate }}\"\r\n class=\"submit-btn\"\r\n data-testid=\"proxy-token-generate-button\"\r\n (onClick)=\"generateProxyAccessToken()\"\r\n >\r\n <span class=\"generate-icon\">\r\n <img\r\n src=\"assets/common-header-lib/images/generate.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n />\r\n </span>\r\n </p-button>\r\n </div>\r\n }\r\n\r\n <!-- Masked token -->\r\n @if (tokenGenerated) {\r\n <div class=\"mt-2\">\r\n <div class=\"key-display\">\r\n <span class=\"token-text\">{{ maskedProxyAccessToken }}</span>\r\n\r\n <div class=\"copy-btn\">\r\n <span\r\n data-testid=\"proxy-token-copy-button\"\r\n (click)=\"copyProxyAccessToken()\"\r\n >\r\n <img\r\n [src]=\"\r\n isCopied\r\n ? 'assets/common-header-lib/images/copy-success.svg'\r\n : 'assets/common-header-lib/images/copy.svg'\r\n \"\r\n alt=\"\" aria-hidden=\"true\"\r\n [pTooltip]=\"\r\n (isCopied ? 'Generic_lib.Copied' : 'Generic_lib.Copy')\r\n | translate\r\n \"\r\n tooltipPosition=\"top\"\r\n />\r\n </span>\r\n </div>\r\n </div>\r\n <!-- Expiry Time -->\r\n <div class=\"sub-label-name mt-2\">\r\n {{ 'Generic_lib.ProxyAccessTokenExpiry' | translate }}:\r\n <span dir=\"ltr\">{{\r\n expiryTime | date: 'dd MMM yyyy, hh:mm a'\r\n }}</span>\r\n </div>\r\n <!-- Regenerate button -->\r\n <div class=\"mt-2 action-buttons\">\r\n <p-button\r\n label=\"{{ 'Generic_lib.Regenerate' | translate }}\"\r\n styleClass=\"p-button-danger\"\r\n class=\"submit-btn\"\r\n data-testid=\"proxy-token-regenerate-button\"\r\n (onClick)=\"regenerateProxyAccessToken()\"\r\n >\r\n <span class=\"generate-icon\">\r\n <img\r\n src=\"assets/common-header-lib/images/regenerate.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n />\r\n </span>\r\n </p-button>\r\n </div>\r\n </div>\r\n }\r\n } @else {\r\n <div class=\"loading-skeleton d-flex flex-column p-3\">\r\n <p-skeleton width=\"100%\" height=\"2rem\" styleClass=\"mb-2\"></p-skeleton>\r\n <p-skeleton width=\"60%\" height=\"1.5rem\" styleClass=\"mb-2\"></p-skeleton>\r\n <p-skeleton width=\"40%\" height=\"1.5rem\"></p-skeleton>\r\n </div>\r\n }\r\n\r\n <!-- SSL/TLS Certificate Downloads -->\r\n <div class=\"certificate-section\">\r\n <div>\r\n <div class=\"label-name\">\r\n {{ 'Generic_lib.SSLCertificates' | translate }}\r\n </div>\r\n <div class=\"sub-label-name\">\r\n {{ 'Generic_lib.CertificateInfo' | translate }}\r\n </div>\r\n </div>\r\n <div class=\"certificate-container\">\r\n <div class=\"certificate-list\">\r\n @for (db of dbTypes; track db.key) {\r\n <div\r\n class=\"certificate-item d-flex align-items-center justify-content-between\"\r\n >\r\n <div>\r\n <div class=\"label-name certificate-header\">\r\n {{ db.label }} {{ 'Generic_lib.Proxy' | translate }}\r\n </div>\r\n <div class=\"sub-label-name\">\r\n {{ 'Generic_lib.SSLCertificatesTitle' | translate }}\r\n {{ db.label }} {{ 'Generic_lib.Proxy' | translate }}\r\n </div>\r\n </div>\r\n <div class=\"img-div\">\r\n <p-button\r\n class=\"submit-btn download-button\"\r\n [class.hover-enabled]=\"!db.downloading\"\r\n [loading]=\"db.downloading\"\r\n data-testid=\"proxy-cert-download-button\"\r\n (onClick)=\"downloadCertificate(db)\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/download-blue.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n class=\"btn-icon me-1\"\r\n />\r\n <span class=\"me-1\">{{\r\n 'Generic_lib.Download' | translate\r\n }}</span>\r\n </p-button>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".preference-container .path-title{font-size:20px;color:var(--primary-text);margin-bottom:10px}.preference-container .form-group{margin-bottom:15px}.preference-container .label-name{font-size:16px;color:var(--primary-text);line-height:26px;font-weight:600}.preference-container .cur-text{font-size:12px;color:var(--secondary-text);line-height:20px;font-weight:500}.preference-container .key-display{height:45px;display:flex;align-items:center;gap:8px;background:#f5f6f8;border:1px solid #e1e4e8;border-radius:4px;padding:0 10px;font-family:monospace;font-size:13px;color:var(--primary-text);word-break:break-all;justify-content:space-between}.preference-container .action-buttons{display:flex;gap:15px}.preference-container .sub-label-name{font-size:12px;color:var(--secondary-text);line-height:20px;margin:5px 0}.preference-container .generate-icon{margin:0 10px 3px 0}.preference-container .token-text{word-break:break-all}.preference-container .copy-btn{display:flex;justify-content:center;cursor:pointer;height:28px;width:28px;align-items:center}.preference-container .certificate-container{border:1px solid #d0d4e4;border-radius:8px;margin-top:16px}.preference-container .certificate-list{display:flex;flex-direction:column}.preference-container .certificate-header{font-size:14px}.preference-container .img-div{display:none}.preference-container .certificate-item:hover .img-div{display:block}.preference-container .certificate-list .certificate-item{padding:20px 24px;border-bottom:1px solid #d0d4e4}.preference-container .certificate-list .certificate-item:last-child{border-bottom:none}.preference-container .certificate-item:hover{background-color:#e3e5f0}.preference-container .download-button.hover-enabled:hover .btn-icon{filter:brightness(0) invert(1)}.preference-container .certificate-section{margin-top:20px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: SkeletonModule }, { kind: "component", type: i1$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i3$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i4$1.DatePipe, name: "date" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2044
+ }
2045
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ProxyAccessTokenConfigurationComponent, decorators: [{
2046
+ type: Component,
2047
+ args: [{ selector: 'app-proxy-access-token-configuration', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
2048
+ CommonModule,
2049
+ ButtonModule,
2050
+ SkeletonModule,
2051
+ TooltipModule,
2052
+ TranslateModule,
2053
+ ], template: "<div class=\"preference-container\">\r\n <div class=\"form-group\">\r\n <div class=\"d-flex\">\r\n <div class=\"label-name\">\r\n {{ 'Generic_lib.ProxyAccessToken' | translate }}\r\n </div>\r\n </div>\r\n <div class=\"d-flex\">\r\n <div class=\"sub-label-name\">\r\n {{ 'Generic_lib.ProxyAccessTokenSubLabel' | translate }}\r\n </div>\r\n </div>\r\n\r\n @if (!proxyAccessTokenSkeleton) {\r\n <!-- Generate button -->\r\n @if (!tokenGenerated) {\r\n <div class=\"mt-2\">\r\n <p-button\r\n label=\"{{ 'Generic_lib.Generate' | translate }}\"\r\n class=\"submit-btn\"\r\n data-testid=\"proxy-token-generate-button\"\r\n (onClick)=\"generateProxyAccessToken()\"\r\n >\r\n <span class=\"generate-icon\">\r\n <img\r\n src=\"assets/common-header-lib/images/generate.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n />\r\n </span>\r\n </p-button>\r\n </div>\r\n }\r\n\r\n <!-- Masked token -->\r\n @if (tokenGenerated) {\r\n <div class=\"mt-2\">\r\n <div class=\"key-display\">\r\n <span class=\"token-text\">{{ maskedProxyAccessToken }}</span>\r\n\r\n <div class=\"copy-btn\">\r\n <span\r\n data-testid=\"proxy-token-copy-button\"\r\n (click)=\"copyProxyAccessToken()\"\r\n >\r\n <img\r\n [src]=\"\r\n isCopied\r\n ? 'assets/common-header-lib/images/copy-success.svg'\r\n : 'assets/common-header-lib/images/copy.svg'\r\n \"\r\n alt=\"\" aria-hidden=\"true\"\r\n [pTooltip]=\"\r\n (isCopied ? 'Generic_lib.Copied' : 'Generic_lib.Copy')\r\n | translate\r\n \"\r\n tooltipPosition=\"top\"\r\n />\r\n </span>\r\n </div>\r\n </div>\r\n <!-- Expiry Time -->\r\n <div class=\"sub-label-name mt-2\">\r\n {{ 'Generic_lib.ProxyAccessTokenExpiry' | translate }}:\r\n <span dir=\"ltr\">{{\r\n expiryTime | date: 'dd MMM yyyy, hh:mm a'\r\n }}</span>\r\n </div>\r\n <!-- Regenerate button -->\r\n <div class=\"mt-2 action-buttons\">\r\n <p-button\r\n label=\"{{ 'Generic_lib.Regenerate' | translate }}\"\r\n styleClass=\"p-button-danger\"\r\n class=\"submit-btn\"\r\n data-testid=\"proxy-token-regenerate-button\"\r\n (onClick)=\"regenerateProxyAccessToken()\"\r\n >\r\n <span class=\"generate-icon\">\r\n <img\r\n src=\"assets/common-header-lib/images/regenerate.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n />\r\n </span>\r\n </p-button>\r\n </div>\r\n </div>\r\n }\r\n } @else {\r\n <div class=\"loading-skeleton d-flex flex-column p-3\">\r\n <p-skeleton width=\"100%\" height=\"2rem\" styleClass=\"mb-2\"></p-skeleton>\r\n <p-skeleton width=\"60%\" height=\"1.5rem\" styleClass=\"mb-2\"></p-skeleton>\r\n <p-skeleton width=\"40%\" height=\"1.5rem\"></p-skeleton>\r\n </div>\r\n }\r\n\r\n <!-- SSL/TLS Certificate Downloads -->\r\n <div class=\"certificate-section\">\r\n <div>\r\n <div class=\"label-name\">\r\n {{ 'Generic_lib.SSLCertificates' | translate }}\r\n </div>\r\n <div class=\"sub-label-name\">\r\n {{ 'Generic_lib.CertificateInfo' | translate }}\r\n </div>\r\n </div>\r\n <div class=\"certificate-container\">\r\n <div class=\"certificate-list\">\r\n @for (db of dbTypes; track db.key) {\r\n <div\r\n class=\"certificate-item d-flex align-items-center justify-content-between\"\r\n >\r\n <div>\r\n <div class=\"label-name certificate-header\">\r\n {{ db.label }} {{ 'Generic_lib.Proxy' | translate }}\r\n </div>\r\n <div class=\"sub-label-name\">\r\n {{ 'Generic_lib.SSLCertificatesTitle' | translate }}\r\n {{ db.label }} {{ 'Generic_lib.Proxy' | translate }}\r\n </div>\r\n </div>\r\n <div class=\"img-div\">\r\n <p-button\r\n class=\"submit-btn download-button\"\r\n [class.hover-enabled]=\"!db.downloading\"\r\n [loading]=\"db.downloading\"\r\n data-testid=\"proxy-cert-download-button\"\r\n (onClick)=\"downloadCertificate(db)\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/download-blue.svg\"\r\n alt=\"\" aria-hidden=\"true\"\r\n class=\"btn-icon me-1\"\r\n />\r\n <span class=\"me-1\">{{\r\n 'Generic_lib.Download' | translate\r\n }}</span>\r\n </p-button>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".preference-container .path-title{font-size:20px;color:var(--primary-text);margin-bottom:10px}.preference-container .form-group{margin-bottom:15px}.preference-container .label-name{font-size:16px;color:var(--primary-text);line-height:26px;font-weight:600}.preference-container .cur-text{font-size:12px;color:var(--secondary-text);line-height:20px;font-weight:500}.preference-container .key-display{height:45px;display:flex;align-items:center;gap:8px;background:#f5f6f8;border:1px solid #e1e4e8;border-radius:4px;padding:0 10px;font-family:monospace;font-size:13px;color:var(--primary-text);word-break:break-all;justify-content:space-between}.preference-container .action-buttons{display:flex;gap:15px}.preference-container .sub-label-name{font-size:12px;color:var(--secondary-text);line-height:20px;margin:5px 0}.preference-container .generate-icon{margin:0 10px 3px 0}.preference-container .token-text{word-break:break-all}.preference-container .copy-btn{display:flex;justify-content:center;cursor:pointer;height:28px;width:28px;align-items:center}.preference-container .certificate-container{border:1px solid #d0d4e4;border-radius:8px;margin-top:16px}.preference-container .certificate-list{display:flex;flex-direction:column}.preference-container .certificate-header{font-size:14px}.preference-container .img-div{display:none}.preference-container .certificate-item:hover .img-div{display:block}.preference-container .certificate-list .certificate-item{padding:20px 24px;border-bottom:1px solid #d0d4e4}.preference-container .certificate-list .certificate-item:last-child{border-bottom:none}.preference-container .certificate-item:hover{background-color:#e3e5f0}.preference-container .download-button.hover-enabled:hover .btn-icon{filter:brightness(0) invert(1)}.preference-container .certificate-section{margin-top:20px}\n"] }]
2054
+ }] });
2055
+
2056
+ class GeneralConfigurationComponent {
2057
+ constructor() {
2058
+ this.ShowPreferencePathScreen = true;
2059
+ this.ShowChangePasswordScreen = false;
2060
+ this.ShowTimeZoneScreen = false;
2061
+ this.ShowLandinPgScreen = false;
2062
+ this.ShowProxyTokenScreen = false;
2063
+ this.ShowTimeZoneBtn = false;
2064
+ this.showStatus = false;
2065
+ this.userAssetTypeList = [];
2066
+ this.userAssetNameList = [];
2067
+ this.userServiceList = [];
2068
+ this.userSelectedTimezone = '';
2069
+ this.filePathName = '';
2070
+ this.lastUpdatedFileStatus = '';
2071
+ this.destroyRef = inject(DestroyRef);
2072
+ this.cdr = inject(ChangeDetectorRef);
2073
+ this.fb = inject(FormBuilder);
2074
+ this.msgService = inject(ToastMsgService);
2075
+ this.encryptService = inject(EncrydecryRSAdataService);
2076
+ this.loginService = inject(RESTLoginFormService);
2077
+ this._validatePwdService = inject(ASYNCPasswordcheckService);
2078
+ this.translateService = inject(TranslateService);
2079
+ this._vaptService = inject(VaptValidationService);
2080
+ this.config = inject(DynamicDialogConfig);
2081
+ this.httpCommonService = inject(HttpCommonService);
2082
+ this.httpGeneralConfigService = inject(HttpGeneralConfigurationService);
2083
+ this.makeNewPwdVisible = true;
2084
+ this.makeOldPwdVisible = true;
2085
+ this.makeCnfrmPwdVisible = true;
2086
+ this.isAssetTypeLoading = false;
2087
+ this.isAssetNameLoading = false;
2088
+ this.isConnectionMethodLoading = false;
2089
+ this.isPathUpdated = false;
2090
+ this.pwderrorMsg = '';
2091
+ this.AssetTypeEvent = 'AssetType';
2092
+ this.AssetNameEvent = 'AssetName';
2093
+ this.ConnectionMethodEvent = 'ConnectionMethod';
2094
+ this.pathSuccessMsg = errorMsg.PATHSUCCESS;
2095
+ this.pathErrorMsg = errorMsg.PATHERROR;
2096
+ this.apiURL = '';
2097
+ }
2098
+ ngOnInit() {
2099
+ //Get Initalize Form
2100
+ this.getInitalizeForm();
2101
+ this.OpenPreferencePathScreen();
2102
+ }
2103
+ ngAfterViewInit() {
2104
+ this.getTranslateContent();
2105
+ // Get PWD Validation MSg From Validation Service
2106
+ this._validatePwdService
2107
+ .listValidationMsg()
2108
+ .pipe(takeUntilDestroyed(this.destroyRef))
2109
+ .subscribe((msg) => {
2110
+ this.pwderrorMsg = msg;
2111
+ this.cdr.markForCheck();
2112
+ });
2113
+ }
2114
+ getInitalizeForm() {
2115
+ this.appSettingForm = this.fb.group({
2116
+ AssetType: ['', Validators.required],
2117
+ AssetName: ['', Validators.required],
2118
+ ServiceName: ['', Validators.required],
2119
+ filePathName: ['', [Validators.required, noSpaceAllowed()]],
2120
+ });
2121
+ this.timeZoneForm = this.fb.group({
2122
+ timezone: ['', Validators.required],
2123
+ });
2124
+ // Password Reset Form
2125
+ this.userResetPasswordForm = this.fb.group({
2126
+ oldUserARCXWD: ['', [Validators.required]],
2127
+ newUserARCXWD: [
2128
+ '',
2129
+ [Validators.required],
2130
+ [this._validatePwdService.createValidator()],
2131
+ ],
2132
+ crnmNewUserARCXWD: ['', [Validators.required]],
2133
+ }, {
2134
+ validator: ConfirmedValidator('newUserARCXWD', 'crnmNewUserARCXWD'),
2135
+ });
2136
+ }
2137
+ // //Method: Convert text one Lang. to another
2138
+ getTranslateContent() {
2139
+ this.translateService
2140
+ .get([
2141
+ 'Generic_lib.PreferencePathSuccessMsg',
2142
+ 'Generic_lib.PreferencePathErrorMsg',
2143
+ ])
2144
+ .pipe(takeUntilDestroyed(this.destroyRef))
2145
+ .subscribe((trans) => {
2146
+ this.pathSuccessMsg = trans['Generic_lib.PreferencePathSuccessMsg'];
2147
+ this.pathErrorMsg = trans['Generic_lib.PreferencePathErrorMsg'];
2148
+ });
2149
+ }
2150
+ OpenPreferencePathScreen() {
2151
+ this.closeAllScreen();
2152
+ setTimeout(() => {
2153
+ this.ShowPreferencePathScreen = true;
2154
+ this.appSettingForm.reset();
2155
+ this.userAssetTypeList = [];
2156
+ this.userAssetNameList = [];
2157
+ this.userServiceList = [];
2158
+ this.getServiceAssetDetails();
2159
+ this.cdr.markForCheck();
2160
+ }, 10);
2161
+ }
2162
+ OpenChangePasswordScreen() {
2163
+ this.closeAllScreen();
2164
+ this.ShowChangePasswordScreen = true;
2165
+ this.userResetPasswordForm.reset();
2166
+ }
2167
+ OpenTimezoneScreen() {
2168
+ this.closeAllScreen();
2169
+ this.ShowTimeZoneScreen = true;
2170
+ }
2171
+ OpenLandingPgConfig() {
2172
+ this.closeAllScreen();
2173
+ this.ShowLandinPgScreen = true;
2174
+ }
2175
+ OpenProxyAccessTokenScreen() {
2176
+ this.closeAllScreen();
2177
+ this.ShowProxyTokenScreen = true;
2178
+ }
2179
+ closeAllScreen() {
2180
+ this.ShowPreferencePathScreen = false;
2181
+ this.ShowChangePasswordScreen = false;
2182
+ this.ShowTimeZoneScreen = false;
2183
+ this.ShowLandinPgScreen = false;
2184
+ this.ShowProxyTokenScreen = false;
2185
+ }
2186
+ preferencePathValueChange(eventName) {
2187
+ if (eventName === this.AssetTypeEvent) {
2188
+ const assetType = this.appSettingForm.get('AssetType')?.value;
2189
+ this.showStatus = false;
2190
+ this.resetFormfields(['AssetName', 'ServiceName', 'filePathName']);
2191
+ this.userAssetNameList = [];
2192
+ this.userServiceList = [];
2193
+ this.getServiceAssetName(assetType['assetTypeID']);
2194
+ }
2195
+ else if (eventName === this.AssetNameEvent) {
2196
+ const assetName = this.appSettingForm.get('AssetName')?.value;
2197
+ this.showStatus = false;
2198
+ this.resetFormfields(['ServiceName', 'filePathName']);
2199
+ this.userServiceList = [];
2200
+ this.fetchServiceNameByAssetTypeEvent(assetName['assetName']);
2201
+ }
2202
+ else if (eventName === this.ConnectionMethodEvent) {
2203
+ const ServiceDetails = this.appSettingForm.get('ServiceName')?.value;
2204
+ this.showStatus = false;
2205
+ this.resetFormfields(['filePathName']);
2206
+ this.getFilePathDetails(ServiceDetails['serviceTypeId']);
2207
+ }
2208
+ }
2209
+ // /*Action : Used to Get Asset Type to update Prefrence Path of Connectors */
2210
+ getServiceAssetDetails() {
2211
+ this.isAssetTypeLoading = true;
2212
+ this.httpGeneralConfigService
2213
+ .getUserPreferredAssetTypeDetails()
2214
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
2215
+ this.isAssetTypeLoading = false;
2216
+ this.cdr.markForCheck();
2217
+ }))
2218
+ .subscribe((data) => {
2219
+ this.userAssetTypeList = data;
2220
+ this.cdr.markForCheck();
2221
+ });
2222
+ }
2223
+ // /*Action : Used to Get Asset Name to update Prefrence Path of that Asset's Connectors */
2224
+ getServiceAssetName(assetTypeID) {
2225
+ this.isAssetNameLoading = true;
2226
+ let payload = {
2227
+ assetTypeId: assetTypeID,
2228
+ };
2229
+ this.httpGeneralConfigService
2230
+ .getUserPreferredAssetName(payload)
2231
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
2232
+ this.isAssetNameLoading = false;
2233
+ this.cdr.markForCheck();
2234
+ }))
2235
+ .subscribe((data) => {
2236
+ this.userAssetNameList = data;
2237
+ this.cdr.markForCheck();
2238
+ });
2239
+ }
2240
+ // /*Method : GET
2241
+ // Action : get User Assigned ServiceName By AssetTypeEvent */
2242
+ fetchServiceNameByAssetTypeEvent(assetName) {
2243
+ this.isConnectionMethodLoading = true;
2244
+ let payload = {
2245
+ assetName: assetName,
2246
+ };
2247
+ this.httpGeneralConfigService
2248
+ .getServiceNameByAssetTypeEvent(payload)
2249
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
2250
+ this.isConnectionMethodLoading = false;
2251
+ this.cdr.markForCheck();
2252
+ }))
2253
+ .subscribe((data) => {
2254
+ this.userServiceList = data;
2255
+ this.cdr.markForCheck();
2256
+ });
2257
+ }
2258
+ // /*Method : GET
2259
+ // Action : Fetch User's File Path Details and Status already set or not */
2260
+ getFilePathDetails(serviceID) {
2261
+ let payload = {
2262
+ serviceTypeId: serviceID,
2263
+ };
2264
+ this.httpGeneralConfigService
2265
+ .getPreferencePathDetails(payload)
2266
+ .pipe(takeUntilDestroyed(this.destroyRef))
2267
+ .subscribe((res) => {
2268
+ this.preferencePathID = res['spmId'];
2269
+ if (res && res['currentSetting'] && res['lastUpdate']) {
2270
+ this.showStatus = true;
2271
+ this.filePathName = res['currentSetting'];
2272
+ this.lastUpdatedFileStatus = res['lastUpdate'];
2273
+ }
2274
+ else {
2275
+ this.filePathName = '';
2276
+ this.showStatus = false;
2277
+ this.lastUpdatedFileStatus = '';
2278
+ }
2279
+ this.cdr.markForCheck();
2280
+ });
2281
+ }
2282
+ // /*Action : It saves or updates a preference path of user */
2283
+ setUserPreferencePath(appSettingForm) {
2284
+ this.toggleBtnLoadder(true);
2285
+ const userpath = String(appSettingForm.value['filePathName']).trim();
2286
+ let payload = {
2287
+ serviceTypeId: appSettingForm.value['ServiceName']['serviceTypeId'],
2288
+ supDescription: userpath,
2289
+ spmId: this.preferencePathID,
2290
+ };
2291
+ this.httpGeneralConfigService
2292
+ .updatePreferencePath(payload)
2293
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
2294
+ this.toggleBtnLoadder(false);
2295
+ this.cdr.markForCheck();
2296
+ }))
2297
+ .subscribe((res) => {
2298
+ if (res) {
2299
+ this.resetForm();
2300
+ this.showStatus = false;
2301
+ this.msgService.success(this.pathSuccessMsg);
2302
+ }
2303
+ else {
2304
+ this.msgService.error(this.pathErrorMsg);
2305
+ }
2306
+ this.cdr.markForCheck();
2307
+ });
2308
+ }
2309
+ // //Method : Used to perform password reset of User
2310
+ resetLoggedInPwd() {
2311
+ if (this._vaptService.hasUnsafeInput(this.userResetPasswordForm.value)) {
2312
+ this.msgService.error(errorMsg.SCRIPTERROR);
2313
+ return;
2314
+ }
2315
+ this.userResetPasswordForm.markAllAsTouched();
2316
+ if (this.userResetPasswordForm.valid) {
2317
+ this.changeLoggedInPwd();
2318
+ }
2319
+ }
2320
+ // /*Method: will User New Password to API */
2321
+ changeLoggedInPwd() {
2322
+ //For Encrp/Dec
2323
+ let oldUserARCXWD = this.encryptService.encryptViaRSA(this.userResetPasswordForm.value['oldUserARCXWD']);
2324
+ //For Encrp/Dec
2325
+ let newUserARCXWD = this.encryptService.encryptViaRSA(this.userResetPasswordForm.value['newUserARCXWD']);
2326
+ let userPwdDetails = {
2327
+ ipAddress: '',
2328
+ oldUserARCXWD: oldUserARCXWD,
2329
+ newUserARCXWD: newUserARCXWD,
2330
+ authenticationType: 0,
2331
+ };
2332
+ this.toggleBtnLoadder(true);
2333
+ this.httpCommonService
2334
+ .setNewpassword(userPwdDetails)
2335
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => {
2336
+ this.toggleBtnLoadder(false);
2337
+ this.cdr.markForCheck();
2338
+ }))
2339
+ .subscribe((data) => {
2340
+ if (data['success']) {
2341
+ this.msgService.success(data['message']);
2342
+ this.userResetPasswordForm.reset();
2343
+ }
2344
+ else if (!data['success']) {
2345
+ this.msgService.error(data['errorMessage']);
2346
+ }
2347
+ this.cdr.markForCheck();
2348
+ });
2349
+ }
2350
+ // /*Method:
2351
+ // Action : Get Public Key for encryption of User Details */
2352
+ getEncryptKey() {
2353
+ let params = {
2354
+ type: 0,
2355
+ };
2356
+ this.loginService
2357
+ .getPrivateKey(params)
2358
+ .pipe(takeUntilDestroyed(this.destroyRef))
2359
+ .subscribe((data) => {
2360
+ if (data['success'] === true) {
2361
+ LoggedInUserInfo.privateKey = data['result'];
2362
+ }
2363
+ else if (data['success'] === false) {
2364
+ this.msgService.error(this.translateService.instant('Generic_lib.SessionTokenError'));
2365
+ }
2366
+ });
2367
+ }
2368
+ // /*Method : POST
2369
+ // Action : Get configuration ID based on to show hide Time Zone*/
2370
+ getglobalConfigDetails() {
2371
+ this.loginService
2372
+ .getglobalConfigDetails('1', [336])
2373
+ .pipe(takeUntilDestroyed(this.destroyRef))
2374
+ .subscribe((data) => {
2375
+ if (data && data.length > 0) {
2376
+ data.forEach((element) => {
2377
+ if (element && element['id'] === 336 && element['value'] === '0') {
2378
+ this.ShowTimeZoneBtn = true;
2379
+ }
2380
+ else {
2381
+ this.ShowTimeZoneBtn = false;
2382
+ }
2383
+ });
2384
+ }
2385
+ });
2386
+ }
2387
+ // // Show/Hide Password Fileds of Change Pwd form
2388
+ togglePasswordVisibility(flag) {
2389
+ if (flag === 1) {
2390
+ this.makeOldPwdVisible = !this.makeOldPwdVisible;
2391
+ }
2392
+ else if (flag === 2) {
2393
+ this.makeNewPwdVisible = !this.makeNewPwdVisible;
2394
+ }
2395
+ else if (flag === 3) {
2396
+ this.makeCnfrmPwdVisible = !this.makeCnfrmPwdVisible;
2397
+ }
2398
+ }
2399
+ resetForm() {
2400
+ this.appSettingForm.reset();
2401
+ }
2402
+ resetFormfields(fields) {
2403
+ fields.forEach((fieldsName) => {
2404
+ this.appSettingForm.get(fieldsName)?.reset();
2405
+ });
2406
+ }
2407
+ toggleBtnLoadder(flag) {
2408
+ this.isPathUpdated = flag;
2409
+ }
2410
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: GeneralConfigurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2411
+ 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 class=\"profile-card\" [class.active]=\"ShowProxyTokenScreen\">\r\n <button type=\"button\" class=\"tertiary-btn w-100 text-start\"\r\n (click)=\"OpenProxyAccessTokenScreen()\">\r\n <div class=\"p-2\">\r\n <div class=\"profile-label\">\r\n {{ \"Generic_lib.ProxyAccessToken\" | 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 <!-- Proxy Access Token Screen -->\r\n @if (ShowProxyTokenScreen) {\r\n <div class=\"col-lg-6\">\r\n <app-proxy-access-token-configuration></app-proxy-access-token-configuration>\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: "component", type: ProxyAccessTokenConfigurationComponent, selector: "app-proxy-access-token-configuration" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2412
+ }
2413
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: GeneralConfigurationComponent, decorators: [{
2414
+ type: Component,
2415
+ args: [{ selector: 'app-general-configuration', providers: [DialogService], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, ReactiveFormsModule, InputTextModule, SelectModule, ButtonModule, TranslateModule, LandingpgConfigComponent, TimezoneConfigurationComponent, ProxyAccessTokenConfigurationComponent], 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 class=\"profile-card\" [class.active]=\"ShowProxyTokenScreen\">\r\n <button type=\"button\" class=\"tertiary-btn w-100 text-start\"\r\n (click)=\"OpenProxyAccessTokenScreen()\">\r\n <div class=\"p-2\">\r\n <div class=\"profile-label\">\r\n {{ \"Generic_lib.ProxyAccessToken\" | 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 <!-- Proxy Access Token Screen -->\r\n @if (ShowProxyTokenScreen) {\r\n <div class=\"col-lg-6\">\r\n <app-proxy-access-token-configuration></app-proxy-access-token-configuration>\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"] }]
2416
+ }] });
2417
+
2418
+ class NgTranslationComponent {
2419
+ constructor() {
2420
+ /* Languages provided by the host app (single source of truth — populated
2421
+ from languages.json by the host's app initializer and forwarded down
2422
+ through <lib-app-header> → <app-user-sidebar> → here).
2423
+ Falls back to GlobalConstants.USERFILTEREDLANGUAGES when not supplied
2424
+ so the component remains usable in legacy contexts. */
2425
+ this.languages = input([], ...(ngDevMode ? [{ debugName: "languages" }] : []));
2426
+ /* Effective list bound to the template; derived from the languages input
2427
+ with a fallback to GlobalConstants for legacy contexts. */
2428
+ this.languageList = [];
2429
+ this.selectedLang = GlobalConstants.DEFAULTLANG;
2430
+ this._translate = inject(TranslateService);
2431
+ this._localstorage = inject(StorageService);
2432
+ this.msgService = inject(ToastMsgService);
2433
+ // Signal inputs do not trigger ngOnChanges; mirror the previous
2434
+ // "reload on subsequent languages changes" behaviour with an effect
2435
+ // (ngOnInit still performs the initial load, so skip the first run).
2436
+ let isFirst = true;
2437
+ effect(() => {
2438
+ this.languages(); // track changes to the languages input
2439
+ if (isFirst) {
2440
+ isFirst = false;
2441
+ return;
2442
+ }
2443
+ this.loadLanguages();
2444
+ });
2445
+ }
2446
+ ngOnInit() {
2447
+ this.loadLanguages();
2448
+ }
2449
+ loadLanguages() {
2450
+ /* 1. Use languages input if provided; fall back to GlobalConstants
2451
+ for backward compatibility. */
2452
+ const langs = this.languages();
2453
+ this.languageList =
2454
+ !langs || langs.length === 0
2455
+ ? GlobalConstants.USERFILTEREDLANGUAGES || []
2456
+ : langs;
2457
+ /* 2. Read saved language */
2458
+ const savedLang = this._localstorage.getData(COOKIECONSTANT.USERLANG);
2459
+ if (savedLang) {
2460
+ try {
2461
+ const parsed = JSON.parse(savedLang);
2462
+ const validLang = this.languageList.find((x) => x.langKey === parsed?.langKey);
2463
+ this.selectedLang = validLang || GlobalConstants.DEFAULTLANG;
2464
+ }
2465
+ catch {
2466
+ this.selectedLang = GlobalConstants.DEFAULTLANG;
2467
+ }
2468
+ }
2469
+ else {
2470
+ this.selectedLang = GlobalConstants.DEFAULTLANG;
2471
+ }
2472
+ }
2473
+ /* Language Change */
2474
+ selectLang(event) {
2475
+ this.selectedLang = event?.value;
2476
+ this.useTranslate(this.selectedLang);
2477
+ }
2478
+ useTranslate(selectedLang) {
2479
+ this._translate.use(selectedLang.langKey).subscribe({
2480
+ next: () => {
2481
+ this.saveUserLanguage(selectedLang);
2482
+ },
2483
+ error: () => {
2484
+ this.msgService.error(this._translate.instant('Generic_lib.FailedToLoadLanguageFile'));
2485
+ },
2486
+ });
2487
+ }
2488
+ saveUserLanguage(lang) {
2489
+ this._localstorage.saveData(COOKIECONSTANT.USERLANG, JSON.stringify(lang));
2490
+ }
2491
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NgTranslationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2492
+ 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 }); }
2493
+ }
2494
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NgTranslationComponent, decorators: [{
2495
+ type: Component,
2496
+ 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" }]
2497
+ }], ctorParameters: () => [], propDecorators: { languages: [{ type: i0.Input, args: [{ isSignal: true, alias: "languages", required: false }] }] } });
2498
+
2499
+ class UserSidebarComponent {
2500
+ constructor() {
2501
+ this.userDetails = {};
2502
+ this.showProfile = false;
2503
+ this.userdisplayName = '';
2504
+ this.userFirstName = '';
2505
+ this.userLastName = '';
2506
+ this.userLastLoggedIn = '';
2507
+ this.destroyRef = inject(DestroyRef);
2508
+ this.cdr = inject(ChangeDetectorRef);
2509
+ this.dialogService = inject(DialogService);
2510
+ this._cookieService = inject(CookieStorageManagerService);
2511
+ this.route = inject(Router);
2512
+ this.msgService = inject(ToastMsgService);
2513
+ this._localStorage = inject(StorageService);
2514
+ this.translateService = inject(TranslateService);
2515
+ this.httpCommonService = inject(HttpCommonService);
2516
+ /* Forwarded down to <ng-translation> so the language list is sourced
2517
+ from the host app instead of a separate library API call. */
2518
+ this.languages = input([], ...(ngDevMode ? [{ debugName: "languages" }] : []));
2519
+ /* Sidebar action buttons — default hidden; host app opts in via the
2520
+ <lib-app-header> EnableLearningCenter / EnableGeneralConfiguration inputs. */
2521
+ this.EnableLearningCenter = input(false, ...(ngDevMode ? [{ debugName: "EnableLearningCenter" }] : []));
2522
+ this.EnableGeneralConfiguration = input(false, ...(ngDevMode ? [{ debugName: "EnableGeneralConfiguration" }] : []));
2523
+ this.closeDialogBox = output();
2524
+ this.ref = null;
2525
+ this.sec = 1;
2526
+ this.min = 2;
2527
+ this.Hr = 30;
2528
+ this.isOpenSidePopup = false;
2529
+ this.showUserDetails = false;
2530
+ this.isNameCopied = false;
2531
+ }
2532
+ ngOnInit() {
2533
+ this.getLoggedInuserDteils();
2534
+ }
2535
+ //Method: Open User Setting Panel
2536
+ openUserSettingPanel() {
2537
+ this.ref = this.dialogService.open(GeneralConfigurationComponent, {
2538
+ header: this.translateService.instant('Generic_lib.GeneralConfiguration'),
2539
+ styleClass: 'general-configuration',
2540
+ closable: true, // ✅ FORCE enable
2541
+ closeOnEscape: true, // optional
2542
+ // DynamicDialog defaults resizable to true (undefined !== false), which
2543
+ // renders PrimeNG's .p-resizable-handle. Explicitly disable it.
2544
+ resizable: false,
2545
+ });
2546
+ }
2547
+ getLoggedInuserDteils() {
2548
+ this.httpCommonService
2549
+ .getLoggedInUserDetails()
2550
+ .pipe(takeUntilDestroyed(this.destroyRef))
2551
+ .subscribe((result) => {
2552
+ if (result && result['success'] && result['result']) {
2553
+ this.userDetails = result['result'];
2554
+ this.userdisplayName = this.userDetails['userDisplayName'];
2555
+ this.showProfile = true;
2556
+ this.getTotalSessionTime();
2557
+ this.setLoggedInUserName(this.userdisplayName);
2558
+ }
2559
+ else {
2560
+ this.showProfile = false;
2561
+ this.userDetails = {};
2562
+ }
2563
+ this.cdr.markForCheck();
2564
+ });
2565
+ }
2566
+ setLoggedInUserName(userdisplayName) {
2567
+ if (userdisplayName && userdisplayName.includes(' ')) {
2568
+ let splitStringArr = userdisplayName.split(' ');
2569
+ this.userFirstName = splitStringArr[0];
2570
+ this.userLastName = splitStringArr[1];
2571
+ }
2572
+ else {
2573
+ this.userdisplayName = userdisplayName;
2574
+ }
2575
+ }
2576
+ getcloseDialogBox() {
2577
+ this.closeDialogBox.emit(true);
2578
+ }
2579
+ /*Method : Copies the full user display name, as it is truncated in the panel */
2580
+ copyUserDisplayName() {
2581
+ const displayName = this.userDetails['userDisplayName'];
2582
+ if (!displayName) {
2583
+ return;
2584
+ }
2585
+ navigator.clipboard
2586
+ .writeText(displayName)
2587
+ .then(() => {
2588
+ this.isNameCopied = true;
2589
+ this.cdr.markForCheck();
2590
+ setTimeout(() => {
2591
+ this.isNameCopied = false;
2592
+ this.cdr.markForCheck();
2593
+ }, 2000);
2594
+ })
2595
+ .catch((error) => {
2596
+ console.error('Error copying user name to clipboard: ', error);
2597
+ });
2598
+ }
2599
+ getUserLoggedInTime() {
2600
+ let LastLoggedIn = this.convertUTCToLocal(this.userDetails['lastLogIn']);
2601
+ let LastLoggedInDate = new Date(LastLoggedIn);
2602
+ this.userLastLoggedIn = LastLoggedInDate.toLocaleString();
2603
+ }
2604
+ logoutCurrentUser() {
2605
+ this.httpCommonService
2606
+ .getInitiateUserLogout()
2607
+ .pipe()
2608
+ .subscribe((res) => {
2609
+ if (res) {
2610
+ this._cookieService.clearAllCookies();
2611
+ this._localStorage.clearData();
2612
+ if (res && res['spLogoutUrls'] && res['spLogoutUrls'].length > 0) {
2613
+ this.destoryAllSessions(res['spLogoutUrls']);
2614
+ }
2615
+ if (res?.['identity']) {
2616
+ this.userWithWindowAuthentication();
2617
+ }
2618
+ else {
2619
+ const path = '/' + RoutePaths.LOGINPG_PATH;
2620
+ const urlnew = globalThis.location.origin + '/#' + path;
2621
+ globalThis.location.href = urlnew;
2622
+ }
2623
+ }
2624
+ else {
2625
+ this.msgService.error(errorMsg.LOGOUTERROR);
2626
+ }
2627
+ });
2628
+ }
2629
+ /**
2630
+ * This function destroys all user sessions by opening multiple SAML logout URLs in new browser tabs.
2631
+ */
2632
+ destoryAllSessions(samlUrls) {
2633
+ samlUrls.forEach((url) => {
2634
+ globalThis.open(url, '_blank');
2635
+ });
2636
+ }
2637
+ userWithWindowAuthentication() {
2638
+ const path = '/' + RoutePaths.LOGOUT_PATH;
2639
+ this.route.navigateByUrl(path);
2640
+ }
2641
+ getTotalSessionTime() {
2642
+ let loginTime = this.convertUTCToLocal(this.userDetails['currentLogIn']);
2643
+ let loginTimeDate = new Date(loginTime);
2644
+ let currentTime = new Date();
2645
+ let milliseconds = currentTime.valueOf() - loginTimeDate.valueOf();
2646
+ let seconds = Math.floor(milliseconds / 1000);
2647
+ let minutes = Math.floor(seconds / 60);
2648
+ let hours = Math.floor(minutes / 60);
2649
+ seconds = seconds % 60;
2650
+ minutes = minutes % 60;
2651
+ this.Hr = hours;
2652
+ this.min = minutes;
2653
+ this.sec = seconds;
2654
+ // Clear any existing timer before starting a new one to avoid duplicates.
2655
+ if (this.sessionTimerInterval) {
2656
+ clearInterval(this.sessionTimerInterval);
2657
+ }
2658
+ this.sessionTimerInterval = setInterval(() => {
2659
+ this.updateTimer();
2660
+ }, 1000);
2661
+ }
2662
+ updateTimer() {
2663
+ if (this.sec < 59) {
2664
+ this.sec += 1;
2665
+ }
2666
+ else {
2667
+ this.sec = 0;
2668
+ if (this.min < 59) {
2669
+ this.min += 1;
2670
+ }
2671
+ else {
2672
+ this.min = 0;
2673
+ this.Hr += 1;
2674
+ }
2675
+ }
2676
+ this.cdr.markForCheck();
2677
+ }
2678
+ convertUTCToLocal(newdate) {
2679
+ let localDate = newdate + 'Z';
2680
+ localDate = localDate.toLocaleString();
2681
+ return localDate;
2682
+ }
2683
+ OpenArconLearningCenter() {
2684
+ const helpPageURL = localStorage.getItem('_WAU');
2685
+ if (helpPageURL?.trim()) {
2686
+ try {
2687
+ const baseUrl = new URL(helpPageURL.trim());
2688
+ const finalUrl = `${baseUrl.origin}/helppageui/`;
2689
+ GlobalConstants.PlugInDownloadURL = finalUrl;
2690
+ window.open(finalUrl, '_blank');
2691
+ }
2692
+ catch (e) { }
2693
+ }
2694
+ else {
2695
+ }
2696
+ }
2697
+ //close Popup
2698
+ closeUserSettingPanel() {
2699
+ if (this.ref) {
2700
+ this.ref.close();
2701
+ }
2702
+ }
2703
+ ngOnDestroy() {
2704
+ this.closeUserSettingPanel();
2705
+ if (this.sessionTimerInterval) {
2706
+ clearInterval(this.sessionTimerInterval);
2707
+ }
2708
+ }
2709
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: UserSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2710
+ 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 }, EnableLearningCenter: { classPropertyName: "EnableLearningCenter", publicName: "EnableLearningCenter", isSignal: true, isRequired: false, transformFunction: null }, EnableGeneralConfiguration: { classPropertyName: "EnableGeneralConfiguration", publicName: "EnableGeneralConfiguration", 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 <div class=\"user-name-row\">\r\n <h4 class=\"title\">\r\n <span\r\n class=\"title-text\"\r\n [pTooltip]=\"userDetails['userDisplayName']\"\r\n tooltipStyleClass=\"name-tooltip\"\r\n tooltipPosition=\"bottom\"\r\n >{{ userDetails[\"userDisplayName\"] }}</span\r\n >\r\n </h4>\r\n <button\r\n type=\"button\"\r\n class=\"copy-name-btn\"\r\n (click)=\"copyUserDisplayName()\"\r\n [pTooltip]=\"(isNameCopied ? 'Generic_lib.Copied' : 'Generic_lib.Copy') | translate\"\r\n tooltipPosition=\"bottom\"\r\n [attr.aria-label]=\"'Generic_lib.Copy' | translate\"\r\n data-testid=\"user-name-copy-button\"\r\n >\r\n <img\r\n [class.copied]=\"isNameCopied\"\r\n [src]=\"\r\n isNameCopied\r\n ? 'assets/common-header-lib/images/check.svg'\r\n : 'assets/common-header-lib/images/copy.svg'\r\n \"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n </button>\r\n </div>\r\n <p class=\"email-text\" [title]=\"userDetails['emailID']\">\r\n {{ userDetails[\"emailID\"] }}\r\n </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 @if (EnableLearningCenter()) {\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\r\n @if (EnableGeneralConfiguration()) {\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 }\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;flex-shrink:0;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:0 70px 0 14px!important;min-width:0!important;flex:1 1 auto!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .user-name-row{display:flex;align-items:center;gap:8px;padding-right:70px}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .title{font-size:17px!important;font-weight:600!important;line-height:21px!important;margin-bottom:2px!important;color:#292f4c!important;flex:0 1 auto;min-width:0}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .title .title-text{display:inline-block;max-width:100%;vertical-align:bottom;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .copy-name-btn{flex-shrink:0;width:28px;height:28px;padding:0;border:0;border-radius:50%;background-color:var(--white-color);display:flex;align-items:center;justify-content:center;cursor:pointer}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .copy-name-btn img{width:16px;height:16px}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .copy-name-btn img.copied{width:22px!important;height:22px!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .email-text{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.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: TooltipModule }, { kind: "directive", type: i3$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { 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 }); }
2711
+ }
2712
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: UserSidebarComponent, decorators: [{
2713
+ type: Component,
2714
+ args: [{ selector: 'app-user-sidebar', providers: [DialogService], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
2715
+ CommonModule,
2716
+ SkeletonModule,
2717
+ TooltipModule,
2718
+ TranslateModule,
2719
+ NgTranslationComponent,
2720
+ SliceToTwoPipe,
2721
+ ], 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 <div class=\"user-name-row\">\r\n <h4 class=\"title\">\r\n <span\r\n class=\"title-text\"\r\n [pTooltip]=\"userDetails['userDisplayName']\"\r\n tooltipStyleClass=\"name-tooltip\"\r\n tooltipPosition=\"bottom\"\r\n >{{ userDetails[\"userDisplayName\"] }}</span\r\n >\r\n </h4>\r\n <button\r\n type=\"button\"\r\n class=\"copy-name-btn\"\r\n (click)=\"copyUserDisplayName()\"\r\n [pTooltip]=\"(isNameCopied ? 'Generic_lib.Copied' : 'Generic_lib.Copy') | translate\"\r\n tooltipPosition=\"bottom\"\r\n [attr.aria-label]=\"'Generic_lib.Copy' | translate\"\r\n data-testid=\"user-name-copy-button\"\r\n >\r\n <img\r\n [class.copied]=\"isNameCopied\"\r\n [src]=\"\r\n isNameCopied\r\n ? 'assets/common-header-lib/images/check.svg'\r\n : 'assets/common-header-lib/images/copy.svg'\r\n \"\r\n alt=\"\"\r\n aria-hidden=\"true\"\r\n />\r\n </button>\r\n </div>\r\n <p class=\"email-text\" [title]=\"userDetails['emailID']\">\r\n {{ userDetails[\"emailID\"] }}\r\n </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 @if (EnableLearningCenter()) {\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\r\n @if (EnableGeneralConfiguration()) {\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 }\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;flex-shrink:0;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:0 70px 0 14px!important;min-width:0!important;flex:1 1 auto!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .user-name-row{display:flex;align-items:center;gap:8px;padding-right:70px}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .title{font-size:17px!important;font-weight:600!important;line-height:21px!important;margin-bottom:2px!important;color:#292f4c!important;flex:0 1 auto;min-width:0}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .title .title-text{display:inline-block;max-width:100%;vertical-align:bottom;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .copy-name-btn{flex-shrink:0;width:28px;height:28px;padding:0;border:0;border-radius:50%;background-color:var(--white-color);display:flex;align-items:center;justify-content:center;cursor:pointer}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .copy-name-btn img{width:16px;height:16px}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .copy-name-btn img.copied{width:22px!important;height:22px!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .email-text{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.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"] }]
2722
+ }], propDecorators: { languages: [{ type: i0.Input, args: [{ isSignal: true, alias: "languages", required: false }] }], EnableLearningCenter: [{ type: i0.Input, args: [{ isSignal: true, alias: "EnableLearningCenter", required: false }] }], EnableGeneralConfiguration: [{ type: i0.Input, args: [{ isSignal: true, alias: "EnableGeneralConfiguration", required: false }] }], closeDialogBox: [{ type: i0.Output, args: ["closeDialogBox"] }] } });
2723
+
2724
+ /**
2725
+ * 9-dots waffle panel — shows the list of applications the logged-in user can access.
2726
+ *
2727
+ * Extracted from CommonHeaderLibComponent to remove the God class smell.
2728
+ * Responsibilities:
2729
+ * - Toggle the PrimeNG popover on the 9-dots button click
2730
+ * - Lazily load the app list on first open (avoids an API call if never opened)
2731
+ * - Run pre-connection checks for specific apps before launching them
2732
+ */
2733
+ class AppPanelComponent {
2734
+ constructor() {
2735
+ this.httpCommonService = inject(HttpCommonService);
2736
+ this.msgService = inject(ToastMsgService);
2737
+ this.destroyRef = inject(DestroyRef);
2738
+ this.cdRef = inject(ChangeDetectorRef);
2739
+ this.popoverRef = viewChild.required('appPopover');
2740
+ this.APP_PANEL_SKELETON_COUNT = 12;
2741
+ /** List of apps the user is privileged to access. */
2742
+ this.ListOfUserPrivillegedApp = [];
2743
+ /** Controls skeleton loader while the app list is being fetched. */
2744
+ this.userAppLoaderLoadder = true;
2745
+ this.repeatLoader = new Array(this.APP_PANEL_SKELETON_COUNT).fill(0);
2746
+ // Some apps require a pre-launch validation before the URL is opened.
2747
+ // Only APP032 (MFA) and APP033 (internal config) have checks.
2748
+ // All other apps open directly without any pre-validation.
2749
+ this.APP_CONNECTION_CHECKS = {
2750
+ APP032: { check: () => this.httpCommonService.checkMFAConfiguration() },
2751
+ APP033: { check: () => this.httpCommonService.getInternalAppConfig('app033') },
2752
+ };
2753
+ }
2754
+ /** Toggles the popover and fetches the app list the first time it opens. */
2755
+ toggle(event) {
2756
+ this.popoverRef().toggle(event);
2757
+ if (this.ListOfUserPrivillegedApp.length === 0) {
2758
+ this.getUserAssignedApp();
2759
+ }
2760
+ }
2761
+ /** Fetches the apps assigned to the current user. */
2762
+ getUserAssignedApp() {
2763
+ this.ListOfUserPrivillegedApp = [];
2764
+ this.userAppLoaderLoadder = true;
2765
+ this.httpCommonService
2766
+ .getUserAssignedApps()
2767
+ .pipe(takeUntilDestroyed(this.destroyRef))
2768
+ .subscribe((result) => {
2769
+ this.userAppLoaderLoadder = false;
2770
+ this.ListOfUserPrivillegedApp = result;
2771
+ this.cdRef.markForCheck();
2772
+ });
2773
+ }
2774
+ /** Handles a click on an app tile.
2775
+ * Apps with special pre-validation (MFA, internal config) are checked first;
2776
+ * all other apps open immediately. */
2777
+ getConnectionofApplication(appCode) {
2778
+ this.popoverRef()?.hide();
2779
+ const appCheck = this.APP_CONNECTION_CHECKS[appCode];
2780
+ const commonError = 'Unable to verify the application configuration.';
2781
+ if (!appCheck) {
2782
+ // No pre-validation needed — open the app directly
2783
+ this.httpCommonService.openAppConnection(appCode);
2784
+ return;
2785
+ }
2786
+ appCheck
2787
+ .check()
2788
+ .pipe(takeUntilDestroyed(this.destroyRef))
2789
+ .subscribe({
2790
+ next: (response) => {
2791
+ if (response?.isValid) {
2792
+ this.httpCommonService.openAppConnection(appCode);
2793
+ }
2794
+ else {
2795
+ this.msgService.error(response?.errorMessage || commonError);
2796
+ }
2797
+ },
2798
+ error: () => {
2799
+ this.msgService.error(commonError);
2800
+ },
2801
+ });
2802
+ }
2803
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2804
+ 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 }); }
2805
+ }
2806
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppPanelComponent, decorators: [{
2807
+ type: Component,
2808
+ 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"] }]
2809
+ }], propDecorators: { popoverRef: [{ type: i0.ViewChild, args: ['appPopover', { isSignal: true }] }] } });
2810
+
2811
+ /**
2812
+ * Notification side panel — shows event-wise pending ticket counts.
2813
+ *
2814
+ * Extracted from CommonHeaderLibComponent to remove the God class smell.
2815
+ * Responsibilities:
2816
+ * - Fetch event-wise notification counts from the API on open (ngOnInit)
2817
+ * - Accept real-time SignalR updates from the parent via the signalREvents input
2818
+ * - Allow the user to manually refresh the notification list
2819
+ * - Expose a two-way `visible` model so the parent can open/close the panel
2820
+ *
2821
+ * The @if (EnableNotifications()) guard in the parent template ensures this component
2822
+ * is never created (and therefore never calls the API) when notifications are disabled.
2823
+ */
2824
+ class NotificationPanelComponent {
2825
+ constructor() {
2826
+ /** Two-way binding — parent sets this to true to open the panel. */
2827
+ this.visible = model(false, ...(ngDevMode ? [{ debugName: "visible" }] : []));
2828
+ /** Formatted total notification count string shown in the panel header. */
2829
+ this.notificationCount = input('', ...(ngDevMode ? [{ debugName: "notificationCount" }] : []));
2830
+ /** Real-time event data pushed by SignalR from HeaderDataService via the parent.
2831
+ * null means no SignalR push has arrived yet. */
2832
+ this.signalREvents = input(null, ...(ngDevMode ? [{ debugName: "signalREvents" }] : []));
2833
+ this.httpCommonService = inject(HttpCommonService);
2834
+ this.destroyRef = inject(DestroyRef);
2835
+ this.cdRef = inject(ChangeDetectorRef);
2836
+ this.NOTIFICATION_SKELETON_COUNT = 9;
2837
+ /** Event-wise list displayed in the panel (one row per event type). */
2838
+ this.eventwiseNotificationCount = [];
2839
+ /** Controls skeleton loader while the API call is in progress. */
2840
+ this.notificationLoadder = true;
2841
+ /** True when the API returns an error or an empty list. */
2842
+ this.isErrorFound = false;
2843
+ this.repeatLoader = new Array(this.NOTIFICATION_SKELETON_COUNT).fill(0);
2844
+ // When the parent pushes new SignalR data, update the list immediately
2845
+ // without waiting for the next manual API call or refresh.
2846
+ effect(() => {
2847
+ const events = this.signalREvents();
2848
+ if (events !== null) {
2849
+ this.eventwiseNotificationCount = events;
2850
+ this.isErrorFound = false;
2851
+ this.notificationLoadder = false;
2852
+ this.cdRef.markForCheck();
2853
+ }
2854
+ });
2855
+ }
2856
+ ngOnInit() {
2857
+ // Load the notification list as soon as the panel is created
2858
+ this.getEventwiseNotificationCount();
2859
+ }
2860
+ /** Fetches pending ticket counts grouped by workflow event type.
2861
+ * Also called by the Refresh button in the template. */
2862
+ getEventwiseNotificationCount() {
2863
+ const payload = {
2864
+ ApplicationName: GlobalConstants.applicationName,
2865
+ UserId: '',
2866
+ };
2867
+ this.notificationLoadder = true;
2868
+ this.httpCommonService
2869
+ .getWorkFlowTicketEventwiseCount(payload)
2870
+ .pipe(takeUntilDestroyed(this.destroyRef),
2871
+ // Always hide the loader when the request ends, even on error
2872
+ finalize$1(() => {
2873
+ this.notificationLoadder = false;
2874
+ this.cdRef.markForCheck();
2875
+ }))
2876
+ .subscribe({
2877
+ next: (data) => {
2878
+ this.isErrorFound = data.length === 0;
2879
+ this.eventwiseNotificationCount = data;
2880
+ this.cdRef.markForCheck();
2881
+ },
2882
+ error: () => {
2883
+ this.isErrorFound = true;
2884
+ this.cdRef.markForCheck();
2885
+ },
2886
+ });
2887
+ }
2888
+ /** Closes the panel by resetting the visible model. */
2889
+ closePanel() {
2890
+ this.visible.set(false);
2891
+ }
2892
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NotificationPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2893
+ 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 }); }
2894
+ }
2895
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NotificationPanelComponent, decorators: [{
2896
+ type: Component,
2897
+ args: [{ selector: 'app-notification-panel', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
2898
+ CommonModule,
2899
+ TranslateModule,
2900
+ SkeletonModule,
2901
+ SidePopupComponent,
2902
+ NoServiceMyAccessPgComponent,
2903
+ ], 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"] }]
2904
+ }], 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 }] }] } });
2905
+
2906
+ class EncrpdataService {
2907
+ constructor() {
2908
+ this.privateKey = "";
2909
+ }
2910
+ getASCIIValue(text) {
2911
+ let charCodeArr = [];
2912
+ for (let i = 0; i < text.length; i++) {
2913
+ let code = text.charCodeAt(i);
2914
+ charCodeArr.push(BigInt(code));
2915
+ }
2916
+ return charCodeArr;
2917
+ }
2918
+ getModuleValue(arr, num1, num2) {
2919
+ let numArr = [];
2920
+ for (let i = 0; i < arr.length; i++) {
2921
+ let code = arr[i] ** num2 % num1;
2922
+ numArr.push(code);
2923
+ }
2924
+ return numArr;
2925
+ }
2926
+ getEncrpytedData(text) {
2927
+ this.privateKey = LoggedInUserInfo.privateKey;
2928
+ let key = this.privateKey.split(',');
2929
+ const num1 = BigInt(key[0]);
2930
+ const num2 = BigInt(key[1]);
2931
+ //1. Convert string to phiN
2932
+ let asciiValue = this.getASCIIValue(text);
2933
+ //2. Get Mod of All Value
2934
+ let ModValue = this.getModuleValue(asciiValue, num1, num2);
2935
+ //3. Convert Arr to String
2936
+ const encodedText = ModValue.map(b => b.toString()).join('-');
2937
+ return encodedText;
2938
+ }
2939
+ encodeToBase64(text) {
2940
+ return btoa(text);
2941
+ }
2942
+ decodeToBase64(text) {
2943
+ return atob(text);
2944
+ }
2945
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EncrpdataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2946
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EncrpdataService, providedIn: 'root' }); }
2947
+ }
2948
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EncrpdataService, decorators: [{
2949
+ type: Injectable,
2950
+ args: [{
2951
+ providedIn: 'root',
2952
+ }]
2953
+ }] });
2954
+
2955
+ class RestSignalRService {
2956
+ constructor() {
2957
+ this.eventMsg = new BehaviorSubject({});
2958
+ this.AuthToken = '';
2959
+ this.hubURLS = [];
2960
+ this._localStorage = inject(StorageService);
2961
+ this._encrpdataService = inject(EncrpdataService);
2962
+ //Method: Established the Connection With SignalR to get RealTime Data
2963
+ this.establishedConnection = async () => {
2964
+ this.hubConnection = new signalR.HubConnectionBuilder()
2965
+ .withUrl(`${GlobalConstants.signalRURL}/chatHub`, {
2966
+ skipNegotiation: true,
2967
+ transport: signalR.HttpTransportType.WebSockets,
2968
+ headers: { Authorization: `Bearer ${this.AuthToken}` },
2969
+ })
2970
+ .build();
2971
+ try {
2972
+ await this.hubConnection.start();
2973
+ //* SignalR connection established successfully
2974
+ this.addMessageListener();
2975
+ }
2976
+ catch (error) {
2977
+ throw error;
2978
+ }
2979
+ };
2980
+ }
2981
+ async initializeSignalRConnection() {
2982
+ if (!GlobalConstants.signalRURL) {
2983
+ throw new Error('No hub URLs provided');
2984
+ }
2985
+ this.hubURLS = GlobalConstants.signalRURL
2986
+ ? GlobalConstants.signalRURL.split(',')
2987
+ : [];
2988
+ if (this.hubURLS.length === 1) {
2989
+ GlobalConstants.signalRURL = this.hubURLS[0];
2990
+ await this.establishedConnection();
2991
+ return;
2992
+ }
2993
+ let lastUsedIndex = this.getLastUsedIndex();
2994
+ for (let i = 0; i < this.hubURLS.length; i++) {
2995
+ const index = (lastUsedIndex + i) % this.hubURLS.length;
2996
+ GlobalConstants.signalRURL = this.hubURLS[index];
2997
+ try {
2998
+ await this.establishedConnection();
2999
+ this.setLastUsedIndex(index + 1); // Update for next round
3000
+ break; // Exit the loop if connection is successful
3001
+ }
3002
+ catch (error) {
3003
+ }
3004
+ }
3005
+ if (!this.hubConnection) {
3006
+ throw new Error('All SignalR connections failed');
3007
+ }
3008
+ }
3009
+ addMessageListener() {
3010
+ this.hubConnection.on('ReceiveMessage', (user, data) => {
3011
+ data = JSON.parse(data);
3012
+ this.emitEventMsg(data);
3013
+ });
3014
+ }
3015
+ emitEventMsg(data) {
3016
+ this.eventMsg.next(data);
3017
+ }
3018
+ listenerEventMsg() {
3019
+ return this.eventMsg.asObservable();
3020
+ }
3021
+ getLastUsedIndex() {
3022
+ const lastIndex = this._localStorage.getData(COOKIECONSTANT.SIGNALR_INDEX);
3023
+ return lastIndex
3024
+ ? Number(this._encrpdataService.decodeToBase64(lastIndex)) || 0
3025
+ : 0;
3026
+ }
3027
+ setLastUsedIndex(index) {
3028
+ const lastIndex = this._encrpdataService.encodeToBase64(index.toString());
3029
+ this._localStorage.saveData(COOKIECONSTANT.SIGNALR_INDEX, lastIndex);
3030
+ }
3031
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: RestSignalRService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3032
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: RestSignalRService, providedIn: 'root' }); }
3033
+ }
3034
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: RestSignalRService, decorators: [{
3035
+ type: Injectable,
3036
+ args: [{
3037
+ providedIn: 'root',
3038
+ }]
3039
+ }] });
3040
+
3041
+ /**
3042
+ * Handles all data loading and real-time state for the header.
3043
+ *
3044
+ * Extracted from CommonHeaderLibComponent to remove the God class smell.
3045
+ * Responsibilities:
3046
+ * - Load header data on init via a single forkJoin (notifications, user info, timezone, email count)
3047
+ * - Listen for real-time updates: SignalR notifications, timezone changes, email count, language
3048
+ * - Expose all results as signals so the template re-renders automatically
3049
+ *
3050
+ * Provided at the component level (not root) so each header instance gets its own state
3051
+ * and the service lifetime is tied to the component.
3052
+ */
3053
+ class HeaderDataService {
3054
+ constructor() {
3055
+ this.http = inject(HttpCommonService);
3056
+ this.signalR = inject(RestSignalRService);
3057
+ this.eventService = inject(EventService);
3058
+ this.translate = inject(TranslateService);
3059
+ this.destroyRef = inject(DestroyRef);
3060
+ // -- Public signals read directly by the component template --
3061
+ /** Base64-encoded header logo string (set after loadLogo() completes) */
3062
+ this.headerLogo = signal('', ...(ngDevMode ? [{ debugName: "headerLogo" }] : []));
3063
+ /** True once the forkJoin in loadAll() has finished (success or error) */
3064
+ this.isHeaderContentLoaded = signal(false, ...(ngDevMode ? [{ debugName: "isHeaderContentLoaded" }] : []));
3065
+ /** Logged-in user's display name */
3066
+ this.userdisplayName = signal('', ...(ngDevMode ? [{ debugName: "userdisplayName" }] : []));
3067
+ /** Formatted notification count string (e.g. "5", "99+", or "" when zero) */
3068
+ this.userNotificationCount = signal('', ...(ngDevMode ? [{ debugName: "userNotificationCount" }] : []));
3069
+ /** User's preferred timezone abbreviation (e.g. "IST") */
3070
+ this.userTimeZoneAbbreviations = signal('', ...(ngDevMode ? [{ debugName: "userTimeZoneAbbreviations" }] : []));
3071
+ /** User's full timezone name shown as a tooltip */
3072
+ this.userTimeZoneFullForm = signal('', ...(ngDevMode ? [{ debugName: "userTimeZoneFullForm" }] : []));
3073
+ /** Formatted unread email count string */
3074
+ this.totalEmails = signal('', ...(ngDevMode ? [{ debugName: "totalEmails" }] : []));
3075
+ /** Event-wise notification data pushed by SignalR; null until first push */
3076
+ this.signalREventwiseData = signal(null, ...(ngDevMode ? [{ debugName: "signalREventwiseData" }] : []));
3077
+ // -- Bridge signals watched by component effects to emit Angular outputs --
3078
+ // The service cannot call Angular output() functions directly, so it updates
3079
+ // these signals and the component uses effect() to emit the corresponding outputs.
3080
+ /** Set whenever a timezone update arrives (initial load or live change) */
3081
+ this.timezoneEmitValue = signal(null, ...(ngDevMode ? [{ debugName: "timezoneEmitValue" }] : []));
3082
+ /** Set after the logo API returns; carries the raw response for getBgImage output */
3083
+ this.bgImageEmitValue = signal(null, ...(ngDevMode ? [{ debugName: "bgImageEmitValue" }] : []));
3084
+ this.userNotificationCountObj = {};
3085
+ // accessTypes is kept for translate refresh — not exposed to the template
3086
+ this.accessTypes = [
3087
+ { id: 1, name: 'Permanent' },
3088
+ { id: 2, name: 'OneTime' },
3089
+ { id: 3, name: 'TimeBased' },
3090
+ ];
3091
+ this.translateKeys = [
3092
+ 'Generic_lib.Permanent',
3093
+ 'Generic_lib.OneTime',
3094
+ 'Generic_lib.TimeBased',
3095
+ ];
3096
+ }
3097
+ /** Fetches the header logo and sets headerLogo + bgImageEmitValue signals. */
3098
+ loadLogo() {
3099
+ this.http
3100
+ .getLogo()
3101
+ .pipe(takeUntilDestroyed(this.destroyRef))
3102
+ .subscribe((img) => {
3103
+ this.bgImageEmitValue.set(img);
3104
+ this.headerLogo.set('data:image/png;base64,' + img['logoImg']);
3105
+ });
3106
+ }
3107
+ /** Runs all enabled header APIs in parallel using forkJoin.
3108
+ * Only the APIs the host app has enabled are included in the request batch,
3109
+ * so disabled features never make unnecessary network calls. */
3110
+ loadAll(options) {
3111
+ const responseSet = {};
3112
+ const notificationPayload = {
3113
+ ApplicationName: GlobalConstants.applicationName,
3114
+ UserId: options.userId,
3115
+ };
3116
+ if (options.enableNotifications) {
3117
+ // catchError keeps forkJoin alive if the notifications API fails
3118
+ responseSet.notifications = this.http
3119
+ .getWorkFlowTicketCount(notificationPayload)
3120
+ .pipe(catchError$1(() => of(null)));
3121
+ }
3122
+ if (options.enableProfile) {
3123
+ responseSet.userinfo = this.http.getLoggedInUserDetails();
3124
+ }
3125
+ if (options.enableTimeZone) {
3126
+ responseSet.timeZone = this.http.getGlobalTimeZone();
3127
+ }
3128
+ if (options.enableMail) {
3129
+ responseSet.emailCount = this.http.getUnreadUserEmailsCount();
3130
+ }
3131
+ forkJoin(responseSet)
3132
+ .pipe(takeUntilDestroyed(this.destroyRef),
3133
+ // Mark loading complete whether the APIs succeed or fail
3134
+ finalize$1(() => this.isHeaderContentLoaded.set(true)))
3135
+ .subscribe((response) => {
3136
+ if (response.notifications)
3137
+ this.processNotifications(response.notifications);
3138
+ if (response.userinfo)
3139
+ this.processUserInfo(response.userinfo);
3140
+ if (response.timeZone)
3141
+ this.processTimeZone(response.timeZone);
3142
+ if (response.emailCount)
3143
+ this.totalEmails.set(this.formatCount(response.emailCount));
3144
+ });
3145
+ }
3146
+ /** Registers all real-time listeners. Call once from ngOnInit.
3147
+ * All subscriptions clean up automatically when the component is destroyed. */
3148
+ initListeners() {
3149
+ // SignalR: update notification count and event list on every push
3150
+ this.signalR
3151
+ .listenerEventMsg()
3152
+ .pipe(takeUntilDestroyed(this.destroyRef))
3153
+ .subscribe((data) => {
3154
+ if (data?.['application'] && data?.['events']) {
3155
+ this.userNotificationCountObj = data['application'];
3156
+ this.userNotificationCount.set(this.formatCount(Number(this.userNotificationCountObj['PendingCount'])));
3157
+ this.signalREventwiseData.set(data['events']);
3158
+ }
3159
+ });
3160
+ // Timezone change: user updates their preferred timezone in settings
3161
+ this.eventService
3162
+ .listenerTimezone()
3163
+ .pipe(takeUntilDestroyed(this.destroyRef))
3164
+ .subscribe((response) => {
3165
+ if (response?.['component'] === 'timezone') {
3166
+ this.userTimeZoneAbbreviations.set(response['usertimezoneAbbreviations'] ?? '');
3167
+ this.userTimeZoneFullForm.set(response['userTimeZoneFullForm'] ?? '');
3168
+ // Bridge signal triggers the component effect to emit timezoneDetails output
3169
+ this.timezoneEmitValue.set({
3170
+ abbreviations: response['usertimezoneAbbreviations'],
3171
+ userTimeZone: response['id'],
3172
+ timelist: response['timelist'],
3173
+ });
3174
+ }
3175
+ });
3176
+ // Email count change: user reads a mail, count decreases
3177
+ this.eventService
3178
+ .listenerUserEmail()
3179
+ .pipe(takeUntilDestroyed(this.destroyRef))
3180
+ .subscribe((data) => {
3181
+ if (data?.['component'] === 'email-count') {
3182
+ this.totalEmails.set(data?.['mailCount'] ?? '');
3183
+ }
3184
+ });
3185
+ // Language change: refresh translated access type names
3186
+ this.translate.onLangChange
3187
+ .pipe(takeUntilDestroyed(this.destroyRef))
3188
+ .subscribe(() => this.refreshTranslations());
3189
+ }
3190
+ /** Returns "" for zero/negative counts, "99+" for counts above 99. */
3191
+ formatCount(count) {
3192
+ if (!count || count <= 0)
3193
+ return '';
3194
+ return count > 99 ? '99+' : String(count);
3195
+ }
3196
+ // -- Private processing helpers --
3197
+ processNotifications(data) {
3198
+ this.userNotificationCountObj = data || {};
3199
+ this.userNotificationCount.set(this.formatCount(Number(this.userNotificationCountObj['PendingCount'])));
3200
+ }
3201
+ processUserInfo(response) {
3202
+ if (response?.['success'] && response?.['result']) {
3203
+ this.userdisplayName.set(response['result']['userDisplayName']);
3204
+ }
3205
+ }
3206
+ /** Updates timezone signals and sets the bridge signal for the output emit. */
3207
+ processTimeZone(result) {
3208
+ if (result?.['abbreviations']) {
3209
+ this.userTimeZoneAbbreviations.set(result['abbreviations']);
3210
+ this.userTimeZoneFullForm.set(result['userTimeZone']);
3211
+ this.timezoneEmitValue.set(result);
3212
+ }
3213
+ }
3214
+ refreshTranslations() {
3215
+ this.translate.get(this.translateKeys).subscribe((trans) => {
3216
+ this.accessTypes.forEach((item, index) => {
3217
+ item['name'] = trans[this.translateKeys[index]];
3218
+ });
3219
+ });
3220
+ }
3221
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HeaderDataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3222
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HeaderDataService }); }
3223
+ }
3224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: HeaderDataService, decorators: [{
3225
+ type: Injectable
3226
+ }] });
3227
+
3228
+ /**
3229
+ * Manages Line of Business (LOB) state and selection logic for the header.
3230
+ *
3231
+ * Extracted from CommonHeaderLibComponent to remove the God class smell.
3232
+ * Responsibilities:
3233
+ * - Fetch the LOB list from the API
3234
+ * - Restore the previously selected LOB from localStorage on load
3235
+ * - Persist the confirmed LOB selection back to localStorage
3236
+ * - Revert the dropdown to the last confirmed LOB when the user cancels
3237
+ * - Validate LOB IDs set programmatically by the host app
3238
+ *
3239
+ * Provided at the component level so each header instance has isolated LOB state.
3240
+ */
3241
+ class LobService {
3242
+ constructor() {
3243
+ this.http = inject(HttpCommonService);
3244
+ this.msgService = inject(ToastMsgService);
3245
+ this.translate = inject(TranslateService);
3246
+ this.destroyRef = inject(DestroyRef);
3247
+ /** Full LOB list used as options for the dropdown. */
3248
+ this.userLOBList = [];
3249
+ /** Controls the skeleton loader shown while the LOB list is being fetched. */
3250
+ this.showLobLoader = true;
3251
+ }
3252
+ /** Fetches the LOB list and resolves the initial selection.
3253
+ * - If localStorage has a valid pre-selected LOB, it is restored.
3254
+ * - Otherwise the first item in the list is selected and saved to localStorage. */
3255
+ loadLOBs(showAllLOB) {
3256
+ this.showLobLoader = true;
3257
+ return this.http.getLOBList().pipe(takeUntilDestroyed(this.destroyRef), map((res) => {
3258
+ this.showLobLoader = false;
3259
+ this.userLOBList = res.result;
3260
+ // Prepend "All LOB" option when the host app enables it
3261
+ if (showAllLOB) {
3262
+ this.userLOBList.unshift({ lobId: -1, lobName: 'All LOB' });
3263
+ }
3264
+ let initialLobSelected = this.getLobById(this.userLOBList, this.userLOBList[0]?.lobId);
3265
+ const preSelectedLob = JSON.parse(localStorage.getItem('XOB') || 'null');
3266
+ // Check if the stored LOB still exists in the current list (it may have been removed)
3267
+ const isInList = this.userLOBList.some((lob) => Number(lob.lobId) === Number(preSelectedLob?.LOBId));
3268
+ let selectedLobId;
3269
+ if (preSelectedLob && Number(preSelectedLob.LOBId) && isInList) {
3270
+ // Restore the previously selected LOB from localStorage
3271
+ selectedLobId = preSelectedLob.LOBId;
3272
+ this.tempSelectedLobId = preSelectedLob.LOBId;
3273
+ initialLobSelected = this.getLobById(this.userLOBList, selectedLobId);
3274
+ }
3275
+ else {
3276
+ // No valid stored LOB — default to the first item and save it
3277
+ selectedLobId = this.userLOBList[0]?.lobId;
3278
+ this.tempSelectedLobId = this.userLOBList[0]?.lobId;
3279
+ localStorage.setItem('XOB', JSON.stringify(initialLobSelected));
3280
+ }
3281
+ return { initialLobSelected, selectedLobId };
3282
+ }));
3283
+ }
3284
+ /** Called when the user confirms the LOB change dialog.
3285
+ * Updates the temp reference and persists the new selection to localStorage. */
3286
+ confirmChange(selectedLobId) {
3287
+ this.tempSelectedLobId = selectedLobId;
3288
+ const lob = this.getLobById(this.userLOBList, selectedLobId);
3289
+ localStorage.setItem('XOB', JSON.stringify(lob));
3290
+ return lob;
3291
+ }
3292
+ /** Called when the user cancels the LOB change dialog.
3293
+ * Returns the last confirmed LOB ID so the dropdown can be reverted. */
3294
+ revertChange() {
3295
+ return this.tempSelectedLobId;
3296
+ }
3297
+ /** Validates a LOB ID set programmatically by the host app (via setCustomLobId).
3298
+ * Shows an error toast if the ID does not exist in the current list. */
3299
+ validateCustomLobId(lobId) {
3300
+ const lob = this.getLobById(this.userLOBList, lobId);
3301
+ if (Object.keys(lob).length === 0) {
3302
+ this.msgService.error(this.translate.instant('Generic_lib.SettingInvalidLobIdMsg'));
3303
+ return null;
3304
+ }
3305
+ // Mark as externally set so the host app knows this was a forced selection
3306
+ lob['CustomLOBSetByParent'] = true;
3307
+ localStorage.setItem('XOB', JSON.stringify(lob));
3308
+ return lob;
3309
+ }
3310
+ /** Finds a LOB in the list by its ID and returns a normalised LobItem.
3311
+ * Returns an empty object cast as LobItem when no match is found. */
3312
+ getLobById(list, id) {
3313
+ const item = list.find((x) => x.lobId === id);
3314
+ if (!item)
3315
+ return {};
3316
+ return { LOBId: item.lobId, LOBName: item.lobName, CustomLOBSetByParent: false };
3317
+ }
3318
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: LobService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3319
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: LobService }); }
3320
+ }
3321
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: LobService, decorators: [{
3322
+ type: Injectable
3323
+ }] });
3324
+
3325
+ /**
3326
+ * Main header component — acts as a thin coordinator.
3327
+ *
3328
+ * Responsibilities kept here:
3329
+ * - Declare signal inputs and outputs (public API for the host app)
3330
+ * - Toggle UI panels (mailbox, user profile, notifications)
3331
+ * - Coordinate LOB selection + confirmation dialog
3332
+ * - Wire service signals to Angular outputs via effects
3333
+ *
3334
+ * Heavy logic is delegated to:
3335
+ * - HeaderDataService — data loading, SignalR/event listeners, state signals
3336
+ * - LobService — LOB list loading, selection persistence, validation
3337
+ * - AppPanelComponent — 9-dots waffle panel (app list + connection checks)
3338
+ * - NotificationPanelComponent — notification sidebar (event counts, refresh)
3339
+ */
3340
+ class CommonHeaderLibComponent {
3341
+ constructor() {
3342
+ // -- Inputs (host app configures which header features are active) --
3343
+ this.EnableLogo = input(true, ...(ngDevMode ? [{ debugName: "EnableLogo" }] : []));
3344
+ this.moduleName = input('', ...(ngDevMode ? [{ debugName: "moduleName" }] : []));
3345
+ this.EnableTimeZone = input(true, ...(ngDevMode ? [{ debugName: "EnableTimeZone" }] : []));
3346
+ this.EnableLOB = input(true, ...(ngDevMode ? [{ debugName: "EnableLOB" }] : []));
3347
+ this.showAllLOB = input(false, ...(ngDevMode ? [{ debugName: "showAllLOB" }] : []));
3348
+ this.EnableMail = input(true, ...(ngDevMode ? [{ debugName: "EnableMail" }] : []));
3349
+ this.EnableNotifications = input(true, ...(ngDevMode ? [{ debugName: "EnableNotifications" }] : []));
3350
+ this.EnableMoreApps = input(true, ...(ngDevMode ? [{ debugName: "EnableMoreApps" }] : []));
3351
+ this.EnableProfile = input(true, ...(ngDevMode ? [{ debugName: "EnableProfile" }] : []));
3352
+ // Sidebar action buttons — default hidden; host app opts in.
3353
+ this.EnableLearningCenter = input(false, ...(ngDevMode ? [{ debugName: "EnableLearningCenter" }] : []));
3354
+ this.EnableGeneralConfiguration = input(false, ...(ngDevMode ? [{ debugName: "EnableGeneralConfiguration" }] : []));
3355
+ /* Supported languages forwarded down to <ng-translation>. The host app
3356
+ loads languages.json once (via its app initializer) and binds the
3357
+ resulting list here, eliminating a duplicate fetch from the library. */
3358
+ this.languages = input([], ...(ngDevMode ? [{ debugName: "languages" }] : []));
3359
+ // -- Outputs (events the host app can subscribe to) --
3360
+ this.timezoneDetails = output();
3361
+ this.lobSelected = output();
3362
+ this.getBgImage = output();
3363
+ this.langChange = output();
3364
+ this.overlayStateChange = output();
3365
+ // -- View references --
3366
+ this.confirmDialog = viewChild.required('confirmDialog');
3367
+ this.appPanelRef = viewChild.required('appPanel');
3368
+ // Services are public so the template can read their signals directly
3369
+ // (e.g. headerData.userNotificationCount(), lobService.userLOBList)
3370
+ this.headerData = inject(HeaderDataService);
3371
+ this.lobService = inject(LobService);
3372
+ this.isOpenSidePopup = false;
3373
+ this.showUserDetails = false;
3374
+ this.showMailboxScreenflag = false;
3375
+ this.isNotificationPanelOpen = false;
3376
+ this.cdRef = inject(ChangeDetectorRef);
3377
+ this.setWebAPIURL();
3378
+ // EnableLOB is a signal input — reload the LOB list whenever it becomes true.
3379
+ // untracked() prevents reads inside getListofLOB from becoming dependencies
3380
+ // of this effect, which would cause infinite re-execution.
3381
+ effect(() => {
3382
+ if (this.EnableLOB() === true) {
3383
+ untracked(() => this.getListofLOB());
3384
+ }
3385
+ });
3386
+ // HeaderDataService cannot emit Angular outputs directly, so it exposes
3387
+ // bridge signals that the component watches here and emits as outputs.
3388
+ effect(() => {
3389
+ const tz = this.headerData.timezoneEmitValue();
3390
+ if (tz !== null)
3391
+ this.timezoneDetails.emit(tz);
3392
+ });
3393
+ effect(() => {
3394
+ const img = this.headerData.bgImageEmitValue();
3395
+ if (img !== null)
3396
+ this.getBgImage.emit(img);
3397
+ });
3398
+ }
3399
+ ngOnInit() {
3400
+ this.overlayStateChange.emit(false);
3401
+ if (this.EnableLogo())
3402
+ this.headerData.loadLogo();
3403
+ // Load all header data (user info, notifications, timezone, email count) in parallel
3404
+ this.headerData.loadAll({
3405
+ enableNotifications: this.EnableNotifications(),
3406
+ enableProfile: this.EnableProfile(),
3407
+ enableTimeZone: this.EnableTimeZone(),
3408
+ enableMail: this.EnableMail(),
3409
+ userId: '',
3410
+ });
3411
+ // Start listening for real-time updates (SignalR, timezone change, email count, language)
3412
+ this.headerData.initListeners();
3413
+ }
3414
+ // -- Mailbox panel --
3415
+ showMailBoxScreen() {
3416
+ this.showMailboxScreenflag = true;
3417
+ this.overlayStateChange.emit(true);
3418
+ }
3419
+ hideMailBoxScreen() {
3420
+ this.showMailboxScreenflag = false;
3421
+ this.overlayStateChange.emit(false);
3422
+ }
3423
+ // -- Language change --
3424
+ languageChange(event) {
3425
+ if (!event)
3426
+ return;
3427
+ this.langChange.emit(event);
3428
+ }
3429
+ // -- 9-dots app panel --
3430
+ showUserAppsPanel(event) {
3431
+ this.appPanelRef().toggle(event);
3432
+ }
3433
+ // -- User profile sidebar --
3434
+ showUserDetailsPanel() {
3435
+ this.isOpenSidePopup = true;
3436
+ this.showUserDetails = true;
3437
+ }
3438
+ closeSidePopup() {
3439
+ this.showUserDetails = false;
3440
+ this.isOpenSidePopup = false;
3441
+ }
3442
+ // -- Notification panel --
3443
+ OpenNotificationModal() {
3444
+ this.isNotificationPanelOpen = true;
3445
+ this.cdRef.markForCheck();
3446
+ }
3447
+ closeModal() {
3448
+ this.isNotificationPanelOpen = false;
3449
+ this.cdRef.markForCheck();
3450
+ }
3451
+ // -- LOB (Line of Business) selection --
3452
+ /** Called when the user picks a different LOB from the dropdown.
3453
+ * Stores the new value and opens the confirmation dialog before committing. */
3454
+ onLobChangeEvent(event) {
3455
+ this.selectedLOBId = event.value;
3456
+ this.confirmDialog().openConfirmModal(event);
3457
+ }
3458
+ /** Called when the user confirms the LOB change dialog.
3459
+ * Persists the new selection and emits it to the host app. */
3460
+ confirmLobChange() {
3461
+ const lob = this.lobService.confirmChange(this.selectedLOBId);
3462
+ this.lobSelected.emit(lob);
3463
+ }
3464
+ /** Called when the user cancels the LOB change dialog.
3465
+ * Reverts the dropdown back to the previously confirmed LOB. */
3466
+ revertLobChange() {
3467
+ this.selectedLOBId = this.lobService.revertChange();
3468
+ }
3469
+ /** Public API — allows the host app to force-select a specific LOB by ID. */
3470
+ setCustomLobId(lobId) {
3471
+ const lob = this.lobService.validateCustomLobId(lobId);
3472
+ if (lob) {
3473
+ this.selectedLOBId = lobId;
3474
+ this.lobSelected.emit(lob);
3475
+ }
3476
+ }
3477
+ // -- Initialization helpers --
3478
+ /** Sets the base API URL once. Falls back to the current browser origin
3479
+ * if no URL has been stored in localStorage under '_WAU'. */
3480
+ setWebAPIURL() {
3481
+ if (GlobalConstants.baseURL === undefined) {
3482
+ const storedURL = localStorage.getItem('_WAU');
3483
+ GlobalConstants.baseURL = storedURL?.trim() ? storedURL : globalThis.location.origin;
3484
+ }
3485
+ }
3486
+ /** Loads the LOB list and emits the initially selected LOB to the host app.
3487
+ * detectChanges() is used (not markForCheck) because lobService properties
3488
+ * are plain values, not signals — we need an immediate re-render after the
3489
+ * subscription updates showLobLoader and userLOBList on the service. */
3490
+ getListofLOB() {
3491
+ this.lobService.loadLOBs(this.showAllLOB()).subscribe(({ initialLobSelected, selectedLobId }) => {
3492
+ this.selectedLOBId = selectedLobId;
3493
+ this.lobSelected.emit(initialLobSelected);
3494
+ this.cdRef.detectChanges();
3495
+ });
3496
+ }
3497
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CommonHeaderLibComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3498
+ 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 }, EnableLearningCenter: { classPropertyName: "EnableLearningCenter", publicName: "EnableLearningCenter", isSignal: true, isRequired: false, transformFunction: null }, EnableGeneralConfiguration: { classPropertyName: "EnableGeneralConfiguration", publicName: "EnableGeneralConfiguration", 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 [EnableLearningCenter]=\"EnableLearningCenter()\"\r\n [EnableGeneralConfiguration]=\"EnableGeneralConfiguration()\"\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%}.p-tooltip{max-width:320px!important}.p-tooltip .p-tooltip-text{font-size:12px!important;line-height:18px!important;padding:8px 10px!important;border-radius:6px!important;white-space:normal!important;overflow-wrap:anywhere;word-break:break-word}.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", "EnableLearningCenter", "EnableGeneralConfiguration"], 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 }); }
3499
+ }
3500
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CommonHeaderLibComponent, decorators: [{
3501
+ type: Component,
3502
+ args: [{ selector: 'lib-app-header', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, providers: [HeaderDataService, LobService], imports: [
3503
+ CommonModule,
3504
+ FormsModule,
3505
+ SelectModule,
3506
+ SkeletonModule,
3507
+ BadgeModule,
3508
+ TranslateModule,
3509
+ SliceToTwoPipe,
3510
+ UserMailboxComponent,
3511
+ SidePopupComponent,
3512
+ UserSidebarComponent,
3513
+ AppPanelComponent,
3514
+ NotificationPanelComponent,
3515
+ ConfirmDialogComponent,
3516
+ ], 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 [EnableLearningCenter]=\"EnableLearningCenter()\"\r\n [EnableGeneralConfiguration]=\"EnableGeneralConfiguration()\"\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%}.p-tooltip{max-width:320px!important}.p-tooltip .p-tooltip-text{font-size:12px!important;line-height:18px!important;padding:8px 10px!important;border-radius:6px!important;white-space:normal!important;overflow-wrap:anywhere;word-break:break-word}.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"] }]
3517
+ }], 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 }] }], EnableLearningCenter: [{ type: i0.Input, args: [{ isSignal: true, alias: "EnableLearningCenter", required: false }] }], EnableGeneralConfiguration: [{ type: i0.Input, args: [{ isSignal: true, alias: "EnableGeneralConfiguration", 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 }] }] } });
3518
+
3519
+ /**
3520
+ * Thin re-export wrapper for NgModule-based host apps.
3521
+ *
3522
+ * All components and pipes are now standalone. This module simply imports and
3523
+ * re-exports the public API so that existing NgModule consumers can continue
3524
+ * using `CommonHeaderLibModule` without changes.
3525
+ *
3526
+ * Translation initialization (app initializer, languages.json validation,
3527
+ * fallback chain, language-file loading) is OWNED BY THE CONSUMING APP.
3528
+ * TranslateModule is re-exported here so that consumers get access to the
3529
+ * translate pipe. Do NOT use forChild({ isolate: true }) — library components
3530
+ * share the host app's TranslateService singleton.
3531
+ */
3532
+ class CommonHeaderLibModule {
3533
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CommonHeaderLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3534
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: CommonHeaderLibModule, imports: [CommonHeaderLibComponent,
3535
+ SliceToTwoPipe,
3536
+ CustomDateFormatPipe,
3537
+ DateDiffPipe,
3538
+ ConfirmDialogComponent,
3539
+ ViewpasswordPopupComponent,
3540
+ TranslateModule], exports: [CommonHeaderLibComponent,
3541
+ SliceToTwoPipe,
3542
+ DateDiffPipe,
3543
+ CustomDateFormatPipe,
3544
+ ConfirmDialogComponent,
3545
+ ViewpasswordPopupComponent,
3546
+ TranslateModule] }); }
3547
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CommonHeaderLibModule, imports: [CommonHeaderLibComponent,
3548
+ ConfirmDialogComponent,
3549
+ ViewpasswordPopupComponent,
3550
+ TranslateModule, TranslateModule] }); }
3551
+ }
3552
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CommonHeaderLibModule, decorators: [{
3553
+ type: NgModule,
3554
+ args: [{
3555
+ imports: [
3556
+ CommonHeaderLibComponent,
3557
+ SliceToTwoPipe,
3558
+ CustomDateFormatPipe,
3559
+ DateDiffPipe,
3560
+ ConfirmDialogComponent,
3561
+ ViewpasswordPopupComponent,
3562
+ TranslateModule,
3563
+ ],
3564
+ exports: [
3565
+ CommonHeaderLibComponent,
3566
+ SliceToTwoPipe,
3567
+ DateDiffPipe,
3568
+ CustomDateFormatPipe,
3569
+ ConfirmDialogComponent,
3570
+ ViewpasswordPopupComponent,
3571
+ TranslateModule,
3572
+ ],
3573
+ }]
3574
+ }] });
3575
+
3576
+ const httpErrorInterceptor = (req, next) => {
3577
+ const encryptService = inject(EncrydecryRSAdataService);
3578
+ if (!isAuthorized()) {
3579
+ return throwError(() => new Error('Unauthorized - Session not found'));
3580
+ }
3581
+ const encryptedTime = generateEncryptedToken(encryptService);
3582
+ const securedReq = encryptedTime
3583
+ ? req.clone({ setHeaders: { encht: encryptedTime } })
3584
+ : req;
3585
+ return next(securedReq).pipe(catchError$1((error) => throwError(() => error)));
3586
+ };
3587
+ function isAuthorized() {
3588
+ return !!localStorage.getItem('001-SAC-GEC');
3589
+ }
3590
+ function generateEncryptedToken(encryptService) {
3591
+ GlobalConstants.ErrorCode = localStorage.getItem('001-SAC-GEC') || '';
3592
+ const timeStamp = convertLocalTimeToUTCTime(new Date(), GlobalConstants.TimeForEncToken);
3593
+ const encryptedTime = encryptService.encryptViaRSA(timeStamp.toISOString());
3594
+ GlobalConstants.token = encryptedTime;
3595
+ return encryptedTime;
3596
+ }
3597
+ function convertLocalTimeToUTCTime(localDateTime, extraSeconds) {
3598
+ const localDate = new Date(localDateTime);
3599
+ localDate.setSeconds(localDate.getSeconds() + extraSeconds);
3600
+ return new Date(Date.UTC(localDate.getUTCFullYear(), localDate.getUTCMonth(), localDate.getUTCDate(), localDate.getUTCHours(), localDate.getUTCMinutes(), localDate.getUTCSeconds()));
3601
+ }
3602
+
3603
+ /*
3604
+ * Public API Surface of common-header-lib
3605
+ */
3606
+
3607
+ /**
3608
+ * Generated bundle index. Do not edit.
3609
+ */
3610
+
3611
+ export { COOKIECONSTANT, CommonHeaderLibComponent, CommonHeaderLibModule, ConfirmDialogComponent, CustomDateFormatPipe, DateDiffPipe, GlobalConstants, SliceToTwoPipe, StorageService, ToastMsgService, ViewpasswordPopupComponent, httpErrorInterceptor };
3612
+ //# sourceMappingURL=common-header-lib.mjs.map