common-header-lib 0.5.15 → 0.20.2

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