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