common-header-lib 0.0.1

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