common-header-lib 0.0.20 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +143 -24
  2. package/assets/i18n/ar.json +4 -1
  3. package/assets/i18n/de.json +4 -1
  4. package/assets/i18n/en.json +4 -1
  5. package/assets/i18n/es.json +4 -1
  6. package/assets/i18n/fr.json +4 -1
  7. package/assets/i18n/hi.json +4 -1
  8. package/assets/i18n/ja.json +4 -1
  9. package/assets/i18n/ko.json +4 -1
  10. package/fesm2022/common-header-lib.mjs +3380 -0
  11. package/fesm2022/common-header-lib.mjs.map +1 -0
  12. package/index.d.ts +459 -5
  13. package/package.json +20 -31
  14. package/src/assets/i18n/ar.json +4 -1
  15. package/src/assets/i18n/de.json +4 -1
  16. package/src/assets/i18n/en.json +4 -1
  17. package/src/assets/i18n/es.json +4 -1
  18. package/src/assets/i18n/fr.json +4 -1
  19. package/src/assets/i18n/hi.json +4 -1
  20. package/src/assets/i18n/ja.json +4 -1
  21. package/src/assets/i18n/ko.json +4 -1
  22. package/assets/scss/_sidebar.scss +0 -267
  23. package/assets/scss/styles.scss +0 -577
  24. package/esm2020/common-header-lib.mjs +0 -5
  25. package/esm2020/lib/Validators/noSpaceAllowed.mjs +0 -16
  26. package/esm2020/lib/common-header-lib.component.mjs +0 -629
  27. package/esm2020/lib/common-header-lib.module.mjs +0 -174
  28. package/esm2020/lib/common-header-lib.service.mjs +0 -200
  29. package/esm2020/lib/components/confirm-dialog/confirm-dialog.component.mjs +0 -49
  30. package/esm2020/lib/components/general-configuration/general-configuration.component.mjs +0 -399
  31. package/esm2020/lib/components/general-configuration/landingpg-config/landingpg-config.component.mjs +0 -124
  32. package/esm2020/lib/components/general-configuration/timezone-configuration/timezone-configuration.component.mjs +0 -137
  33. package/esm2020/lib/components/grid-pagination/grid-pagination.component.mjs +0 -38
  34. package/esm2020/lib/components/ng-translation/ng-translation.component.mjs +0 -82
  35. package/esm2020/lib/components/no-service-my-access-pg/no-service-my-access-pg.component.mjs +0 -19
  36. package/esm2020/lib/components/notification-sidebar/notification-sidebar.component.mjs +0 -40
  37. package/esm2020/lib/components/side-popup/side-popup.component.mjs +0 -34
  38. package/esm2020/lib/components/user-mailbox/user-mailbox.component.mjs +0 -168
  39. package/esm2020/lib/components/user-sidebar/user-sidebar.component.mjs +0 -254
  40. package/esm2020/lib/components/viewpassword-popup/viewpassword-popup.component.mjs +0 -197
  41. package/esm2020/lib/model/data_model.mjs +0 -229
  42. package/esm2020/lib/pipes/custome-dateformat.pipe.mjs +0 -27
  43. package/esm2020/lib/pipes/date-diff.pipe.mjs +0 -55
  44. package/esm2020/lib/pipes/slice-to-two.pipe.mjs +0 -34
  45. package/esm2020/lib/services/EncrypDecryp_RSA.service.mjs +0 -100
  46. package/esm2020/lib/services/async-passwordcheck.service.mjs +0 -70
  47. package/esm2020/lib/services/cookie-storage-manager.service.mjs +0 -78
  48. package/esm2020/lib/services/encrpdata.service.mjs +0 -55
  49. package/esm2020/lib/services/encrydecrydata.service.mjs +0 -205
  50. package/esm2020/lib/services/event.service.mjs +0 -132
  51. package/esm2020/lib/services/http/http-common.service.mjs +0 -245
  52. package/esm2020/lib/services/http/http-general-config.service.mjs +0 -84
  53. package/esm2020/lib/services/rest-login-form.service.mjs +0 -294
  54. package/esm2020/lib/services/rest-signalr.service.mjs +0 -104
  55. package/esm2020/lib/services/storage.service.mjs +0 -33
  56. package/esm2020/lib/services/toast-msg.service.mjs +0 -101
  57. package/esm2020/lib/services/vapt-validation.service.mjs +0 -31
  58. package/esm2020/public-api.mjs +0 -13
  59. package/fesm2015/common-header-lib.mjs +0 -4182
  60. package/fesm2015/common-header-lib.mjs.map +0 -1
  61. package/fesm2020/common-header-lib.mjs +0 -4162
  62. package/fesm2020/common-header-lib.mjs.map +0 -1
  63. package/lib/Validators/noSpaceAllowed.d.ts +0 -2
  64. package/lib/common-header-lib.component.d.ts +0 -149
  65. package/lib/common-header-lib.module.d.ts +0 -55
  66. package/lib/common-header-lib.service.d.ts +0 -25
  67. package/lib/components/confirm-dialog/confirm-dialog.component.d.ts +0 -13
  68. package/lib/components/general-configuration/general-configuration.component.d.ts +0 -86
  69. package/lib/components/general-configuration/landingpg-config/landingpg-config.component.d.ts +0 -37
  70. package/lib/components/general-configuration/timezone-configuration/timezone-configuration.component.d.ts +0 -38
  71. package/lib/components/grid-pagination/grid-pagination.component.d.ts +0 -20
  72. package/lib/components/ng-translation/ng-translation.component.d.ts +0 -21
  73. package/lib/components/no-service-my-access-pg/no-service-my-access-pg.component.d.ts +0 -8
  74. package/lib/components/notification-sidebar/notification-sidebar.component.d.ts +0 -16
  75. package/lib/components/side-popup/side-popup.component.d.ts +0 -14
  76. package/lib/components/user-mailbox/user-mailbox.component.d.ts +0 -40
  77. package/lib/components/user-sidebar/user-sidebar.component.d.ts +0 -60
  78. package/lib/components/viewpassword-popup/viewpassword-popup.component.d.ts +0 -47
  79. package/lib/model/data_model.d.ts +0 -185
  80. package/lib/pipes/custome-dateformat.pipe.d.ts +0 -8
  81. package/lib/pipes/date-diff.pipe.d.ts +0 -9
  82. package/lib/pipes/slice-to-two.pipe.d.ts +0 -7
  83. package/lib/services/EncrypDecryp_RSA.service.d.ts +0 -15
  84. package/lib/services/async-passwordcheck.service.d.ts +0 -18
  85. package/lib/services/cookie-storage-manager.service.d.ts +0 -16
  86. package/lib/services/encrpdata.service.d.ts +0 -12
  87. package/lib/services/encrydecrydata.service.d.ts +0 -33
  88. package/lib/services/event.service.d.ts +0 -30
  89. package/lib/services/http/http-common.service.d.ts +0 -40
  90. package/lib/services/http/http-general-config.service.d.ts +0 -15
  91. package/lib/services/rest-login-form.service.d.ts +0 -39
  92. package/lib/services/rest-signalr.service.d.ts +0 -23
  93. package/lib/services/storage.service.d.ts +0 -11
  94. package/lib/services/toast-msg.service.d.ts +0 -23
  95. package/lib/services/vapt-validation.service.d.ts +0 -7
  96. package/public-api.d.ts +0 -8
  97. package/src/assets/scss/_sidebar.scss +0 -267
  98. package/src/assets/scss/styles.scss +0 -577
