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