@@ -1,4162 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, Component, Input, Output, Pipe, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
3
- import { map, catchError, debounceTime, take, switchMap, takeUntil, finalize } from 'rxjs/operators';
4
- import * as i1 from '@angular/common/http';
5
- import { HttpParams, HttpClientModule } from '@angular/common/http';
6
- import { throwError, BehaviorSubject, Subject, map as map$1, catchError as catchError$1, of, takeUntil as takeUntil$1, finalize as finalize$1, forkJoin } from 'rxjs';
7
- import * as i9 from 'primeng/api';
8
- import { ConfirmationService } from 'primeng/api';
9
- import * as i2 from 'primeng/confirmdialog';
10
- import { ConfirmDialogModule } from 'primeng/confirmdialog';
11
- import * as i10$1 from 'primeng/overlaypanel';
12
- import { OverlayPanel, OverlayPanelModule } from 'primeng/overlaypanel';
13
- import * as signalR from '@microsoft/signalr';
14
- import * as i1$1 from 'ngx-cookie-service';
15
- import * as i4 from '@ngx-translate/core';
16
- import { TranslateModule } from '@ngx-translate/core';
17
- import * as i1$2 from 'ngx-toastr';
18
- import * as i6 from '@angular/common';
19
- import { DatePipe, CommonModule } from '@angular/common';
20
- import * as i2$1 from '@angular/forms';
21
- import { FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
22
- import * as i8 from 'primeng/dropdown';
23
- import { DropdownModule } from 'primeng/dropdown';
24
- import * as i11 from 'primeng/badge';
25
- import { BadgeModule } from 'primeng/badge';
26
- import * as i9$1 from 'primeng/skeleton';
27
- import { SkeletonModule } from 'primeng/skeleton';
28
- import * as i3 from '@angular/router';
29
- import * as i1$3 from 'primeng/dynamicdialog';
30
- import { DialogService } from 'primeng/dynamicdialog';
31
- import * as CryptoJS from 'crypto-js';
32
- import JSEncrypt from 'jsencrypt';
33
- import * as bigintCryptoUtils from 'bigint-crypto-utils';
34
- import { decode } from '@msgpack/msgpack';
35
- import * as i13 from 'primeng/inputtext';
36
- import { InputTextModule } from 'primeng/inputtext';
37
- import * as i10 from 'primeng/button';
38
- import { ButtonModule } from 'primeng/button';
39
- import * as i1$4 from 'primeng/dialog';
40
- import { DialogModule } from 'primeng/dialog';
41
- import * as i9$2 from 'primeng/table';
42
- import { TableModule } from 'primeng/table';
43
- import * as i1$5 from 'primeng/paginator';
44
- import { PaginatorModule } from 'primeng/paginator';
45
- import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
46
-
47
- class GlobalConstants {
48
- }
49
- GlobalConstants.COOKIEDELETEVENT = 'd';
50
- GlobalConstants.ALLCOOKIEDELET = '-100';
51
- GlobalConstants.TimeForEncToken = 30;
52
- GlobalConstants.AgGridPaginationSize = 50;
53
- GlobalConstants.reconcileServiceLimit = 100;
54
- GlobalConstants.applicationName = 'Converged IAM';
55
- GlobalConstants.publicKey = '';
56
- GlobalConstants.PAMPluginURL = 'http://localhost:55755/';
57
- GlobalConstants.APPName = 'workspace';
58
- GlobalConstants.PlugInDownloadURL = 'https://hfarcon.arconnet.com/helppageui/';
59
- GlobalConstants.cipluginversion = '';
60
- GlobalConstants.localInstalledCIPluginVersion = ''; // to store installed CI plugin version
61
- GlobalConstants.PCI_DSS_Standard = false;
62
- GlobalConstants.TOKENTIME = 30;
63
- GlobalConstants.LOGOUTIMER = 60;
64
- GlobalConstants.PAGEROW = 10;
65
- GlobalConstants.CONFIGCONNECTORS = false;
66
- GlobalConstants.USERLANGUAGES = [
67
- { langKey: 'en', langName: 'English' },
68
- { langKey: 'hi', langName: 'हिन्दी' },
69
- { langKey: 'mr', langName: 'मराठी' },
70
- { langKey: 'ar', langName: 'العربية' },
71
- { langKey: 'fr', langName: 'Français' },
72
- { langKey: 'es', langName: 'Español' },
73
- { langKey: 'de', langName: 'Deutsch' },
74
- { langKey: 'ja', langName: '日本語' },
75
- { langKey: 'ko', langName: '한국어' },
76
- { langKey: 'zh', langName: '中文' },
77
- { langKey: 'ru', langName: 'Русский' },
78
- { langKey: 'pt', langName: 'Português' },
79
- { langKey: 'it', langName: 'Italiano' },
80
- { langKey: 'nl', langName: 'Nederlands' },
81
- { langKey: 'tr', langName: 'Türkçe' },
82
- { langKey: 'sv', langName: 'Svenska' },
83
- { langKey: 'pl', langName: 'Polski' },
84
- { langKey: 'th', langName: 'ไทย' },
85
- { langKey: 'vi', langName: 'Tiếng Việt' },
86
- ];
87
- GlobalConstants.USERFILTEREDLANGUAGES = [];
88
- GlobalConstants.DEFAULTLANG = { langKey: 'en', langName: 'English' };
89
- GlobalConstants.DEFAULTLANGKEY = 'en';
90
- GlobalConstants.DEFAULT_IMGPATH = 'assets/images/';
91
- GlobalConstants.DEFAULT_BGIMG = `${GlobalConstants.DEFAULT_IMGPATH}login-bg/default_bg.svg`;
92
- GlobalConstants.DEFAULT_LOGO = `${GlobalConstants.DEFAULT_IMGPATH}default_logo.svg`;
93
- GlobalConstants.IMG_CODE = 'data:image/png;base64,';
94
- GlobalConstants.DYNAMIC_LOGO = '';
95
- GlobalConstants.DYNAMIC_BGIMG = '';
96
- GlobalConstants.APP_VERSION = '';
97
- class LoggedInUserInfo {
98
- static setPrivateKeyFromBigInts(arr) {
99
- this.privateKey = arr.map((b) => b.toString()).join(',');
100
- }
101
- }
102
- LoggedInUserInfo.domainName = null;
103
- LoggedInUserInfo.domainId = 0;
104
- class RoutePaths {
105
- }
106
- RoutePaths.LOGINPG_PATH = 'login';
107
- RoutePaths.WINDOW_AUTH = 'domainauth';
108
- RoutePaths.OTHER_METHODS_PATH = 'othermethods';
109
- RoutePaths.MY_ACCESS_PATH = 'my-access';
110
- RoutePaths.FORGOT_PASSWORD_PATH = 'forgotpassword';
111
- RoutePaths.AUTH_STATUS_PATH = 'auth-status';
112
- RoutePaths.LOGOUT_PATH = 'logout';
113
- RoutePaths.PAGE_NOT_FOUND_PATH = 'page-not-found';
114
- RoutePaths.INTERNAL_SERVER_ERROR_PATH = 'internal-server-error';
115
- RoutePaths.ERROR_PATH = 'error';
116
- RoutePaths.AUTH_LOADING = 'session-verify';
117
- class errorMsg {
118
- }
119
- errorMsg.NOASSET = `No assets have been assigned to the user in the selected LOB. Please select a different LOB.`;
120
- errorMsg.NORECENTASSET = `No recently accessed Asset found.`;
121
- errorMsg.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'`;
122
- errorMsg.NOMAILFOUND = `We couldn't find any mails assigned to you`;
123
- errorMsg.SERVERDOWN = `Something Went Wrong, Please Try Again later`;
124
- errorMsg.NOCIPLUGIN = `Install the CI Plugin or Contact Administrator`;
125
- errorMsg.CIPLUGINVERSIONISSUE = `Kindly Install latest version of CI Plugin`;
126
- errorMsg.ADMINMSG = `Kindly Contact Administrator`;
127
- errorMsg.PLUGINMSG = `Kindly check below link for downloadables.`;
128
- errorMsg.PAMPLUGINBTN = `Install the CI Plugin or Contact Administrator`;
129
- errorMsg.USERNOTFOUND = `Invalid User Details`;
130
- errorMsg.TIMEZONESUCCESS = `Time Zone Updated SuccessFully`;
131
- errorMsg.TIMEZONERROR = `Time Zone Updated Couldn't Update`;
132
- errorMsg.LOGOUTERROR = 'Logout Attempt Failed';
133
- errorMsg.ASSETSTATUS = 'Asset Under Maintenance';
134
- errorMsg.REFERENCEPOPUPTITLE = 'Reference Case ID for Accessing Asset';
135
- errorMsg.DICREDENTIALINFO = 'Digital Identity Credentials Updated Successfully';
136
- errorMsg.DICREDENTIALERROR = "Digital Identity Credentials Couldn't updated";
137
- errorMsg.PATHSUCCESS = 'Preference Path Updated SuccessFully';
138
- errorMsg.PATHERROR = "Preference Path Couldn't Update";
139
- errorMsg.USERCREDENIALERROR = 'Configure Credentials';
140
- errorMsg.CREDENIALERROR = 'Kindly Configure Credentials';
141
- errorMsg.ADMINCREDENIALERROR = 'The credentials have yet to be configured by the Admin';
142
- errorMsg.COMMONError = 'Something Went Wrong !';
143
- errorMsg.NODIGITALIDENTITES = 'There are no digital identities assigned. Kindly contact administrator.';
144
- errorMsg.SEARCHTEXT = 'Search Results';
145
- errorMsg.MFACONFIGUREERROR = 'MFA is not configured for the user, Please contact the system administrator';
146
- errorMsg.SESSIONIDERROR = 'Session Service ID not found';
147
- errorMsg.CHROMEEXTENSIONERROR = 'Kindly Install the CI Extension or Contact Administrator';
148
- errorMsg.WINDOW_DOMAIN_LOGINERR = 'Please wait, Domain Authentication is in progress for your login';
149
- errorMsg.LANDINGPGSUCCESS = `Landing Page Configured SuccessFully`;
150
- errorMsg.LANDINGPGERROR = `Landing Page Configuration Couldn't Update`;
151
- errorMsg.SCRIPTERROR = `Unexpected Script Detected`;
152
- class COOKIECONSTANT {
153
- }
154
- COOKIECONSTANT.LOBNAME = 'lobdata';
155
- COOKIECONSTANT.DOMAINAME = 'domainname';
156
- COOKIECONSTANT.DOMAINID = 'domainid';
157
- COOKIECONSTANT.USERDETAILS = 'UserDetail';
158
- COOKIECONSTANT.SESSIONID = 'userSessionId';
159
- COOKIECONSTANT.USERNAME = 'username';
160
- COOKIECONSTANT.USERID = 'userId';
161
- COOKIECONSTANT._AT = '_AT';
162
- COOKIECONSTANT._RT = '_RT';
163
- COOKIECONSTANT.USERDISPLAYNAME = 'userDisplayName';
164
- COOKIECONSTANT.ENCRYPTEDKEY = 'EncryptedKey';
165
- COOKIECONSTANT.MFASTATUS = 'MFAStatus';
166
- COOKIECONSTANT.EVENTNAME = 'Event';
167
- COOKIECONSTANT.MACHINEDETAILS = 'machinedetails';
168
- COOKIECONSTANT.COOKIEDELETEVENT = 'd';
169
- COOKIECONSTANT.COOKIECREATEEVENT = 'c';
170
- COOKIECONSTANT.COOKIEUPDATEEVENT = 'c';
171
- COOKIECONSTANT.ALLCOOKIEDELET = '-100';
172
- COOKIECONSTANT.NEWUSER = '003-NU-GEC';
173
- COOKIECONSTANT.UNLOCKACC = 'Unlock';
174
- COOKIECONSTANT.ERRORCODE = '001-SAC-GEC';
175
- COOKIECONSTANT.PUBLICCODE = '001-PUB-GEC';
176
- COOKIECONSTANT.USERLANG = 'lang';
177
- COOKIECONSTANT.MFATIMEOUT = 180000; //3 mins
178
- COOKIECONSTANT.MFASTATUSCHECK = '_ssmf';
179
- COOKIECONSTANT.MFASTATUSCHECKFAIL = '_ssmff';
180
- COOKIECONSTANT.MFACLI = '_SSIDMFACLI';
181
- COOKIECONSTANT.WINDOWAUTH_HEADER = 'Authentication-Window';
182
- COOKIECONSTANT.SIGNALR_INDEX = '002-SR-NO';
183
- COOKIECONSTANT.ONETIME_TOKEN = 'state';
184
- COOKIECONSTANT.THICKCLIENT_KEY = 'APP_VER';
185
- const EXCLUDED_URLS = [
186
- 'http://localhost:55755/',
187
- 'workflow/api/Workflow/Workflow/GetWorkFlowTicketCount',
188
- 'workflow/api/Workflow/Workflow/GetWorkFlowTicketCountEventWise',
189
- 'xaccess/api/SecureAccess/GetBackgroundImage',
190
- 'xaccess/api/SecureAccess/UpdateLogoutTimer',
191
- ];
192
- class MFAEvent {
193
- }
194
- MFAEvent.ForgotPwd = 1;
195
- MFAEvent.unlockAcc = 2;
196
- MFAEvent.Login = 3;
197
- class BrowserName {
198
- }
199
- BrowserName.Chrome = 'Chrome';
200
- BrowserName.Firefox = 'Firefox';
201
- BrowserName.Edge = 'Edge';
202
- BrowserName.Safari = 'Safari';
203
- BrowserName.Opera = 'Opera';
204
- BrowserName.InterNetExp = 'Internet Explorer';
205
- // GetLocalIPAddress
206
- // GetLocalMACAddress
207
- // GetProcessorID
208
- // GetBIOSSerialID
209
- // GetDomainName
210
- // GetPAMPluginInstalledVersion
211
- //GetLocalHostName
212
- class PAMParameter {
213
- constructor() {
214
- this.ipAddress = '';
215
- this.macAddress = '';
216
- this.processorID = '';
217
- this.bIOSSerialID = '';
218
- this.domainName = '';
219
- this.hostname = '';
220
- this.pAMPluginInstalledVersion = '';
221
- }
222
- }
223
- // "Status : for user status
224
- // Active = 0,
225
- // NewUserCreated = 1,
226
- // ResetbyAdmin = 2,
227
- // LockedOut = 5,
228
- // Dormant = 4,
229
- // Disabled = 3
230
- // Suspended = 6,
231
- // Sabbatical = 7 ,
232
- // ACMO CLI Priviledge not assigned=9"
233
- // export const loginStatusMsg = {
234
- // 0: {
235
- // status: 'Active',
236
- // msg: 'Successfull login',
237
- // },
238
- // 1: {
239
- // status: 'NewUserCreated',
240
- // msg: 'New Created User',
241
- // },
242
- // 2: {
243
- // status: 'ResetbyAdmin',
244
- // msg: 'Password Is Reset By Admin',
245
- // },
246
- // 3: {
247
- // status: 'Disabled',
248
- // msg: 'User is Disabled',
249
- // },
250
- // 4: {
251
- // status: 'Dormant',
252
- // msg: 'User is Dormant',
253
- // },
254
- // 5: {
255
- // status: 'LockedOut',
256
- // msg: 'User is Locked Out',
257
- // },
258
- // 6: {
259
- // status: 'Suspended',
260
- // msg: 'User is Suspended',
261
- // },
262
- // 7: {
263
- // status: 'Sabbatical',
264
- // msg: 'User is Sabbatical',
265
- // },
266
- // 9: {
267
- // status: 'ACMO CLI Priviledge not assigned',
268
- // msg: '',
269
- // },
270
- // 11: {
271
- // status: 'Invalid User',
272
- // msg: 'Invalid User Name OR Password',
273
- // },
274
- // };
275
-
276
- class CommonHeaderLibService {
277
- constructor(http) {
278
- this.http = http;
279
- this.apiUrl = '';
280
- }
281
- getGlobalTimeZone() {
282
- return this.http
283
- .get(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/GetSystemTimeZones')
284
- .pipe(map((response) => {
285
- if (response && response['success']) {
286
- return response['result'];
287
- }
288
- else {
289
- return [];
290
- }
291
- }));
292
- }
293
- getLoggedInUserDetails(url) {
294
- return this.http
295
- .post(url + 'xaccess/api/SecureAccess/GetUsersDetailsById', {})
296
- .pipe(map((response) => {
297
- // return response['result'];
298
- return response;
299
- }));
300
- }
301
- getLOBList(url) {
302
- return this.http.get(url + 'meta/api/metadata/Lobs').pipe(map((response) => {
303
- let result = [];
304
- if (response['statusCode'] === 200) {
305
- // let result = response['result'];
306
- let result = response;
307
- return result;
308
- }
309
- }));
310
- }
311
- getUserAssignedApps(url) {
312
- return this.http
313
- .post(url + 'xaccess/api/SecureAccess/GetUserPriviledgesList', {})
314
- .pipe(map((response) => {
315
- if (response && response['success']) {
316
- return response['result'].filter((x) => x.appCode != null
317
- // (x) => x.appCode !== 'APP026' && x.appCode != null
318
- );
319
- }
320
- else {
321
- return [];
322
- }
323
- }));
324
- }
325
- getUnreadUserEmailsCount(url) {
326
- return this.http.get(url + 'xservice/api/CIInfraAsset/MailBoxCount').pipe(map((response) => {
327
- if (response && response['success'] && response['result'] > 0) {
328
- return response['result'];
329
- }
330
- else {
331
- return 0;
332
- }
333
- }));
334
- }
335
- getUserAssignedMails(userDetails, url) {
336
- return this.http
337
- .post(url + 'xservice/api/CIInfraAsset/MailBox', userDetails)
338
- .pipe(map((response) => {
339
- if (response && response['success']) {
340
- return response['result'];
341
- }
342
- else {
343
- return [];
344
- }
345
- }));
346
- }
347
- getWorkFlowTicketEventwiseCount(userDetails, url) {
348
- return this.http
349
- .post(url + 'workflow/api/Workflow/Workflow/GetWorkFlowTicketCountEventWise', userDetails)
350
- .pipe(map((response) => {
351
- if (response && response[0]['Success']) {
352
- return response[0]['Data'];
353
- }
354
- else {
355
- return [];
356
- }
357
- }), catchError((e) => throwError(this.errorHandler(e))));
358
- }
359
- errorHandler(e) {
360
- throw new Error('Method not implemented.');
361
- }
362
- getUserPreferredAssetTypeDetails(url) {
363
- return this.http
364
- .get(url + 'xaccess/api/PagePreference/GetAssetTypeDetails')
365
- .pipe(map((response) => {
366
- if (response && response['success']) {
367
- return response['result'];
368
- }
369
- else {
370
- return [];
371
- }
372
- }), catchError((e) => throwError(this.errorHandler(e))));
373
- }
374
- getUserPreferredAssetName(payload, url) {
375
- return this.http
376
- .post(url + 'xaccess/api/PagePreference/GetAssetName', payload)
377
- .pipe(map((response) => {
378
- if (response && response['success']) {
379
- return response['result'];
380
- }
381
- else {
382
- return [];
383
- }
384
- }), catchError((e) => throwError(this.errorHandler(e))));
385
- }
386
- getServiceNameByAssetTypeEvent(payload, url) {
387
- return this.http
388
- .post(url + 'xaccess/api/PagePreference/GetServiceDetails', payload)
389
- .pipe(map((response) => {
390
- if (response && response['success']) {
391
- return response['result'];
392
- }
393
- else {
394
- return [];
395
- }
396
- }), catchError((e) => throwError(this.errorHandler(e))));
397
- }
398
- getPreferencePathDetails(payload, url) {
399
- return this.http
400
- .post(url + 'xaccess/api/PagePreference/CurrentPreferencepathDetails', payload)
401
- .pipe(map((response) => {
402
- if (response && response['success']) {
403
- return response['result'];
404
- }
405
- else {
406
- return {};
407
- }
408
- }), catchError((e) => throwError(this.errorHandler(e))));
409
- }
410
- updatePreferencePath(payload, url) {
411
- return this.http
412
- .post(url + 'xaccess/api/PagePreference/UpdatePreferencePath', payload)
413
- .pipe(map((response) => {
414
- if (response && response['success']) {
415
- return true;
416
- }
417
- else {
418
- return false;
419
- }
420
- }), catchError((e) => throwError(this.errorHandler(e))));
421
- }
422
- updateUserTimeZone(tz, url) {
423
- const params = new HttpParams().set('timezone', tz);
424
- return this.http
425
- .post(url + 'xaccess/api/SecureAccess/UpdateTimeZone', {}, { params: params })
426
- .pipe(map((response) => {
427
- if (response && response['success']) {
428
- return response['result'];
429
- }
430
- else {
431
- return '';
432
- }
433
- }), catchError((e) => throwError(this.errorHandler(e))));
434
- }
435
- setLandingPgPreference(moduleId, url) {
436
- return this.http
437
- .post(url + 'xaccess/api/SecureAccess/SetLandingPage', {
438
- moduleId: moduleId,
439
- })
440
- .pipe(map((response) => {
441
- if (response && response['success']) {
442
- return response['result'];
443
- }
444
- else {
445
- return '';
446
- }
447
- }), catchError((e) => throwError(this.errorHandler(e))));
448
- }
449
- getInitiateUserLogout() {
450
- return this.http.post(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/logout', {}).pipe(map((response) => {
451
- if (response && response['success']) {
452
- return response['result'];
453
- }
454
- else {
455
- return {};
456
- }
457
- }), catchError((e) => throwError(this.errorHandler(e))));
458
- }
459
- }
460
- CommonHeaderLibService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CommonHeaderLibService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
461
- CommonHeaderLibService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CommonHeaderLibService, providedIn: 'root' });
462
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CommonHeaderLibService, decorators: [{
463
- type: Injectable,
464
- args: [{
465
- providedIn: 'root',
466
- }]
467
- }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
468
-
469
- class ConfirmDialogComponent {
470
- constructor(confirmationService) {
471
- this.confirmationService = confirmationService;
472
- this.header = '';
473
- this.message = '';
474
- this.result = new EventEmitter();
475
- }
476
- openConfirmModal(event) {
477
- this.confirmationService.confirm({
478
- target: event.target,
479
- message: this.message,
480
- header: this.header,
481
- closeOnEscape: true,
482
- // icon: 'pi pi-exclamation-triangle',
483
- // ✔ PrimeNG 14 button config
484
- acceptLabel: 'Yes',
485
- rejectLabel: 'No',
486
- acceptButtonStyleClass: 'p-button-primary',
487
- rejectButtonStyleClass: 'p-button-secondary p-button-outlined',
488
- accept: () => {
489
- this.result.emit(true);
490
- },
491
- reject: () => {
492
- this.result.emit(false);
493
- },
494
- });
495
- }
496
- }
497
- ConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmDialogComponent, deps: [{ token: i9.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component });
498
- ConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmDialogComponent, selector: "confirm-dialog", inputs: { header: "header", message: "message" }, outputs: { result: "result" }, providers: [ConfirmationService], ngImport: i0, template: "<div class=\"card flex justify-center gap-2 view-pass-details confirmtion-modal\">\n <p-confirmDialog icon=\"none\" acceptIcon=\"\" rejectIcon=\"\"></p-confirmDialog>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: i2.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }] });
499
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
500
- type: Component,
501
- args: [{ selector: 'confirm-dialog', providers: [ConfirmationService], template: "<div class=\"card flex justify-center gap-2 view-pass-details confirmtion-modal\">\n <p-confirmDialog icon=\"none\" acceptIcon=\"\" rejectIcon=\"\"></p-confirmDialog>\n</div>\n" }]
502
- }], ctorParameters: function () { return [{ type: i9.ConfirmationService }]; }, propDecorators: { header: [{
503
- type: Input,
504
- args: ['header']
505
- }], message: [{
506
- type: Input,
507
- args: ['message']
508
- }], result: [{
509
- type: Output,
510
- args: ['result']
511
- }] } });
512
-
513
- class StorageService {
514
- constructor() { }
515
- saveData(key, value) {
516
- localStorage.setItem(key, value);
517
- }
518
- getData(key) {
519
- return localStorage.getItem(key);
520
- }
521
- removeData(key) {
522
- localStorage.removeItem(key);
523
- }
524
- clearData() {
525
- localStorage.clear();
526
- }
527
- checkData(key) {
528
- const data = localStorage.getItem(key);
529
- if (data) {
530
- return true;
531
- }
532
- return false;
533
- }
534
- }
535
- StorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
536
- StorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StorageService, providedIn: 'root' });
537
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StorageService, decorators: [{
538
- type: Injectable,
539
- args: [{
540
- providedIn: 'root',
541
- }]
542
- }], ctorParameters: function () { return []; } });
543
-
544
- class EncrpdataService {
545
- constructor() {
546
- // private publicKey: string =
547
- // '10234186980819816859565723471972110581900468266056266385607156653250136308259057583501560583440295112186917105135474383769292631464432088817050933329522683,65537';
548
- this.privateKey = "";
549
- }
550
- getASCIIValue(text) {
551
- let charCodeArr = [];
552
- for (let i = 0; i < text.length; i++) {
553
- let code = text.charCodeAt(i);
554
- charCodeArr.push(BigInt(code));
555
- }
556
- return charCodeArr;
557
- }
558
- getModuleValue(arr, num1, num2) {
559
- let numArr = [];
560
- for (let i = 0; i < arr.length; i++) {
561
- let code = arr[i] ** num2 % num1;
562
- numArr.push(code);
563
- }
564
- return numArr;
565
- }
566
- getEncrpytedData(text) {
567
- this.privateKey = LoggedInUserInfo.privateKey;
568
- let key = this.privateKey.split(',');
569
- const num1 = BigInt(key[0]);
570
- const num2 = BigInt(key[1]);
571
- //1. Convert string to phiN
572
- let asciiValue = this.getASCIIValue(text);
573
- //2. Get Mod of All Value
574
- let ModValue = this.getModuleValue(asciiValue, num1, num2);
575
- //3. Convert Arr to String
576
- // let encodedText = ModValue.join('-');
577
- const encodedText = ModValue.map(b => b.toString()).join('-');
578
- return encodedText;
579
- }
580
- encodeToBase64(text) {
581
- return btoa(text);
582
- }
583
- decodeToBase64(text) {
584
- return atob(text);
585
- }
586
- }
587
- EncrpdataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EncrpdataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
588
- EncrpdataService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EncrpdataService, providedIn: 'root' });
589
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EncrpdataService, decorators: [{
590
- type: Injectable,
591
- args: [{
592
- providedIn: 'root',
593
- }]
594
- }], ctorParameters: function () { return []; } });
595
-
596
- // import { CookieStorageManagerService } from '../cookie-storage-manager.service';
597
- class RestSignalRService {
598
- constructor(_localStorage, _encrpdataService) {
599
- this._localStorage = _localStorage;
600
- this._encrpdataService = _encrpdataService;
601
- this.eventMsg = new BehaviorSubject({});
602
- this.AuthToken = '';
603
- this.hubURLS = [];
604
- //Method: Established the Connection With SignalR to get RealTime Data
605
- this.establishedConnection = async () => {
606
- this.hubConnection = new signalR.HubConnectionBuilder()
607
- .withUrl(`${GlobalConstants.signalRURL}/chatHub`, {
608
- skipNegotiation: true,
609
- transport: signalR.HttpTransportType.WebSockets,
610
- headers: { Authorization: `Bearer ${this.AuthToken}` },
611
- })
612
- .build();
613
- try {
614
- await this.hubConnection.start();
615
- //* SignalR connection established successfully
616
- this.addMessageListener();
617
- }
618
- catch (error) {
619
- console.error('Error establishing SignalR connection:', error);
620
- throw error;
621
- }
622
- };
623
- }
624
- async initializeSignalRConnection() {
625
- if (!GlobalConstants.signalRURL) {
626
- throw new Error('No hub URLs provided');
627
- }
628
- this.hubURLS = GlobalConstants.signalRURL
629
- ? GlobalConstants.signalRURL.split(',')
630
- : [];
631
- if (this.hubURLS.length === 1) {
632
- GlobalConstants.signalRURL = this.hubURLS[0];
633
- await this.establishedConnection();
634
- return;
635
- }
636
- let lastUsedIndex = this.getLastUsedIndex();
637
- for (let i = 0; i < this.hubURLS.length; i++) {
638
- const index = (lastUsedIndex + i) % this.hubURLS.length;
639
- GlobalConstants.signalRURL = this.hubURLS[index];
640
- try {
641
- await this.establishedConnection();
642
- this.setLastUsedIndex(index + 1); // Update for next round
643
- break; // Exit the loop if connection is successful
644
- }
645
- catch (error) {
646
- console.error(`Error connecting to hub ${this.hubURLS[index]}:`, error);
647
- }
648
- }
649
- if (!this.hubConnection) {
650
- throw new Error('All SignalR connections failed');
651
- }
652
- }
653
- addMessageListener() {
654
- this.hubConnection.on('ReceiveMessage', (user, data) => {
655
- data = JSON.parse(data);
656
- this.emitEventMsg(data);
657
- });
658
- }
659
- emitEventMsg(data) {
660
- this.eventMsg.next(data);
661
- }
662
- listenerEventMsg() {
663
- return this.eventMsg.asObservable();
664
- }
665
- getLastUsedIndexv1() {
666
- const lastIndex = this._localStorage.getData(COOKIECONSTANT.SIGNALR_INDEX);
667
- return lastIndex
668
- ? Number(this._encrpdataService.decodeToBase64(lastIndex)) || 0
669
- : 0;
670
- }
671
- getLastUsedIndex() {
672
- const lastIndex = this._localStorage.getData(COOKIECONSTANT.SIGNALR_INDEX);
673
- return lastIndex
674
- ? Number(this._encrpdataService.decodeToBase64(lastIndex)) || 0
675
- : 0;
676
- }
677
- setLastUsedIndex(index) {
678
- const lastIndex = this._encrpdataService.encodeToBase64(index.toString());
679
- this._localStorage.saveData(COOKIECONSTANT.SIGNALR_INDEX, lastIndex);
680
- }
681
- }
682
- RestSignalRService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RestSignalRService, deps: [{ token: StorageService }, { token: EncrpdataService }], target: i0.ɵɵFactoryTarget.Injectable });
683
- RestSignalRService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RestSignalRService, providedIn: 'root' });
684
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RestSignalRService, decorators: [{
685
- type: Injectable,
686
- args: [{
687
- providedIn: 'root',
688
- }]
689
- }], ctorParameters: function () { return [{ type: StorageService }, { type: EncrpdataService }]; } });
690
-
691
- class EventService {
692
- constructor(_cookie) {
693
- this._cookie = _cookie;
694
- this.getUserLOB = new BehaviorSubject({});
695
- this.getAssetType = new BehaviorSubject({});
696
- this.refreshSidebar = new BehaviorSubject({});
697
- this.filterRecords = new Subject();
698
- this.AuthMethods = new BehaviorSubject([]);
699
- this.refreshEmails = new BehaviorSubject({});
700
- this.timeZone = new BehaviorSubject({});
701
- }
702
- emitLOBEvent(data) {
703
- this.getUserLOB.next(data);
704
- }
705
- listenerLOBEvent() {
706
- return this.getUserLOB.asObservable();
707
- }
708
- emitAssetTypeEvent(data) {
709
- this.getAssetType.next(data);
710
- }
711
- listenerAssetTypeEvent() {
712
- return this.getAssetType.asObservable();
713
- }
714
- emitrefreshSidebar(data) {
715
- this.refreshSidebar.next(data);
716
- }
717
- listenerrefreshSidebar() {
718
- return this.refreshSidebar.asObservable();
719
- }
720
- emitFilterRecords(data) {
721
- this.filterRecords.next(data);
722
- }
723
- listenerFilterEvent() {
724
- return this.filterRecords.asObservable();
725
- }
726
- emitAuthMethod(data) {
727
- this.AuthMethods.next(data);
728
- }
729
- listenerAuthMethod() {
730
- return this.AuthMethods.asObservable();
731
- }
732
- emitUserEmail(data) {
733
- this.refreshEmails.next(data);
734
- }
735
- listenerUserEmail() {
736
- return this.refreshEmails.asObservable();
737
- }
738
- emitTimezone(data) {
739
- this.timeZone.next(data);
740
- }
741
- listenerTimezone() {
742
- return this.timeZone.asObservable();
743
- }
744
- // checkMFAv1(mfaUrl: string) {
745
- // return new Promise((resolve, reject) => {
746
- // const params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,
747
- // width=600,height=500,left=350,top=150`;
748
- // const mfaWindow = open(mfaUrl, 'CI Authentication', params);
749
- // //setInterval to check cookie every second
750
- // const interval = setInterval(() => {
751
- // if (this._cookie.get(COOKIECONSTANT.MFASTATUSCHECK)) {
752
- // clearInterval(interval);
753
- // // clearTimeout(timeout);
754
- // mfaWindow.close();
755
- // resolve(true);
756
- // }
757
- // else if (this._cookie.get(COOKIECONSTANT.MFASTATUSCHECKFAIL)) {
758
- // clearInterval(interval);
759
- // mfaWindow.close();
760
- // reject(false);
761
- // }
762
- // }, 1000);
763
- // //when use close window manually
764
- // let flag = false;
765
- // mfaWindow.onunload = () => {
766
- // if (flag) {
767
- // clearInterval(interval);
768
- // // clearTimeout(timeout);
769
- // reject(false);
770
- // }
771
- // flag = true;
772
- // }
773
- // })
774
- // }
775
- checkMFA(mfaUrl) {
776
- return new Promise((resolve, reject) => {
777
- const params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,
778
- width=600,height=500,left=350,top=150`;
779
- const mfaWindow = window.open(mfaUrl, 'CI Authentication', params);
780
- if (!mfaWindow) {
781
- reject(new Error('Failed to open MFA window. Popup blocked?'));
782
- return;
783
- }
784
- // Polling interval to check cookie every second
785
- const interval = setInterval(() => {
786
- if (this._cookie.get(COOKIECONSTANT.MFASTATUSCHECK)) {
787
- clearInterval(interval);
788
- mfaWindow.close();
789
- resolve(true);
790
- }
791
- else if (this._cookie.get(COOKIECONSTANT.MFASTATUSCHECKFAIL)) {
792
- clearInterval(interval);
793
- mfaWindow.close();
794
- reject(false);
795
- }
796
- }, 1000);
797
- // Detect manual close of popup window
798
- const checkPopupClosed = setInterval(() => {
799
- if (mfaWindow.closed) {
800
- clearInterval(interval);
801
- clearInterval(checkPopupClosed);
802
- reject(false);
803
- }
804
- }, 500);
805
- });
806
- }
807
- }
808
- EventService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EventService, deps: [{ token: i1$1.CookieService }], target: i0.ɵɵFactoryTarget.Injectable });
809
- EventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EventService, providedIn: 'root' });
810
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EventService, decorators: [{
811
- type: Injectable,
812
- args: [{
813
- providedIn: 'root',
814
- }]
815
- }], ctorParameters: function () { return [{ type: i1$1.CookieService }]; } });
816
-
817
- class HttpCommonService {
818
- constructor(http) {
819
- this.http = http;
820
- this.xAccessAPIUrl = '/xaccess/api/SecureAccess/';
821
- this.metaAPIUrl = '/meta/api/metadata/';
822
- this.metaAPIUrl1 = '/meta/api/Metadata/';
823
- this.xServiceAPIUrl = '/xservice/api/CIInfraAsset/';
824
- this.workflowAPIUrl = '/workflow/api/Workflow/Workflow/';
825
- }
826
- getLogo() {
827
- return this.http
828
- .get(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}BackgroundLogo`)
829
- .pipe(map$1((response) => {
830
- return response['result'];
831
- }));
832
- }
833
- getGlobalTimeZone() {
834
- return this.http
835
- .get(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}GetSystemTimeZones`)
836
- .pipe(map$1((response) => {
837
- if (response && response['success']) {
838
- return response['result'];
839
- }
840
- else {
841
- return [];
842
- }
843
- }));
844
- }
845
- updateUserTimeZone(tz) {
846
- const params = new HttpParams().set('timezone', tz);
847
- return this.http
848
- .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}UpdateTimeZone`, {}, { params: params })
849
- .pipe(map$1((response) => {
850
- if (response && response['success']) {
851
- return response['result'];
852
- }
853
- else {
854
- return '';
855
- }
856
- }));
857
- }
858
- getLOBList() {
859
- return this.http
860
- .get(`${GlobalConstants.baseURL}${this.metaAPIUrl}Lobs`)
861
- .pipe(map$1((response) => {
862
- return response;
863
- }));
864
- }
865
- getUnreadUserEmailsCount() {
866
- return this.http
867
- .get(`${GlobalConstants.baseURL}${this.xServiceAPIUrl}MailBoxCount`)
868
- .pipe(map$1((response) => {
869
- if (response && response['success'] && response['result'] > 0) {
870
- return response['result'];
871
- }
872
- else {
873
- return 0;
874
- }
875
- }));
876
- }
877
- getUserAssignedMails(userDetails) {
878
- return this.http
879
- .post(`${GlobalConstants.baseURL}${this.xServiceAPIUrl}MailBox`, userDetails)
880
- .pipe(map$1((response) => {
881
- if (response && response['success']) {
882
- return response['result'];
883
- }
884
- else {
885
- return [];
886
- }
887
- }));
888
- }
889
- /*Method : GET
890
- Action : Get Application Password */
891
- getAccessToViewServicePassword(mailDetails) {
892
- return this.http
893
- .post(`${GlobalConstants.baseURL}${this.xServiceAPIUrl}OpenServicePwd`, mailDetails)
894
- .pipe(map$1((response) => {
895
- if (response && response['success']) {
896
- response['result'][1] = response['message'];
897
- return response['result'];
898
- }
899
- else {
900
- return [];
901
- }
902
- }), catchError$1((e) => throwError(this.errorHandler(e))));
903
- }
904
- getUserAssignedApps() {
905
- return this.http
906
- .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}GetUserPriviledgesList`, {})
907
- .pipe(map$1((response) => {
908
- if (response && response['success']) {
909
- return response['result'].filter((x) => x.appCode != null);
910
- }
911
- else {
912
- return [];
913
- }
914
- }));
915
- }
916
- getLoggedInUserDetails() {
917
- return this.http
918
- .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}GetUsersDetailsById`, {})
919
- .pipe(map$1((response) => {
920
- return response;
921
- }));
922
- }
923
- //Method: Used to Total Notification count of user
924
- //Action: It used get all notification count
925
- getWorkFlowTicketCount(userDetails) {
926
- return this.http
927
- .post(`${GlobalConstants.baseURL}${this.workflowAPIUrl}GetWorkFlowTicketCount`, userDetails)
928
- .pipe(map$1((response) => {
929
- if (response && response[0]['Success']) {
930
- if (response[0]['Data'][0]) {
931
- return response[0]['Data'][0];
932
- }
933
- else {
934
- return {};
935
- }
936
- }
937
- else {
938
- return {};
939
- }
940
- }), catchError$1((e) => throwError(this.errorHandler(e))));
941
- }
942
- getWorkFlowTicketEventwiseCount(userDetails) {
943
- return this.http
944
- .post(`${GlobalConstants.baseURL}${this.workflowAPIUrl}GetWorkFlowTicketCountEventWise`, userDetails)
945
- .pipe(map$1((response) => {
946
- if (response && response[0]['Success']) {
947
- return response[0]['Data'];
948
- // return [];
949
- }
950
- else {
951
- return [];
952
- }
953
- }));
954
- }
955
- setLandingPgPreference(moduleId) {
956
- return this.http
957
- .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}SetLandingPage`, {
958
- moduleId: moduleId,
959
- })
960
- .pipe(map$1((response) => {
961
- if (response && response['success']) {
962
- return response['result'];
963
- }
964
- else {
965
- return '';
966
- }
967
- }));
968
- }
969
- /*Method : POST
970
- Action :Will validate User entered PWD as
971
- per Password Policy Set
972
- */
973
- validatePassword(userDetails) {
974
- return this.http
975
- .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}ValidatePassword`, userDetails)
976
- .pipe(catchError$1((e) => throwError(this.errorHandler(e))));
977
- }
978
- /*Method : POST
979
- Action : RESET Password for First Time User
980
- */
981
- setNewpassword(loggedInUserDetails) {
982
- return this.http
983
- .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}ChangeUserArcXwdManually`, loggedInUserDetails)
984
- .pipe(catchError$1((e) => throwError(this.errorHandler(e))));
985
- }
986
- errorHandler(e) {
987
- throw new Error('Method not implemented.');
988
- }
989
- /*Method : GET
990
- Action : Get hiding the password for a service. */
991
- getProtectedServiceCredentials(mailDetails) {
992
- return this.http
993
- .post(`${GlobalConstants.baseURL}${this.xServiceAPIUrl}GetServicePasswordClose`, mailDetails)
994
- .pipe(map$1((response) => {
995
- if (response && response['success']) {
996
- return response['result'];
997
- }
998
- else {
999
- return false;
1000
- }
1001
- }), catchError$1((e) => throwError(this.errorHandler(e))));
1002
- }
1003
- /*Method : POST
1004
- Parameter : subID , id
1005
- Action : Get configuration ID based on to show hide DOMAIN dropdown
1006
- */
1007
- getglobalConfigDetails(subid, id) {
1008
- return this.http
1009
- .post(`${GlobalConstants.baseURL}${this.metaAPIUrl1}GetArcosConfigsValues?subId=${subid}`, id)
1010
- .pipe(map$1((response) => {
1011
- if (response['statusCode'] === 200) {
1012
- let result = response['result'];
1013
- return result;
1014
- }
1015
- }), catchError$1((e) => throwError(this.errorHandler(e))));
1016
- }
1017
- getInitiateUserLogout() {
1018
- return this.http
1019
- .post(`${GlobalConstants.baseURL}${this.xAccessAPIUrl}logout`, {})
1020
- .pipe(map$1((response) => {
1021
- if (response && response['success']) {
1022
- return response['result'];
1023
- }
1024
- else {
1025
- return {};
1026
- }
1027
- }), catchError$1((e) => throwError(this.errorHandler(e))));
1028
- }
1029
- //Method: Open the OAuth connection window for the given application
1030
- openAppConnection(appCode) {
1031
- const url = GlobalConstants.baseURL + '/xauth/api/Token/AppOAuth?appcode=' + appCode;
1032
- window.open(url, '_blank');
1033
- }
1034
- //Method: Validate MFA / SAML configuration before establishing the APP032 connection
1035
- checkMFAConfiguration() {
1036
- return this.http
1037
- .get(`${GlobalConstants.baseURL}/xaccess/api/Token/getMfaSamlConfig`)
1038
- .pipe(catchError$1((e) => throwError(this.errorHandler(e))));
1039
- }
1040
- //Method: Validate internal SAML app configuration before establishing the connection (e.g. APP033)
1041
- getInternalAppConfig(appCode) {
1042
- return this.http
1043
- .get(`${GlobalConstants.baseURL}/xaccess/api/Token/getInternalAppConfig?appCode=${appCode}`)
1044
- .pipe(catchError$1((e) => throwError(this.errorHandler(e))));
1045
- }
1046
- }
1047
- HttpCommonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpCommonService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1048
- HttpCommonService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpCommonService, providedIn: 'root' });
1049
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpCommonService, decorators: [{
1050
- type: Injectable,
1051
- args: [{
1052
- providedIn: 'root',
1053
- }]
1054
- }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
1055
-
1056
- class ToastMsgService {
1057
- constructor(toastr, translateService) {
1058
- this.toastr = toastr;
1059
- this.translateService = translateService;
1060
- this.toastType_sucess = 'toast-success';
1061
- this.toastType_info = 'toast-info';
1062
- this.toastType_error = 'toast-error';
1063
- this.toastType_warning = 'toast-warn';
1064
- }
1065
- success(textMessage, title) {
1066
- const heading = title || this.translateService.instant('Generic_lib.Successful');
1067
- if (this.isToastMsgActive()) {
1068
- if (this.checkActiveToastMessagesByType(this.toastType_sucess)) {
1069
- this.updateActiveToastMessage(heading, textMessage, this.toastType_sucess);
1070
- }
1071
- else {
1072
- this.toastr.success(textMessage, heading);
1073
- }
1074
- }
1075
- else {
1076
- this.toastr.success(textMessage, heading);
1077
- }
1078
- }
1079
- error(textMessage, title) {
1080
- const heading = title || this.translateService.instant('Generic_lib.Error');
1081
- if (this.isToastMsgActive()) {
1082
- if (this.checkActiveToastMessagesByType(this.toastType_error)) {
1083
- this.updateActiveToastMessage(heading, textMessage, this.toastType_error);
1084
- }
1085
- else {
1086
- this.toastr.error(textMessage, heading);
1087
- }
1088
- }
1089
- else {
1090
- this.toastr.error(textMessage, heading);
1091
- }
1092
- }
1093
- info(textMessage, title) {
1094
- const heading = title || this.translateService.instant('Generic_lib.Information');
1095
- if (this.isToastMsgActive()) {
1096
- if (this.checkActiveToastMessagesByType(this.toastType_info)) {
1097
- this.updateActiveToastMessage(heading, textMessage, this.toastType_info);
1098
- }
1099
- else {
1100
- this.toastr.info(textMessage, heading);
1101
- }
1102
- }
1103
- else {
1104
- this.toastr.info(textMessage, heading);
1105
- }
1106
- }
1107
- warning(textMessage, title) {
1108
- const heading = title || this.translateService.instant('Generic_lib.Warning');
1109
- if (this.isToastMsgActive()) {
1110
- if (this.checkActiveToastMessagesByType(this.toastType_warning)) {
1111
- this.updateActiveToastMessage(heading, textMessage, this.toastType_warning);
1112
- }
1113
- else {
1114
- this.toastr.warning(textMessage, heading);
1115
- }
1116
- }
1117
- else {
1118
- this.toastr.warning(textMessage, heading);
1119
- }
1120
- }
1121
- updateActiveToastMessage(title, textMessage, ToastType) {
1122
- const activeToasts = this.getActiveToastMessagesByType(ToastType);
1123
- if (activeToasts.length > 0) {
1124
- const toastObj = activeToasts[0];
1125
- toastObj.toastRef.componentInstance.title = title;
1126
- toastObj.toastRef.componentInstance.message = textMessage;
1127
- }
1128
- }
1129
- isToastMsgActive() {
1130
- return this.toastr.currentlyActive ? true : false;
1131
- }
1132
- getActiveToastMessagesByType(type) {
1133
- return this.toastr.toasts.filter((toastItem) => toastItem.toastRef.componentInstance.toastPackage.toastType.includes(type));
1134
- }
1135
- checkActiveToastMessagesByType(type) {
1136
- return this.toastr.toasts.some((toastItem) => toastItem.toastRef.componentInstance.toastPackage.toastType == type);
1137
- }
1138
- clear() {
1139
- this.toastr.clear();
1140
- }
1141
- }
1142
- ToastMsgService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ToastMsgService, deps: [{ token: i1$2.ToastrService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
1143
- ToastMsgService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ToastMsgService, providedIn: 'root' });
1144
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ToastMsgService, decorators: [{
1145
- type: Injectable,
1146
- args: [{
1147
- providedIn: 'root',
1148
- }]
1149
- }], ctorParameters: function () { return [{ type: i1$2.ToastrService }, { type: i4.TranslateService }]; } });
1150
-
1151
- class CookieStorageManagerService {
1152
- constructor(cookie, _http) {
1153
- this.cookie = cookie;
1154
- this._http = _http;
1155
- }
1156
- //Check if cookies is set or not
1157
- checksetCookies(cookiesParam1) {
1158
- let status = this.cookie.check(cookiesParam1);
1159
- if (status) {
1160
- return true;
1161
- }
1162
- else {
1163
- return false;
1164
- }
1165
- }
1166
- //get cookies value
1167
- getCookieValue(cookiesParam) {
1168
- let status = this.cookie.check(cookiesParam);
1169
- if (status) {
1170
- let cookieValue = this.cookie.get(cookiesParam);
1171
- return cookieValue;
1172
- }
1173
- //What if cookies not found
1174
- else {
1175
- return '';
1176
- }
1177
- }
1178
- //Set cookies value
1179
- setCookiesValue(key, value) {
1180
- this.cookie.set(key, value);
1181
- }
1182
- //Delete a specific cookie
1183
- deleteCookie(cookieKey) {
1184
- this.cookie.delete(cookieKey);
1185
- }
1186
- //Delete All cookie
1187
- clearAllCookies() {
1188
- const cookies = this.cookie.getAll();
1189
- for (const cookieName in cookies) {
1190
- if (cookies.hasOwnProperty(cookieName)) {
1191
- this.cookie.delete(cookieName);
1192
- }
1193
- }
1194
- }
1195
- //Delete All cookie
1196
- // clearCookiesByAPI(payload: any) {
1197
- // const delCookieEndpoint = `${GlobalConstants.baseURL}/xaccess/api/SecureAccess/cookiesUpdation`;
1198
- // return this._http.post(delCookieEndpoint, payload).pipe(map((response:any)=>{
1199
- // if (response && response['success']) {
1200
- // return response['result'];
1201
- // } else {
1202
- // return null;
1203
- // }
1204
- // }));
1205
- // }
1206
- //Set Long cookies
1207
- setLongCookie(name, value, maxChunkSize) {
1208
- for (let i = 0; i < Math.ceil(value.length / maxChunkSize); i++) {
1209
- const chunk = value.substring(i * maxChunkSize, (i + 1) * maxChunkSize);
1210
- this.setCookiesValue(`${name}_${i}`, chunk);
1211
- }
1212
- }
1213
- }
1214
- CookieStorageManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CookieStorageManagerService, deps: [{ token: i1$1.CookieService }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1215
- CookieStorageManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CookieStorageManagerService, providedIn: 'root' });
1216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CookieStorageManagerService, decorators: [{
1217
- type: Injectable,
1218
- args: [{
1219
- providedIn: 'root',
1220
- }]
1221
- }], ctorParameters: function () { return [{ type: i1$1.CookieService }, { type: i1.HttpClient }]; } });
1222
-
1223
- class EncrydecryRSAdataService {
1224
- generateAESKey() {
1225
- const publicKey = this.getPublicKey();
1226
- const symmetricKey = this.generateKeyAndIV();
1227
- const gkey = symmetricKey.key.toString();
1228
- const giv = symmetricKey.iv.toString();
1229
- const key = gkey + ',' + giv;
1230
- const encryptedSymmetricKey = this.encryptSymmetricKey(gkey, publicKey);
1231
- const encryptedSymmetriciv = this.encryptSymmetricKey(giv, publicKey);
1232
- return String(encryptedSymmetricKey + ',' + encryptedSymmetriciv);
1233
- }
1234
- encryptViaRSA(simpleText) {
1235
- const { symmKey, symmIV } = this.getRSAsymmetricKeyIV();
1236
- const encryptedText = this.encryptText(simpleText, symmKey, symmIV);
1237
- return encryptedText;
1238
- }
1239
- decryptViaRSA(encrpyText) {
1240
- const { symmKey, symmIV } = this.getRSAsymmetricKeyIV();
1241
- const decryptedText = this.decryptText(encrpyText, symmKey, symmIV);
1242
- return decryptedText;
1243
- }
1244
- generateKeyAndIV() {
1245
- const key = CryptoJS.lib.WordArray.random(32); // 32 bytes for AES-256
1246
- const iv = CryptoJS.lib.WordArray.random(16); // 16 bytes IV
1247
- return { key, iv };
1248
- }
1249
- encryptText(plaintext, hkey, hiv) {
1250
- //* If the data is Object then converting the object into JSON.stringify()
1251
- if (typeof plaintext === 'object' && plaintext !== null) {
1252
- plaintext = JSON.stringify(plaintext);
1253
- }
1254
- const key = CryptoJS.enc.Hex.parse(hkey);
1255
- const iv = CryptoJS.enc.Hex.parse(hiv);
1256
- const encrypted = CryptoJS.AES.encrypt(plaintext, key, {
1257
- iv: iv,
1258
- mode: CryptoJS.mode.CBC,
1259
- padding: CryptoJS.pad.Pkcs7,
1260
- });
1261
- return encrypted.toString();
1262
- }
1263
- encryptSymmetricKey(key, publicKey) {
1264
- try {
1265
- const rsa = new JSEncrypt();
1266
- rsa.setPublicKey(publicKey);
1267
- const encryptedKey = rsa.encrypt(key);
1268
- if (!encryptedKey)
1269
- throw new Error('Encryption failed. The key might be improperly formatted.');
1270
- return encryptedKey;
1271
- }
1272
- catch (error) {
1273
- console.error(`Encryption error: ${error.message}`);
1274
- return '';
1275
- }
1276
- }
1277
- decryptText(encryptedBase64, hkey, hiv) {
1278
- const key = CryptoJS.enc.Hex.parse(hkey);
1279
- const iv = CryptoJS.enc.Hex.parse(hiv);
1280
- const decrypted = CryptoJS.AES.decrypt(encryptedBase64, key, {
1281
- iv: iv,
1282
- mode: CryptoJS.mode.CBC,
1283
- padding: CryptoJS.pad.Pkcs7,
1284
- });
1285
- return decrypted.toString(CryptoJS.enc.Utf8);
1286
- }
1287
- getPublicKey() {
1288
- const publicKey = this.base64ToPem(localStorage.getItem('001-SAC-GEC') || '');
1289
- return publicKey;
1290
- }
1291
- getRSAsymmetricKeyIV() {
1292
- let symmKey = '';
1293
- let symmIV = '';
1294
- const key = localStorage.getItem('001-SAC-GEC');
1295
- if (key?.includes(',')) {
1296
- const syymArr = key.split(',');
1297
- symmKey = syymArr[0];
1298
- symmIV = syymArr[1];
1299
- }
1300
- return { symmKey, symmIV };
1301
- }
1302
- base64ToPem(base64Key) {
1303
- const pemHeader = '-----BEGIN PUBLIC KEY-----';
1304
- const pemFooter = '-----END PUBLIC KEY-----';
1305
- const chunkSize = 64; // Standard line length for PEM files
1306
- const formattedKey = base64Key.match(new RegExp(`.{1,${chunkSize}}`, 'g'))?.join('\n') || '';
1307
- return `${pemHeader}\n${formattedKey}\n${pemFooter}`;
1308
- }
1309
- }
1310
- EncrydecryRSAdataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EncrydecryRSAdataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1311
- EncrydecryRSAdataService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EncrydecryRSAdataService, providedIn: 'root' });
1312
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EncrydecryRSAdataService, decorators: [{
1313
- type: Injectable,
1314
- args: [{
1315
- providedIn: 'root',
1316
- }]
1317
- }] });
1318
-
1319
- class EncrydecrydataService {
1320
- constructor(_storageService) {
1321
- this._storageService = _storageService;
1322
- this.phiN = BigInt('1439652808780798693078119762209596147168096953796219172262910821317967061987350219660913015278464376519592636923598633193936864497263640780784805168728449');
1323
- this.m = BigInt('1439652808780798693078119762209596147168096953796219172262910821317967061987270868696269635759315523684521986922202953647194318017157636815317250179926320');
1324
- this.Genrator = 5;
1325
- this.min = 10000000;
1326
- this.max = 10000000 * 10000000;
1327
- }
1328
- generate() {
1329
- this.randomPrime = this.generateRandomPrime(this.min, this.max);
1330
- let code = bigintCryptoUtils.modPow(this.Genrator, BigInt(this.randomPrime), this.phiN);
1331
- return code;
1332
- }
1333
- process(key) {
1334
- let secretcode = bigintCryptoUtils.modPow(BigInt(key), BigInt(this.randomPrime), this.phiN);
1335
- this._storageService.saveData(COOKIECONSTANT.ERRORCODE, secretcode.toString());
1336
- }
1337
- encryptViaCrypto(normalText) {
1338
- const code = this.getSecretCode();
1339
- const encryptedMessagedata = this.encryptMessage(normalText, code);
1340
- return encryptedMessagedata;
1341
- }
1342
- decryptViaCrypto(cipherText) {
1343
- const decryptedData = this.base64ToUint8Array(cipherText);
1344
- const code = this.getSecretCode();
1345
- let decryptdata = this.decrypt(decryptedData, code);
1346
- let decryptdatastr = this.bytesToString(decryptdata);
1347
- return decryptdatastr;
1348
- }
1349
- decryptResponseViaCrypto(cipherText) {
1350
- const code = String(this.getPublicKey());
1351
- const decryptdata = this.decrypt123(cipherText, code);
1352
- return decryptdata;
1353
- }
1354
- //todo amit
1355
- // private decrypt123(messageme: string, key: string): string {
1356
- // let bigKey: bigint = BigInt(key);
1357
- // let bytes: string = atob(messageme);
1358
- // let decryptedBytes: number[] = [];
1359
- // for (let i = 0; i < bytes.length; i++) {
1360
- // let byteValue: bigint = BigInt(bytes.charCodeAt(i));
1361
- // byteValue = (byteValue - bigKey) % 256n;
1362
- // if (byteValue < 0n) {
1363
- // byteValue = 256n + byteValue;
1364
- // }
1365
- // decryptedBytes.push(Number(byteValue));
1366
- // }
1367
- // let decryptedMessage: string = String.fromCharCode.apply(
1368
- // null,
1369
- // decryptedBytes
1370
- // );
1371
- // return decryptedMessage;
1372
- // }
1373
- //new amit
1374
- decrypt123(messageme, key) {
1375
- const bigKey = BigInt(key);
1376
- const bytes = atob(messageme);
1377
- const decryptedBytes = [];
1378
- for (let i = 0; i < bytes.length; i++) {
1379
- let byteValue = BigInt(bytes.charCodeAt(i));
1380
- byteValue = (byteValue - bigKey) % BigInt(256);
1381
- if (byteValue < BigInt(0)) {
1382
- byteValue = BigInt(256) + byteValue;
1383
- }
1384
- decryptedBytes.push(Number(byteValue));
1385
- }
1386
- return String.fromCharCode(...decryptedBytes);
1387
- }
1388
- encryptMessage(message, sharedSecret) {
1389
- const messageBytes = new TextEncoder().encode(message);
1390
- const encryptedMessage = this.encrypt(messageBytes, sharedSecret);
1391
- return this.encryptMessageToBase64(encryptedMessage);
1392
- //return encryptedMessage;
1393
- }
1394
- base64ToUint8Array(base64String) {
1395
- const decodedString = atob(base64String);
1396
- const uint8Array = new Uint8Array(decodedString.length);
1397
- for (let i = 0; i < decodedString.length; i++) {
1398
- uint8Array[i] = decodedString.charCodeAt(i);
1399
- }
1400
- return uint8Array;
1401
- }
1402
- bytesToString(bytes) {
1403
- let str = '';
1404
- for (let i = 0; i < bytes.length; i++) {
1405
- str += String.fromCharCode(bytes[i]);
1406
- }
1407
- return str;
1408
- }
1409
- encryptMessageToBase64(encryptedMessage) {
1410
- const encryptedArray = Array.from(encryptedMessage);
1411
- const messageString = String.fromCharCode.apply(null, encryptedArray);
1412
- const base64String = btoa(messageString);
1413
- return base64String;
1414
- }
1415
- bigintToBytes(key) {
1416
- const hexString = key.toString(16);
1417
- const byteLength = Math.ceil(hexString.length / 2);
1418
- const bytes = new Uint8Array(byteLength);
1419
- let i = hexString.length;
1420
- let j = 0;
1421
- while (i > 0) {
1422
- bytes[j++] = parseInt(hexString.substring(Math.max(i - 2, 0), i), 16);
1423
- i -= 2;
1424
- }
1425
- return bytes;
1426
- }
1427
- encrypt(data, key) {
1428
- const keyBytes = this.bigintToBytes(key);
1429
- const encryptedData = new Uint8Array(data.length);
1430
- for (let i = 0; i < data.length; i++) {
1431
- encryptedData[i] = data[i] ^ keyBytes[i % keyBytes.length];
1432
- }
1433
- return encryptedData;
1434
- }
1435
- decrypt(data, key) {
1436
- return this.encrypt(data, key);
1437
- }
1438
- generateRandomPrime(min, max) {
1439
- const isPrime = (num) => {
1440
- if (num <= 1)
1441
- return false;
1442
- if (num <= 3)
1443
- return true;
1444
- if (num % 2 === 0 || num % 3 === 0)
1445
- return false;
1446
- let i = 5;
1447
- while (i * i <= num) {
1448
- if (num % i === 0 || num % (i + 2) === 0)
1449
- return false;
1450
- i += 6;
1451
- }
1452
- return true;
1453
- };
1454
- let prime;
1455
- do {
1456
- prime = Math.floor(Math.random() * (max - min + 1)) + min;
1457
- } while (!isPrime(prime));
1458
- return prime;
1459
- }
1460
- getSecretCode() {
1461
- //todo Amit -
1462
- // const key = this._storageService.getData(COOKIECONSTANT.ERRORCODE);
1463
- const key = this._storageService.getData(COOKIECONSTANT.ERRORCODE) ?? '0000';
1464
- return this.convertToBigInt(key);
1465
- }
1466
- convertToBigInt(value) {
1467
- try {
1468
- return BigInt(value);
1469
- }
1470
- catch {
1471
- return BigInt('0000');
1472
- }
1473
- }
1474
- getPublicKey() {
1475
- const publicKey = LoggedInUserInfo.privateKey;
1476
- // Check if publicKey is undefined, null, or empty
1477
- if (!publicKey) {
1478
- console.error('Public key is missing.');
1479
- return this.convertToBigInt('0');
1480
- }
1481
- const KeyArr = publicKey.split(',');
1482
- if (KeyArr.length === 0 || !KeyArr[0]) {
1483
- return this.convertToBigInt('0');
1484
- }
1485
- const keySegment = KeyArr[0];
1486
- // const keySegment = KeyArr[0].slice(0, 10);
1487
- // const keySegment = this.getSlicePublicKey(KeyArr[0]);
1488
- if (!keySegment) {
1489
- return this.convertToBigInt('0');
1490
- }
1491
- try {
1492
- return this.convertToBigInt(keySegment);
1493
- }
1494
- catch (error) {
1495
- return this.convertToBigInt('0');
1496
- }
1497
- }
1498
- getSlicePublicKey(key) {
1499
- const subString = key.length >= 20 ? key.substring(0, 20) : key;
1500
- const uniqueKey = this.getUniqueLetter(subString);
1501
- return uniqueKey;
1502
- }
1503
- getUniqueLetter(text) {
1504
- const textSet = new Set(text);
1505
- const uniqueString = [...textSet].join('');
1506
- return uniqueString;
1507
- }
1508
- }
1509
- EncrydecrydataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EncrydecrydataService, deps: [{ token: StorageService }], target: i0.ɵɵFactoryTarget.Injectable });
1510
- EncrydecrydataService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EncrydecrydataService, providedIn: 'root' });
1511
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EncrydecrydataService, decorators: [{
1512
- type: Injectable,
1513
- args: [{
1514
- providedIn: 'root',
1515
- }]
1516
- }], ctorParameters: function () { return [{ type: StorageService }]; } });
1517
-
1518
- class RESTLoginFormService {
1519
- constructor(_http, cookieService, _encryptDec) {
1520
- this._http = _http;
1521
- this.cookieService = cookieService;
1522
- this._encryptDec = _encryptDec;
1523
- }
1524
- /*Method : GET
1525
- Action : Fetch Domain List */
1526
- fetchDomainList() {
1527
- return this._http
1528
- .get(GlobalConstants.baseURL + 'meta/api/Metadata/Domains')
1529
- .pipe(map((response) => {
1530
- let result = [];
1531
- if (response['statusCode'] === 200) {
1532
- if (response['result'].length > 0) {
1533
- let result = response['result'];
1534
- return result;
1535
- }
1536
- else {
1537
- return [];
1538
- }
1539
- }
1540
- }), catchError((e) => throwError(this.errorHandler(e))));
1541
- }
1542
- errorHandler(e) {
1543
- throw new Error('Method not implemented.');
1544
- }
1545
- /*Method : POST
1546
- Parameter : subID , id
1547
- Action : Get configuration ID based on to show hide DOMAIN dropdown
1548
- */
1549
- getglobalConfigDetails(subid, id) {
1550
- return this._http
1551
- .post(GlobalConstants.baseURL +
1552
- 'meta/api/Metadata/GetArcosConfigsValues?subId=' +
1553
- subid, id)
1554
- .pipe(map((response) => {
1555
- let result = [];
1556
- if (response['statusCode'] === 200) {
1557
- let result = response['result'];
1558
- return result;
1559
- }
1560
- }), catchError((e) => throwError(this.errorHandler(e))));
1561
- }
1562
- /*Method : POST
1563
- Action : get login to user
1564
- */
1565
- // userAuthentication(userDetails: any) {
1566
- // return this._http
1567
- // .post(
1568
- // GlobalConstants.baseURL + 'xaccess/api/SecureAccess/Authenticate',
1569
- // userDetails
1570
- // )
1571
- // .pipe(
1572
- // map((response: any) => {
1573
- // if (response && response['data']) {
1574
- // return this.getDecryptAPIResponse(response['data']);
1575
- // }
1576
- // }),
1577
- // catchError((e) => throwError(this.errorHandler(e)))
1578
- // );
1579
- // }
1580
- /*Method : POST
1581
- Action : RESET Password for First Time User
1582
- */
1583
- setNewpassword(loggedInUserDetails) {
1584
- return this._http
1585
- .post(GlobalConstants.baseURL +
1586
- 'xaccess/api/SecureAccess/ChangeUserArcXwdManually', loggedInUserDetails)
1587
- .pipe(catchError((e) => throwError(this.errorHandler(e))));
1588
- }
1589
- /*Method : POST
1590
- Action :Will validate User entered PWD as
1591
- per Password Policy Set
1592
- */
1593
- validatePassword(userDetails) {
1594
- return this._http
1595
- .post(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/ValidatePassword', userDetails)
1596
- .pipe(catchError((e) => throwError(this.errorHandler(e))));
1597
- }
1598
- /*Method : POST
1599
- Action : Get Public Key for encryption of Data */
1600
- getPrivateKey(params) {
1601
- return this._http
1602
- .post(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/XKEDSync', params)
1603
- .pipe(catchError((e) => throwError(this.errorHandler(e))));
1604
- }
1605
- /* Method : POST
1606
- Action : Send request for OTP of MFA Authenticator */
1607
- sendMFAOTPRequest(mfaDetails) {
1608
- return this._http
1609
- .post(GlobalConstants.baseURL + 'xmfa/api/Mfa/mfa', mfaDetails)
1610
- .pipe(map((response) => {
1611
- let result = [];
1612
- if (response['success']) {
1613
- let result = response['result'];
1614
- return result;
1615
- }
1616
- }), catchError((e) => throwError(this.errorHandler(e))));
1617
- }
1618
- /* Method : POST
1619
- Action : Submit User Enter OTP of MFA Authenticator */
1620
- submitOtpForMfaVerification(mfaDetails) {
1621
- return this._http
1622
- .post(GlobalConstants.baseURL + 'xmfa/api/Mfa/mfavalidation', mfaDetails)
1623
- .pipe(map((response) => {
1624
- let result = [];
1625
- if (response['success']) {
1626
- let result = response['result'];
1627
- return result;
1628
- }
1629
- }), catchError((e) => throwError(this.errorHandler(e))));
1630
- }
1631
- /*Method : POST
1632
- Action : It will provide Token which used for multiple Application access */
1633
- getAuthToken(userDetails) {
1634
- return this._http
1635
- .post(GlobalConstants.baseURL + 'xauth/api/Token/GenerateJwtTokenApplication', userDetails)
1636
- .pipe(map((response) => {
1637
- if (response) {
1638
- return response;
1639
- }
1640
- else {
1641
- return '';
1642
- }
1643
- }), catchError((e) => throwError(this.errorHandler(e))));
1644
- }
1645
- /* Method : GET
1646
- Action : It will provide Token which used to established MFA Method */
1647
- // getMFAAccessTokenKey() {
1648
- // return this._http
1649
- // .get<any>(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/GetMfaDetails')
1650
- // .pipe(
1651
- // map((response) => {
1652
- // if (response && response['data']) {
1653
- // return this.getDecryptAPIResponse(response['data']);
1654
- // }
1655
- // return {};
1656
- // }),
1657
- // catchError((e) => throwError(this.errorHandler(e)))
1658
- // );
1659
- // }
1660
- /* Method : POST
1661
- Action : It will check Valida User or not */
1662
- // checkUserExists(userDetails: any) {
1663
- // return this._http
1664
- // .post(
1665
- // GlobalConstants.baseURL + 'xaccess/api/SecureAccess/ValidateUser',
1666
- // userDetails
1667
- // )
1668
- // .pipe(
1669
- // map((response: any) => {
1670
- // if (response && response['data']) {
1671
- // return this.getDecryptAPIResponse(response['data']);
1672
- // }
1673
- // return {};
1674
- // }),
1675
- // catchError((e) => throwError(this.errorHandler(e)))
1676
- // );
1677
- // }
1678
- /* Method : POST
1679
- Action : Unlock User to enable login process */
1680
- unlockUserAccount(userDetails) {
1681
- return this._http
1682
- .post(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/ValidateUser', userDetails)
1683
- .pipe(map((result) => {
1684
- return result;
1685
- }), catchError((e) => throwError(this.errorHandler(e))));
1686
- }
1687
- /* Method : GET
1688
- Action : It will provide Third Parth AUth Method etc. Google, Okta, Microsoft */
1689
- // getThirdPartySignInMethods() {
1690
- // return this._http
1691
- // .get(
1692
- // GlobalConstants.baseURL + 'xaccess/api/SecureAccess/GetThirdPartyDetail'
1693
- // )
1694
- // .pipe(
1695
- // map((response: any) => {
1696
- // let result: any = [];
1697
- // if (response['success']) {
1698
- // return response['result'];
1699
- // }
1700
- // return result;
1701
- // }),
1702
- // catchError((error: any) => throwError(this.errorHandler(error)))
1703
- // );
1704
- // }
1705
- /* Method : POST
1706
- Action : It will Verify plugin version is correct or not */
1707
- // public verifyUserInstalledPluginVersion(pluginInfo: any) {
1708
- // return this._http
1709
- // .post(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/CheckAutoUpdatePAMPlugin',
1710
- // pluginInfo).pipe(
1711
- // map((response: any) => {
1712
- // return response['result'];
1713
- // }),
1714
- // catchError((error: any) => throwError(this.errorHandler(error)))
1715
- // );
1716
- // }
1717
- /**
1718
- * Verifies user authentication using Windows credentials.
1719
- */
1720
- // public checkAuthenticateWithWindowsCredentials(pluginInfo: any) {
1721
- // return this._http
1722
- // .post(GlobalConstants.baseURL + 'xdomainauth/api/DomainAuthentication/DomainAuth',
1723
- // // .post(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/DomainAuth',
1724
- // pluginInfo).pipe(
1725
- // map((response: any) => {
1726
- // if (response && response['data']) {
1727
- // return this.getDecryptAPIResponse(response['data']);
1728
- // }
1729
- // return {};
1730
- // }),
1731
- // catchError((error: any) => throwError(this.errorHandler(error)))
1732
- // );
1733
- // }
1734
- /*Method : GET
1735
- Action : Get User Background Image and Logo */
1736
- getUserBackgroundImageAndLogo() {
1737
- return this._http
1738
- .get(GlobalConstants.baseURL + 'xaccess/api/SecureAccess/GetBackgroundImage')
1739
- .pipe(map((response) => {
1740
- return response;
1741
- }), catchError((error) => throwError(this.errorHandler(error))));
1742
- }
1743
- // public getVerifiedUserSessionDetails(authToken: string) {
1744
- // return this._http.post(
1745
- // GlobalConstants.baseURL + 'xaccess/api/SecureAccess/ValidateUserSessionDetail', { state: authToken }).pipe(
1746
- // map((response: any) => {
1747
- // if (response && response['data']) {
1748
- // return this.getDecryptAPIResponse(response['data']);
1749
- // }
1750
- // return {};
1751
- // }),
1752
- // catchError((error: any) => throwError(this.errorHandler(error)))
1753
- // );
1754
- // }
1755
- deleteCookieData(payload) {
1756
- const url = this.cookieService.getCookieValue('baseurl');
1757
- const delCookieEndpoint = `${url}xaccess/api/SecureAccess/cookiesUpdation`;
1758
- return this._http.post(delCookieEndpoint, payload);
1759
- }
1760
- /**
1761
- * Decrypts a base64-encoded, MessagePack-encoded ciphertext into its original tuple form.
1762
- *
1763
- * @param cipherText - The encrypted string received from the API.
1764
- * @returns The decoded tuple [key, value] if decryption is successful; otherwise, an empty object.
1765
- *
1766
- * Steps:
1767
- * 1. Decrypts the cipherText using custom crypto method.
1768
- * 2. Decodes the base64 response into a binary Uint8Array.
1769
- * 3. Deserializes the binary using MessagePack's decode to get the original data.
1770
- */
1771
- // private getDecryptAPIResponse_old(cipherText: string): any {
1772
- // if (cipherText) {
1773
- // const responseString =
1774
- // this._encryptDec.decryptResponseViaCrypto(cipherText);
1775
- // const binary = Uint8Array.from(atob(responseString), c => c.charCodeAt(0));
1776
- // const decodedArray = decode(binary) as [string, string];
1777
- // return decodedArray
1778
- // }
1779
- // return {};
1780
- // }
1781
- async getDecryptAPIResponse(cipherText) {
1782
- if (cipherText) {
1783
- const responseString = await this._encryptDec.decryptResponseViaCrypto(cipherText); // await here
1784
- const binary = Uint8Array.from(atob(responseString), (c) => c.charCodeAt(0));
1785
- const decodedArray = decode(binary);
1786
- return decodedArray;
1787
- }
1788
- return {};
1789
- }
1790
- }
1791
- RESTLoginFormService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RESTLoginFormService, deps: [{ token: i1.HttpClient }, { token: CookieStorageManagerService }, { token: EncrydecrydataService }], target: i0.ɵɵFactoryTarget.Injectable });
1792
- RESTLoginFormService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RESTLoginFormService, providedIn: 'root' });
1793
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RESTLoginFormService, decorators: [{
1794
- type: Injectable,
1795
- args: [{
1796
- providedIn: 'root',
1797
- }]
1798
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: CookieStorageManagerService }, { type: EncrydecrydataService }]; } });
1799
-
1800
- class ASYNCPasswordcheckService {
1801
- constructor(httpCommonService, encryptService) {
1802
- this.httpCommonService = httpCommonService;
1803
- this.encryptService = encryptService;
1804
- this.pwdErrorMsg = '';
1805
- this.pwdValidation = new Subject();
1806
- }
1807
- createValidator() {
1808
- return (control) => {
1809
- //For AES Encrp/Dec
1810
- const userPassword = this.encryptService.encryptViaRSA(control.value);
1811
- let useDetails = {
1812
- userARCXWD: userPassword,
1813
- // userId: LoggedInUserInfo.userId,
1814
- // userName: LoggedInUserInfo.userName,
1815
- };
1816
- return control.valueChanges.pipe(debounceTime(500), take(1), switchMap((_) => this.httpCommonService.validatePassword(useDetails).pipe(map((data) => {
1817
- if (data['success']) {
1818
- this.pwdErrorMsg = data['message'];
1819
- this.emitValidationMsg(this.pwdErrorMsg);
1820
- return null;
1821
- }
1822
- else {
1823
- this.pwdErrorMsg = data['errorMessage'];
1824
- this.emitValidationMsg(this.pwdErrorMsg);
1825
- return { pwdInvalid: true };
1826
- }
1827
- }), catchError(() => of({ pwdInvalid: true })))));
1828
- };
1829
- }
1830
- emitValidationMsg(msg) {
1831
- this.pwdValidation.next(msg);
1832
- }
1833
- listValidationMsg() {
1834
- return this.pwdValidation.asObservable();
1835
- }
1836
- }
1837
- ASYNCPasswordcheckService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ASYNCPasswordcheckService, deps: [{ token: HttpCommonService }, { token: EncrydecryRSAdataService }], target: i0.ɵɵFactoryTarget.Injectable });
1838
- ASYNCPasswordcheckService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ASYNCPasswordcheckService, providedIn: 'root' });
1839
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ASYNCPasswordcheckService, decorators: [{
1840
- type: Injectable,
1841
- args: [{
1842
- providedIn: 'root',
1843
- }]
1844
- }], ctorParameters: function () { return [{ type: HttpCommonService }, { type: EncrydecryRSAdataService }]; } });
1845
- function ConfirmedValidator(controlName, matchingControlName) {
1846
- return (formGroup) => {
1847
- const control = formGroup.controls[controlName];
1848
- const matchingControl = formGroup.controls[matchingControlName];
1849
- if (matchingControl.errors &&
1850
- !matchingControl.errors['confirmedValidator']) {
1851
- return;
1852
- }
1853
- if (control.value !== matchingControl.value) {
1854
- matchingControl.setErrors({ confirmedValidator: true });
1855
- }
1856
- else {
1857
- matchingControl.setErrors(null);
1858
- }
1859
- };
1860
- }
1861
-
1862
- class VaptValidationService {
1863
- constructor() { }
1864
- hasUnsafeInput(formData) {
1865
- const dangerousPattern = /<\s*(script|iframe|object|embed|link|style)\b[^>]*>(.*?)<\s*\/\s*\1\s*>|<\s*(script|iframe|object|embed|link|style)\b[^>]*\/?>|<[^>]+>/gi;
1866
- function checkValue(value) {
1867
- if (typeof value === 'string') {
1868
- return dangerousPattern.test(value);
1869
- }
1870
- if (Array.isArray(value)) {
1871
- return value.some(checkValue);
1872
- }
1873
- if (typeof value === 'object' && value !== null) {
1874
- return Object.values(value).some(checkValue);
1875
- }
1876
- // If it's a number, boolean, null, or undefined, ignore
1877
- return false;
1878
- }
1879
- return checkValue(formData);
1880
- }
1881
- }
1882
- VaptValidationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: VaptValidationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1883
- VaptValidationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: VaptValidationService, providedIn: 'root' });
1884
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: VaptValidationService, decorators: [{
1885
- type: Injectable,
1886
- args: [{
1887
- providedIn: 'root'
1888
- }]
1889
- }], ctorParameters: function () { return []; } });
1890
-
1891
- function noSpaceAllowed() {
1892
- return (control) => {
1893
- const value = control.value;
1894
- if (!value) {
1895
- return null; // No value is not an error here
1896
- }
1897
- // Check if the value starts with a space or contains any space
1898
- const hasLeadingSpace = value.startsWith(' ');
1899
- // const hasAnySpace = value.includes(' ');
1900
- if (hasLeadingSpace) {
1901
- return { noSpace: true };
1902
- }
1903
- return null;
1904
- };
1905
- }
1906
-
1907
- class HttpGeneralConfigurationService {
1908
- constructor(http) {
1909
- this.http = http;
1910
- this.xPageRefAPIUrl = '/xaccess/api/PagePreference/';
1911
- }
1912
- getUserPreferredAssetTypeDetails() {
1913
- return this.http
1914
- .get(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}GetAssetTypeDetails`)
1915
- .pipe(map$1((response) => {
1916
- if (response && response['success']) {
1917
- return response['result'];
1918
- }
1919
- else {
1920
- return [];
1921
- }
1922
- }), catchError$1((e) => throwError(this.errorHandler(e))));
1923
- }
1924
- getUserPreferredAssetName(payload) {
1925
- return this.http
1926
- .post(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}GetAssetName`, payload)
1927
- .pipe(map$1((response) => {
1928
- if (response && response['success']) {
1929
- return response['result'];
1930
- }
1931
- else {
1932
- return [];
1933
- }
1934
- }), catchError$1((e) => throwError(this.errorHandler(e))));
1935
- }
1936
- getServiceNameByAssetTypeEvent(payload) {
1937
- return this.http
1938
- .post(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}GetServiceDetails`, payload)
1939
- .pipe(map$1((response) => {
1940
- if (response && response['success']) {
1941
- return response['result'];
1942
- }
1943
- else {
1944
- return [];
1945
- }
1946
- }), catchError$1((e) => throwError(this.errorHandler(e))));
1947
- }
1948
- getPreferencePathDetails(payload) {
1949
- return this.http
1950
- .post(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}CurrentPreferencepathDetails`, payload)
1951
- .pipe(map$1((response) => {
1952
- if (response && response['success']) {
1953
- return response['result'];
1954
- }
1955
- else {
1956
- return {};
1957
- }
1958
- }), catchError$1((e) => throwError(this.errorHandler(e))));
1959
- }
1960
- updatePreferencePath(payload) {
1961
- return this.http
1962
- .post(`${GlobalConstants.baseURL}${this.xPageRefAPIUrl}UpdatePreferencePath`, payload)
1963
- .pipe(map$1((response) => {
1964
- if (response && response['success']) {
1965
- return true;
1966
- }
1967
- else {
1968
- return false;
1969
- }
1970
- }), catchError$1((e) => throwError(this.errorHandler(e))));
1971
- }
1972
- errorHandler(e) {
1973
- throw new Error('Method not implemented.');
1974
- }
1975
- }
1976
- HttpGeneralConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpGeneralConfigurationService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1977
- HttpGeneralConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpGeneralConfigurationService, providedIn: 'root' });
1978
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpGeneralConfigurationService, decorators: [{
1979
- type: Injectable,
1980
- args: [{
1981
- providedIn: 'root',
1982
- }]
1983
- }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
1984
-
1985
- class TimezoneConfigurationComponent {
1986
- constructor(fb, msgService, _storageService, _eventService, translateService, httpCommonService) {
1987
- this.fb = fb;
1988
- this.msgService = msgService;
1989
- this._storageService = _storageService;
1990
- this._eventService = _eventService;
1991
- this.translateService = translateService;
1992
- this.httpCommonService = httpCommonService;
1993
- this.timeZoneForm = new FormGroup({}); //user Reset Password Form
1994
- this.ListOfTimeZones = [];
1995
- this.isTimezoneLoading = false;
1996
- this.isTimezoneupdate = false;
1997
- this.unsubscribeAPIEventListenerData = new Subject();
1998
- this.tzSuccessMsg = errorMsg.TIMEZONESUCCESS;
1999
- this.tzErrorMsg = errorMsg.TIMEZONERROR;
2000
- this.apiUrl = '';
2001
- this.closepopup = new EventEmitter();
2002
- }
2003
- ngAfterViewInit() {
2004
- this.getTranslateContent();
2005
- }
2006
- ngOnInit() {
2007
- this.getListofTimeZones();
2008
- this.getInitalizeForm();
2009
- }
2010
- getInitalizeForm() {
2011
- this.timeZoneForm = this.fb.group({
2012
- timezone: [null, Validators.required], // Add Validators.required
2013
- });
2014
- }
2015
- //Method: Convert text one Lang. to another
2016
- getTranslateContent() {
2017
- this.translateService
2018
- .get(['Generic_lib.TimeZoneSuccessMsg', 'Generic_lib.TimeZoneErrorMsg'])
2019
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData))
2020
- .subscribe((trans) => {
2021
- this.tzSuccessMsg = trans['Generic_lib.TimeZoneSuccessMsg'];
2022
- this.tzErrorMsg = trans['Generic_lib.TimeZoneErrorMsg'];
2023
- });
2024
- }
2025
- /*Method : GET
2026
- Action : Get List of Time Zone*/
2027
- getListofTimeZones() {
2028
- this.isTimezoneLoading = true;
2029
- this.httpCommonService
2030
- .getGlobalTimeZone()
2031
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData), finalize(() => {
2032
- this.isTimezoneLoading = false;
2033
- }))
2034
- .subscribe((result) => {
2035
- if (result && result['timelist']) {
2036
- this.ListOfTimeZones = result['timelist'];
2037
- }
2038
- if (result && result['userTimeZone']) {
2039
- let userTz = result['userTimeZone'];
2040
- const selectedTZ = this.ListOfTimeZones.find((tz) => tz.id === userTz);
2041
- this.setTimezoneOptionValue(selectedTZ);
2042
- }
2043
- });
2044
- }
2045
- /*Method : POST
2046
- Action : Used to Update User Selected TimeZone*/
2047
- setUserTimeZone() {
2048
- const tz = this.timeZoneForm.get('timezone')?.value;
2049
- let tzName = tz['id'];
2050
- this.showBtnLoadder(true);
2051
- this.httpCommonService
2052
- .updateUserTimeZone(tzName)
2053
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData), finalize(() => {
2054
- this.showBtnLoadder(false);
2055
- }))
2056
- .subscribe((result) => {
2057
- if (result) {
2058
- setTimeout(() => {
2059
- this.setTimezoneOptionValue(tz);
2060
- }, 10);
2061
- this.msgService.success(this.tzSuccessMsg);
2062
- this._storageService.removeData(COOKIECONSTANT.NEWUSER);
2063
- this._eventService.emitTimezone({
2064
- component: 'timezone',
2065
- usertimezoneAbbreviations: result,
2066
- userTimeZoneFullForm: '',
2067
- id: tz['id'],
2068
- timelist: this.ListOfTimeZones,
2069
- });
2070
- this.closepopup.emit(true);
2071
- this.timeZoneForm.reset();
2072
- }
2073
- else {
2074
- this.msgService.error(this.tzErrorMsg);
2075
- }
2076
- });
2077
- }
2078
- setTimezoneOptionValue(selectedTZ) {
2079
- if (selectedTZ) {
2080
- this.selectedTimeZone = selectedTZ;
2081
- this.timeZoneForm.get('timezone')?.setValue(this.selectedTimeZone);
2082
- }
2083
- }
2084
- showBtnLoadder(flag) {
2085
- this.isTimezoneupdate = flag;
2086
- }
2087
- ngOnDestroy() {
2088
- this.unsubscribeAPIEventListenerData.next(true);
2089
- this.unsubscribeAPIEventListenerData.complete();
2090
- }
2091
- }
2092
- TimezoneConfigurationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TimezoneConfigurationComponent, deps: [{ token: i2$1.FormBuilder }, { token: ToastMsgService }, { token: StorageService }, { token: EventService }, { token: i4.TranslateService }, { token: HttpCommonService }], target: i0.ɵɵFactoryTarget.Component });
2093
- TimezoneConfigurationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TimezoneConfigurationComponent, 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 <span class=\"madontary-icon\">*</span>\r\n </div>\r\n <div class=\" timezone-dropdown\">\r\n <p-dropdown [options]=\"ListOfTimeZones\" 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 <div *ngIf=\"isTimezoneLoading\" class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n </ng-template></p-dropdown>\r\n </div>\r\n <ng-container *ngIf=\"\r\n timeZoneForm.get('timezone')?.invalid &&\r\n timeZoneForm.get('timezone')?.touched\r\n \">\r\n <span class=\"error-msg mt-1\">{{'Generic_lib.TimeZoneFieldValidation' | translate}}</span>\r\n </ng-container>\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: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i8.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i9.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i10.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
2094
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TimezoneConfigurationComponent, decorators: [{
2095
- type: Component,
2096
- args: [{ selector: 'app-timezone-configuration', 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 <span class=\"madontary-icon\">*</span>\r\n </div>\r\n <div class=\" timezone-dropdown\">\r\n <p-dropdown [options]=\"ListOfTimeZones\" 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 <div *ngIf=\"isTimezoneLoading\" class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n </ng-template></p-dropdown>\r\n </div>\r\n <ng-container *ngIf=\"\r\n timeZoneForm.get('timezone')?.invalid &&\r\n timeZoneForm.get('timezone')?.touched\r\n \">\r\n <span class=\"error-msg mt-1\">{{'Generic_lib.TimeZoneFieldValidation' | translate}}</span>\r\n </ng-container>\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"] }]
2097
- }], ctorParameters: function () { return [{ type: i2$1.FormBuilder }, { type: ToastMsgService }, { type: StorageService }, { type: EventService }, { type: i4.TranslateService }, { type: HttpCommonService }]; }, propDecorators: { closepopup: [{
2098
- type: Output
2099
- }] } });
2100
-
2101
- class LandingpgConfigComponent {
2102
- constructor(libService, fb, msgService, translateService, _encryptRSAService, httpCommonService) {
2103
- this.libService = libService;
2104
- this.fb = fb;
2105
- this.msgService = msgService;
2106
- this.translateService = translateService;
2107
- this._encryptRSAService = _encryptRSAService;
2108
- this.httpCommonService = httpCommonService;
2109
- this.AppNameForm = new FormGroup({});
2110
- this.ListofApplicationNames = [];
2111
- this.isAppNameLoading = false;
2112
- this.isAppNameUpdate = false;
2113
- this.updateSuccess = errorMsg.LANDINGPGSUCCESS;
2114
- this.updateError = errorMsg.LANDINGPGERROR;
2115
- this.userConfiguredApp = {};
2116
- this.unsubscribeAPIEventListenerData = new Subject();
2117
- this.apiUrl = '';
2118
- }
2119
- ngAfterViewInit() {
2120
- this.getTranslateContent();
2121
- }
2122
- ngOnInit() {
2123
- this.getListofApplications();
2124
- this.getInitalizeForm();
2125
- }
2126
- getInitalizeForm() {
2127
- this.AppNameForm = this.fb.group({
2128
- userApp: [null, Validators.required],
2129
- });
2130
- }
2131
- //Method: Convert text one Lang. to another
2132
- getTranslateContent() {
2133
- this.translateService
2134
- .get([
2135
- 'Generic_lib.LandingPageSuccessMsg',
2136
- 'Generic_lib.LandingPageErrorMsg',
2137
- ])
2138
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData))
2139
- .subscribe((trans) => {
2140
- this.updateSuccess = trans['Generic_lib.LandingPageSuccessMsg'];
2141
- this.updateError = trans['Generic_lib.LandingPageErrorMsg'];
2142
- });
2143
- }
2144
- /*Method : GET
2145
- Action : Get List of User Assign Application*/
2146
- getListofApplications() {
2147
- this.isAppNameLoading = true;
2148
- this.httpCommonService
2149
- .getUserAssignedApps()
2150
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData), finalize(() => {
2151
- this.isAppNameLoading = false;
2152
- }))
2153
- .subscribe((response) => {
2154
- this.ListofApplicationNames = response;
2155
- this.userConfiguredApp = this.ListofApplicationNames.find((app) => app.isAssignedLanding);
2156
- this.setPostLoginModuleOption(this.userConfiguredApp);
2157
- });
2158
- }
2159
- /*Method : POST
2160
- Action : Used to Update User Preferred Landing App Name*/
2161
- getUpdateLandingPgPreference() {
2162
- const userApp = this.AppNameForm.get('userApp')?.value;
2163
- const moduleId = this._encryptRSAService.encryptViaRSA(userApp['appCode']);
2164
- this.showBtnLoadder(true);
2165
- this.httpCommonService
2166
- .setLandingPgPreference(moduleId)
2167
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData), finalize(() => {
2168
- this.showBtnLoadder(false);
2169
- }))
2170
- .subscribe((result) => {
2171
- if (result) {
2172
- setTimeout(() => {
2173
- this.setPostLoginModuleOption(userApp);
2174
- }, 10);
2175
- this.msgService.success(this.updateSuccess);
2176
- this.AppNameForm.reset();
2177
- }
2178
- else {
2179
- this.msgService.error(this.updateError);
2180
- }
2181
- });
2182
- }
2183
- setPostLoginModuleOption(userConfiguredApp) {
2184
- if (userConfiguredApp) {
2185
- this.AppNameForm.get('userApp')?.setValue(userConfiguredApp);
2186
- }
2187
- }
2188
- showBtnLoadder(flag) {
2189
- this.isAppNameUpdate = flag;
2190
- }
2191
- ngOnDestroy() {
2192
- this.unsubscribeAPIEventListenerData.next(true);
2193
- this.unsubscribeAPIEventListenerData.complete();
2194
- }
2195
- }
2196
- LandingpgConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LandingpgConfigComponent, deps: [{ token: CommonHeaderLibService }, { token: i2$1.FormBuilder }, { token: ToastMsgService }, { token: i4.TranslateService }, { token: EncrydecryRSAdataService }, { token: HttpCommonService }], target: i0.ɵɵFactoryTarget.Component });
2197
- LandingpgConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: LandingpgConfigComponent, 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\">{{ \"Generic_lib.LandingPageConfig\" | translate }}</div>\r\n <span class=\"madontary-icon\">*</span>\r\n </div>\r\n <div class=\" timezone-dropdown\">\r\n <p-dropdown [options]=\"ListofApplicationNames\"\r\n placeholder='{{\"Generic_lib.LandingPagePlaceHolder\" | translate}}'\r\n filterPlaceholder='{{\"Generic_lib.Search\" | translate }}' formControlName=\"userApp\"\r\n [filter]=\"!isAppNameLoading ? true:false\" optionLabel=\"applicationName\" filterBy=\"applicationName\"\r\n [showClear]=\"false\" panelStyleClass=\"{'dropdown-loader': isAppNameLoading}\">\r\n\r\n <ng-template pTemplate=\"header\">\r\n <div *ngIf=\"isAppNameLoading\" class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n </ng-template>\r\n </p-dropdown>\r\n </div>\r\n <ng-container *ngIf=\"AppNameForm.get('userApp')?.invalid && AppNameForm.get('userApp')?.touched\">\r\n <span class=\"error-msg mt-1\">{{'Generic_lib.LandingPageValidation' | translate}}</span>\r\n </ng-container>\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]=\"AppNameForm.invalid\"\r\n iconPos=\"right\" [loading]=\"isAppNameUpdate\" (onClick)=\"getUpdateLandingPgPreference()\"></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: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i8.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i9.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i10.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
2198
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LandingpgConfigComponent, decorators: [{
2199
- type: Component,
2200
- args: [{ selector: 'app-landingpg-config', 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\">{{ \"Generic_lib.LandingPageConfig\" | translate }}</div>\r\n <span class=\"madontary-icon\">*</span>\r\n </div>\r\n <div class=\" timezone-dropdown\">\r\n <p-dropdown [options]=\"ListofApplicationNames\"\r\n placeholder='{{\"Generic_lib.LandingPagePlaceHolder\" | translate}}'\r\n filterPlaceholder='{{\"Generic_lib.Search\" | translate }}' formControlName=\"userApp\"\r\n [filter]=\"!isAppNameLoading ? true:false\" optionLabel=\"applicationName\" filterBy=\"applicationName\"\r\n [showClear]=\"false\" panelStyleClass=\"{'dropdown-loader': isAppNameLoading}\">\r\n\r\n <ng-template pTemplate=\"header\">\r\n <div *ngIf=\"isAppNameLoading\" class=\"dropdown-loader-container\">\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n </ng-template>\r\n </p-dropdown>\r\n </div>\r\n <ng-container *ngIf=\"AppNameForm.get('userApp')?.invalid && AppNameForm.get('userApp')?.touched\">\r\n <span class=\"error-msg mt-1\">{{'Generic_lib.LandingPageValidation' | translate}}</span>\r\n </ng-container>\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]=\"AppNameForm.invalid\"\r\n iconPos=\"right\" [loading]=\"isAppNameUpdate\" (onClick)=\"getUpdateLandingPgPreference()\"></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"] }]
2201
- }], ctorParameters: function () { return [{ type: CommonHeaderLibService }, { type: i2$1.FormBuilder }, { type: ToastMsgService }, { type: i4.TranslateService }, { type: EncrydecryRSAdataService }, { type: HttpCommonService }]; } });
2202
-
2203
- class GeneralConfigurationComponent {
2204
- constructor(libService, fb, msgService, encryptService, loginService, _validatePwdService, translateService, _vaptService, config, httpCommonService, httpGeneralConfigService) {
2205
- this.libService = libService;
2206
- this.fb = fb;
2207
- this.msgService = msgService;
2208
- this.encryptService = encryptService;
2209
- this.loginService = loginService;
2210
- this._validatePwdService = _validatePwdService;
2211
- this.translateService = translateService;
2212
- this._vaptService = _vaptService;
2213
- this.config = config;
2214
- this.httpCommonService = httpCommonService;
2215
- this.httpGeneralConfigService = httpGeneralConfigService;
2216
- // export class GeneralConfigurationComponent {
2217
- this.ShowPreferencePathScreen = true;
2218
- this.ShowUserProfileScreen = false;
2219
- this.ShowChangePasswordScreen = false;
2220
- this.ShowTimeZoneScreen = false;
2221
- this.ShowLandinPgScreen = false;
2222
- this.ShowTimeZoneBtn = false;
2223
- this.showStatus = false;
2224
- this.userAssetTypeList = [];
2225
- this.userAssetNameList = [];
2226
- this.userServiceList = [];
2227
- this.userSelectedTimezone = '';
2228
- // private domainName: string = '';
2229
- // private domainID: number;
2230
- // private LoggedInUserID: number;
2231
- // private username: string;
2232
- this.filePathName = '';
2233
- this.lastUpdatedFileStatus = '';
2234
- this.appSettingForm = new FormGroup({}); // Define form group
2235
- this.userResetPasswordForm = new FormGroup({}); //user Reset Password Form
2236
- this.timeZoneForm = new FormGroup({}); //user Reset Password Form
2237
- this.unsubscribeAPIEventListenerData = new Subject();
2238
- this.makeNewPwdVisible = true;
2239
- this.makeOldPwdVisible = true;
2240
- this.makeCnfrmPwdVisible = true;
2241
- this.isAssetTypeLoading = false;
2242
- this.isAssetNameLoading = false;
2243
- this.isConnectionMethodLoading = false;
2244
- this.isPathUpdated = false;
2245
- this.pwderrorMsg = '';
2246
- this.AssetTypeEvent = 'AssetType';
2247
- this.AssetNameEvent = 'AssetName';
2248
- this.ConnectionMethodEvent = 'ConnectionMethod';
2249
- this.pathSuccessMsg = errorMsg.PATHSUCCESS;
2250
- this.pathErrorMsg = errorMsg.PATHERROR;
2251
- this.apiURL = '';
2252
- }
2253
- ngOnInit() {
2254
- //Get Initalize Form
2255
- this.getInitalizeForm();
2256
- this.OpenPreferencePathScreen();
2257
- }
2258
- ngAfterViewInit() {
2259
- this.getTranslateContent();
2260
- // Get PWD Validation MSg From Validation Service
2261
- this._validatePwdService.listValidationMsg().subscribe((msg) => {
2262
- this.pwderrorMsg = msg;
2263
- });
2264
- }
2265
- getInitalizeForm() {
2266
- this.appSettingForm = this.fb.group({
2267
- AssetType: ['', Validators.required],
2268
- AssetName: ['', Validators.required],
2269
- ServiceName: ['', Validators.required],
2270
- filePathName: ['', [Validators.required, noSpaceAllowed()]],
2271
- });
2272
- this.timeZoneForm = this.fb.group({
2273
- timezone: ['', Validators.required],
2274
- });
2275
- // Password Reset Form
2276
- this.userResetPasswordForm = this.fb.group({
2277
- oldUserARCXWD: ['', [Validators.required]],
2278
- newUserARCXWD: [
2279
- '',
2280
- [Validators.required],
2281
- [this._validatePwdService.createValidator()],
2282
- ],
2283
- crnmNewUserARCXWD: ['', [Validators.required]],
2284
- }, {
2285
- validator: ConfirmedValidator('newUserARCXWD', 'crnmNewUserARCXWD'),
2286
- });
2287
- }
2288
- // //Method: Convert text one Lang. to another
2289
- getTranslateContent() {
2290
- this.translateService
2291
- .get([
2292
- 'Generic_lib.PreferencePathSuccessMsg',
2293
- 'Generic_lib.PreferencePathErrorMsg',
2294
- ])
2295
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData))
2296
- .subscribe((trans) => {
2297
- this.pathSuccessMsg = trans['Generic_lib.PreferencePathSuccessMsg'];
2298
- this.pathErrorMsg = trans['Generic_lib.PreferencePathErrorMsg'];
2299
- });
2300
- }
2301
- OpenPreferencePathScreen() {
2302
- this.closeAllScreen();
2303
- setTimeout(() => {
2304
- this.ShowPreferencePathScreen = true;
2305
- this.appSettingForm.reset();
2306
- this.userAssetTypeList = [];
2307
- this.userAssetNameList = [];
2308
- this.userServiceList = [];
2309
- this.getServiceAssetDetails();
2310
- }, 10);
2311
- }
2312
- OpenUserProfileScreen() {
2313
- this.closeAllScreen();
2314
- this.ShowUserProfileScreen = true;
2315
- }
2316
- OpenChangePasswordScreen() {
2317
- this.closeAllScreen();
2318
- this.ShowChangePasswordScreen = true;
2319
- this.userResetPasswordForm.reset();
2320
- // this.getEncryptKey();
2321
- }
2322
- OpenTimezoneScreen() {
2323
- this.closeAllScreen();
2324
- this.ShowTimeZoneScreen = true;
2325
- }
2326
- OpenLandingPgConfig() {
2327
- this.closeAllScreen();
2328
- this.ShowLandinPgScreen = true;
2329
- }
2330
- closeAllScreen() {
2331
- this.ShowPreferencePathScreen = false;
2332
- this.ShowUserProfileScreen = false;
2333
- this.ShowChangePasswordScreen = false;
2334
- this.ShowTimeZoneScreen = false;
2335
- this.ShowLandinPgScreen = false;
2336
- }
2337
- preferencePathValueChange(eventName) {
2338
- if (eventName === this.AssetTypeEvent) {
2339
- const assetType = this.appSettingForm.get('AssetType')?.value;
2340
- this.showStatus = false;
2341
- this.resetFormfields(['AssetName', 'ServiceName', 'filePathName']);
2342
- this.userAssetNameList = [];
2343
- this.userServiceList = [];
2344
- this.getServiceAssetName(assetType['assetTypeID']);
2345
- }
2346
- else if (eventName === this.AssetNameEvent) {
2347
- const assetName = this.appSettingForm.get('AssetName')?.value;
2348
- this.showStatus = false;
2349
- this.resetFormfields(['ServiceName', 'filePathName']);
2350
- this.userServiceList = [];
2351
- this.fetchServiceNameByAssetTypeEvent(assetName['assetName']);
2352
- }
2353
- else if (eventName === this.ConnectionMethodEvent) {
2354
- const ServiceDetails = this.appSettingForm.get('ServiceName')?.value;
2355
- this.showStatus = false;
2356
- this.resetFormfields(['filePathName']);
2357
- this.getFilePathDetails(ServiceDetails['serviceTypeId']);
2358
- }
2359
- }
2360
- // /*Action : Used to Get Asset Type to update Prefrence Path of Connectors */
2361
- getServiceAssetDetails() {
2362
- this.isAssetTypeLoading = true;
2363
- this.httpGeneralConfigService
2364
- .getUserPreferredAssetTypeDetails()
2365
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData), finalize(() => {
2366
- this.isAssetTypeLoading = false;
2367
- }))
2368
- .subscribe((data) => {
2369
- this.userAssetTypeList = data;
2370
- });
2371
- }
2372
- // /*Action : Used to Get Asset Name to update Prefrence Path of that Asset's Connectors */
2373
- getServiceAssetName(assetTypeID) {
2374
- this.isAssetNameLoading = true;
2375
- let payload = {
2376
- assetTypeId: assetTypeID,
2377
- };
2378
- this.httpGeneralConfigService
2379
- .getUserPreferredAssetName(payload)
2380
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData), finalize(() => {
2381
- this.isAssetNameLoading = false;
2382
- }))
2383
- .subscribe((data) => {
2384
- this.userAssetNameList = data;
2385
- });
2386
- }
2387
- // /*Method : GET
2388
- // Action : get User Assigned ServiceName By AssetTypeEvent */
2389
- fetchServiceNameByAssetTypeEvent(assetName) {
2390
- this.isConnectionMethodLoading = true;
2391
- let payload = {
2392
- assetName: assetName,
2393
- };
2394
- this.httpGeneralConfigService
2395
- .getServiceNameByAssetTypeEvent(payload)
2396
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData), finalize(() => {
2397
- this.isConnectionMethodLoading = false;
2398
- }))
2399
- .subscribe((data) => {
2400
- this.userServiceList = data;
2401
- });
2402
- }
2403
- // /*Method : GET
2404
- // Action : Fetch User's File Path Details and Status already set or not */
2405
- getFilePathDetails(serviceID) {
2406
- let payload = {
2407
- // userId: this.LoggedInUserID,
2408
- serviceTypeId: serviceID,
2409
- };
2410
- this.httpGeneralConfigService
2411
- .getPreferencePathDetails(payload)
2412
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData))
2413
- .subscribe((res) => {
2414
- this.preferencePathID = res['spmId'];
2415
- if (res && res['currentSetting'] && res['lastUpdate']) {
2416
- this.showStatus = true;
2417
- this.filePathName = res['currentSetting'];
2418
- this.lastUpdatedFileStatus = res['lastUpdate'];
2419
- }
2420
- else {
2421
- this.filePathName = '';
2422
- this.showStatus = false;
2423
- this.lastUpdatedFileStatus = '';
2424
- }
2425
- });
2426
- }
2427
- // /*Action : It saves or updates a preference path of user */
2428
- setUserPreferencePath(appSettingForm) {
2429
- this.toggleBtnLoadder(true);
2430
- const userpath = String(appSettingForm.value['filePathName']).trim();
2431
- let payload = {
2432
- // userId: this.LoggedInUserID,
2433
- // userLogTime: this._cookieService.getCookieValue(COOKIECONSTANT.SESSIONID),
2434
- serviceTypeId: appSettingForm.value['ServiceName']['serviceTypeId'],
2435
- supDescription: userpath,
2436
- spmId: this.preferencePathID,
2437
- };
2438
- this.httpGeneralConfigService
2439
- .updatePreferencePath(payload)
2440
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData), finalize(() => {
2441
- this.toggleBtnLoadder(false);
2442
- }))
2443
- .subscribe((res) => {
2444
- if (res) {
2445
- this.resetForm();
2446
- this.showStatus = false;
2447
- this.msgService.success(this.pathSuccessMsg);
2448
- }
2449
- else {
2450
- this.msgService.error(this.pathErrorMsg);
2451
- }
2452
- });
2453
- }
2454
- // //Method : Used to perform password reset of User
2455
- resetLoggedInPwd() {
2456
- if (this._vaptService.hasUnsafeInput(this.userResetPasswordForm.value)) {
2457
- this.msgService.error(errorMsg.SCRIPTERROR);
2458
- return;
2459
- }
2460
- this.userResetPasswordForm.markAllAsTouched();
2461
- if (this.userResetPasswordForm.valid) {
2462
- this.changeLoggedInPwd();
2463
- }
2464
- }
2465
- // /*Method: will User New Password to API */
2466
- changeLoggedInPwd() {
2467
- //For Encrp/Dec
2468
- let oldUserARCXWD = this.encryptService.encryptViaRSA(this.userResetPasswordForm.value['oldUserARCXWD']);
2469
- //For Encrp/Dec
2470
- let newUserARCXWD = this.encryptService.encryptViaRSA(this.userResetPasswordForm.value['newUserARCXWD']);
2471
- let userPwdDetails = {
2472
- ipAddress: '',
2473
- oldUserARCXWD: oldUserARCXWD,
2474
- newUserARCXWD: newUserARCXWD,
2475
- authenticationType: 0,
2476
- };
2477
- this.toggleBtnLoadder(true);
2478
- this.httpCommonService
2479
- .setNewpassword(userPwdDetails)
2480
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData), finalize(() => {
2481
- this.toggleBtnLoadder(false);
2482
- }))
2483
- .subscribe((data) => {
2484
- if (data['success']) {
2485
- this.msgService.success(data['message']);
2486
- this.userResetPasswordForm.reset();
2487
- }
2488
- else if (!data['success']) {
2489
- this.msgService.error(data['errorMessage']);
2490
- }
2491
- });
2492
- }
2493
- // /*Method:
2494
- // Action : Get Public Key for encryption of User Details */
2495
- getEncryptKey() {
2496
- let params = {
2497
- type: 0,
2498
- };
2499
- this.loginService
2500
- .getPrivateKey(params)
2501
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData))
2502
- .subscribe((data) => {
2503
- if (data['success'] === true) {
2504
- LoggedInUserInfo.privateKey = data['result'];
2505
- }
2506
- else if (data['success'] === false) {
2507
- this.msgService.error('Session Token Error !');
2508
- }
2509
- });
2510
- }
2511
- // /*Method : POST
2512
- // Action : Get configuration ID based on to show hide Time Zone*/
2513
- getglobalConfigDetails() {
2514
- this.loginService
2515
- .getglobalConfigDetails('1', [336])
2516
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData))
2517
- .subscribe((data) => {
2518
- if (data && data.length > 0) {
2519
- data.forEach((element) => {
2520
- if (element && element['id'] === 336 && element['value'] === '0') {
2521
- this.ShowTimeZoneBtn = true;
2522
- }
2523
- else {
2524
- this.ShowTimeZoneBtn = false;
2525
- }
2526
- });
2527
- }
2528
- });
2529
- }
2530
- // // Show/Hide Password Fileds of Change Pwd form
2531
- togglePasswordVisibility(flag) {
2532
- if (flag === 1) {
2533
- this.makeOldPwdVisible = !this.makeOldPwdVisible;
2534
- }
2535
- else if (flag === 2) {
2536
- this.makeNewPwdVisible = !this.makeNewPwdVisible;
2537
- }
2538
- else if (flag === 3) {
2539
- this.makeCnfrmPwdVisible = !this.makeCnfrmPwdVisible;
2540
- }
2541
- }
2542
- resetForm() {
2543
- this.appSettingForm.reset();
2544
- }
2545
- resetFormfields(fields) {
2546
- fields.forEach((fieldsName) => {
2547
- this.appSettingForm.get(fieldsName)?.reset();
2548
- });
2549
- }
2550
- toggleBtnLoadder(flag) {
2551
- this.isPathUpdated = flag;
2552
- }
2553
- ngOnDestroy() {
2554
- this.unsubscribeAPIEventListenerData.next(true);
2555
- this.unsubscribeAPIEventListenerData.complete();
2556
- }
2557
- }
2558
- GeneralConfigurationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GeneralConfigurationComponent, deps: [{ token: CommonHeaderLibService }, { token: i2$1.FormBuilder }, { token: ToastMsgService }, { token: EncrydecryRSAdataService }, { token: RESTLoginFormService }, { token: ASYNCPasswordcheckService }, { token: i4.TranslateService }, { token: VaptValidationService }, { token: i1$3.DynamicDialogConfig }, { token: HttpCommonService }, { token: HttpGeneralConfigurationService }], target: i0.ɵɵFactoryTarget.Component });
2559
- GeneralConfigurationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: GeneralConfigurationComponent, 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\r\n class=\"profile-card\"\r\n [ngClass]=\"{ active: ShowPreferencePathScreen }\"\r\n (click)=\"OpenPreferencePathScreen()\"\r\n >\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 </div>\r\n <div\r\n class=\"profile-card\"\r\n [ngClass]=\"{ active: ShowChangePasswordScreen }\"\r\n (click)=\"OpenChangePasswordScreen()\"\r\n >\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 </div>\r\n <div\r\n class=\"profile-card\"\r\n [ngClass]=\"{ active: ShowTimeZoneScreen }\"\r\n (click)=\"OpenTimezoneScreen()\"\r\n >\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 </div>\r\n <div\r\n class=\"profile-card\"\r\n [ngClass]=\"{ active: ShowLandinPgScreen }\"\r\n (click)=\"OpenLandingPgConfig()\"\r\n >\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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Left_Card_Ended -->\r\n\r\n <!--User Profile -->\r\n <ng-container *ngIf=\"ShowUserProfileScreen\">\r\n <div class=\"col-lg-6\">\r\n <div class=\"initial-text\">\r\n {{ \"AK\" }}\r\n </div>\r\n <div class=\"preference-container\">\r\n <!--Card-->\r\n <div class=\"mt-3\">\r\n <div class=\"form-group\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.UserName\" | translate }}\r\n </div>\r\n <div class=\"input-dropdown d-flex align-items-center\">\r\n <input\r\n type=\"text\"\r\n pInputText\r\n formControlName=\"text\"\r\n placeholder=\"{{ 'Generic_lib.UserName' | translate }}\"\r\n autocomplete=\"off\"\r\n />\r\n <img\r\n src=\"assets/common-header-lib/images/images/user-name.svg\"\r\n alt=\"Icon\"\r\n class=\"position-absolute px-2\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <div class=\"label-name\">{{ \"Generic_lib.Email\" | translate }}</div>\r\n <div class=\"input-dropdown d-flex align-items-center\">\r\n <input\r\n type=\"text\"\r\n pInputText\r\n formControlName=\"text\"\r\n placeholder=\"{{ 'Generic_lib.EmailAddress' | translate }}\"\r\n autocomplete=\"off\"\r\n />\r\n <img\r\n src=\"assets/common-header-lib/images/gc-mail.svg\"\r\n alt=\"Icon\"\r\n class=\"position-absolute px-2\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"mt-4\">\r\n <p-button class=\"submit-btn\" label=\"Submit\"></p-button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Preference PathScreen -->\r\n <ng-container>\r\n <!-- <ng-container *ngIf=\"ShowPreferencePathScreen\"> -->\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 <span class=\"madontary-icon\">*</span>\r\n </div>\r\n <div class=\"assets-dropdown\">\r\n <p-dropdown\r\n [options]=\"userAssetTypeList\"\r\n formControlName=\"AssetType\"\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 <div\r\n *ngIf=\"isAssetTypeLoading\"\r\n class=\"dropdown-loader-container\"\r\n >\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n </ng-template>\r\n </p-dropdown>\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n appSettingForm.get('AssetType')?.invalid &&\r\n appSettingForm.get('AssetType')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.AssetTypeFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\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 <span class=\"madontary-icon\">*</span>\r\n </div>\r\n <div class=\"assets-dropdown\">\r\n <p-dropdown\r\n [options]=\"userAssetNameList\"\r\n formControlName=\"AssetName\"\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 <div\r\n *ngIf=\"isAssetNameLoading\"\r\n class=\"dropdown-loader-container\"\r\n >\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n </ng-template>\r\n </p-dropdown>\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n appSettingForm.get('AssetName')?.invalid &&\r\n appSettingForm.get('AssetName')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.AssetNameFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\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 <span class=\"madontary-icon\">*</span>\r\n </div>\r\n <div class=\"assets-dropdown\">\r\n <p-dropdown\r\n [options]=\"userServiceList\"\r\n formControlName=\"ServiceName\"\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 <div\r\n *ngIf=\"isConnectionMethodLoading\"\r\n class=\"dropdown-loader-container\"\r\n >\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div> </ng-template\r\n ></p-dropdown>\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n appSettingForm.get('ServiceName')?.invalid &&\r\n appSettingForm.get('ServiceName')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.ConnectionMethodFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\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 <span class=\"madontary-icon\">*</span>\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 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=\"path Icon\"\r\n class=\"position-absolute mx-2 img-lock ext\"\r\n />\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n appSettingForm.get('filePathName')?.invalid &&\r\n (appSettingForm.get('filePathName')?.touched ||\r\n appSettingForm.get('filePathName')?.dirty)\r\n \"\r\n >\r\n <ng-container\r\n *ngIf=\"\r\n appSettingForm.controls['filePathName'].errors?.['required']\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.PreferencePathFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\r\n <ng-container\r\n *ngIf=\"\r\n appSettingForm.controls['filePathName'].errors?.['noSpace']\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.PreferencePathFieldSpaceValidation\" | translate\r\n }}</span>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <ng-container *ngIf=\"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 </ng-container>\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 <ng-container *ngIf=\"ShowTimeZoneScreen\">\r\n <div class=\"col-lg-6\">\r\n <app-timezone-configuration></app-timezone-configuration>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- LandingPg Config Screen -->\r\n <ng-container *ngIf=\"ShowLandinPgScreen\">\r\n <div class=\"col-lg-6\">\r\n <app-landingpg-config></app-landingpg-config>\r\n </div>\r\n </ng-container>\r\n\r\n <!--Change Password Screen -->\r\n <!-- <ng-container *ngIf=\"ShowChangePasswordScreen\"> -->\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 <span class=\"madontary-icon\">*</span>\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 (click)=\"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 autocomplete=\"off\"\r\n />\r\n\r\n <img\r\n src=\"assets/common-header-lib/images/lock-pass.svg\"\r\n alt=\"lock Icon\"\r\n class=\"position-absolute mx-2 img-lock\"\r\n />\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n userResetPasswordForm.get('oldUserARCXWD')?.invalid &&\r\n userResetPasswordForm.get('oldUserARCXWD')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.PasswordFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\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 <span class=\"madontary-icon\">*</span>\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 (click)=\"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 autocomplete=\"off\"\r\n />\r\n\r\n <img\r\n src=\"assets/common-header-lib/images/lock-pass.svg\"\r\n alt=\"lock Icon\"\r\n class=\"position-absolute mx-2 img-lock\"\r\n />\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n userResetPasswordForm\r\n .get('newUserARCXWD')\r\n ?.hasError('required') &&\r\n userResetPasswordForm.get('newUserARCXWD')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.NewPasswordFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\r\n <ng-container\r\n *ngIf=\"\r\n userResetPasswordForm\r\n .get('newUserARCXWD')\r\n ?.hasError('pwdInvalid') &&\r\n userResetPasswordForm.get('newUserARCXWD')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{ pwderrorMsg }}</span>\r\n </ng-container>\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 <span class=\"madontary-icon\">*</span>\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 (click)=\"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 />\r\n\r\n <img\r\n src=\"assets/common-header-lib/images/lock-pass.svg\"\r\n alt=\"eye Icon\"\r\n class=\"position-absolute mx-2 img-lock\"\r\n />\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n userResetPasswordForm\r\n .get('crnmNewUserARCXWD')\r\n ?.hasError('required') &&\r\n userResetPasswordForm.get('crnmNewUserARCXWD')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.ConfirmPasswordFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\r\n <span\r\n class=\"error-msg mt-2\"\r\n *ngIf=\"\r\n userResetPasswordForm\r\n .get('crnmNewUserARCXWD')\r\n ?.hasError('confirmedValidator')\r\n \"\r\n >\r\n {{\r\n \"Generic_lib.ConfirmPasswordFieldNewValidation\" | translate\r\n }}\r\n </span>\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:#f6f7fb!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:#fff;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);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}}.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-dropdown-filter-container input{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: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i13.InputText, selector: "[pInputText]" }, { kind: "component", type: i8.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i9.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i10.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: TimezoneConfigurationComponent, selector: "app-timezone-configuration", outputs: ["closepopup"] }, { kind: "component", type: LandingpgConfigComponent, selector: "app-landingpg-config" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
2560
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GeneralConfigurationComponent, decorators: [{
2561
- type: Component,
2562
- args: [{ selector: 'app-general-configuration', providers: [DialogService], 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\r\n class=\"profile-card\"\r\n [ngClass]=\"{ active: ShowPreferencePathScreen }\"\r\n (click)=\"OpenPreferencePathScreen()\"\r\n >\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 </div>\r\n <div\r\n class=\"profile-card\"\r\n [ngClass]=\"{ active: ShowChangePasswordScreen }\"\r\n (click)=\"OpenChangePasswordScreen()\"\r\n >\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 </div>\r\n <div\r\n class=\"profile-card\"\r\n [ngClass]=\"{ active: ShowTimeZoneScreen }\"\r\n (click)=\"OpenTimezoneScreen()\"\r\n >\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 </div>\r\n <div\r\n class=\"profile-card\"\r\n [ngClass]=\"{ active: ShowLandinPgScreen }\"\r\n (click)=\"OpenLandingPgConfig()\"\r\n >\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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Left_Card_Ended -->\r\n\r\n <!--User Profile -->\r\n <ng-container *ngIf=\"ShowUserProfileScreen\">\r\n <div class=\"col-lg-6\">\r\n <div class=\"initial-text\">\r\n {{ \"AK\" }}\r\n </div>\r\n <div class=\"preference-container\">\r\n <!--Card-->\r\n <div class=\"mt-3\">\r\n <div class=\"form-group\">\r\n <div class=\"label-name\">\r\n {{ \"Generic_lib.UserName\" | translate }}\r\n </div>\r\n <div class=\"input-dropdown d-flex align-items-center\">\r\n <input\r\n type=\"text\"\r\n pInputText\r\n formControlName=\"text\"\r\n placeholder=\"{{ 'Generic_lib.UserName' | translate }}\"\r\n autocomplete=\"off\"\r\n />\r\n <img\r\n src=\"assets/common-header-lib/images/images/user-name.svg\"\r\n alt=\"Icon\"\r\n class=\"position-absolute px-2\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <div class=\"label-name\">{{ \"Generic_lib.Email\" | translate }}</div>\r\n <div class=\"input-dropdown d-flex align-items-center\">\r\n <input\r\n type=\"text\"\r\n pInputText\r\n formControlName=\"text\"\r\n placeholder=\"{{ 'Generic_lib.EmailAddress' | translate }}\"\r\n autocomplete=\"off\"\r\n />\r\n <img\r\n src=\"assets/common-header-lib/images/gc-mail.svg\"\r\n alt=\"Icon\"\r\n class=\"position-absolute px-2\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"mt-4\">\r\n <p-button class=\"submit-btn\" label=\"Submit\"></p-button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Preference PathScreen -->\r\n <ng-container>\r\n <!-- <ng-container *ngIf=\"ShowPreferencePathScreen\"> -->\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 <span class=\"madontary-icon\">*</span>\r\n </div>\r\n <div class=\"assets-dropdown\">\r\n <p-dropdown\r\n [options]=\"userAssetTypeList\"\r\n formControlName=\"AssetType\"\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 <div\r\n *ngIf=\"isAssetTypeLoading\"\r\n class=\"dropdown-loader-container\"\r\n >\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n </ng-template>\r\n </p-dropdown>\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n appSettingForm.get('AssetType')?.invalid &&\r\n appSettingForm.get('AssetType')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.AssetTypeFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\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 <span class=\"madontary-icon\">*</span>\r\n </div>\r\n <div class=\"assets-dropdown\">\r\n <p-dropdown\r\n [options]=\"userAssetNameList\"\r\n formControlName=\"AssetName\"\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 <div\r\n *ngIf=\"isAssetNameLoading\"\r\n class=\"dropdown-loader-container\"\r\n >\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div>\r\n </ng-template>\r\n </p-dropdown>\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n appSettingForm.get('AssetName')?.invalid &&\r\n appSettingForm.get('AssetName')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.AssetNameFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\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 <span class=\"madontary-icon\">*</span>\r\n </div>\r\n <div class=\"assets-dropdown\">\r\n <p-dropdown\r\n [options]=\"userServiceList\"\r\n formControlName=\"ServiceName\"\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 <div\r\n *ngIf=\"isConnectionMethodLoading\"\r\n class=\"dropdown-loader-container\"\r\n >\r\n <i class=\"pi pi-spin pi-spinner\"></i>\r\n </div> </ng-template\r\n ></p-dropdown>\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n appSettingForm.get('ServiceName')?.invalid &&\r\n appSettingForm.get('ServiceName')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.ConnectionMethodFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\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 <span class=\"madontary-icon\">*</span>\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 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=\"path Icon\"\r\n class=\"position-absolute mx-2 img-lock ext\"\r\n />\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n appSettingForm.get('filePathName')?.invalid &&\r\n (appSettingForm.get('filePathName')?.touched ||\r\n appSettingForm.get('filePathName')?.dirty)\r\n \"\r\n >\r\n <ng-container\r\n *ngIf=\"\r\n appSettingForm.controls['filePathName'].errors?.['required']\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.PreferencePathFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\r\n <ng-container\r\n *ngIf=\"\r\n appSettingForm.controls['filePathName'].errors?.['noSpace']\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.PreferencePathFieldSpaceValidation\" | translate\r\n }}</span>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <ng-container *ngIf=\"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 </ng-container>\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 <ng-container *ngIf=\"ShowTimeZoneScreen\">\r\n <div class=\"col-lg-6\">\r\n <app-timezone-configuration></app-timezone-configuration>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- LandingPg Config Screen -->\r\n <ng-container *ngIf=\"ShowLandinPgScreen\">\r\n <div class=\"col-lg-6\">\r\n <app-landingpg-config></app-landingpg-config>\r\n </div>\r\n </ng-container>\r\n\r\n <!--Change Password Screen -->\r\n <!-- <ng-container *ngIf=\"ShowChangePasswordScreen\"> -->\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 <span class=\"madontary-icon\">*</span>\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 (click)=\"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 autocomplete=\"off\"\r\n />\r\n\r\n <img\r\n src=\"assets/common-header-lib/images/lock-pass.svg\"\r\n alt=\"lock Icon\"\r\n class=\"position-absolute mx-2 img-lock\"\r\n />\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n userResetPasswordForm.get('oldUserARCXWD')?.invalid &&\r\n userResetPasswordForm.get('oldUserARCXWD')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.PasswordFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\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 <span class=\"madontary-icon\">*</span>\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 (click)=\"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 autocomplete=\"off\"\r\n />\r\n\r\n <img\r\n src=\"assets/common-header-lib/images/lock-pass.svg\"\r\n alt=\"lock Icon\"\r\n class=\"position-absolute mx-2 img-lock\"\r\n />\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n userResetPasswordForm\r\n .get('newUserARCXWD')\r\n ?.hasError('required') &&\r\n userResetPasswordForm.get('newUserARCXWD')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.NewPasswordFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\r\n <ng-container\r\n *ngIf=\"\r\n userResetPasswordForm\r\n .get('newUserARCXWD')\r\n ?.hasError('pwdInvalid') &&\r\n userResetPasswordForm.get('newUserARCXWD')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{ pwderrorMsg }}</span>\r\n </ng-container>\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 <span class=\"madontary-icon\">*</span>\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 (click)=\"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 />\r\n\r\n <img\r\n src=\"assets/common-header-lib/images/lock-pass.svg\"\r\n alt=\"eye Icon\"\r\n class=\"position-absolute mx-2 img-lock\"\r\n />\r\n </div>\r\n <ng-container\r\n *ngIf=\"\r\n userResetPasswordForm\r\n .get('crnmNewUserARCXWD')\r\n ?.hasError('required') &&\r\n userResetPasswordForm.get('crnmNewUserARCXWD')?.touched\r\n \"\r\n >\r\n <span class=\"error-msg mt-2\">{{\r\n \"Generic_lib.ConfirmPasswordFieldValidation\" | translate\r\n }}</span>\r\n </ng-container>\r\n <span\r\n class=\"error-msg mt-2\"\r\n *ngIf=\"\r\n userResetPasswordForm\r\n .get('crnmNewUserARCXWD')\r\n ?.hasError('confirmedValidator')\r\n \"\r\n >\r\n {{\r\n \"Generic_lib.ConfirmPasswordFieldNewValidation\" | translate\r\n }}\r\n </span>\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:#f6f7fb!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:#fff;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);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}}.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-dropdown-filter-container input{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"] }]
2563
- }], ctorParameters: function () { return [{ type: CommonHeaderLibService }, { type: i2$1.FormBuilder }, { type: ToastMsgService }, { type: EncrydecryRSAdataService }, { type: RESTLoginFormService }, { type: ASYNCPasswordcheckService }, { type: i4.TranslateService }, { type: VaptValidationService }, { type: i1$3.DynamicDialogConfig }, { type: HttpCommonService }, { type: HttpGeneralConfigurationService }]; } });
2564
-
2565
- class NgTranslationComponent {
2566
- constructor(_translate, _localstorage, msgService) {
2567
- this._translate = _translate;
2568
- this._localstorage = _localstorage;
2569
- this.msgService = msgService;
2570
- /* Languages provided by the host app (single source of truth — populated
2571
- from languages.json by the host's APP_INITIALIZER and forwarded down
2572
- through <lib-common-header-lib> → <app-user-sidebar> → here).
2573
- Falls back to GlobalConstants.USERFILTEREDLANGUAGES when not supplied
2574
- so the component remains usable in legacy contexts. */
2575
- this.languages = [];
2576
- this.selectedLang = {};
2577
- }
2578
- ngOnInit() {
2579
- this.loadLanguages();
2580
- }
2581
- ngOnChanges(changes) {
2582
- if (changes['languages'] && !changes['languages'].firstChange) {
2583
- this.loadLanguages();
2584
- }
2585
- }
2586
- loadLanguages() {
2587
- /* 1. Use @Input languages if provided; fall back to GlobalConstants
2588
- for backward compatibility. */
2589
- if (!this.languages || this.languages.length === 0) {
2590
- this.languages = GlobalConstants.USERFILTEREDLANGUAGES || [];
2591
- }
2592
- /* 2. Read saved language */
2593
- const savedLang = this._localstorage.getData(COOKIECONSTANT.USERLANG);
2594
- if (savedLang) {
2595
- try {
2596
- const parsed = JSON.parse(savedLang);
2597
- const validLang = this.languages.find((x) => x.langKey === parsed?.langKey);
2598
- this.selectedLang = validLang || GlobalConstants.DEFAULTLANG;
2599
- }
2600
- catch {
2601
- this.selectedLang = GlobalConstants.DEFAULTLANG;
2602
- }
2603
- }
2604
- else {
2605
- this.selectedLang = GlobalConstants.DEFAULTLANG;
2606
- }
2607
- }
2608
- /* Language Change */
2609
- selectLang(event) {
2610
- this.selectedLang = event?.value;
2611
- this.useTranslate(this.selectedLang);
2612
- }
2613
- useTranslate(selectedLang) {
2614
- this._translate.use(selectedLang.langKey).subscribe({
2615
- next: () => {
2616
- this.saveUserLanguage(selectedLang);
2617
- },
2618
- error: () => {
2619
- this.msgService.error(this._translate.instant('Generic_lib.FailedToLoadLanguageFile'));
2620
- },
2621
- });
2622
- }
2623
- saveUserLanguage(lang) {
2624
- this._localstorage.saveData(COOKIECONSTANT.USERLANG, JSON.stringify(lang));
2625
- }
2626
- }
2627
- NgTranslationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgTranslationComponent, deps: [{ token: i4.TranslateService }, { token: StorageService }, { token: ToastMsgService }], target: i0.ɵɵFactoryTarget.Component });
2628
- NgTranslationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgTranslationComponent, selector: "ng-translation", inputs: { languages: "languages" }, usesOnChanges: true, ngImport: i0, template: "<p-dropdown [options]=\"languages\" optionLabel=\"langName\" 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-dropdown>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i8.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
2629
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgTranslationComponent, decorators: [{
2630
- type: Component,
2631
- args: [{ selector: 'ng-translation', standalone: false, template: "<p-dropdown [options]=\"languages\" optionLabel=\"langName\" 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-dropdown>\r\n" }]
2632
- }], ctorParameters: function () { return [{ type: i4.TranslateService }, { type: StorageService }, { type: ToastMsgService }]; }, propDecorators: { languages: [{
2633
- type: Input
2634
- }] } });
2635
-
2636
- class SliceToTwoPipe {
2637
- transform(textName) {
2638
- if (textName === null || textName === '') {
2639
- return 'NA';
2640
- }
2641
- textName = textName?.trim();
2642
- let result = '';
2643
- if (textName && textName.includes(' ')) {
2644
- let splitStringArr = textName.split(' ');
2645
- result =
2646
- splitStringArr[0][0] + splitStringArr[splitStringArr.length - 1][0];
2647
- }
2648
- else if (textName && textName.includes('_')) {
2649
- let splitStringArr = textName.split('_');
2650
- result =
2651
- splitStringArr[0][0] + splitStringArr[splitStringArr.length - 1][0];
2652
- }
2653
- else {
2654
- result = textName[0] + textName[1];
2655
- }
2656
- return result.toLocaleUpperCase();
2657
- }
2658
- }
2659
- SliceToTwoPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SliceToTwoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2660
- SliceToTwoPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SliceToTwoPipe, name: "sliceToTwo" });
2661
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SliceToTwoPipe, decorators: [{
2662
- type: Pipe,
2663
- args: [{
2664
- name: 'sliceToTwo',
2665
- }]
2666
- }] });
2667
-
2668
- class UserSidebarComponent {
2669
- constructor(dialogService, _cookieService, route, msgService, _localStorage, translateService, httpCommonService) {
2670
- this.dialogService = dialogService;
2671
- this._cookieService = _cookieService;
2672
- this.route = route;
2673
- this.msgService = msgService;
2674
- this._localStorage = _localStorage;
2675
- this.translateService = translateService;
2676
- this.httpCommonService = httpCommonService;
2677
- this.userDetails = {};
2678
- this.showProfile = false;
2679
- this.userdisplayName = '';
2680
- this.userFirstName = '';
2681
- this.userLastName = '';
2682
- this.userLastLoggedIn = '';
2683
- // private LoggedInUserID: string = '';
2684
- this.unsubscribeAPIEventListenerData = new Subject();
2685
- /* Forwarded down to <ng-translation> so the language list is sourced
2686
- from the host app instead of a separate library API call. */
2687
- this.languages = [];
2688
- this.closeDialogBox = new EventEmitter();
2689
- // public userSessionID: string = '';
2690
- this.sec = 1;
2691
- this.min = 2;
2692
- this.Hr = 30;
2693
- this.isOpenSidePopup = false;
2694
- this.showUserDetails = false;
2695
- // private themeService: ThemeService,
2696
- // private fontService: FontService,
2697
- // private cookieService: CookieService,
2698
- // this.fetchedSavedData();
2699
- }
2700
- ngOnInit() {
2701
- this.getLoggedInuserDteils();
2702
- }
2703
- //Method: Open User Setting Panel
2704
- openUserSettingPanel() {
2705
- this.ref = this.dialogService.open(GeneralConfigurationComponent, {
2706
- header: this.translateService.instant('Generic_lib.GeneralConfiguration'),
2707
- styleClass: 'general-configuration',
2708
- // data: {
2709
- // apiURL: this.apiURL,
2710
- // },
2711
- });
2712
- }
2713
- getLoggedInuserDteils() {
2714
- this.httpCommonService
2715
- .getLoggedInUserDetails()
2716
- .pipe(takeUntil$1(this.unsubscribeAPIEventListenerData))
2717
- .subscribe((result) => {
2718
- if (result && result['success'] && result['result']) {
2719
- this.userDetails = result['result'];
2720
- this.userdisplayName = this.userDetails['userDisplayName'];
2721
- this.showProfile = true;
2722
- this.getTotalSessionTime();
2723
- this.setLoggedInUserName(this.userdisplayName);
2724
- }
2725
- else {
2726
- this.showProfile = false;
2727
- this.userDetails = {};
2728
- }
2729
- });
2730
- }
2731
- setLoggedInUserName(userdisplayName) {
2732
- if (userdisplayName && userdisplayName.includes(' ')) {
2733
- let splitStringArr = userdisplayName.split(' ');
2734
- this.userFirstName = splitStringArr[0];
2735
- this.userLastName = splitStringArr[1];
2736
- }
2737
- else {
2738
- this.userdisplayName = userdisplayName;
2739
- }
2740
- }
2741
- getcloseDialogBox() {
2742
- this.closeDialogBox.emit(true);
2743
- }
2744
- getUserLoggedInTime() {
2745
- let LastLoggedIn = this.convertUTCToLocal(this.userDetails['lastLogIn']);
2746
- let LastLoggedInDate = new Date(LastLoggedIn);
2747
- this.userLastLoggedIn = LastLoggedInDate.toLocaleString();
2748
- }
2749
- logoutCurrentUser() {
2750
- this.httpCommonService
2751
- .getInitiateUserLogout()
2752
- .pipe()
2753
- .subscribe((res) => {
2754
- if (res) {
2755
- this._cookieService.clearAllCookies();
2756
- this._localStorage.clearData();
2757
- if (res && res['spLogoutUrls'] && res['spLogoutUrls'].length > 0) {
2758
- this.destoryAllSessions(res['spLogoutUrls']);
2759
- }
2760
- if (res?.['identity']) {
2761
- this.userWithWindowAuthentication();
2762
- }
2763
- else {
2764
- const path = '/' + RoutePaths.LOGINPG_PATH;
2765
- const urlnew = new URL(window.location.href).origin + '/#' + path;
2766
- window.location.href = urlnew;
2767
- }
2768
- }
2769
- else {
2770
- this.msgService.error(errorMsg.LOGOUTERROR);
2771
- // window.location.href = new URL(window.location.href).origin + '/#/login';
2772
- }
2773
- });
2774
- }
2775
- /**
2776
- * This function destroys all user sessions by opening multiple SAML logout URLs in new browser tabs.
2777
- */
2778
- destoryAllSessions(samlUrls) {
2779
- samlUrls.forEach((url) => {
2780
- window.open(url, '_blank');
2781
- });
2782
- }
2783
- userWithWindowAuthentication() {
2784
- const path = '/' + RoutePaths.LOGOUT_PATH;
2785
- this.route.navigateByUrl(path);
2786
- }
2787
- getTotalSessionTime() {
2788
- let loginTime = this.convertUTCToLocal(this.userDetails['currentLogIn']);
2789
- let loginTimeDate = new Date(loginTime);
2790
- let currentTime = new Date();
2791
- let milliseconds = currentTime.valueOf() - loginTimeDate.valueOf();
2792
- let seconds = Math.floor(milliseconds / 1000);
2793
- let minutes = Math.floor(seconds / 60);
2794
- let hours = Math.floor(minutes / 60);
2795
- seconds = seconds % 60;
2796
- minutes = minutes % 60;
2797
- this.Hr = hours;
2798
- this.min = minutes;
2799
- this.sec = seconds;
2800
- setInterval(() => {
2801
- this.updateTimer();
2802
- }, 1000);
2803
- }
2804
- updateTimer() {
2805
- if (this.sec < 59) {
2806
- this.sec += 1;
2807
- }
2808
- else {
2809
- this.sec = 0;
2810
- if (this.min < 59) {
2811
- this.min += 1;
2812
- }
2813
- else {
2814
- this.min = 0;
2815
- this.Hr += 1;
2816
- }
2817
- }
2818
- }
2819
- convertUTCToLocal(newdate) {
2820
- let localDate = newdate + 'Z';
2821
- localDate = localDate.toLocaleString();
2822
- return localDate;
2823
- }
2824
- OpenArconLearningCenter() {
2825
- const url = GlobalConstants.PlugInDownloadURL;
2826
- window.open(url, '_blank');
2827
- }
2828
- //close Popup
2829
- closeUserSettingPanel() {
2830
- if (this.ref) {
2831
- this.ref.close();
2832
- }
2833
- }
2834
- // languageChange(event: any) {
2835
- // if (!event) return;
2836
- // // this.langChange.emit(event);
2837
- // }
2838
- //*Global Font and Theme
2839
- getRedTheme() {
2840
- // const active = this.themeService.getActiveTheme();
2841
- // if (
2842
- // active.name === "blue" ||
2843
- // active.name === "black" ||
2844
- // active.name === "red"
2845
- // ) {
2846
- // this.themeService.setTheme("red");
2847
- // this.cookieService.set("themeColor", "red");
2848
- // }
2849
- }
2850
- getBlackTheme() {
2851
- // const active = this.themeService.getActiveTheme();
2852
- // if (
2853
- // active.name === "blue" ||
2854
- // active.name === "black" ||
2855
- // active.name === "red"
2856
- // ) {
2857
- // this.themeService.setTheme("blue");
2858
- // this.cookieService.set("themeColor", "blue");
2859
- // }
2860
- }
2861
- getBlueTheme() {
2862
- // const active = this.themeService.getActiveTheme();
2863
- // if (
2864
- // active.name === "blue" ||
2865
- // active.name === "black" ||
2866
- // active.name === "red"
2867
- // ) {
2868
- // this.themeService.setTheme("black");
2869
- // this.cookieService.set("themeColor", "black");
2870
- // }
2871
- }
2872
- // Accessibility Fonts sizes
2873
- getSmallFont() {
2874
- // this.fontService.setFont("smFont");
2875
- }
2876
- getMediumFont() {
2877
- // this.fontService.setFont("mdFont");
2878
- }
2879
- getLargeFont() {
2880
- // this.fontService.setFont("lgFont");
2881
- }
2882
- ngOnDestroy() {
2883
- this.closeUserSettingPanel();
2884
- this.unsubscribeAPIEventListenerData.next(true);
2885
- this.unsubscribeAPIEventListenerData.complete();
2886
- }
2887
- }
2888
- UserSidebarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserSidebarComponent, deps: [{ token: i1$3.DialogService }, { token: CookieStorageManagerService }, { token: i3.Router }, { token: ToastMsgService }, { token: StorageService }, { token: i4.TranslateService }, { token: HttpCommonService }], target: i0.ɵɵFactoryTarget.Component });
2889
- UserSidebarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: UserSidebarComponent, selector: "app-user-sidebar", inputs: { languages: "languages" }, 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 src=\"assets/common-header-lib/images/logout.svg\" class=\"imgs\" alt=\"user\">\r\n <div class=\"mx-2 log-text\" (click)=\"logoutCurrentUser()\">{{\"Generic_lib.Logout\" | translate}}</div>\r\n </div>\r\n <div class=\"sh-top-right\">\r\n <button type=\"button\" class=\"common-bn tertiary-btn\">\r\n <img src=\"assets/common-header-lib/images/close.svg\" class=\"imgs\" alt=\"close icon\" title=\"Close\"\r\n (click)=\"getcloseDialogBox()\">\r\n </button>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"showProfile; else LoadingAnimation\">\r\n <div class=\"sh-bottom d-flex pt-3\">\r\n <ng-container *ngIf=\"userdisplayName && userdisplayName.length > 0; else defaultName\">\r\n <div class=\"initial-text\">\r\n {{ userdisplayName | sliceToTwo }}\r\n </div>\r\n </ng-container>\r\n <ng-template #defaultName>\r\n <div class=\"initial-text\">\r\n {{ 'NA' }}\r\n </div>\r\n </ng-template>\r\n <div class=\"sh-bottom-content\">\r\n <h4 class=\"title\">{{ userDetails['userDisplayName']}}</h4>\r\n <p>{{ userDetails['emailID']}}</p>\r\n <div class=\"sh-bottom-content-ls\">\r\n <ng-container\r\n *ngIf=\"userDetails['lastLogIn'] && !userDetails['lastLogIn'].includes('NA'); else InvalidDate\">\r\n <p style=\"margin-right: 5px;\">{{\"Generic_lib.LastSession\" | translate}} : </p>\r\n <p>{{userDetails['lastLogIn']}}</p>\r\n </ng-container>\r\n <ng-template #InvalidDate>\r\n <p style=\"margin-right: 5px;\">{{\"Generic_lib.LastSession\" | translate}} : </p>\r\n <p>NA</p>\r\n </ng-template>\r\n </div>\r\n <div class=\"sh-bottom-content-ls session-content\">\r\n <p tyle=\"margin-right: 5px;\">{{\"Generic_lib.CurrentSession\" | translate}} : </p>\r\n <p>{{Hr}} {{\"Generic_lib.hrs\" | translate}} {{min}} {{\"Generic_lib.min\" | translate}} {{sec}}\r\n {{\"Generic_lib.secs\" | translate}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-template #LoadingAnimation>\r\n <div class=\"loading-skeleton d-flex p-3\">\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 width=\"8rem\" height=\".7rem\" styleClass=\"mb-2\"></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 </ng-template>\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 src=\"assets/common-header-lib/images/domain_img.svg\" loading=\"lazy\">\r\n <div class=\"mx-2 lang-dropdown\">\r\n <ng-translation [languages]=\"languages\"></ng-translation> <!-- (langChange)=\"languageChange($event)\" -->\r\n </div>\r\n </li>\r\n <li class=\"grey-bg-hover\" (click)=\"OpenArconLearningCenter()\">\r\n <img src=\"assets/common-header-lib/images/local.svg\" class=\"imgs\" alt=\"Arcon\">\r\n <p class=\"mx-2\">{{\"Generic_lib.ArconLearningCenter\" | translate}}</p>\r\n </li>\r\n\r\n <li class=\"grey-bg-hover\">\r\n <img src=\"assets/common-header-lib/images/settings.svg\" alt=\"settings\">\r\n <p class=\"mx-2\" (click)=\"openUserSettingPanel()\">{{\"Generic_lib.GeneralConfiguration\" | translate}}</p>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Global Font and Theme -->\r\n <!-- <div class=\"accessibility-container d-flex justify-content-between\">\r\n <div class=\"d-flex\">\r\n <button class=\"btn btn-light btn-small rounded-circle\" (click)=\"getSmallFont()\">\r\n <span>A-</span>\r\n </button>\r\n <button class=\"btn btn-light btn-small rounded-circle\" (click)=\"getMediumFont()\">\r\n <span>A</span>\r\n </button>\r\n <button class=\"btn btn-light btn-small rounded-circle\" (click)=\"getLargeFont()\">\r\n <span>A+</span>\r\n </button>\r\n </div>\r\n <div class=\"d-flex\">\r\n <button class=\"btn btn-light btn-small rounded-circle\" (click)=\"getRedTheme()\">\r\n <span class=\"theme theme-red\"></span>\r\n </button>\r\n <button class=\"btn btn-light btn-small rounded-circle\" (click)=\"getBlackTheme()\">\r\n <span class=\"theme theme-black\"></span>\r\n </button>\r\n <button class=\"btn btn-light btn-small rounded-circle\" (click)=\"getBlueTheme()\">\r\n <span class=\"theme theme-blue\"></span>\r\n </button>\r\n </div>\r\n </div> -->\r\n</div>\r\n", styles: [".white-bg{background-color:#fff!important;width:100%!important}.grey-background{background-color:#f6f7fb!important}.imgs{width:20px!important}.cursor-pointer{cursor:pointer}.sidebar-outer{width:100%!important;float:left!important}.sidebar-outer .sidebar-header{padding:12px 15px!important}.sidebar-outer .sidebar-header .sh-top{display:flex!important;align-items:center!important;justify-content:space-between!important}.sidebar-outer .sidebar-header .sh-top .sh-top-left{display:flex!important;align-items:center!important}.sidebar-outer .sidebar-header .sh-top .sh-top-left .log-text{font-size:14px!important;font-weight:500!important;cursor:pointer!important}.sidebar-outer .sidebar-header .sh-top .sh-top-right button{height:24px!important;border:none!important;background-color:transparent!important}.sidebar-outer .sidebar-header .sh-bottom{display:flex!important;padding-top:16px!important}.sidebar-outer .sidebar-header .sh-bottom .initial-text{width:40px;height:40px;display:flex;align-items:center;justify-content:center;font-size:15px;border-radius:50%;color:#fff;background-color:#8e562e}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content{padding-left:14px!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .title{font-size:17px!important;font-weight:600!important;height:21px!important;margin-bottom:2px!important;line-height:26px!important;color:#292f4c!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content p{font-size:14px!important;line-height:22px!important;color:#676879!important;margin-bottom:0!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .sh-bottom-content-ls{display:flex!important;align-items:center!important;font-size:12px!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .session-content{position:relative!important;bottom:2px!important}.sidebar-outer .sidebar-body{padding:12px 20px!important;width:100%!important}.sidebar-outer .sidebar-body .sb-list{width:100%!important}.sidebar-outer .sidebar-body .sb-list ul{width:100%!important;list-style:none;padding-left:0;margin:0}.sidebar-outer .sidebar-body .sb-list ul li{display:flex!important;align-items:center!important;padding:8px 2px!important;cursor:pointer!important}.sidebar-outer .sidebar-body .sb-list ul li img{width:18px}.sidebar-outer .sidebar-body .sb-list ul li p{margin:0 0 0 8px!important;font-size:14px!important}.sidebar-outer .sidebar-body .sb-list ul li .lang-dropdown{margin-left:8px!important}.accessibility-container{background-color:#eee;padding:7px 20px}.accessibility-container .btn{align-content:center;align-items:center;border:1px solid #9e9e9e;color:#707070;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:#d4231d}.accessibility-container .btn .theme-black{background-color:#212121}.accessibility-container .btn .theme-blue{background-color:#4d91ea}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i9$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: NgTranslationComponent, selector: "ng-translation", inputs: ["languages"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: SliceToTwoPipe, name: "sliceToTwo" }] });
2890
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserSidebarComponent, decorators: [{
2891
- type: Component,
2892
- args: [{ selector: 'app-user-sidebar', providers: [DialogService], 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 src=\"assets/common-header-lib/images/logout.svg\" class=\"imgs\" alt=\"user\">\r\n <div class=\"mx-2 log-text\" (click)=\"logoutCurrentUser()\">{{\"Generic_lib.Logout\" | translate}}</div>\r\n </div>\r\n <div class=\"sh-top-right\">\r\n <button type=\"button\" class=\"common-bn tertiary-btn\">\r\n <img src=\"assets/common-header-lib/images/close.svg\" class=\"imgs\" alt=\"close icon\" title=\"Close\"\r\n (click)=\"getcloseDialogBox()\">\r\n </button>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"showProfile; else LoadingAnimation\">\r\n <div class=\"sh-bottom d-flex pt-3\">\r\n <ng-container *ngIf=\"userdisplayName && userdisplayName.length > 0; else defaultName\">\r\n <div class=\"initial-text\">\r\n {{ userdisplayName | sliceToTwo }}\r\n </div>\r\n </ng-container>\r\n <ng-template #defaultName>\r\n <div class=\"initial-text\">\r\n {{ 'NA' }}\r\n </div>\r\n </ng-template>\r\n <div class=\"sh-bottom-content\">\r\n <h4 class=\"title\">{{ userDetails['userDisplayName']}}</h4>\r\n <p>{{ userDetails['emailID']}}</p>\r\n <div class=\"sh-bottom-content-ls\">\r\n <ng-container\r\n *ngIf=\"userDetails['lastLogIn'] && !userDetails['lastLogIn'].includes('NA'); else InvalidDate\">\r\n <p style=\"margin-right: 5px;\">{{\"Generic_lib.LastSession\" | translate}} : </p>\r\n <p>{{userDetails['lastLogIn']}}</p>\r\n </ng-container>\r\n <ng-template #InvalidDate>\r\n <p style=\"margin-right: 5px;\">{{\"Generic_lib.LastSession\" | translate}} : </p>\r\n <p>NA</p>\r\n </ng-template>\r\n </div>\r\n <div class=\"sh-bottom-content-ls session-content\">\r\n <p tyle=\"margin-right: 5px;\">{{\"Generic_lib.CurrentSession\" | translate}} : </p>\r\n <p>{{Hr}} {{\"Generic_lib.hrs\" | translate}} {{min}} {{\"Generic_lib.min\" | translate}} {{sec}}\r\n {{\"Generic_lib.secs\" | translate}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-template #LoadingAnimation>\r\n <div class=\"loading-skeleton d-flex p-3\">\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 width=\"8rem\" height=\".7rem\" styleClass=\"mb-2\"></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 </ng-template>\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 src=\"assets/common-header-lib/images/domain_img.svg\" loading=\"lazy\">\r\n <div class=\"mx-2 lang-dropdown\">\r\n <ng-translation [languages]=\"languages\"></ng-translation> <!-- (langChange)=\"languageChange($event)\" -->\r\n </div>\r\n </li>\r\n <li class=\"grey-bg-hover\" (click)=\"OpenArconLearningCenter()\">\r\n <img src=\"assets/common-header-lib/images/local.svg\" class=\"imgs\" alt=\"Arcon\">\r\n <p class=\"mx-2\">{{\"Generic_lib.ArconLearningCenter\" | translate}}</p>\r\n </li>\r\n\r\n <li class=\"grey-bg-hover\">\r\n <img src=\"assets/common-header-lib/images/settings.svg\" alt=\"settings\">\r\n <p class=\"mx-2\" (click)=\"openUserSettingPanel()\">{{\"Generic_lib.GeneralConfiguration\" | translate}}</p>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Global Font and Theme -->\r\n <!-- <div class=\"accessibility-container d-flex justify-content-between\">\r\n <div class=\"d-flex\">\r\n <button class=\"btn btn-light btn-small rounded-circle\" (click)=\"getSmallFont()\">\r\n <span>A-</span>\r\n </button>\r\n <button class=\"btn btn-light btn-small rounded-circle\" (click)=\"getMediumFont()\">\r\n <span>A</span>\r\n </button>\r\n <button class=\"btn btn-light btn-small rounded-circle\" (click)=\"getLargeFont()\">\r\n <span>A+</span>\r\n </button>\r\n </div>\r\n <div class=\"d-flex\">\r\n <button class=\"btn btn-light btn-small rounded-circle\" (click)=\"getRedTheme()\">\r\n <span class=\"theme theme-red\"></span>\r\n </button>\r\n <button class=\"btn btn-light btn-small rounded-circle\" (click)=\"getBlackTheme()\">\r\n <span class=\"theme theme-black\"></span>\r\n </button>\r\n <button class=\"btn btn-light btn-small rounded-circle\" (click)=\"getBlueTheme()\">\r\n <span class=\"theme theme-blue\"></span>\r\n </button>\r\n </div>\r\n </div> -->\r\n</div>\r\n", styles: [".white-bg{background-color:#fff!important;width:100%!important}.grey-background{background-color:#f6f7fb!important}.imgs{width:20px!important}.cursor-pointer{cursor:pointer}.sidebar-outer{width:100%!important;float:left!important}.sidebar-outer .sidebar-header{padding:12px 15px!important}.sidebar-outer .sidebar-header .sh-top{display:flex!important;align-items:center!important;justify-content:space-between!important}.sidebar-outer .sidebar-header .sh-top .sh-top-left{display:flex!important;align-items:center!important}.sidebar-outer .sidebar-header .sh-top .sh-top-left .log-text{font-size:14px!important;font-weight:500!important;cursor:pointer!important}.sidebar-outer .sidebar-header .sh-top .sh-top-right button{height:24px!important;border:none!important;background-color:transparent!important}.sidebar-outer .sidebar-header .sh-bottom{display:flex!important;padding-top:16px!important}.sidebar-outer .sidebar-header .sh-bottom .initial-text{width:40px;height:40px;display:flex;align-items:center;justify-content:center;font-size:15px;border-radius:50%;color:#fff;background-color:#8e562e}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content{padding-left:14px!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .title{font-size:17px!important;font-weight:600!important;height:21px!important;margin-bottom:2px!important;line-height:26px!important;color:#292f4c!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content p{font-size:14px!important;line-height:22px!important;color:#676879!important;margin-bottom:0!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .sh-bottom-content-ls{display:flex!important;align-items:center!important;font-size:12px!important}.sidebar-outer .sidebar-header .sh-bottom .sh-bottom-content .session-content{position:relative!important;bottom:2px!important}.sidebar-outer .sidebar-body{padding:12px 20px!important;width:100%!important}.sidebar-outer .sidebar-body .sb-list{width:100%!important}.sidebar-outer .sidebar-body .sb-list ul{width:100%!important;list-style:none;padding-left:0;margin:0}.sidebar-outer .sidebar-body .sb-list ul li{display:flex!important;align-items:center!important;padding:8px 2px!important;cursor:pointer!important}.sidebar-outer .sidebar-body .sb-list ul li img{width:18px}.sidebar-outer .sidebar-body .sb-list ul li p{margin:0 0 0 8px!important;font-size:14px!important}.sidebar-outer .sidebar-body .sb-list ul li .lang-dropdown{margin-left:8px!important}.accessibility-container{background-color:#eee;padding:7px 20px}.accessibility-container .btn{align-content:center;align-items:center;border:1px solid #9e9e9e;color:#707070;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:#d4231d}.accessibility-container .btn .theme-black{background-color:#212121}.accessibility-container .btn .theme-blue{background-color:#4d91ea}\n"] }]
2893
- }], ctorParameters: function () { return [{ type: i1$3.DialogService }, { type: CookieStorageManagerService }, { type: i3.Router }, { type: ToastMsgService }, { type: StorageService }, { type: i4.TranslateService }, { type: HttpCommonService }]; }, propDecorators: { languages: [{
2894
- type: Input
2895
- }], closeDialogBox: [{
2896
- type: Output
2897
- }] } });
2898
-
2899
- class SidePopupComponent {
2900
- constructor() {
2901
- this.closeDialogBox = new EventEmitter();
2902
- this.visible = false;
2903
- this.position = 'right';
2904
- this.header = 'Details';
2905
- }
2906
- //Method: Close the Side Panel
2907
- getcloseDialogBox() {
2908
- this.visible = false;
2909
- this.closeDialogBox.emit(true);
2910
- }
2911
- ngOnDestroy() {
2912
- this.visible = false;
2913
- }
2914
- }
2915
- SidePopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SidePopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2916
- SidePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SidePopupComponent, selector: "app-side-popup", inputs: { visible: "visible", position: "position", header: "header" }, outputs: { closeDialogBox: "closeDialogBox" }, ngImport: i0, template: "<p-dialog [header]=\"header\" (onHide)=\"getcloseDialogBox()\" [modal]=\"true\" [draggable]=\"false\" [(visible)]=\"visible\"\r\n [position]=\"position\" [style]=\"{\r\n width: '40vw',\r\n minHeight: '100vh',\r\n right: '-15px',\r\n position: 'absolute'\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: "component", type: i1$4.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }] });
2917
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SidePopupComponent, decorators: [{
2918
- type: Component,
2919
- args: [{ selector: 'app-side-popup', template: "<p-dialog [header]=\"header\" (onHide)=\"getcloseDialogBox()\" [modal]=\"true\" [draggable]=\"false\" [(visible)]=\"visible\"\r\n [position]=\"position\" [style]=\"{\r\n width: '40vw',\r\n minHeight: '100vh',\r\n right: '-15px',\r\n position: 'absolute'\r\n }\">\r\n <!-- Dynamically Change the Content of Sidebar -->\r\n <ng-content></ng-content>\r\n</p-dialog>\r\n" }]
2920
- }], ctorParameters: function () { return []; }, propDecorators: { closeDialogBox: [{
2921
- type: Output
2922
- }], visible: [{
2923
- type: Input
2924
- }], position: [{
2925
- type: Input
2926
- }], header: [{
2927
- type: Input
2928
- }] } });
2929
-
2930
- class DateDiffPipe {
2931
- constructor() { } // Inject service
2932
- transform(date) {
2933
- if (date != null) {
2934
- const localDate = this.convertUTCToLocal(date);
2935
- let date2 = new Date(localDate);
2936
- let date1 = new Date();
2937
- if (date2 > date1) {
2938
- // Calculate the absolute difference in milliseconds between the two dates
2939
- const diffTime = Math.abs(date2.getTime() - date1.getTime());
2940
- // Calculate the number of days
2941
- const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
2942
- // Calculate the remaining time after removing the days
2943
- const remainingTime = diffTime % (1000 * 60 * 60 * 24);
2944
- // Calculate the number of hours
2945
- const diffHours = Math.floor(remainingTime / (1000 * 60 * 60));
2946
- // Calculate the remaining time after removing the hours
2947
- const remainingMinutes = remainingTime % (1000 * 60 * 60);
2948
- // Calculate the number of minutes
2949
- const diffMinutes = Math.floor(remainingMinutes / (1000 * 60));
2950
- let result = '';
2951
- if (diffDays > 0) {
2952
- result += `${diffDays} days `;
2953
- }
2954
- if (diffHours > 0) {
2955
- result += `${diffHours} hours `;
2956
- }
2957
- if (diffMinutes > 0) {
2958
- result += `${diffMinutes} minutes`;
2959
- }
2960
- return result.trim();
2961
- }
2962
- else {
2963
- return '00:00:00';
2964
- }
2965
- }
2966
- return '';
2967
- }
2968
- convertUTCToLocal(newdate) {
2969
- let localDate = newdate + 'Z';
2970
- localDate = localDate.toLocaleString();
2971
- return localDate;
2972
- }
2973
- }
2974
- DateDiffPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateDiffPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2975
- DateDiffPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DateDiffPipe, name: "dateDiff" });
2976
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateDiffPipe, decorators: [{
2977
- type: Pipe,
2978
- args: [{
2979
- name: 'dateDiff',
2980
- }]
2981
- }], ctorParameters: function () { return []; } });
2982
-
2983
- class ViewpasswordPopupComponent {
2984
- constructor(dialogService,
2985
- // private readonly _RESTService: RESTMyaccessService,
2986
- msgService, _eventService, translateService, httpCommonService) {
2987
- this.dialogService = dialogService;
2988
- this.msgService = msgService;
2989
- this._eventService = _eventService;
2990
- this.translateService = translateService;
2991
- this.httpCommonService = httpCommonService;
2992
- this.servicePassword = 'Password';
2993
- this.showVaultBtn = false;
2994
- this.isContentLoaded = false;
2995
- this.isValueUpdated = false;
2996
- this.OpenTillDate = '';
2997
- this.unsubscribeAPIEventListenerData = new Subject();
2998
- this.totalEmails = '';
2999
- this.SSHFileType = '';
3000
- this.SSHFileName = '';
3001
- this.isSSHKey = false;
3002
- this.isPasswordVisible = true;
3003
- this.PasswordViewSuccessMsg = '';
3004
- this.SSHPasswordViewSuccessMsg = '';
3005
- this.SSHPasswordViewErrorMsg = '';
3006
- this.sshKeyForDownload = '';
3007
- this.getSelectedGridData(dialogService.data); //Getting Data from popup
3008
- }
3009
- ngAfterViewInit() {
3010
- this.getTranslateContent();
3011
- }
3012
- ngOnInit() {
3013
- this.getAccessServicePassword();
3014
- // this.getCurrentEmailsCount()
3015
- }
3016
- getSelectedGridData(gridData) {
3017
- if (gridData && gridData['payload']) {
3018
- this.mailDetails = gridData['payload'];
3019
- this.SSHFileType = gridData['SSHfileType'];
3020
- this.showVaultBtn = gridData['btnStatus'];
3021
- this.OpenTillDate = this.mailDetails['spv_Opentildate'];
3022
- this.isSSHKey = this.mailDetails['sshkey_isenabled'];
3023
- }
3024
- }
3025
- //Method: Convert text one Lang. to another
3026
- getTranslateContent() {
3027
- this.translateService
3028
- .get([
3029
- 'Generic_lib.PasswordViewSuccessMsg',
3030
- 'Generic_lib.SSHPasswordViewSuccessMsg',
3031
- 'Generic_lib.SSHPasswordViewErrorMsg',
3032
- ])
3033
- .pipe(takeUntil$1(this.unsubscribeAPIEventListenerData))
3034
- .subscribe((trans) => {
3035
- this.PasswordViewSuccessMsg =
3036
- trans['Generic_lib.PasswordViewSuccessMsg'];
3037
- this.SSHPasswordViewSuccessMsg =
3038
- trans['Generic_lib.SSHPasswordViewSuccessMsg'];
3039
- this.SSHPasswordViewErrorMsg =
3040
- trans['Generic_lib.SSHPasswordViewErrorMsg'];
3041
- });
3042
- }
3043
- //Method: Grants access to the View password for a service
3044
- getAccessServicePassword() {
3045
- this.isContentLoaded = false;
3046
- let mailDetails = {
3047
- mailid: String(this.mailDetails['smi_SpvId']),
3048
- // userid: this.userId,
3049
- // userSessionID: this.userSessionId,
3050
- };
3051
- this.httpCommonService
3052
- .getAccessToViewServicePassword(mailDetails)
3053
- .pipe(takeUntil$1(this.unsubscribeAPIEventListenerData), finalize$1(() => {
3054
- this.isContentLoaded = true;
3055
- }))
3056
- .subscribe((result) => {
3057
- this.servicePassword = result?.sshKeyPassPhrase;
3058
- this.SSHFileName = result?.sshFileName;
3059
- this.sshKeyForDownload = result?.sshKey;
3060
- this.getCurrentEmailsCount();
3061
- });
3062
- }
3063
- //Method: Hide password of a service
3064
- getHideServicePassword() {
3065
- this.isValueUpdated = true;
3066
- let mailDetails = {
3067
- spvId: String(this.mailDetails['smi_SpvId']),
3068
- // userId: this.userId,
3069
- };
3070
- this.httpCommonService
3071
- .getProtectedServiceCredentials(mailDetails)
3072
- .pipe(takeUntil$1(this.unsubscribeAPIEventListenerData), finalize$1(() => {
3073
- this.isValueUpdated = false;
3074
- }))
3075
- .subscribe((result) => {
3076
- if (result) {
3077
- this._eventService.emitUserEmail({
3078
- component: 'view-pwd',
3079
- refreshGrid: true,
3080
- });
3081
- }
3082
- });
3083
- }
3084
- /*Method : GET
3085
- Action : Fetch User Mails Count */
3086
- getCurrentEmailsCount() {
3087
- this.httpCommonService
3088
- .getUnreadUserEmailsCount()
3089
- .pipe(takeUntil$1(this.unsubscribeAPIEventListenerData))
3090
- .subscribe((count) => {
3091
- if (count <= 0) {
3092
- this.totalEmails = '';
3093
- }
3094
- else if (count > 99) {
3095
- this.totalEmails = '99+';
3096
- }
3097
- else {
3098
- this.totalEmails = String(count);
3099
- }
3100
- this.updateMailCount();
3101
- });
3102
- }
3103
- getGenerateFile() {
3104
- this.generateSSHKeyFile();
3105
- this.getHideServicePassword();
3106
- }
3107
- generateSSHKeyFile() {
3108
- try {
3109
- const blob = new Blob([this.sshKeyForDownload], { type: '' });
3110
- const url = window.URL.createObjectURL(blob);
3111
- const a = document.createElement('a');
3112
- a.href = url;
3113
- a.download = `${this.SSHFileName}.${this.SSHFileType}`;
3114
- document.body.appendChild(a);
3115
- a.click();
3116
- document.body.removeChild(a);
3117
- window.URL.revokeObjectURL(url);
3118
- this.msgService.success(this.SSHPasswordViewSuccessMsg);
3119
- }
3120
- catch (error) {
3121
- console.error('Error generating SSH key file:', error);
3122
- this.msgService.error(this.SSHPasswordViewErrorMsg);
3123
- }
3124
- }
3125
- updateMailCount() {
3126
- this._eventService.emitUserEmail({
3127
- component: 'email-count',
3128
- mailCount: this.totalEmails,
3129
- });
3130
- }
3131
- copyToClipboard(text) {
3132
- navigator.clipboard
3133
- .writeText(text)
3134
- .then(() => {
3135
- this.msgService.success(this.PasswordViewSuccessMsg);
3136
- })
3137
- .catch((error) => {
3138
- console.error('Error copying text to clipboard: ', error);
3139
- });
3140
- }
3141
- togglePasswordVisibility() {
3142
- this.isPasswordVisible = !this.isPasswordVisible;
3143
- }
3144
- showPassword() {
3145
- if (this.isSSHKey && !this.servicePassword) {
3146
- return false;
3147
- }
3148
- return true;
3149
- }
3150
- ngOnDestroy() {
3151
- // Unsubscribing All the Observer
3152
- this.unsubscribeAPIEventListenerData.next(true);
3153
- this.unsubscribeAPIEventListenerData.complete();
3154
- }
3155
- }
3156
- ViewpasswordPopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewpasswordPopupComponent, deps: [{ token: i1$3.DynamicDialogConfig }, { token: ToastMsgService }, { token: EventService }, { token: i4.TranslateService }, { token: HttpCommonService }], target: i0.ɵɵFactoryTarget.Component });
3157
- ViewpasswordPopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ViewpasswordPopupComponent, selector: "app-viewpassword-popup", ngImport: i0, template: "<div class=\"view-pass-detail\">\r\n <!-- <div class=\"title\">{{\"Generic.Password\" | translate}}</div> -->\r\n <div class=\"mt-4 position-relative px-4\">\r\n <ng-container *ngIf=\"isContentLoaded; else LoadingAnimation\">\r\n <ng-container *ngIf=\"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 </ng-container>\r\n\r\n <ng-container *ngIf=\"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 type=\"checkbox\" (click)=\"togglePasswordVisibility()\" />\r\n <span></span>\r\n </div>\r\n </div>\r\n <input\r\n class=\"form-control view-pass\"\r\n [ngClass]=\"isSSHKey === true ? 'ssh' : ''\"\r\n readonly\r\n type=\"{{ isPasswordVisible ? 'password' : 'text' }}\"\r\n [value]=\"servicePassword\"\r\n placeholder=\"\"\r\n autocomplete=\"off\"\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=\"copy Icon\"\r\n class=\"mx-2\"\r\n />{{ \"Generic_lib.Copy\" | translate }}\r\n </button>\r\n <img\r\n *ngIf=\"!isSSHKey\"\r\n src=\"assets/common-header-lib/images/pass-img.svg\"\r\n alt=\"Icon\"\r\n class=\"position-absolute mx-2\"\r\n />\r\n <p *ngIf=\"isSSHKey\" class=\"position-absolute mx-2\">\r\n {{ \"Generic_lib.KeyPassphrase\" | translate }}:\r\n </p>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- LODDER -->\r\n <ng-template #LoadingAnimation>\r\n <div class=\"row w-100\">\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 </ng-template>\r\n <!-- /LODDER -->\r\n\r\n <!-- MAIN-CONTENT -->\r\n <ng-container *ngIf=\"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 <!-- <ng-container *ngIf=\"showVaultBtn\"> -->\r\n <!-- ! AMIT: Check showVaultBtn condition -->\r\n <ng-container *ngIf=\"true\">\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 <ng-container *ngIf=\"isSSHKey; else downloadbtn\">\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 </ng-container>\r\n <ng-template #downloadbtn>\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 </ng-template>\r\n </div>\r\n </ng-container>\r\n </ng-container>\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}.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: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i9$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: i10.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: DateDiffPipe, name: "dateDiff" }] });
3158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewpasswordPopupComponent, decorators: [{
3159
- type: Component,
3160
- args: [{ selector: 'app-viewpassword-popup', template: "<div class=\"view-pass-detail\">\r\n <!-- <div class=\"title\">{{\"Generic.Password\" | translate}}</div> -->\r\n <div class=\"mt-4 position-relative px-4\">\r\n <ng-container *ngIf=\"isContentLoaded; else LoadingAnimation\">\r\n <ng-container *ngIf=\"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 </ng-container>\r\n\r\n <ng-container *ngIf=\"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 type=\"checkbox\" (click)=\"togglePasswordVisibility()\" />\r\n <span></span>\r\n </div>\r\n </div>\r\n <input\r\n class=\"form-control view-pass\"\r\n [ngClass]=\"isSSHKey === true ? 'ssh' : ''\"\r\n readonly\r\n type=\"{{ isPasswordVisible ? 'password' : 'text' }}\"\r\n [value]=\"servicePassword\"\r\n placeholder=\"\"\r\n autocomplete=\"off\"\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=\"copy Icon\"\r\n class=\"mx-2\"\r\n />{{ \"Generic_lib.Copy\" | translate }}\r\n </button>\r\n <img\r\n *ngIf=\"!isSSHKey\"\r\n src=\"assets/common-header-lib/images/pass-img.svg\"\r\n alt=\"Icon\"\r\n class=\"position-absolute mx-2\"\r\n />\r\n <p *ngIf=\"isSSHKey\" class=\"position-absolute mx-2\">\r\n {{ \"Generic_lib.KeyPassphrase\" | translate }}:\r\n </p>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- LODDER -->\r\n <ng-template #LoadingAnimation>\r\n <div class=\"row w-100\">\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 </ng-template>\r\n <!-- /LODDER -->\r\n\r\n <!-- MAIN-CONTENT -->\r\n <ng-container *ngIf=\"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 <!-- <ng-container *ngIf=\"showVaultBtn\"> -->\r\n <!-- ! AMIT: Check showVaultBtn condition -->\r\n <ng-container *ngIf=\"true\">\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 <ng-container *ngIf=\"isSSHKey; else downloadbtn\">\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 </ng-container>\r\n <ng-template #downloadbtn>\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 </ng-template>\r\n </div>\r\n </ng-container>\r\n </ng-container>\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}.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"] }]
3161
- }], ctorParameters: function () { return [{ type: i1$3.DynamicDialogConfig }, { type: ToastMsgService }, { type: EventService }, { type: i4.TranslateService }, { type: HttpCommonService }]; } });
3162
-
3163
- class NoServiceMyAccessPgComponent {
3164
- constructor() {
3165
- this.heading = "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"; //'Generic_lib.NoSearchResult';
3166
- this.subHeading = '';
3167
- }
3168
- }
3169
- NoServiceMyAccessPgComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NoServiceMyAccessPgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3170
- NoServiceMyAccessPgComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NoServiceMyAccessPgComponent, selector: "app-no-service-my-access-pg", inputs: { heading: "heading", subHeading: "subHeading" }, 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=\"Icon\">\r\n </div>\r\n <div class=\"no-service-description\">\r\n <!-- <div class=\"no-data-text\">{{heading | translate}}</div> -->\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:#212121;font-weight:400}\n"] });
3171
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NoServiceMyAccessPgComponent, decorators: [{
3172
- type: Component,
3173
- args: [{ selector: 'app-no-service-my-access-pg', 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=\"Icon\">\r\n </div>\r\n <div class=\"no-service-description\">\r\n <!-- <div class=\"no-data-text\">{{heading | translate}}</div> -->\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:#212121;font-weight:400}\n"] }]
3174
- }], ctorParameters: function () { return []; }, propDecorators: { heading: [{
3175
- type: Input
3176
- }], subHeading: [{
3177
- type: Input
3178
- }] } });
3179
-
3180
- class GridPaginationComponent {
3181
- constructor() {
3182
- this.first = 0;
3183
- this.currentPgNo = 0;
3184
- this.rows = GlobalConstants.PAGEROW;
3185
- this.totalRecords = 0;
3186
- this.onPgChange = new EventEmitter();
3187
- }
3188
- onPageChange(event) {
3189
- event['page'] = event['page'] + 1; // By default pg index 0 so add +1
3190
- this.currentPgNo = event.page;
3191
- this.rows = event.rows;
3192
- //Emit Page No and PageRow Size
3193
- this.onPgChange.emit({
3194
- currentPgNo: this.currentPgNo,
3195
- perPgRows: this.rows,
3196
- });
3197
- }
3198
- }
3199
- GridPaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3200
- GridPaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: GridPaginationComponent, selector: "app-grid-pagination", inputs: { currentPgNo: "currentPgNo", rows: "rows", totalRecords: "totalRecords" }, 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: "component", type: i1$5.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "templateLeft", "templateRight", "dropdownAppendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "showPageLinks", "dropdownItemTemplate", "first"], outputs: ["onPageChange"] }] });
3201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridPaginationComponent, decorators: [{
3202
- type: Component,
3203
- args: [{ selector: 'app-grid-pagination', 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" }]
3204
- }], ctorParameters: function () { return []; }, propDecorators: { currentPgNo: [{
3205
- type: Input
3206
- }], rows: [{
3207
- type: Input
3208
- }], totalRecords: [{
3209
- type: Input
3210
- }], onPgChange: [{
3211
- type: Output
3212
- }] } });
3213
-
3214
- class customDateFormatPipe {
3215
- constructor() {
3216
- this.datePipe = new DatePipe('en-US');
3217
- }
3218
- transform(value) {
3219
- if (!value) {
3220
- return 'Not Applicable';
3221
- }
3222
- const parsedDate = new Date(value);
3223
- if (isNaN(parsedDate.getTime())) {
3224
- return 'Invalid Date';
3225
- }
3226
- return this.datePipe.transform(parsedDate, 'dd-MMM-yyyy HH:mm:ss');
3227
- }
3228
- }
3229
- customDateFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: customDateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
3230
- customDateFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: customDateFormatPipe, name: "customDateFormat" });
3231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: customDateFormatPipe, decorators: [{
3232
- type: Pipe,
3233
- args: [{
3234
- name: 'customDateFormat',
3235
- }]
3236
- }] });
3237
-
3238
- class UserMailboxComponent {
3239
- constructor(dialogService,
3240
- // private readonly _restMyaccessService: RESTMyaccessService,
3241
- // private readonly loginService: RESTLoginFormService,
3242
- _eventService, translate, libService, httpCommonService) {
3243
- this.dialogService = dialogService;
3244
- this._eventService = _eventService;
3245
- this.translate = translate;
3246
- this.libService = libService;
3247
- this.httpCommonService = httpCommonService;
3248
- this.closeMailDialogBox = new EventEmitter();
3249
- this.ListOfUserAssingedMails = [];
3250
- // private userId: string;
3251
- this.unsubscribeAPIEventListenerData = new Subject();
3252
- this.showVaultBtn = false;
3253
- this.SSHFileName = 'ppk';
3254
- this.hasUserAssignedMails = true;
3255
- //Pagintion
3256
- this.currentPgNo = 1;
3257
- this.perPgRows = 10;
3258
- this.totalCount = 0;
3259
- this.NoServiceMsgText = '';
3260
- this.isContentLoaded = false;
3261
- this.repeatLoader = Array.from({ length: this.perPgRows }).map((_, i) => `Item #${i}`);
3262
- this.apiURL = '';
3263
- }
3264
- ngOnInit() {
3265
- this.onLoadMethods();
3266
- }
3267
- /* Require Methods on PageLoad */
3268
- onLoadMethods() {
3269
- this.getUserEmails();
3270
- this.getglobalConfigDetails();
3271
- this._eventService.listenerUserEmail().subscribe((data) => {
3272
- if (data && data['component'] === 'view-pwd') {
3273
- if (data['refreshGrid']) {
3274
- this.ref?.close();
3275
- // this.getUserEmails();
3276
- }
3277
- }
3278
- });
3279
- }
3280
- openViewPasswordPanel(mailDetails) {
3281
- this.ref = this.dialogService.open(ViewpasswordPopupComponent, {
3282
- header: mailDetails.sshkey_isenabled
3283
- ? this.translate.instant('Generic_lib.SSHKey')
3284
- : this.translate.instant('Generic_lib.Password'),
3285
- styleClass: 'view-pass-details',
3286
- data: {
3287
- payload: mailDetails,
3288
- btnStatus: this.showVaultBtn,
3289
- SSHfileType: this.SSHFileName,
3290
- },
3291
- });
3292
- // Handle the close event here
3293
- this.ref.onClose.subscribe((result) => {
3294
- this.getUserEmails();
3295
- });
3296
- }
3297
- /*Action : Fetching user Emails from a API */
3298
- getUserEmails() {
3299
- this.isContentLoaded = false;
3300
- let payload = {
3301
- pageSize: this.perPgRows,
3302
- pageNumber: this.currentPgNo,
3303
- };
3304
- this.httpCommonService
3305
- .getUserAssignedMails(payload)
3306
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData), finalize(() => {
3307
- this.isContentLoaded = true;
3308
- }))
3309
- .subscribe((response) => {
3310
- this.ListOfUserAssingedMails = response;
3311
- if (this.ListOfUserAssingedMails.length > 0) {
3312
- this.hasUserAssignedMails = true;
3313
- this.getTotalNoOfRecords();
3314
- }
3315
- else {
3316
- this.hasUserAssignedMails = false;
3317
- this.NoServiceMsgText = errorMsg.NOMAILFOUND;
3318
- }
3319
- });
3320
- }
3321
- //Note: Get Total No of Records for Pagination
3322
- getTotalNoOfRecords() {
3323
- if (this.ListOfUserAssingedMails.length > 0 &&
3324
- this.ListOfUserAssingedMails[0]['totalRecords'] != null) {
3325
- this.totalCount = this.ListOfUserAssingedMails[0]['totalRecords'];
3326
- }
3327
- }
3328
- /*Method : POST
3329
- Action : Get configuration ID based on to show hide Vault Btn*/
3330
- getglobalConfigDetails() {
3331
- this.httpCommonService
3332
- .getglobalConfigDetails('1', [247, 338])
3333
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData))
3334
- .subscribe((data) => {
3335
- if (data && data.length > 0) {
3336
- data.forEach((element) => {
3337
- //For Vault Btn
3338
- if (element && element['id'] === 247 && element['value'] === '0') {
3339
- this.showVaultBtn = false;
3340
- }
3341
- else {
3342
- this.showVaultBtn = true;
3343
- }
3344
- //For Vault Btn
3345
- if (element && element['id'] === 338 && element['value'] === '1') {
3346
- this.SSHFileName = 'pem';
3347
- }
3348
- else {
3349
- this.SSHFileName = 'ppk';
3350
- }
3351
- });
3352
- }
3353
- });
3354
- }
3355
- //Method: Fetch User Assigned Email based on PageNo
3356
- updateDataOnPageChange(pageDetails) {
3357
- this.currentPgNo = pageDetails['currentPgNo'];
3358
- this.perPgRows = pageDetails['perPgRows'];
3359
- this.getUserEmails();
3360
- }
3361
- closeMailBox() {
3362
- this.closeMailDialogBox.emit();
3363
- }
3364
- ngOnDestroy() {
3365
- this.unsubscribeAPIEventListenerData.next(true);
3366
- this.unsubscribeAPIEventListenerData.complete();
3367
- }
3368
- }
3369
- UserMailboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserMailboxComponent, deps: [{ token: i1$3.DialogService }, { token: EventService }, { token: i4.TranslateService }, { token: CommonHeaderLibService }, { token: HttpCommonService }], target: i0.ɵɵFactoryTarget.Component });
3370
- UserMailboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: UserMailboxComponent, selector: "app-user-mailbox", inputs: { apiURL: "apiURL" }, 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 (click)=\"closeMailBox()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/close.svg\"\r\n class=\"imgs\"\r\n alt=\"close icon\"\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 <ng-container *ngIf=\"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 [ngClass]=\"{ markasRead: userMail.smi_sms_id != 1 }\">\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\">{{userMail.smi_Received_On}}</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=\"Icon\"\r\n />\r\n </div>\r\n <div>\r\n <img\r\n src=\"assets/common-header-lib/images/flag1.svg\"\r\n alt=\"Icon\"\r\n />\r\n </div>\r\n <div>\r\n <img\r\n src=\"assets/common-header-lib/images/lock1.svg\"\r\n alt=\"Icon\"\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 </ng-container>\r\n <ng-container *ngIf=\"!isContentLoaded\">\r\n <p-table\r\n [value]=\"repeatLoader\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n responsiveLayout=\"scroll\"\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 </ng-container>\r\n <!-- When There is No Data Present -->\r\n <ng-container *ngIf=\"!hasUserAssignedMails\">\r\n <app-no-service-my-access-pg\r\n [heading]=\"NoServiceMsgText\"\r\n ></app-no-service-my-access-pg>\r\n </ng-container>\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: [".mail-content{padding:0 25px;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:#fff}.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: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: i9$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "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", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "virtualRowHeight", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "component", type: NoServiceMyAccessPgComponent, selector: "app-no-service-my-access-pg", inputs: ["heading", "subHeading"] }, { kind: "component", type: GridPaginationComponent, selector: "app-grid-pagination", inputs: ["currentPgNo", "rows", "totalRecords"], outputs: ["onPgChange"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: customDateFormatPipe, name: "customDateFormat" }] });
3371
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserMailboxComponent, decorators: [{
3372
- type: Component,
3373
- args: [{ selector: 'app-user-mailbox', providers: [DialogService], 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 (click)=\"closeMailBox()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/close.svg\"\r\n class=\"imgs\"\r\n alt=\"close icon\"\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 <ng-container *ngIf=\"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 [ngClass]=\"{ markasRead: userMail.smi_sms_id != 1 }\">\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\">{{userMail.smi_Received_On}}</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=\"Icon\"\r\n />\r\n </div>\r\n <div>\r\n <img\r\n src=\"assets/common-header-lib/images/flag1.svg\"\r\n alt=\"Icon\"\r\n />\r\n </div>\r\n <div>\r\n <img\r\n src=\"assets/common-header-lib/images/lock1.svg\"\r\n alt=\"Icon\"\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 </ng-container>\r\n <ng-container *ngIf=\"!isContentLoaded\">\r\n <p-table\r\n [value]=\"repeatLoader\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n responsiveLayout=\"scroll\"\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 </ng-container>\r\n <!-- When There is No Data Present -->\r\n <ng-container *ngIf=\"!hasUserAssignedMails\">\r\n <app-no-service-my-access-pg\r\n [heading]=\"NoServiceMsgText\"\r\n ></app-no-service-my-access-pg>\r\n </ng-container>\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: [".mail-content{padding:0 25px;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:#fff}.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"] }]
3374
- }], ctorParameters: function () { return [{ type: i1$3.DialogService }, { type: EventService }, { type: i4.TranslateService }, { type: CommonHeaderLibService }, { type: HttpCommonService }]; }, propDecorators: { closeMailDialogBox: [{
3375
- type: Output
3376
- }], apiURL: [{
3377
- type: Input
3378
- }] } });
3379
-
3380
- class CommonHeaderLibComponent {
3381
- constructor(cdRef, _signalRService, _eventService, translate, httpCommonService, msgService) {
3382
- this.cdRef = cdRef;
3383
- this._signalRService = _signalRService;
3384
- this._eventService = _eventService;
3385
- this.translate = translate;
3386
- this.httpCommonService = httpCommonService;
3387
- this.msgService = msgService;
3388
- // @Input() apiURL: string = '';
3389
- this.EnableLogo = true;
3390
- this.moduleName = '';
3391
- this.EnableTimeZone = true;
3392
- this.EnableLOB = true;
3393
- this.showAllLOB = false;
3394
- this.EnableMail = true;
3395
- this.EnableNotifications = true;
3396
- this.EnableMoreApps = true;
3397
- this.EnableProfile = true;
3398
- /* Supported languages forwarded down to <ng-translation>. The host app
3399
- loads languages.json once (via its APP_INITIALIZER) and binds the
3400
- resulting list here, eliminating a duplicate fetch from the library. */
3401
- this.languages = [];
3402
- this.timezoneDetails = new EventEmitter();
3403
- this.lobSelected = new EventEmitter();
3404
- this.getBgImage = new EventEmitter();
3405
- this.langChange = new EventEmitter();
3406
- this.overlayStateChange = new EventEmitter();
3407
- this.userTimeZoneAbbreviations = '';
3408
- this.userTimeZoneFullForm = '';
3409
- this.userLOBList = [];
3410
- this.showLobLoader = true;
3411
- this.totalEmails = '';
3412
- this.userNotificationCount = '';
3413
- this.ListOfUserPrivillegedApp = [];
3414
- this.userdisplayName = '';
3415
- this.userDetailsInfo = [];
3416
- this.isOpenSidePopup = false;
3417
- this.showUserDetails = false;
3418
- this.userAppLoaderLoadder = true;
3419
- this.repeatLoader = new Array(12).fill(0);
3420
- this.showMailboxScreenflag = false;
3421
- this.isErrorFound = false;
3422
- this.userNotificationCountObj = {};
3423
- this.eventwiseNotificationCount = [];
3424
- this.notificationLoadder = true;
3425
- this.unsubscribeAPIEventListenerData = new Subject();
3426
- this.unsubscribeSidebarListenerData = new Subject();
3427
- this.userId = '';
3428
- this.assetCategoryMenuList = [];
3429
- this.showbusinessFileds = false;
3430
- this.showInfraFileds = false;
3431
- this.showfiltersearch = true;
3432
- this.clickInside = false;
3433
- this.isLobContentLoaded = false;
3434
- this.isHeaderContentLoaded = false;
3435
- this.requestTypeId = 1;
3436
- this.accessTypes = [
3437
- { id: 1, name: 'Permanent' },
3438
- { id: 2, name: 'OneTime' },
3439
- { id: 3, name: 'TimeBased' },
3440
- ];
3441
- this.selectedAssetName = {
3442
- assetId: -100,
3443
- assetName: 'All',
3444
- };
3445
- this.assetName = '';
3446
- this.assetId = 0;
3447
- this.allCategory = {
3448
- assetTypeId: -100,
3449
- assetTypeValue: 'All Section',
3450
- assetList: [
3451
- {
3452
- assetId: -100,
3453
- assetName: 'All',
3454
- },
3455
- ],
3456
- };
3457
- this.translateName = [
3458
- 'Generic_lib.Permanent',
3459
- 'Generic_lib.OneTime',
3460
- 'Generic_lib.TimeBased',
3461
- ];
3462
- this.appPanel = OverlayPanel;
3463
- this.isErrorOccured = false;
3464
- // @Output() public refreshNotification = new EventEmitter<boolean>();
3465
- this.repeatLoader1 = new Array(9).fill(0);
3466
- // Mapping of app codes to their pre-connection validation checks.
3467
- // Apps not listed here open the connection directly without a config check.
3468
- this.APP_CONNECTION_CHECKS = {
3469
- APP032: {
3470
- check: () => this.httpCommonService.checkMFAConfiguration(),
3471
- },
3472
- APP033: {
3473
- // Backend expects the lowercase app code (mirrors Workflow_UI MR !287)
3474
- check: () => this.httpCommonService.getInternalAppConfig('app033'),
3475
- },
3476
- };
3477
- this.setWebAPIURL();
3478
- }
3479
- ngOnChanges(changes) {
3480
- if (changes['EnableLOB']) {
3481
- if (changes['EnableLOB'].currentValue === true) {
3482
- this.getListofLOB();
3483
- }
3484
- }
3485
- }
3486
- ngOnInit() {
3487
- this.headerLogo = '';
3488
- this.overlayStateChange.emit(false);
3489
- this.setWebAPIURL();
3490
- if (this.EnableLogo)
3491
- this.loadHeaderLogo();
3492
- this.onLoadMethod();
3493
- }
3494
- onLoadMethod() {
3495
- this.onDemandActions();
3496
- if (this.EnableNotifications)
3497
- this.getEventwiseNotificationCount();
3498
- this.getUserActivityDetails();
3499
- }
3500
- //* on click of Mail icon
3501
- showMailBoxScreen() {
3502
- this.showMailboxScreenflag = true;
3503
- this.overlayStateChange.emit(true);
3504
- }
3505
- hideMailBoxScreen() {
3506
- this.showMailboxScreenflag = false;
3507
- this.overlayStateChange.emit(false);
3508
- }
3509
- //* Main language change emitter
3510
- languageChange(event) {
3511
- if (!event)
3512
- return;
3513
- this.langChange.emit(event);
3514
- }
3515
- showUserAppsPanel(event) {
3516
- this.appPanel.toggle(event);
3517
- if (this.ListOfUserPrivillegedApp.length === 0) {
3518
- this.getUserAssignedApp();
3519
- }
3520
- }
3521
- showUserDetailsPanel() {
3522
- this.openSidePopup();
3523
- this.showUserDetails = true;
3524
- }
3525
- closeSidePopup() {
3526
- this.showUserDetails = false;
3527
- this.isOpenSidePopup = false;
3528
- }
3529
- openSidePopup() {
3530
- this.isOpenSidePopup = true;
3531
- }
3532
- //Method: Take Connection of Application
3533
- getConnectionofApplication(appCode) {
3534
- // Close the apps (9-dots) overlay panel immediately on selection.
3535
- this.appPanel?.hide();
3536
- const appCheck = this.APP_CONNECTION_CHECKS[appCode];
3537
- const commonError = 'Unable to verify the application configuration.';
3538
- // Apps without a configured check connect directly.
3539
- if (!appCheck) {
3540
- this.httpCommonService.openAppConnection(appCode);
3541
- return;
3542
- }
3543
- appCheck
3544
- .check()
3545
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData))
3546
- .subscribe({
3547
- next: (response) => {
3548
- if (response?.isValid) {
3549
- this.httpCommonService.openAppConnection(appCode);
3550
- }
3551
- else {
3552
- this.msgService.error(response?.errorMessage || commonError);
3553
- }
3554
- },
3555
- error: () => {
3556
- this.msgService.error(commonError);
3557
- },
3558
- });
3559
- }
3560
- async getConnectToSingalRhub() {
3561
- try {
3562
- await this._signalRService.initializeSignalRConnection();
3563
- }
3564
- catch (error) {
3565
- console.error('All SignalR hub connections failed.', error);
3566
- }
3567
- }
3568
- ngAfterViewInit() {
3569
- this.ListenToTranslateEvent();
3570
- // Initialize modal instance when DOM is ready
3571
- this.bsModalInstance = new bootstrap.Modal(this.notifyModal.nativeElement);
3572
- }
3573
- /*Method : Listen to the Other component event
3574
- Action : It used to listen diff. component command on basis of perform some actions */
3575
- onDemandActions() {
3576
- //Listen the Event Emit by SignalR Hub
3577
- this._signalRService
3578
- .listenerEventMsg()
3579
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData))
3580
- .subscribe((data) => {
3581
- if (data && data['application'] && data['events']) {
3582
- this.isErrorFound = false;
3583
- this.userNotificationCountObj = data['application'];
3584
- //Note: If Notification count > 99
3585
- if (this.userNotificationCountObj &&
3586
- this.userNotificationCountObj['PendingCount']) {
3587
- if (Number(this.userNotificationCountObj['PendingCount']) > 99) {
3588
- this.userNotificationCount = '99+';
3589
- }
3590
- else {
3591
- this.userNotificationCount = String(this.userNotificationCountObj['PendingCount']);
3592
- }
3593
- }
3594
- else {
3595
- this.userNotificationCount = '';
3596
- }
3597
- this.eventwiseNotificationCount = data['events'];
3598
- }
3599
- });
3600
- this.listenToTimeZoneConfig();
3601
- this.listenToEmailCountEvent();
3602
- }
3603
- //Listen to TimeZone Config
3604
- listenToTimeZoneConfig() {
3605
- this._eventService
3606
- .listenerTimezone()
3607
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData))
3608
- .subscribe((response) => {
3609
- if (response && response['component'] == 'timezone') {
3610
- this.userTimeZoneAbbreviations =
3611
- response['usertimezoneAbbreviations'];
3612
- this.timezoneDetails.emit({
3613
- abbreviations: response['usertimezoneAbbreviations'],
3614
- userTimeZone: response['id'],
3615
- timelist: response['timelist'],
3616
- });
3617
- this.userTimeZoneFullForm = response['userTimeZoneFullForm'];
3618
- }
3619
- });
3620
- }
3621
- //Listen to Email Count when user Read
3622
- listenToEmailCountEvent() {
3623
- this._eventService
3624
- .listenerUserEmail()
3625
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData))
3626
- .subscribe((data) => {
3627
- if (data && data['component'] === 'email-count') {
3628
- this.totalEmails = data['mailCount'];
3629
- }
3630
- });
3631
- }
3632
- //Method: Convert text one Lang. to another
3633
- ListenToTranslateEvent() {
3634
- this.translate.onLangChange.subscribe((val) => {
3635
- this.getTranslateContent();
3636
- });
3637
- }
3638
- //Method: Convert text one Lang. to another Event Listener
3639
- getTranslateContent() {
3640
- this.translate.get(this.translateName).subscribe((trans) => {
3641
- this.accessTypes.forEach((item, index) => {
3642
- const key = this.translateName[index];
3643
- item['name'] = trans[key];
3644
- });
3645
- });
3646
- }
3647
- OpenNotificationModal() {
3648
- // const modalRef = this.modalService.open(NotificationSidebarComponent);
3649
- // modalRef.componentInstance.lesson = lesson;
3650
- this.bsModalInstance?.show();
3651
- }
3652
- closeModal() {
3653
- this.bsModalInstance?.hide();
3654
- }
3655
- //Method: Call APi to Fetch New Notification Count
3656
- getEventwiseNotification() {
3657
- // this.refreshNotification.emit(true);
3658
- this.getEventwiseNotificationCount();
3659
- }
3660
- setWebAPIURL() {
3661
- if (GlobalConstants.baseURL == undefined) {
3662
- if (localStorage.getItem('_WAU')) {
3663
- GlobalConstants.baseURL = localStorage.getItem('_WAU') || '';
3664
- }
3665
- else {
3666
- let parsedURL = new URL(window.location.href);
3667
- let WebApiUrl = parsedURL.origin;
3668
- GlobalConstants.baseURL = WebApiUrl;
3669
- localStorage.setItem('_WAU', GlobalConstants.baseURL);
3670
- }
3671
- }
3672
- }
3673
- getUserActivityDetails() {
3674
- // Reset error state before API calls
3675
- this.isErrorFound = false;
3676
- // Initialize response container for forkJoin
3677
- const responseSet = {};
3678
- // Build payload once for notification API
3679
- const notificationPayload = {
3680
- ApplicationName: GlobalConstants.applicationName,
3681
- UserId: String(this.userId),
3682
- };
3683
- // Add notification API if enabled
3684
- if (this.EnableNotifications) {
3685
- responseSet.notifications = this.httpCommonService
3686
- .getWorkFlowTicketCount(notificationPayload)
3687
- .pipe(
3688
- // Extract valid notification data
3689
- map((response) => response),
3690
- // Handle API error without breaking forkJoin
3691
- catchError(() => {
3692
- this.isErrorFound = true;
3693
- return of(null);
3694
- }));
3695
- }
3696
- // Add user profile API if enabled
3697
- if (this.EnableProfile) {
3698
- responseSet.userinfo = this.httpCommonService.getLoggedInUserDetails();
3699
- }
3700
- // Add timezone API if enabled
3701
- if (this.EnableTimeZone) {
3702
- responseSet.timeZone = this.httpCommonService.getGlobalTimeZone();
3703
- }
3704
- // Add unread email count API if enabled
3705
- if (this.EnableMail) {
3706
- responseSet.emailCount =
3707
- this.httpCommonService.getUnreadUserEmailsCount();
3708
- }
3709
- // Execute all enabled APIs together
3710
- forkJoin(responseSet)
3711
- .pipe(
3712
- // Mark header loading as completed
3713
- finalize(() => {
3714
- this.isHeaderContentLoaded = true;
3715
- }))
3716
- .subscribe((response) => {
3717
- // Process notification data
3718
- if (response.notifications) {
3719
- this.getTotalNotificationCounts(response.notifications);
3720
- }
3721
- // Process user profile data
3722
- if (response.userinfo) {
3723
- this.getLoggedInUserDetails(response.userinfo);
3724
- }
3725
- // Process timezone list
3726
- if (response.timeZone) {
3727
- this.getListOfTimeZones(response.timeZone);
3728
- }
3729
- // Process unread email count
3730
- if (response.emailCount) {
3731
- this.getUserEmailCount(response.emailCount);
3732
- }
3733
- });
3734
- }
3735
- getTotalNotificationCounts(data) {
3736
- // this.isErrorFound = false;
3737
- this.userNotificationCountObj = data || {};
3738
- if (this.userNotificationCountObj &&
3739
- this.userNotificationCountObj['PendingCount']) {
3740
- if (Number(this.userNotificationCountObj['PendingCount']) > 99) {
3741
- this.userNotificationCount = '99+';
3742
- }
3743
- else {
3744
- this.userNotificationCount = String(this.userNotificationCountObj['PendingCount']);
3745
- }
3746
- }
3747
- else {
3748
- this.userNotificationCount = '';
3749
- }
3750
- }
3751
- /*Method : Retrieves details of the currently logged-in user*/
3752
- getLoggedInUserDetails(response) {
3753
- if (response && response['success'] && response['result']) {
3754
- this.userDetails = response['result'];
3755
- this.userdisplayName = this.userDetails['userDisplayName'];
3756
- }
3757
- }
3758
- /*Method : GET
3759
- Action : Get List of Time Zone*/
3760
- getListOfTimeZones(result) {
3761
- if (result && result['abbreviations']) {
3762
- this.timezoneDetails.emit(result);
3763
- this.userTimeZoneAbbreviations = result['abbreviations'];
3764
- this.userTimeZoneFullForm = result['userTimeZone'];
3765
- }
3766
- }
3767
- /*Method : GET
3768
- Action : Transformation fo Count */
3769
- getUserEmailCount(count) {
3770
- if (count <= 0) {
3771
- this.totalEmails = '';
3772
- }
3773
- else if (count > 99) {
3774
- this.totalEmails = '99+';
3775
- }
3776
- else {
3777
- this.totalEmails = String(count);
3778
- }
3779
- }
3780
- /** API to get the header LOGO */
3781
- loadHeaderLogo() {
3782
- this.httpCommonService.getLogo().subscribe((img) => {
3783
- this.getBgImage.emit(img);
3784
- this.headerLogo = 'data:image/png;base64,' + img['logoImg'];
3785
- });
3786
- }
3787
- /** API to get the timezone */
3788
- // getUserPreferredTimezone() {
3789
- // this.httpCommonService.getGlobalTimeZone().subscribe((res: any) => {
3790
- // if (res?.abbreviations) {
3791
- // this.userTimeZoneAbbreviations = res.abbreviations;
3792
- // this.userTimeZoneFullForm = res?.userTimeZone;
3793
- // }
3794
- // });
3795
- // }
3796
- //* get Lob AI call and initial LOB emitter
3797
- getListofLOB() {
3798
- this.showLobLoader = true;
3799
- this.httpCommonService.getLOBList().subscribe((res) => {
3800
- this.showLobLoader = false;
3801
- this.userLOBList = res.result;
3802
- //* As per parent input, here we add All LOB option in DDL
3803
- if (this.showAllLOB)
3804
- this.userLOBList.unshift({
3805
- lobId: -1,
3806
- lobName: 'All LOB',
3807
- });
3808
- let initialLobSelected = this.getLobById(this.userLOBList, this.userLOBList[0]?.lobId);
3809
- const preSelectedLob = JSON.parse(localStorage.getItem('XOB') || 'null');
3810
- let isPreSelectedLobExistsInList = this.userLOBList.some((lob) => Number(lob.lobId) == Number(preSelectedLob?.LOBId));
3811
- if (preSelectedLob &&
3812
- Number(preSelectedLob.LOBId) &&
3813
- isPreSelectedLobExistsInList) {
3814
- //* Emitting 1st LOB for LOB List as LOb details available in localstorega
3815
- this.selectedLOBId = preSelectedLob?.LOBId;
3816
- this.tempSelectedLOBId = preSelectedLob?.LOBId;
3817
- initialLobSelected = this.getLobById(this.userLOBList, this.selectedLOBId);
3818
- }
3819
- else {
3820
- //* Emitting 1st LOB for LOB List if localstorage have null LOB details
3821
- this.selectedLOBId = this.userLOBList[0]?.lobId;
3822
- this.tempSelectedLOBId = this.userLOBList[0]?.lobId;
3823
- localStorage.setItem('XOB', JSON.stringify(initialLobSelected));
3824
- }
3825
- this.lobSelected.emit(initialLobSelected);
3826
- this.cdRef.detectChanges();
3827
- });
3828
- }
3829
- //* Selected LOB emitter
3830
- onLobChangeEvent(event) {
3831
- this.selectedLOBId = event.value;
3832
- this.openConfirm(event);
3833
- }
3834
- openConfirm(event) {
3835
- this.confirmDialog.openConfirmModal(event);
3836
- }
3837
- lobChangeConfirmation(event) {
3838
- if (event) {
3839
- this.tempSelectedLOBId = this.selectedLOBId;
3840
- let selectedLob = this.getLobById(this.userLOBList, this.tempSelectedLOBId);
3841
- localStorage.setItem('XOB', JSON.stringify(selectedLob));
3842
- this.lobSelected.emit(selectedLob);
3843
- }
3844
- else {
3845
- this.selectedLOBId = this.tempSelectedLOBId;
3846
- }
3847
- }
3848
- setCustomLobId(lobId) {
3849
- if (this.userLOBList) {
3850
- let filteredLobs = this.getLobById(this.userLOBList, lobId);
3851
- if (Object.keys(filteredLobs).length > 0) {
3852
- this.selectedLOBId = lobId;
3853
- //* If the LOB is forcefully set from the parent module, CustomLOBSetByParent is set to true; otherwise, it is set to false.
3854
- filteredLobs['CustomLOBSetByParent'] = true;
3855
- this.lobSelected.emit(filteredLobs);
3856
- localStorage.setItem('XOB', JSON.stringify(filteredLobs));
3857
- }
3858
- else {
3859
- //todo need to do translation
3860
- this.msgService.error('The LOB you are trying to set is not available.');
3861
- }
3862
- }
3863
- }
3864
- //* Helper function to get selected LOB Object by LobId
3865
- getLobById(list, id) {
3866
- const item = list.find((x) => x.lobId === id);
3867
- if (!item)
3868
- return {};
3869
- return {
3870
- LOBId: item.lobId,
3871
- LOBName: item.lobName,
3872
- CustomLOBSetByParent: false,
3873
- };
3874
- }
3875
- //* get the Mail count
3876
- // getMailCount() {
3877
- // this.httpCommonService
3878
- // .getUnreadUserEmailsCount()
3879
- // .pipe(takeUntil(this.unsubscribeAPIEventListenerData))
3880
- // .subscribe((result) => {
3881
- // this.totalEmails = result;
3882
- // });
3883
- // }
3884
- //Action: Used to Get Total Eventwise User Notification Count */
3885
- getEventwiseNotificationCount() {
3886
- let payload = {
3887
- ApplicationName: GlobalConstants.applicationName,
3888
- UserId: String(this.userId),
3889
- };
3890
- this.notificationLoadder = true;
3891
- this.httpCommonService
3892
- .getWorkFlowTicketEventwiseCount(payload)
3893
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData), finalize(() => (this.notificationLoadder = false)))
3894
- .subscribe({
3895
- next: (data) => {
3896
- this.isErrorFound = data.length == 0;
3897
- this.eventwiseNotificationCount = data;
3898
- },
3899
- error: () => {
3900
- this.isErrorFound = true;
3901
- },
3902
- });
3903
- }
3904
- //* Get Module privilege list
3905
- getUserAssignedApp() {
3906
- this.ListOfUserPrivillegedApp = [];
3907
- this.userAppLoaderLoadder = true;
3908
- this.httpCommonService
3909
- .getUserAssignedApps()
3910
- .pipe(takeUntil(this.unsubscribeAPIEventListenerData))
3911
- .subscribe((result) => {
3912
- this.userAppLoaderLoadder = false;
3913
- this.ListOfUserPrivillegedApp = result;
3914
- });
3915
- }
3916
- //* Get User details
3917
- getLoggedInuserDetails() {
3918
- this.httpCommonService.getLoggedInUserDetails().subscribe((result) => {
3919
- this.userDetailsInfo = result.result;
3920
- this.userdisplayName = this.userDetailsInfo['userDisplayName'];
3921
- });
3922
- }
3923
- ngOnDestroy() {
3924
- this.unsubscribeAPIEventListenerData.next(true);
3925
- this.unsubscribeAPIEventListenerData.complete();
3926
- this.unsubscribeSidebarListenerData.next(true);
3927
- this.unsubscribeSidebarListenerData.complete();
3928
- }
3929
- }
3930
- CommonHeaderLibComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CommonHeaderLibComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: RestSignalRService }, { token: EventService }, { token: i4.TranslateService }, { token: HttpCommonService }, { token: ToastMsgService }], target: i0.ɵɵFactoryTarget.Component });
3931
- CommonHeaderLibComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CommonHeaderLibComponent, selector: "lib-common-header-lib", inputs: { EnableLogo: "EnableLogo", moduleName: "moduleName", EnableTimeZone: "EnableTimeZone", EnableLOB: "EnableLOB", showAllLOB: "showAllLOB", EnableMail: "EnableMail", EnableNotifications: "EnableNotifications", EnableMoreApps: "EnableMoreApps", EnableProfile: "EnableProfile", languages: "languages" }, outputs: { timezoneDetails: "timezoneDetails", lobSelected: "lobSelected", getBgImage: "getBgImage", langChange: "langChange", overlayStateChange: "overlayStateChange" }, viewQueries: [{ propertyName: "confirmDialog", first: true, predicate: ["confirmDialog"], descendants: true }, { propertyName: "appPanel", first: true, predicate: ["App"], descendants: true }, { propertyName: "notifyModalRef", first: true, predicate: ["notifyModal"], descendants: true }, { propertyName: "notifyModal", first: true, predicate: ["notifyModal"], descendants: true }], usesOnChanges: 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 <div class=\"logo gap-4\" *ngIf=\"EnableLogo\">\r\n <img\r\n *ngIf=\"EnableLogo && headerLogo\"\r\n class=\"logo-size\"\r\n title=\"Logo\"\r\n alt=\"Logo\"\r\n [src]=\"headerLogo\"\r\n loading=\"lazy\"\r\n />\r\n <p-skeleton\r\n *ngIf=\"!headerLogo\"\r\n height=\"1.5rem\"\r\n width=\"5rem\"\r\n ></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <!--* Test Buttons for toast UI -->\r\n <!-- <button type=\"button\" class=\"btn btn-success\" (click)=\"success()\">\r\n success</button\r\n ><button type=\"button\" class=\"btn btn-success\" (click)=\"success1()\">\r\n success1\r\n </button>\r\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"danger()\">color: #1d4ed8;\r\n background: #eff6ff;\r\n danger\r\n </button>\r\n <button type=\"button\" class=\"btn btn-warning\" (click)=\"warning()\">\r\n warning\r\n </button>\r\n <button type=\"button\" class=\"btn btn-info\" (click)=\"info()\">info</button> -->\r\n\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 <!--timezone-->\r\n <ng-container *ngIf=\"EnableTimeZone && 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=\"Icon\"\r\n />\r\n <span class=\"timezone-text\"\r\n >{{ \"Generic_lib.PreferredTimezone\" | translate }} :\r\n </span>\r\n <span\r\n *ngIf=\"userTimeZoneAbbreviations\"\r\n class=\"user-tz\"\r\n [title]=\"userTimeZoneFullForm\"\r\n >{{ userTimeZoneAbbreviations }}</span\r\n >\r\n </div>\r\n </ng-container>\r\n\r\n <!--lob-->\r\n <ng-container *ngIf=\"EnableLOB\">\r\n <ng-container\r\n *ngIf=\"EnableLOB && !showLobLoader; else LobLodderAnimation\"\r\n >\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=\"pen Icon\"\r\n />\r\n\r\n <!-- *Note: Removed [virtualScroll] and [itemSize] from p-dropdown because it caused filtered search results to appear empty until scrolling. Not needed as LOB list size is small. -->\r\n <p-dropdown\r\n filterPlaceholder=\"{{ 'Generic_lib.Search' | translate }}\"\r\n [options]=\"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 >\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-dropdown>\r\n </div>\r\n </ng-container>\r\n <ng-template #LobLodderAnimation>\r\n <p-skeleton height=\"1.5rem\" width=\"10rem\"></p-skeleton>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!--mailbox-->\r\n <ng-container *ngIf=\"isHeaderContentLoaded; else HeaderLoading\">\r\n <div *ngIf=\"EnableMail\" class=\"header-left-icon\">\r\n <img\r\n src=\"assets/common-header-lib/images/mail-icon.svg\"\r\n alt=\"mail Icon\"\r\n class=\"headeright-icon\"\r\n (click)=\"showMailBoxScreen()\"\r\n />\r\n </div>\r\n <ng-container *ngIf=\"EnableMail && totalEmails.length > 0\">\r\n <!-- <ng-container> -->\r\n <div class=\"badge-notify\">\r\n <div pBadge [value]=\"totalEmails\"></div>\r\n </div>\r\n </ng-container>\r\n\r\n <!--notification-->\r\n <div class=\"header-left-icon\" *ngIf=\"EnableNotifications\">\r\n <img\r\n src=\"assets/common-header-lib/images/bell-icon.svg\"\r\n alt=\"mail Icon\"\r\n class=\"headeright-icon\"\r\n (click)=\"OpenNotificationModal()\"\r\n />\r\n </div>\r\n\r\n <ng-container\r\n *ngIf=\"EnableNotifications && userNotificationCount.length > 0\"\r\n >\r\n <div class=\"badge-notify\">\r\n <div pBadge [value]=\"userNotificationCount\"></div>\r\n </div>\r\n </ng-container>\r\n\r\n <!--9 Dots -->\r\n <div\r\n *ngIf=\"EnableMoreApps\"\r\n class=\"header-left-icon\"\r\n title=\"Control Center\"\r\n alt=\"bell Icon\"\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 />\r\n </div>\r\n\r\n <!--user display name -->\r\n <div\r\n *ngIf=\"EnableProfile\"\r\n class=\"main-right\"\r\n (click)=\"showUserDetailsPanel()\"\r\n >\r\n <ng-container>\r\n <div class=\"initial-text mx-1\">\r\n {{ userdisplayName | sliceToTwo }}\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #HeaderLoading>\r\n <p-skeleton shape=\"circle\" size=\"1.3rem\" styleClass=\"mx-2\"></p-skeleton>\r\n <p-skeleton shape=\"circle\" size=\"1.3rem\" styleClass=\"mx-2\"></p-skeleton>\r\n <p-skeleton size=\"1.5rem\" styleClass=\"mx-2\"></p-skeleton>\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mx-2\"></p-skeleton>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</header>\r\n\r\n<!--List of Application : 9 dots -->\r\n<p-overlayPanel #App class=\"pt-0\" styleClass=\"app-panel\">\r\n <ng-container *ngIf=\"!userAppLoaderLoadder; else LoadingTemplate\">\r\n <div class=\"custom-popover-content\">\r\n <div class=\"waffle-align\">\r\n <div\r\n class=\"waffle-popup\"\r\n [title]=\"appDetails['applicationName']\"\r\n *ngFor=\"let appDetails of ListOfUserPrivillegedApp\"\r\n (click)=\"getConnectionofApplication(appDetails['appCode'])\"\r\n >\r\n <img\r\n *ngIf=\"appDetails?.appCode\"\r\n src=\"assets/common-header-lib/images/{{ appDetails.appCode }}.svg\"\r\n alt=\"App icon\"\r\n />\r\n\r\n <div class=\"waffle-text\">{{ appDetails[\"applicationName\"] }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-template #LoadingTemplate>\r\n <div class=\"custom-popover-content skeleton-popover\">\r\n <ng-container *ngFor=\"let item of repeatLoader\">\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\"></p-skeleton>\r\n <p-skeleton height=\".3rem\" width=\"35px\"></p-skeleton>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-template>\r\n</p-overlayPanel>\r\n\r\n<!--mailbox details-->\r\n<ng-container *ngIf=\"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</ng-container>\r\n\r\n<!-- Userdetails profile pop up -->\r\n<div class=\"profile-sidebar\">\r\n <app-side-popup\r\n *ngIf=\"isOpenSidePopup\"\r\n [visible]=\"true\"\r\n [position]=\"'right'\"\r\n (closeDialogBox)=\"closeSidePopup()\"\r\n >\r\n <app-user-sidebar\r\n *ngIf=\"showUserDetails\"\r\n [languages]=\"languages\"\r\n (closeDialogBox)=\"closeSidePopup()\"\r\n ></app-user-sidebar>\r\n </app-side-popup>\r\n</div>\r\n\r\n<!-- Notification side popup -->\r\n<div\r\n class=\"modal fade common-alert-modal\"\r\n #notifyModal\r\n id=\"Notify_SidebarModal\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n>\r\n <div class=\"modal-dialog sidebar-outer white-bg\">\r\n <div class=\"modal-content\">\r\n <div class=\"sidebar-container white-bg\">\r\n <!-- keep everything inside this content -->\r\n\r\n <!-- Sidebar Header -->\r\n <div class=\"sidebar-header grey-background\">\r\n <div class=\"sh-top\">\r\n <div class=\"sh-top-left d-flex align-items-center\">\r\n <div class=\"mx-2 log-text\">\r\n {{ \"Generic_lib.Notification\" | translate }}\r\n </div>\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=\"Close\"\r\n (click)=\"closeModal()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/close.svg\"\r\n alt=\"Close\"\r\n class=\"imgs mb-1\"\r\n />\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Sidebar Body -->\r\n <div class=\"sidebar-body\">\r\n <div class=\"d-flex justify-content-between align-items-center mb-2\">\r\n <div class=\"noti-text\">\r\n {{\r\n \"Generic_lib.YouHaveNNotifications\"\r\n | translate: { count: userNotificationCount }\r\n }}\r\n </div>\r\n <div\r\n class=\"d-flex align-items-center gap-1 refresh-icon\"\r\n (click)=\"getEventwiseNotification()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/refresh-1.svg\"\r\n alt=\"Refresh\"\r\n />\r\n <div class=\"refresh-text\">\r\n {{ \"Generic_lib.Refresh\" | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"mt-3\">\r\n <ng-container\r\n *ngIf=\"\r\n !isErrorFound && !notificationLoadder;\r\n else Noti_LoadingTemplate\r\n \"\r\n >\r\n <div\r\n class=\"notify-border\"\r\n *ngFor=\"let event of eventwiseNotificationCount\"\r\n >\r\n <div class=\"d-flex align-items-center gap-3\">\r\n <div class=\"initial-text initial-text-1 mx-1\">\r\n <img\r\n src=\"assets/common-header-lib/images/noti_ticket.svg\"\r\n alt=\"Icon\"\r\n />\r\n </div>\r\n <div>\r\n <div>\r\n <span class=\"service-count\"\r\n >{{ event[\"PendingCount\"] }} New </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 </ng-container>\r\n <ng-template #Noti_LoadingTemplate>\r\n <ng-container *ngIf=\"notificationLoadder; else errorTemplate\">\r\n <ng-container *ngFor=\"let item of repeatLoader1\">\r\n <div class=\"d-flex align-items-center gap-3\">\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 </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #errorTemplate>\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 </ng-template>\r\n </div>\r\n <!-- Notification content & loaders remain here -->\r\n </div>\r\n </div>\r\n <!-- end of sidebar-container -->\r\n </div>\r\n <!-- end of modal-content -->\r\n </div>\r\n <!-- end of modal-dialog -->\r\n</div>\r\n\r\n<!-- Common Conirmation Modal -->\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)=\"lobChangeConfirmation($event)\"\r\n></confirm-dialog>\r\n\r\n<!--* Need to use component based notification UI as below -->\r\n<!-- Notification-Sidebar Started -->\r\n<!-- <app-notification-sidebar [isErrorOccured]=\"isErrorFound\" [userNotificationCount]=\"userNotificationCount\"\r\n [userNotificationCountObj]=\"userNotificationCountObj\" [eventwiseNotificationCount]=\"eventwiseNotificationCount\"\r\n (refreshNotification)=\"getEventwiseNotificationCount()\"\r\n [notificationLoadder]=\"notificationLoadder\"></app-notification-sidebar> -->\r\n<!-- Notification-Sidebar Ended -->\r\n", styles: [".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}.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{font-size:25px!important}.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}.main-left .p-dropdown{border:none;border-radius:0;width:140px!important}.main-left .p-dropdown-panel .p-dropdown-items{padding:0!important;max-height:110px}.main-left :focus-visible{outline:none}.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:#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{position:fixed;top:4px;left:275px}.head-search.active input{width:555px!important}@media screen and (min-width: 1920px){.head-search.active{position:fixed;top:4px;left:275px}.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: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}.initial-text{width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:11px;border-radius:50%;color:#fff;background-color:#8e562e}.initial-text-1{background-color:#f2edfa}.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:#fff}.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}.form-group{margin-bottom:5px}.waffle-text{font-size:11px;text-align:center;width:70px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;margin-top:-3px}.waffle-align{display:grid;grid-template-columns:auto auto auto}.waffle{cursor:pointer;margin-right:16px}.waffle-popup{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}.custom-popover-content{padding:10px;right:-5px;top:0;position:absolute;background:white;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}.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:#757575;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}.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}.grey-background{background-color:#f6f7fb}.white-bg{background:#ffffff;overflow:hidden}.imgs{width:20px}.p-dropdown .p-dropdown-label{background:transparent;border:0 none;display:flex;align-items:center}.p-dropdown .p-dropdown-trigger{width:32px!important}.pi-chevron-down:before{content:\"\\e902\";font-size:11px}.sidebar-outer{height:100vh}.lang-dropdown .p-dropdown{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-dropdown .pi{position:relative;bottom:2px;left:7px}.lang-dropdown .p-dropdown-panel{background:#ffffff!important;color:#495057!important;border:0px!important;box-shadow:0 2px 12px #0000001a!important}.lang-dropdown .p-dropdown-header{padding:5px 10px!important;border-bottom:1px solid #dee2e6!important;background:#f8f9fa!important;color:#343a40!important;margin:0!important}.lang-dropdown .p-dropdown-items-wrapper{max-height:140px!important}.lang-dropdown .p-dropdown-panel .p-dropdown-header{padding:4px 8px!important;border-radius:0!important}.p-dropdown-panel .p-dropdown-header{padding:.75rem 1.25rem;border-bottom:1px solid #dee2e6;color:#343a40;background:#f8f9fa;margin:0;border-top-right-radius:6px;border-top-left-radius:6px}.lang-dropdown .p-dropdown .p-dropdown-header .p-dropdown-filter{height:26px;border-radius:4px;font-size:12px;border:1px solid #ced4da!important;padding-left:12px!important}.lang-dropdown .p-inputtext{margin:0;text-align:start;font-size:13px;padding:0!important}.lang-dropdown .p-dropdown-panel .p-dropdown-header .p-dropdown-filter-icon{position:relative;bottom:13px;font-size:13px}.sidebar-outer .sidebar-body .sb-list ul li span{margin-right:12px}.p-dropdown-panel .p-dropdown-header .p-dropdown-filter-icon{left:6px;color:#6c757d}.lang-dropdown .p-dropdown-items-wrapper ::-webkit-scrollbar{width:6px!important}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background-color:#c1c1c1;border-radius:6px}::-webkit-scrollbar-thumb:hover{background-color:#a8a8a8}.sidebar-outer .sidebar-body .sb-list ul{float:left;width:100%;list-style:none;padding-left:0}.lang-dropdown .p-dropdown-panel .p-dropdown-items{font-size:12px;padding:0!important}.p-dropdown-panel .p-dropdown-items .p-dropdown-item.p-highlight{color:var(--jaguar-black-color);background:var(--solitude-blue);background-color:var(--solitude-blue)}.lang-dropdown .p-dropdown-panel .p-dropdown-items .p-dropdown-item{padding:2px 14px;font-size:12px}.sidebar-outer .sidebar-body .sb-list ul li{display:flex;padding:8px 2px;cursor:pointer}.modal-dialog{margin-right:0;margin-top:0;margin-bottom:0}.loblist-drpdwn-panel .p-dropdown-header{padding:5px 10px}.loblist-drpdwn-panel .p-inputtext{background:#ffffff;padding:6px}.loblist-drpdwn .p-inputtext{font-size:13px}.loblist-drpdwn-panel .p-dropdown-header .p-dropdown-filter{height:28px;border-radius:4px;font-size:12px}.loblist-drpdwn-panel .p-dropdown-items .p-dropdown-item{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-dropdown-header .p-dropdown-filter-icon{position:absolute;left:82%;top:50%;transform:translateY(-50%);color:#6c757d}.loblist-drpdwn-panel .p-dropdown-items .p-dropdown-empty-message{padding:6px 12px;color:#495057!important;background:transparent!important;font-size:12px}.logo-size{max-height:32px;max-width:92px}.logo-size-1{width:80px;height:30px}.sidebar-body{overflow:auto;height:calc(100vh - 70px);width:100%}.sidebar-body .refresh-icon{cursor:pointer}.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:#fff;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}.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:#fff}.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-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-datatable .p-sortable-column:hover{background-color:#fff!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-dropdown-panel .p-dropdown-items{padding:0}.mail-table .p-dropdown-panel .p-dropdown-items .p-dropdown-item{font-size:13px!important;padding:10px 15px}.mail-table .p-paginator{justify-content:flex-start!important;position:fixed;bottom:0;padding-left:0!important}.mail-table .p-paginator .p-paginator-current{font-size:12px;height:1rem!important}.mail-table .p-paginator .p-paginator-pages .p-paginator-page{min-width:30px!important;height:30px!important;font-size:12px}.mail-table .p-paginator .p-dropdown{height:30px!important;margin-top:0;border:0px}.mail-table .p-paginator .p-dropdown .p-dropdown-label{padding:4px 5px 0 10px!important;font-size:14px}.mail-table .p-paginator .p-dropdown .p-dropdown-trigger{width:1.5rem!important}.mail-table .p-paginator .p-dropdown .p-dropdown-trigger .pi{font-size:13px!important}.mail-pagination .p-paginator{justify-content:flex-start!important;padding-left:0;height:47px;width:100%}.mail-pagination .p-paginator .p-paginator-current{font-size:12px;height:1rem!important;padding-left:0}.mail-pagination .p-paginator .p-paginator-pages .p-paginator-page{min-width:30px!important;height:30px!important;font-size:12px}.mail-pagination .p-paginator .p-dropdown{height:30px!important;margin-top:0;border:0px}.mail-pagination .p-paginator .p-dropdown .p-dropdown-label{padding:4px 5px 0 10px!important;font-size:14px}.mail-pagination .p-paginator .p-dropdown .p-dropdown-trigger{width:1.5rem!important}.mail-pagination .p-paginator .p-dropdown .p-dropdown-trigger .pi{font-size:13px!important}.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}.rm-invalid-border .card{border:0px}.view-pass-details{width:600px!important}.view-pass-details .p-dialog-header{background:#ffffff!important;border-radius:4px 4px 0 0!important;border-bottom:1px solid var(--primary-color)!important}.view-pass-details .p-dialog-content:last-of-type{border-bottom-right-radius:4px!important;border-bottom-left-radius:4px!important;padding:0}.confirmtion-modal .p-dialog-content{padding-top:24px;padding-right:100px;font-size:var(--base-font-size)}.confirmtion-modal .p-confirm-dialog-message{margin-left:0!important}.confirmtion-modal .p-button{font-size:var(--base-font-size);background-color:var(--primary-color);border-color:var(--primary-color);padding:6px 28px}.confirmtion-modal .p-button .p-button-secondary .p-button-outlined{background-color:var(--white-color);border:1px solid var(--primary-color);color:var(--primary-color)}.confirmtion-modal .p-button .p-button-secondary .p-button-outlined:enabled:hover{background-color:var(--white-color)}.confirmtion-modal .p-button:enabled:hover{border:1px solid var(--primary-color);background-color:var(--primary-color)}.confirmtion-modal .p-button.p-button-secondary.p-button-outlined{color:var(--primary-color);border:1px solid var(--primary-color);background-color:var(--white-color)}.confirmtion-modal .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)}.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}.madontary-icon{color:#d4231d;font-weight:500;padding:5px 0 0 5px}.img-lock{width:12px;margin-bottom:1px}.img-lock.ext{width:16px;margin-bottom:0}.img-lock.ext2{width:18px;margin-bottom:0}.form-group .error-msg{position:relative}.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}.p-dialog.general-configuration{width:100%;height:100vh;max-height:100vh}.general-configuration .p-dialog-header{border-bottom:1px solid #d0d4e4!important;background:#ffffff!important}.p-dialog .p-dialog-header{padding:10px 21px!important;background:#fff!important;border-top-right-radius:6px!important;border-top-left-radius:6px!important;height:45px}.p-dialog .p-dialog-header .p-dialog-title{font-weight:600;font-size:var(--base-font-size)}.assets-dropdown .p-dropdown{height:38px!important;width:100%!important;border-radius:4px!important;align-items:center!important}.assets-dropdown .p-dropdown:hover{border:1px solid #ced4da!important}.p-dropdown-panel .p-dropdown-header .p-dropdown-filter{padding-right:1.75rem;margin-right:-1.75rem}.assets-dropdown .p-inputtext{width:100%;border-radius:4px;height:30px;font-size:13px!important}.assets-dropdown .p-dropdown-panel .p-dropdown-header .p-dropdown-filter-icon{left:96%;color:#6c757d;font-size:13px;top:15px!important}.assets-dropdown .p-dropdown-panel .p-dropdown-header{padding:10px!important}.assets-dropdown .p-dropdown-items-wrapper{max-height:100px!important}.assets-dropdown .p-dropdown-panel .p-dropdown-items .p-dropdown-item{padding:5px 20px!important;font-size:13px!important;font-weight:400!important}.p-dropdown-panel .p-dropdown-items{padding:0!important}.assets-dropdown .p-dropdown-panel .p-dropdown-items .p-dropdown-empty-message{font-size:13px!important;padding:8px 20px!important}.p-dropdown-panel .p-dropdown-items .p-dropdown-empty-message{padding:.75rem 1.25rem;color:#495057!important;background:transparent!important}.p-dropdown-filter-container{position:relative}.p-dropdown-filter-container input{border:1px solid #ced4da!important}.input-dropdown .password-checkbox-right{position:absolute;width:24px;right:8px}.timezone-dropdown .p-dropdown{width:100%;border:1px solid #ced4da!important;border-radius:4px;height:38px}.timezone-dropdown .p-dropdown-panel .p-dropdown-header{padding:5px}.timezone-dropdown .p-dropdown:hover{border:1px solid #ced4da!important}.timezone-dropdown .p-inputtext{width:100%;border-radius:4px;height:30px;font-size:13px!important}.timezone-dropdown .p-dropdown-panel .p-dropdown-header .p-dropdown-filter-icon{left:96%;color:#6c757d;font-size:13px;top:15px!important}.timezone-dropdown .p-dropdown-panel .p-dropdown-header{padding:10px!important}.timezone-dropdowntimezone-dropdown .p-dropdown-items-wrapper{max-height:100px!important}.timezone-dropdown .p-dropdown-panel .p-dropdown-items .p-dropdown-item{padding:5px 20px!important;font-size:13px!important;font-weight:400!important}.timezone-dropdown .p-dropdown-panel .p-dropdown-items .p-dropdown-empty-message{font-size:13px!important;padding:8px 20px!important}.sidebar-container{width:420px;position:fixed;top:0;height:100vh;max-width:100%;transition:all .3s ease;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;background-color:#fff}.white-bg{background:#ffffff;width:420px;overflow:hidden}.sidebar-outer .sidebar-header{padding:12px 15px}.sidebar-outer .sidebar-header .sh-top{display:flex;align-items:center;justify-content:space-between}.log-text{font-size:16px;color:#292f4c;font-weight:600}.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)}.tertiary-btn{border:none;background-color:transparent}.sidebar-body .noti-text{color:#292f4c;font-size:13px;font-weight:600;line-height:24px}.sidebar-body .refresh-text{color:#676879;font-size:12px;line-height:24px}.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}.common-alert-modal .modal-dialog{margin-right:0!important}.ngx-toastr{width:400px!important;margin-top:10px!important}.toast-success{background-color:#fff!important;border-bottom:3px solid #258750;border-radius:4px!important;background-image:url(assets/common-header-lib/images/toast-success.svg)!important;background-repeat:no-repeat}.toast-success .toast-title{color:#258750!important;font-weight:700;font-size:16px}.toast-success .toast-message{padding-top:2px;color:#676879!important;font-size:14px!important}.toast-success .toast-progress{color:#258750!important}.toast-error{background-color:#fff!important;border-bottom:3px solid #d83a52;border-radius:4px!important;background-image:url(assets/common-header-lib/images/toast-error.svg)!important;background-repeat:no-repeat}.toast-error .toast-title{color:#d83a52!important;font-weight:700;font-size:16px}.toast-error .toast-message{padding-top:2px;color:#676879!important;font-size:14px!important}.toast-info{background-color:#fff!important;border-bottom:3px solid #0073ea;border-radius:4px!important;background-image:url(assets/common-header-lib/images/toast-info.svg)!important;background-repeat:no-repeat}.toast-info .toast-title{color:#0073ea!important;font-weight:700;font-size:16px}.toast-info .toast-message{padding-top:3px;color:#676879!important;font-size:14px!important}.toast-warning{background-color:#fff!important;border-bottom:3px solid #fdab3d;border-radius:4px!important;background-image:url(assets/common-header-lib/images/toast-alert.svg)!important;background-repeat:no-repeat}.toast-warning .toast-title{color:#fdab3d!important;font-weight:700;font-size:16px}.toast-warning .toast-message{padding-top:3px;color:#676879!important;font-size:14px!important}.toast-close-button{right:4px!important;top:0;font-size:20px;font-weight:700;text-shadow:0 1px 0 #ffffff;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:#fff}.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}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i8.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i9.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i10$1.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i11.BadgeDirective, selector: "[pBadge]", inputs: ["iconPos", "badgeDisabled", "value", "severity"] }, { kind: "component", type: i9$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: UserSidebarComponent, selector: "app-user-sidebar", inputs: ["languages"], outputs: ["closeDialogBox"] }, { kind: "component", type: SidePopupComponent, selector: "app-side-popup", inputs: ["visible", "position", "header"], outputs: ["closeDialogBox"] }, { kind: "component", type: UserMailboxComponent, selector: "app-user-mailbox", inputs: ["apiURL"], outputs: ["closeMailDialogBox"] }, { kind: "component", type: NoServiceMyAccessPgComponent, selector: "app-no-service-my-access-pg", inputs: ["heading", "subHeading"] }, { kind: "component", type: ConfirmDialogComponent, selector: "confirm-dialog", inputs: ["header", "message"], outputs: ["result"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: SliceToTwoPipe, name: "sliceToTwo" }], encapsulation: i0.ViewEncapsulation.None });
3932
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CommonHeaderLibComponent, decorators: [{
3933
- type: Component,
3934
- args: [{ selector: 'lib-common-header-lib', encapsulation: ViewEncapsulation.None, 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 <div class=\"logo gap-4\" *ngIf=\"EnableLogo\">\r\n <img\r\n *ngIf=\"EnableLogo && headerLogo\"\r\n class=\"logo-size\"\r\n title=\"Logo\"\r\n alt=\"Logo\"\r\n [src]=\"headerLogo\"\r\n loading=\"lazy\"\r\n />\r\n <p-skeleton\r\n *ngIf=\"!headerLogo\"\r\n height=\"1.5rem\"\r\n width=\"5rem\"\r\n ></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <!--* Test Buttons for toast UI -->\r\n <!-- <button type=\"button\" class=\"btn btn-success\" (click)=\"success()\">\r\n success</button\r\n ><button type=\"button\" class=\"btn btn-success\" (click)=\"success1()\">\r\n success1\r\n </button>\r\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"danger()\">color: #1d4ed8;\r\n background: #eff6ff;\r\n danger\r\n </button>\r\n <button type=\"button\" class=\"btn btn-warning\" (click)=\"warning()\">\r\n warning\r\n </button>\r\n <button type=\"button\" class=\"btn btn-info\" (click)=\"info()\">info</button> -->\r\n\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 <!--timezone-->\r\n <ng-container *ngIf=\"EnableTimeZone && 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=\"Icon\"\r\n />\r\n <span class=\"timezone-text\"\r\n >{{ \"Generic_lib.PreferredTimezone\" | translate }} :\r\n </span>\r\n <span\r\n *ngIf=\"userTimeZoneAbbreviations\"\r\n class=\"user-tz\"\r\n [title]=\"userTimeZoneFullForm\"\r\n >{{ userTimeZoneAbbreviations }}</span\r\n >\r\n </div>\r\n </ng-container>\r\n\r\n <!--lob-->\r\n <ng-container *ngIf=\"EnableLOB\">\r\n <ng-container\r\n *ngIf=\"EnableLOB && !showLobLoader; else LobLodderAnimation\"\r\n >\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=\"pen Icon\"\r\n />\r\n\r\n <!-- *Note: Removed [virtualScroll] and [itemSize] from p-dropdown because it caused filtered search results to appear empty until scrolling. Not needed as LOB list size is small. -->\r\n <p-dropdown\r\n filterPlaceholder=\"{{ 'Generic_lib.Search' | translate }}\"\r\n [options]=\"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 >\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-dropdown>\r\n </div>\r\n </ng-container>\r\n <ng-template #LobLodderAnimation>\r\n <p-skeleton height=\"1.5rem\" width=\"10rem\"></p-skeleton>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!--mailbox-->\r\n <ng-container *ngIf=\"isHeaderContentLoaded; else HeaderLoading\">\r\n <div *ngIf=\"EnableMail\" class=\"header-left-icon\">\r\n <img\r\n src=\"assets/common-header-lib/images/mail-icon.svg\"\r\n alt=\"mail Icon\"\r\n class=\"headeright-icon\"\r\n (click)=\"showMailBoxScreen()\"\r\n />\r\n </div>\r\n <ng-container *ngIf=\"EnableMail && totalEmails.length > 0\">\r\n <!-- <ng-container> -->\r\n <div class=\"badge-notify\">\r\n <div pBadge [value]=\"totalEmails\"></div>\r\n </div>\r\n </ng-container>\r\n\r\n <!--notification-->\r\n <div class=\"header-left-icon\" *ngIf=\"EnableNotifications\">\r\n <img\r\n src=\"assets/common-header-lib/images/bell-icon.svg\"\r\n alt=\"mail Icon\"\r\n class=\"headeright-icon\"\r\n (click)=\"OpenNotificationModal()\"\r\n />\r\n </div>\r\n\r\n <ng-container\r\n *ngIf=\"EnableNotifications && userNotificationCount.length > 0\"\r\n >\r\n <div class=\"badge-notify\">\r\n <div pBadge [value]=\"userNotificationCount\"></div>\r\n </div>\r\n </ng-container>\r\n\r\n <!--9 Dots -->\r\n <div\r\n *ngIf=\"EnableMoreApps\"\r\n class=\"header-left-icon\"\r\n title=\"Control Center\"\r\n alt=\"bell Icon\"\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 />\r\n </div>\r\n\r\n <!--user display name -->\r\n <div\r\n *ngIf=\"EnableProfile\"\r\n class=\"main-right\"\r\n (click)=\"showUserDetailsPanel()\"\r\n >\r\n <ng-container>\r\n <div class=\"initial-text mx-1\">\r\n {{ userdisplayName | sliceToTwo }}\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #HeaderLoading>\r\n <p-skeleton shape=\"circle\" size=\"1.3rem\" styleClass=\"mx-2\"></p-skeleton>\r\n <p-skeleton shape=\"circle\" size=\"1.3rem\" styleClass=\"mx-2\"></p-skeleton>\r\n <p-skeleton size=\"1.5rem\" styleClass=\"mx-2\"></p-skeleton>\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mx-2\"></p-skeleton>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</header>\r\n\r\n<!--List of Application : 9 dots -->\r\n<p-overlayPanel #App class=\"pt-0\" styleClass=\"app-panel\">\r\n <ng-container *ngIf=\"!userAppLoaderLoadder; else LoadingTemplate\">\r\n <div class=\"custom-popover-content\">\r\n <div class=\"waffle-align\">\r\n <div\r\n class=\"waffle-popup\"\r\n [title]=\"appDetails['applicationName']\"\r\n *ngFor=\"let appDetails of ListOfUserPrivillegedApp\"\r\n (click)=\"getConnectionofApplication(appDetails['appCode'])\"\r\n >\r\n <img\r\n *ngIf=\"appDetails?.appCode\"\r\n src=\"assets/common-header-lib/images/{{ appDetails.appCode }}.svg\"\r\n alt=\"App icon\"\r\n />\r\n\r\n <div class=\"waffle-text\">{{ appDetails[\"applicationName\"] }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-template #LoadingTemplate>\r\n <div class=\"custom-popover-content skeleton-popover\">\r\n <ng-container *ngFor=\"let item of repeatLoader\">\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\"></p-skeleton>\r\n <p-skeleton height=\".3rem\" width=\"35px\"></p-skeleton>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-template>\r\n</p-overlayPanel>\r\n\r\n<!--mailbox details-->\r\n<ng-container *ngIf=\"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</ng-container>\r\n\r\n<!-- Userdetails profile pop up -->\r\n<div class=\"profile-sidebar\">\r\n <app-side-popup\r\n *ngIf=\"isOpenSidePopup\"\r\n [visible]=\"true\"\r\n [position]=\"'right'\"\r\n (closeDialogBox)=\"closeSidePopup()\"\r\n >\r\n <app-user-sidebar\r\n *ngIf=\"showUserDetails\"\r\n [languages]=\"languages\"\r\n (closeDialogBox)=\"closeSidePopup()\"\r\n ></app-user-sidebar>\r\n </app-side-popup>\r\n</div>\r\n\r\n<!-- Notification side popup -->\r\n<div\r\n class=\"modal fade common-alert-modal\"\r\n #notifyModal\r\n id=\"Notify_SidebarModal\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n>\r\n <div class=\"modal-dialog sidebar-outer white-bg\">\r\n <div class=\"modal-content\">\r\n <div class=\"sidebar-container white-bg\">\r\n <!-- keep everything inside this content -->\r\n\r\n <!-- Sidebar Header -->\r\n <div class=\"sidebar-header grey-background\">\r\n <div class=\"sh-top\">\r\n <div class=\"sh-top-left d-flex align-items-center\">\r\n <div class=\"mx-2 log-text\">\r\n {{ \"Generic_lib.Notification\" | translate }}\r\n </div>\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=\"Close\"\r\n (click)=\"closeModal()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/close.svg\"\r\n alt=\"Close\"\r\n class=\"imgs mb-1\"\r\n />\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Sidebar Body -->\r\n <div class=\"sidebar-body\">\r\n <div class=\"d-flex justify-content-between align-items-center mb-2\">\r\n <div class=\"noti-text\">\r\n {{\r\n \"Generic_lib.YouHaveNNotifications\"\r\n | translate: { count: userNotificationCount }\r\n }}\r\n </div>\r\n <div\r\n class=\"d-flex align-items-center gap-1 refresh-icon\"\r\n (click)=\"getEventwiseNotification()\"\r\n >\r\n <img\r\n src=\"assets/common-header-lib/images/refresh-1.svg\"\r\n alt=\"Refresh\"\r\n />\r\n <div class=\"refresh-text\">\r\n {{ \"Generic_lib.Refresh\" | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"mt-3\">\r\n <ng-container\r\n *ngIf=\"\r\n !isErrorFound && !notificationLoadder;\r\n else Noti_LoadingTemplate\r\n \"\r\n >\r\n <div\r\n class=\"notify-border\"\r\n *ngFor=\"let event of eventwiseNotificationCount\"\r\n >\r\n <div class=\"d-flex align-items-center gap-3\">\r\n <div class=\"initial-text initial-text-1 mx-1\">\r\n <img\r\n src=\"assets/common-header-lib/images/noti_ticket.svg\"\r\n alt=\"Icon\"\r\n />\r\n </div>\r\n <div>\r\n <div>\r\n <span class=\"service-count\"\r\n >{{ event[\"PendingCount\"] }} New </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 </ng-container>\r\n <ng-template #Noti_LoadingTemplate>\r\n <ng-container *ngIf=\"notificationLoadder; else errorTemplate\">\r\n <ng-container *ngFor=\"let item of repeatLoader1\">\r\n <div class=\"d-flex align-items-center gap-3\">\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 </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #errorTemplate>\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 </ng-template>\r\n </div>\r\n <!-- Notification content & loaders remain here -->\r\n </div>\r\n </div>\r\n <!-- end of sidebar-container -->\r\n </div>\r\n <!-- end of modal-content -->\r\n </div>\r\n <!-- end of modal-dialog -->\r\n</div>\r\n\r\n<!-- Common Conirmation Modal -->\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)=\"lobChangeConfirmation($event)\"\r\n></confirm-dialog>\r\n\r\n<!--* Need to use component based notification UI as below -->\r\n<!-- Notification-Sidebar Started -->\r\n<!-- <app-notification-sidebar [isErrorOccured]=\"isErrorFound\" [userNotificationCount]=\"userNotificationCount\"\r\n [userNotificationCountObj]=\"userNotificationCountObj\" [eventwiseNotificationCount]=\"eventwiseNotificationCount\"\r\n (refreshNotification)=\"getEventwiseNotificationCount()\"\r\n [notificationLoadder]=\"notificationLoadder\"></app-notification-sidebar> -->\r\n<!-- Notification-Sidebar Ended -->\r\n", styles: [".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}.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{font-size:25px!important}.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}.main-left .p-dropdown{border:none;border-radius:0;width:140px!important}.main-left .p-dropdown-panel .p-dropdown-items{padding:0!important;max-height:110px}.main-left :focus-visible{outline:none}.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:#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{position:fixed;top:4px;left:275px}.head-search.active input{width:555px!important}@media screen and (min-width: 1920px){.head-search.active{position:fixed;top:4px;left:275px}.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: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}.initial-text{width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:11px;border-radius:50%;color:#fff;background-color:#8e562e}.initial-text-1{background-color:#f2edfa}.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:#fff}.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}.form-group{margin-bottom:5px}.waffle-text{font-size:11px;text-align:center;width:70px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;margin-top:-3px}.waffle-align{display:grid;grid-template-columns:auto auto auto}.waffle{cursor:pointer;margin-right:16px}.waffle-popup{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}.custom-popover-content{padding:10px;right:-5px;top:0;position:absolute;background:white;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}.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:#757575;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}.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}.grey-background{background-color:#f6f7fb}.white-bg{background:#ffffff;overflow:hidden}.imgs{width:20px}.p-dropdown .p-dropdown-label{background:transparent;border:0 none;display:flex;align-items:center}.p-dropdown .p-dropdown-trigger{width:32px!important}.pi-chevron-down:before{content:\"\\e902\";font-size:11px}.sidebar-outer{height:100vh}.lang-dropdown .p-dropdown{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-dropdown .pi{position:relative;bottom:2px;left:7px}.lang-dropdown .p-dropdown-panel{background:#ffffff!important;color:#495057!important;border:0px!important;box-shadow:0 2px 12px #0000001a!important}.lang-dropdown .p-dropdown-header{padding:5px 10px!important;border-bottom:1px solid #dee2e6!important;background:#f8f9fa!important;color:#343a40!important;margin:0!important}.lang-dropdown .p-dropdown-items-wrapper{max-height:140px!important}.lang-dropdown .p-dropdown-panel .p-dropdown-header{padding:4px 8px!important;border-radius:0!important}.p-dropdown-panel .p-dropdown-header{padding:.75rem 1.25rem;border-bottom:1px solid #dee2e6;color:#343a40;background:#f8f9fa;margin:0;border-top-right-radius:6px;border-top-left-radius:6px}.lang-dropdown .p-dropdown .p-dropdown-header .p-dropdown-filter{height:26px;border-radius:4px;font-size:12px;border:1px solid #ced4da!important;padding-left:12px!important}.lang-dropdown .p-inputtext{margin:0;text-align:start;font-size:13px;padding:0!important}.lang-dropdown .p-dropdown-panel .p-dropdown-header .p-dropdown-filter-icon{position:relative;bottom:13px;font-size:13px}.sidebar-outer .sidebar-body .sb-list ul li span{margin-right:12px}.p-dropdown-panel .p-dropdown-header .p-dropdown-filter-icon{left:6px;color:#6c757d}.lang-dropdown .p-dropdown-items-wrapper ::-webkit-scrollbar{width:6px!important}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background-color:#c1c1c1;border-radius:6px}::-webkit-scrollbar-thumb:hover{background-color:#a8a8a8}.sidebar-outer .sidebar-body .sb-list ul{float:left;width:100%;list-style:none;padding-left:0}.lang-dropdown .p-dropdown-panel .p-dropdown-items{font-size:12px;padding:0!important}.p-dropdown-panel .p-dropdown-items .p-dropdown-item.p-highlight{color:var(--jaguar-black-color);background:var(--solitude-blue);background-color:var(--solitude-blue)}.lang-dropdown .p-dropdown-panel .p-dropdown-items .p-dropdown-item{padding:2px 14px;font-size:12px}.sidebar-outer .sidebar-body .sb-list ul li{display:flex;padding:8px 2px;cursor:pointer}.modal-dialog{margin-right:0;margin-top:0;margin-bottom:0}.loblist-drpdwn-panel .p-dropdown-header{padding:5px 10px}.loblist-drpdwn-panel .p-inputtext{background:#ffffff;padding:6px}.loblist-drpdwn .p-inputtext{font-size:13px}.loblist-drpdwn-panel .p-dropdown-header .p-dropdown-filter{height:28px;border-radius:4px;font-size:12px}.loblist-drpdwn-panel .p-dropdown-items .p-dropdown-item{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-dropdown-header .p-dropdown-filter-icon{position:absolute;left:82%;top:50%;transform:translateY(-50%);color:#6c757d}.loblist-drpdwn-panel .p-dropdown-items .p-dropdown-empty-message{padding:6px 12px;color:#495057!important;background:transparent!important;font-size:12px}.logo-size{max-height:32px;max-width:92px}.logo-size-1{width:80px;height:30px}.sidebar-body{overflow:auto;height:calc(100vh - 70px);width:100%}.sidebar-body .refresh-icon{cursor:pointer}.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:#fff;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}.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:#fff}.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-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-datatable .p-sortable-column:hover{background-color:#fff!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-dropdown-panel .p-dropdown-items{padding:0}.mail-table .p-dropdown-panel .p-dropdown-items .p-dropdown-item{font-size:13px!important;padding:10px 15px}.mail-table .p-paginator{justify-content:flex-start!important;position:fixed;bottom:0;padding-left:0!important}.mail-table .p-paginator .p-paginator-current{font-size:12px;height:1rem!important}.mail-table .p-paginator .p-paginator-pages .p-paginator-page{min-width:30px!important;height:30px!important;font-size:12px}.mail-table .p-paginator .p-dropdown{height:30px!important;margin-top:0;border:0px}.mail-table .p-paginator .p-dropdown .p-dropdown-label{padding:4px 5px 0 10px!important;font-size:14px}.mail-table .p-paginator .p-dropdown .p-dropdown-trigger{width:1.5rem!important}.mail-table .p-paginator .p-dropdown .p-dropdown-trigger .pi{font-size:13px!important}.mail-pagination .p-paginator{justify-content:flex-start!important;padding-left:0;height:47px;width:100%}.mail-pagination .p-paginator .p-paginator-current{font-size:12px;height:1rem!important;padding-left:0}.mail-pagination .p-paginator .p-paginator-pages .p-paginator-page{min-width:30px!important;height:30px!important;font-size:12px}.mail-pagination .p-paginator .p-dropdown{height:30px!important;margin-top:0;border:0px}.mail-pagination .p-paginator .p-dropdown .p-dropdown-label{padding:4px 5px 0 10px!important;font-size:14px}.mail-pagination .p-paginator .p-dropdown .p-dropdown-trigger{width:1.5rem!important}.mail-pagination .p-paginator .p-dropdown .p-dropdown-trigger .pi{font-size:13px!important}.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}.rm-invalid-border .card{border:0px}.view-pass-details{width:600px!important}.view-pass-details .p-dialog-header{background:#ffffff!important;border-radius:4px 4px 0 0!important;border-bottom:1px solid var(--primary-color)!important}.view-pass-details .p-dialog-content:last-of-type{border-bottom-right-radius:4px!important;border-bottom-left-radius:4px!important;padding:0}.confirmtion-modal .p-dialog-content{padding-top:24px;padding-right:100px;font-size:var(--base-font-size)}.confirmtion-modal .p-confirm-dialog-message{margin-left:0!important}.confirmtion-modal .p-button{font-size:var(--base-font-size);background-color:var(--primary-color);border-color:var(--primary-color);padding:6px 28px}.confirmtion-modal .p-button .p-button-secondary .p-button-outlined{background-color:var(--white-color);border:1px solid var(--primary-color);color:var(--primary-color)}.confirmtion-modal .p-button .p-button-secondary .p-button-outlined:enabled:hover{background-color:var(--white-color)}.confirmtion-modal .p-button:enabled:hover{border:1px solid var(--primary-color);background-color:var(--primary-color)}.confirmtion-modal .p-button.p-button-secondary.p-button-outlined{color:var(--primary-color);border:1px solid var(--primary-color);background-color:var(--white-color)}.confirmtion-modal .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)}.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}.madontary-icon{color:#d4231d;font-weight:500;padding:5px 0 0 5px}.img-lock{width:12px;margin-bottom:1px}.img-lock.ext{width:16px;margin-bottom:0}.img-lock.ext2{width:18px;margin-bottom:0}.form-group .error-msg{position:relative}.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}.p-dialog.general-configuration{width:100%;height:100vh;max-height:100vh}.general-configuration .p-dialog-header{border-bottom:1px solid #d0d4e4!important;background:#ffffff!important}.p-dialog .p-dialog-header{padding:10px 21px!important;background:#fff!important;border-top-right-radius:6px!important;border-top-left-radius:6px!important;height:45px}.p-dialog .p-dialog-header .p-dialog-title{font-weight:600;font-size:var(--base-font-size)}.assets-dropdown .p-dropdown{height:38px!important;width:100%!important;border-radius:4px!important;align-items:center!important}.assets-dropdown .p-dropdown:hover{border:1px solid #ced4da!important}.p-dropdown-panel .p-dropdown-header .p-dropdown-filter{padding-right:1.75rem;margin-right:-1.75rem}.assets-dropdown .p-inputtext{width:100%;border-radius:4px;height:30px;font-size:13px!important}.assets-dropdown .p-dropdown-panel .p-dropdown-header .p-dropdown-filter-icon{left:96%;color:#6c757d;font-size:13px;top:15px!important}.assets-dropdown .p-dropdown-panel .p-dropdown-header{padding:10px!important}.assets-dropdown .p-dropdown-items-wrapper{max-height:100px!important}.assets-dropdown .p-dropdown-panel .p-dropdown-items .p-dropdown-item{padding:5px 20px!important;font-size:13px!important;font-weight:400!important}.p-dropdown-panel .p-dropdown-items{padding:0!important}.assets-dropdown .p-dropdown-panel .p-dropdown-items .p-dropdown-empty-message{font-size:13px!important;padding:8px 20px!important}.p-dropdown-panel .p-dropdown-items .p-dropdown-empty-message{padding:.75rem 1.25rem;color:#495057!important;background:transparent!important}.p-dropdown-filter-container{position:relative}.p-dropdown-filter-container input{border:1px solid #ced4da!important}.input-dropdown .password-checkbox-right{position:absolute;width:24px;right:8px}.timezone-dropdown .p-dropdown{width:100%;border:1px solid #ced4da!important;border-radius:4px;height:38px}.timezone-dropdown .p-dropdown-panel .p-dropdown-header{padding:5px}.timezone-dropdown .p-dropdown:hover{border:1px solid #ced4da!important}.timezone-dropdown .p-inputtext{width:100%;border-radius:4px;height:30px;font-size:13px!important}.timezone-dropdown .p-dropdown-panel .p-dropdown-header .p-dropdown-filter-icon{left:96%;color:#6c757d;font-size:13px;top:15px!important}.timezone-dropdown .p-dropdown-panel .p-dropdown-header{padding:10px!important}.timezone-dropdowntimezone-dropdown .p-dropdown-items-wrapper{max-height:100px!important}.timezone-dropdown .p-dropdown-panel .p-dropdown-items .p-dropdown-item{padding:5px 20px!important;font-size:13px!important;font-weight:400!important}.timezone-dropdown .p-dropdown-panel .p-dropdown-items .p-dropdown-empty-message{font-size:13px!important;padding:8px 20px!important}.sidebar-container{width:420px;position:fixed;top:0;height:100vh;max-width:100%;transition:all .3s ease;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;background-color:#fff}.white-bg{background:#ffffff;width:420px;overflow:hidden}.sidebar-outer .sidebar-header{padding:12px 15px}.sidebar-outer .sidebar-header .sh-top{display:flex;align-items:center;justify-content:space-between}.log-text{font-size:16px;color:#292f4c;font-weight:600}.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)}.tertiary-btn{border:none;background-color:transparent}.sidebar-body .noti-text{color:#292f4c;font-size:13px;font-weight:600;line-height:24px}.sidebar-body .refresh-text{color:#676879;font-size:12px;line-height:24px}.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}.common-alert-modal .modal-dialog{margin-right:0!important}.ngx-toastr{width:400px!important;margin-top:10px!important}.toast-success{background-color:#fff!important;border-bottom:3px solid #258750;border-radius:4px!important;background-image:url(assets/common-header-lib/images/toast-success.svg)!important;background-repeat:no-repeat}.toast-success .toast-title{color:#258750!important;font-weight:700;font-size:16px}.toast-success .toast-message{padding-top:2px;color:#676879!important;font-size:14px!important}.toast-success .toast-progress{color:#258750!important}.toast-error{background-color:#fff!important;border-bottom:3px solid #d83a52;border-radius:4px!important;background-image:url(assets/common-header-lib/images/toast-error.svg)!important;background-repeat:no-repeat}.toast-error .toast-title{color:#d83a52!important;font-weight:700;font-size:16px}.toast-error .toast-message{padding-top:2px;color:#676879!important;font-size:14px!important}.toast-info{background-color:#fff!important;border-bottom:3px solid #0073ea;border-radius:4px!important;background-image:url(assets/common-header-lib/images/toast-info.svg)!important;background-repeat:no-repeat}.toast-info .toast-title{color:#0073ea!important;font-weight:700;font-size:16px}.toast-info .toast-message{padding-top:3px;color:#676879!important;font-size:14px!important}.toast-warning{background-color:#fff!important;border-bottom:3px solid #fdab3d;border-radius:4px!important;background-image:url(assets/common-header-lib/images/toast-alert.svg)!important;background-repeat:no-repeat}.toast-warning .toast-title{color:#fdab3d!important;font-weight:700;font-size:16px}.toast-warning .toast-message{padding-top:3px;color:#676879!important;font-size:14px!important}.toast-close-button{right:4px!important;top:0;font-size:20px;font-weight:700;text-shadow:0 1px 0 #ffffff;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:#fff}.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}\n"] }]
3935
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: RestSignalRService }, { type: EventService }, { type: i4.TranslateService }, { type: HttpCommonService }, { type: ToastMsgService }]; }, propDecorators: { EnableLogo: [{
3936
- type: Input
3937
- }], moduleName: [{
3938
- type: Input
3939
- }], EnableTimeZone: [{
3940
- type: Input
3941
- }], EnableLOB: [{
3942
- type: Input
3943
- }], showAllLOB: [{
3944
- type: Input
3945
- }], EnableMail: [{
3946
- type: Input
3947
- }], EnableNotifications: [{
3948
- type: Input
3949
- }], EnableMoreApps: [{
3950
- type: Input
3951
- }], EnableProfile: [{
3952
- type: Input
3953
- }], languages: [{
3954
- type: Input
3955
- }], timezoneDetails: [{
3956
- type: Output
3957
- }], lobSelected: [{
3958
- type: Output
3959
- }], getBgImage: [{
3960
- type: Output
3961
- }], langChange: [{
3962
- type: Output
3963
- }], overlayStateChange: [{
3964
- type: Output
3965
- }], confirmDialog: [{
3966
- type: ViewChild,
3967
- args: ['confirmDialog']
3968
- }], appPanel: [{
3969
- type: ViewChild,
3970
- args: ['App']
3971
- }], notifyModalRef: [{
3972
- type: ViewChild,
3973
- args: ['notifyModal']
3974
- }], notifyModal: [{
3975
- type: ViewChild,
3976
- args: ['notifyModal']
3977
- }] } });
3978
-
3979
- class NotificationSidebarComponent {
3980
- constructor() {
3981
- this.userNotificationCount = '';
3982
- this.userNotificationCountObj = {};
3983
- this.eventwiseNotificationCount = [];
3984
- this.refreshNotification = new EventEmitter();
3985
- this.isErrorOccured = false;
3986
- this.notificationLoadder = true;
3987
- this.NoServiceMsgText = 'Generic_lib.CommonError';
3988
- this.repeatLoader = Array(9).fill(0);
3989
- }
3990
- //Method: Call APi to Fetch New Notification Count
3991
- getEventwiseNotification() {
3992
- this.refreshNotification.emit(true);
3993
- }
3994
- }
3995
- NotificationSidebarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NotificationSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3996
- NotificationSidebarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NotificationSidebarComponent, selector: "app-notification-sidebar", inputs: { userNotificationCount: "userNotificationCount", userNotificationCountObj: "userNotificationCountObj", eventwiseNotificationCount: "eventwiseNotificationCount", isErrorOccured: "isErrorOccured", notificationLoadder: "notificationLoadder" }, outputs: { refreshNotification: "refreshNotification" }, ngImport: i0, template: "<div class=\"modal fade common-alert-modal\" id=\"Notify_SidebarModal\" tabindex=\"-1\" aria-hidden=\"true\">\r\n <div class=\"sidebar-container white-bg\">\r\n <div class=\"modal-dialog 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 align-items-center\">\r\n <div class=\"mx-2 log-text\">Notification</div>\r\n </div>\r\n <div class=\"sh-top-right\">\r\n <button type=\"button\" class=\"common-bn tertiary-btn\" data-bs-dismiss=\"modal\" aria-label=\"Close\">\r\n <img src=\"assets/common-header-lib/images/close.svg\" alt=\"Icon\" class=\"imgs mb-1\" title=\"Close\">\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"sidebar-body\">\r\n <div class=\"d-flex justify-content-between align-items-center mb-2\">\r\n <div class=\"noti-text\">You Have {{userNotificationCount}} Notification</div>\r\n <div class=\"d-flex align-items-center gap-1 refresh-icon\" (click)=\"getEventwiseNotification()\">\r\n <img src=\"assets/common-header-lib/images/refresh-1.svg\" alt=\"Icon\">\r\n <div class=\"refresh-text\">Refresh</div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\">\r\n <ng-container *ngIf=\"!isErrorOccured && !notificationLoadder; else LoadingTemplate\">\r\n <div class=\"notify-border\" *ngFor=\"let event of eventwiseNotificationCount\">\r\n <div class=\"d-flex align-items-center gap-3\">\r\n <div class=\"initial-text mx-1\">\r\n <img src=\"assets/common-header-lib/images/noti_ticket.svg\" alt=\"Icon\">\r\n </div>\r\n <div>\r\n <div><span class=\"service-count\">{{event['PendingCount']}} New </span><span\r\n class=\"service-request\">{{event['EventName'] }} Event requests</span>\r\n </div>\r\n <!-- <div class=\"time-text\">{{'2h ago'}}</div> -->\r\n </div>\r\n </div>\r\n <div class=\"grey-borders mt-2\"></div>\r\n </div>\r\n </ng-container>\r\n <ng-template #LoadingTemplate>\r\n <ng-container *ngIf=\"notificationLoadder; else errorTemplate\">\r\n <ng-container *ngFor=\"let item of repeatLoader\">\r\n <div class=\"d-flex align-items-center gap-3\">\r\n <p-skeleton shape=\"circle\" size=\"60px\" styleClass=\"my-2\"></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 </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #errorTemplate>\r\n <app-no-service-my-access-pg [heading]=\"NoServiceMsgText\"></app-no-service-my-access-pg>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".grey-background{background-color:#f6f7fb}.white-bg{background:#ffffff;width:420px;overflow:hidden}.log-text{font-size:16px;color:#292f4c;font-weight:600}.imgs{width:20px}.sidebar-body{overflow:auto;height:calc(100vh - 70px);width:100%}.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 var(--layout-border)}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i9$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: NoServiceMyAccessPgComponent, selector: "app-no-service-my-access-pg", inputs: ["heading", "subHeading"] }] });
3997
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NotificationSidebarComponent, decorators: [{
3998
- type: Component,
3999
- args: [{ selector: 'app-notification-sidebar', template: "<div class=\"modal fade common-alert-modal\" id=\"Notify_SidebarModal\" tabindex=\"-1\" aria-hidden=\"true\">\r\n <div class=\"sidebar-container white-bg\">\r\n <div class=\"modal-dialog 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 align-items-center\">\r\n <div class=\"mx-2 log-text\">Notification</div>\r\n </div>\r\n <div class=\"sh-top-right\">\r\n <button type=\"button\" class=\"common-bn tertiary-btn\" data-bs-dismiss=\"modal\" aria-label=\"Close\">\r\n <img src=\"assets/common-header-lib/images/close.svg\" alt=\"Icon\" class=\"imgs mb-1\" title=\"Close\">\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"sidebar-body\">\r\n <div class=\"d-flex justify-content-between align-items-center mb-2\">\r\n <div class=\"noti-text\">You Have {{userNotificationCount}} Notification</div>\r\n <div class=\"d-flex align-items-center gap-1 refresh-icon\" (click)=\"getEventwiseNotification()\">\r\n <img src=\"assets/common-header-lib/images/refresh-1.svg\" alt=\"Icon\">\r\n <div class=\"refresh-text\">Refresh</div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\">\r\n <ng-container *ngIf=\"!isErrorOccured && !notificationLoadder; else LoadingTemplate\">\r\n <div class=\"notify-border\" *ngFor=\"let event of eventwiseNotificationCount\">\r\n <div class=\"d-flex align-items-center gap-3\">\r\n <div class=\"initial-text mx-1\">\r\n <img src=\"assets/common-header-lib/images/noti_ticket.svg\" alt=\"Icon\">\r\n </div>\r\n <div>\r\n <div><span class=\"service-count\">{{event['PendingCount']}} New </span><span\r\n class=\"service-request\">{{event['EventName'] }} Event requests</span>\r\n </div>\r\n <!-- <div class=\"time-text\">{{'2h ago'}}</div> -->\r\n </div>\r\n </div>\r\n <div class=\"grey-borders mt-2\"></div>\r\n </div>\r\n </ng-container>\r\n <ng-template #LoadingTemplate>\r\n <ng-container *ngIf=\"notificationLoadder; else errorTemplate\">\r\n <ng-container *ngFor=\"let item of repeatLoader\">\r\n <div class=\"d-flex align-items-center gap-3\">\r\n <p-skeleton shape=\"circle\" size=\"60px\" styleClass=\"my-2\"></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 </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #errorTemplate>\r\n <app-no-service-my-access-pg [heading]=\"NoServiceMsgText\"></app-no-service-my-access-pg>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".grey-background{background-color:#f6f7fb}.white-bg{background:#ffffff;width:420px;overflow:hidden}.log-text{font-size:16px;color:#292f4c;font-weight:600}.imgs{width:20px}.sidebar-body{overflow:auto;height:calc(100vh - 70px);width:100%}.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 var(--layout-border)}\n"] }]
4000
- }], ctorParameters: function () { return []; }, propDecorators: { userNotificationCount: [{
4001
- type: Input
4002
- }], userNotificationCountObj: [{
4003
- type: Input
4004
- }], eventwiseNotificationCount: [{
4005
- type: Input
4006
- }], refreshNotification: [{
4007
- type: Output
4008
- }], isErrorOccured: [{
4009
- type: Input
4010
- }], notificationLoadder: [{
4011
- type: Input
4012
- }] } });
4013
-
4014
- /**
4015
- * Common header library module.
4016
- *
4017
- * Translation initialization (APP_INITIALIZER, languages.json validation,
4018
- * fallback chain, language-file loading) is OWNED BY THE CONSUMING APP —
4019
- * see `initTranslateService` and `HttpLoaderFactory` in src/app/app.module.ts
4020
- * (test/dev host) and the equivalent code in your main project's MainModule.
4021
- *
4022
- * The library only imports/exports `TranslateModule` (no `forChild({ isolate })`)
4023
- * so its components share the host app's TranslateService singleton. This
4024
- * guarantees that when the host changes language, library labels translate
4025
- * accordingly.
4026
- *
4027
- * The supported-language list (USERFILTEREDLANGUAGES) is provided by the
4028
- * host app via the `[languages]` @Input on `<lib-common-header-lib>`, which
4029
- * forwards it down to `<ng-translation>`. The library no longer fetches
4030
- * languages.json itself.
4031
- */
4032
- class CommonHeaderLibModule {
4033
- }
4034
- CommonHeaderLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CommonHeaderLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4035
- CommonHeaderLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: CommonHeaderLibModule, declarations: [CommonHeaderLibComponent,
4036
- SliceToTwoPipe,
4037
- customDateFormatPipe,
4038
- DateDiffPipe,
4039
- UserSidebarComponent,
4040
- SidePopupComponent,
4041
- NgTranslationComponent,
4042
- UserMailboxComponent,
4043
- NotificationSidebarComponent,
4044
- GeneralConfigurationComponent,
4045
- TimezoneConfigurationComponent,
4046
- LandingpgConfigComponent,
4047
- NoServiceMyAccessPgComponent,
4048
- GridPaginationComponent,
4049
- ConfirmDialogComponent,
4050
- ViewpasswordPopupComponent], imports: [CommonModule,
4051
- HttpClientModule,
4052
- ReactiveFormsModule,
4053
- /* UI Modules */
4054
- InputTextModule,
4055
- DropdownModule,
4056
- OverlayPanelModule,
4057
- BadgeModule,
4058
- DialogModule,
4059
- SkeletonModule,
4060
- PaginatorModule,
4061
- TableModule,
4062
- ButtonModule,
4063
- ConfirmDialogModule,
4064
- NgbModule,
4065
- /* Share the host app's TranslateService instance — DO NOT use
4066
- forChild({ isolate: true }) here, otherwise library components would
4067
- receive a separate TranslateService and host language changes would
4068
- not propagate to library labels. */
4069
- TranslateModule], exports: [CommonHeaderLibComponent,
4070
- SliceToTwoPipe,
4071
- DateDiffPipe,
4072
- customDateFormatPipe,
4073
- ConfirmDialogComponent,
4074
- ViewpasswordPopupComponent,
4075
- TranslateModule] });
4076
- CommonHeaderLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CommonHeaderLibModule, imports: [CommonModule,
4077
- HttpClientModule,
4078
- ReactiveFormsModule,
4079
- /* UI Modules */
4080
- InputTextModule,
4081
- DropdownModule,
4082
- OverlayPanelModule,
4083
- BadgeModule,
4084
- DialogModule,
4085
- SkeletonModule,
4086
- PaginatorModule,
4087
- TableModule,
4088
- ButtonModule,
4089
- ConfirmDialogModule,
4090
- NgbModule,
4091
- /* Share the host app's TranslateService instance — DO NOT use
4092
- forChild({ isolate: true }) here, otherwise library components would
4093
- receive a separate TranslateService and host language changes would
4094
- not propagate to library labels. */
4095
- TranslateModule, TranslateModule] });
4096
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CommonHeaderLibModule, decorators: [{
4097
- type: NgModule,
4098
- args: [{
4099
- declarations: [
4100
- CommonHeaderLibComponent,
4101
- SliceToTwoPipe,
4102
- customDateFormatPipe,
4103
- DateDiffPipe,
4104
- UserSidebarComponent,
4105
- SidePopupComponent,
4106
- NgTranslationComponent,
4107
- UserMailboxComponent,
4108
- NotificationSidebarComponent,
4109
- GeneralConfigurationComponent,
4110
- TimezoneConfigurationComponent,
4111
- LandingpgConfigComponent,
4112
- NoServiceMyAccessPgComponent,
4113
- GridPaginationComponent,
4114
- ConfirmDialogComponent,
4115
- ViewpasswordPopupComponent,
4116
- ],
4117
- imports: [
4118
- CommonModule,
4119
- HttpClientModule,
4120
- ReactiveFormsModule,
4121
- /* UI Modules */
4122
- InputTextModule,
4123
- DropdownModule,
4124
- OverlayPanelModule,
4125
- BadgeModule,
4126
- DialogModule,
4127
- SkeletonModule,
4128
- PaginatorModule,
4129
- TableModule,
4130
- ButtonModule,
4131
- ConfirmDialogModule,
4132
- NgbModule,
4133
- /* Share the host app's TranslateService instance — DO NOT use
4134
- forChild({ isolate: true }) here, otherwise library components would
4135
- receive a separate TranslateService and host language changes would
4136
- not propagate to library labels. */
4137
- TranslateModule,
4138
- ],
4139
- exports: [
4140
- CommonHeaderLibComponent,
4141
- SliceToTwoPipe,
4142
- DateDiffPipe,
4143
- customDateFormatPipe,
4144
- ConfirmDialogComponent,
4145
- ViewpasswordPopupComponent,
4146
- TranslateModule,
4147
- ],
4148
- providers: [],
4149
- }]
4150
- }] });
4151
-
4152
- /*
4153
- * Public API Surface of common-header-lib
4154
- */
4155
- // export * from './assets/js/bigint-decrypt.helper';
4156
-
4157
- /**
4158
- * Generated bundle index. Do not edit.
4159
- */
4160
-
4161
- export { CommonHeaderLibComponent, CommonHeaderLibModule, CommonHeaderLibService, ConfirmDialogComponent, DateDiffPipe, SliceToTwoPipe, ViewpasswordPopupComponent, customDateFormatPipe };
4162
- //# sourceMappingURL=common-header-lib.mjs.map