@mis-wis/common 0.1.0 → 0.1.2-test
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/esm2020/lib/components/loader/loader.component.mjs +15 -0
- package/esm2020/lib/components/sidenav/sidenav.component.mjs +13 -0
- package/{esm2015/lib/functions/cookie.function.js → esm2020/lib/functions/cookie.function.mjs} +2 -1
- package/esm2020/lib/interceptors/auth.interceptor.mjs +44 -0
- package/{esm2015/lib/models/configurations.model.js → esm2020/lib/models/configurations.model.mjs} +1 -1
- package/esm2020/lib/modules/auth/auth.module.mjs +28 -0
- package/esm2020/lib/modules/auth/auth.service.mjs +17 -0
- package/{esm2015/lib/modules/logger/logger.functions.js → esm2020/lib/modules/logger/logger.functions.mjs} +2 -2
- package/esm2020/lib/modules/logger/logger.module.mjs +41 -0
- package/esm2020/lib/modules/logger/logger.service.mjs +52 -0
- package/esm2020/lib/services/configuration.service.mjs +14 -0
- package/esm2020/lib/services/http.service.mjs +27 -0
- package/esm2020/lib/services/loader.service.mjs +61 -0
- package/esm2020/lib/services/mfe-communication.service.mjs +14 -0
- package/esm2020/lib/wis-common.module.mjs +32 -0
- package/esm2020/mis-wis-common.mjs +5 -0
- package/esm2020/public-api.mjs +19 -0
- package/fesm2015/mis-wis-common.mjs +400 -0
- package/fesm2015/mis-wis-common.mjs.map +1 -0
- package/fesm2020/mis-wis-common.mjs +400 -0
- package/fesm2020/mis-wis-common.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/loader/loader.component.d.ts +3 -0
- package/lib/components/sidenav/sidenav.component.d.ts +3 -0
- package/lib/interceptors/auth.interceptor.d.ts +3 -0
- package/lib/models/configurations.model.d.ts +5 -0
- package/lib/modules/auth/auth.module.d.ts +5 -0
- package/lib/modules/auth/auth.service.d.ts +3 -0
- package/lib/modules/logger/logger.module.d.ts +5 -0
- package/lib/modules/logger/logger.service.d.ts +3 -0
- package/lib/services/configuration.service.d.ts +3 -0
- package/lib/services/http.service.d.ts +3 -0
- package/lib/services/loader.service.d.ts +3 -0
- package/lib/services/mfe-communication.service.d.ts +6 -0
- package/lib/wis-common.module.d.ts +9 -0
- package/package.json +21 -8
- package/public-api.d.ts +3 -0
- package/bundles/mis-wis-common.umd.js +0 -747
- package/bundles/mis-wis-common.umd.js.map +0 -1
- package/bundles/mis-wis-common.umd.min.js +0 -2
- package/bundles/mis-wis-common.umd.min.js.map +0 -1
- package/esm2015/lib/components/loader/loader.component.js +0 -14
- package/esm2015/lib/components/sidenav/sidenav.component.js +0 -14
- package/esm2015/lib/interceptors/auth.interceptor.js +0 -39
- package/esm2015/lib/modules/auth/auth.module.js +0 -23
- package/esm2015/lib/modules/auth/auth.service.js +0 -16
- package/esm2015/lib/modules/logger/logger.module.js +0 -36
- package/esm2015/lib/modules/logger/logger.service.js +0 -50
- package/esm2015/lib/services/configuration.service.js +0 -13
- package/esm2015/lib/services/http.service.js +0 -26
- package/esm2015/lib/services/loader.service.js +0 -64
- package/esm2015/lib/wis-common.module.js +0 -28
- package/esm2015/mis-wis-common.js +0 -10
- package/esm2015/public-api.js +0 -16
- package/fesm2015/mis-wis-common.js +0 -369
- package/fesm2015/mis-wis-common.js.map +0 -1
- package/mis-wis-common.d.ts +0 -11
- package/mis-wis-common.metadata.json +0 -1
- /package/{esm2015/lib/constants/emp-web-exp.constants.js → esm2020/lib/constants/emp-web-exp.constants.mjs} +0 -0
- /package/{esm2015/lib/functions/nav-filter.function.js → esm2020/lib/functions/nav-filter.function.mjs} +0 -0
- /package/{esm2015/lib/functions/url.functions.js → esm2020/lib/functions/url.functions.mjs} +0 -0
- /package/{esm2015/lib/models/env.model.js → esm2020/lib/models/env.model.mjs} +0 -0
- /package/{esm2015/lib/modules/auth/auth.model.js → esm2020/lib/modules/auth/auth.model.mjs} +0 -0
- /package/{esm2015/lib/modules/logger/logger.constant.js → esm2020/lib/modules/logger/logger.constant.mjs} +0 -0
- /package/{esm2015/lib/modules/logger/logger.model.js → esm2020/lib/modules/logger/logger.model.mjs} +0 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, NgModule, Component, Inject } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1$3 from '@angular/common/http';
|
|
6
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
7
|
+
import { tap } from 'rxjs/operators';
|
|
8
|
+
import * as i1 from '@angular/router';
|
|
9
|
+
import * as i2 from 'mis-crystal-design-system/toast';
|
|
10
|
+
import * as i1$2 from '@angular/cdk/overlay';
|
|
11
|
+
import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
12
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
13
|
+
import * as i2$1 from 'mis-crystal-design-system/loader';
|
|
14
|
+
import { LoaderModule } from 'mis-crystal-design-system/loader';
|
|
15
|
+
|
|
16
|
+
class AuthService {
|
|
17
|
+
constructor() { }
|
|
18
|
+
init(user) {
|
|
19
|
+
this.userDetails = user;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
23
|
+
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthService, providedIn: "root" });
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthService, decorators: [{
|
|
25
|
+
type: Injectable,
|
|
26
|
+
args: [{
|
|
27
|
+
providedIn: "root"
|
|
28
|
+
}]
|
|
29
|
+
}], ctorParameters: function () { return []; } });
|
|
30
|
+
|
|
31
|
+
class AuthModule {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @returns ModuleWithProviders<AuthModule>
|
|
35
|
+
*/
|
|
36
|
+
static forRoot() {
|
|
37
|
+
return {
|
|
38
|
+
ngModule: AuthModule,
|
|
39
|
+
providers: [AuthService]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
AuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
44
|
+
AuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: AuthModule, imports: [CommonModule] });
|
|
45
|
+
AuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthModule, imports: [CommonModule] });
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthModule, decorators: [{
|
|
47
|
+
type: NgModule,
|
|
48
|
+
args: [{
|
|
49
|
+
declarations: [],
|
|
50
|
+
imports: [CommonModule],
|
|
51
|
+
providers: []
|
|
52
|
+
}]
|
|
53
|
+
}] });
|
|
54
|
+
|
|
55
|
+
class ConfigurationService {
|
|
56
|
+
constructor() { }
|
|
57
|
+
}
|
|
58
|
+
ConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
59
|
+
ConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfigurationService, providedIn: "root" });
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfigurationService, decorators: [{
|
|
61
|
+
type: Injectable,
|
|
62
|
+
args: [{
|
|
63
|
+
providedIn: "root"
|
|
64
|
+
}]
|
|
65
|
+
}], ctorParameters: function () { return []; } });
|
|
66
|
+
|
|
67
|
+
const filterNavList = (navList, features) => {
|
|
68
|
+
return navList.filter(nav => {
|
|
69
|
+
const mustHave = nav.mustHaveBasedProperty && nav.mustHaveBasedProperty.every(basedProperty => features[basedProperty]);
|
|
70
|
+
const canHave = nav.canHaveBasedProperty && nav.canHaveBasedProperty.some(basedProperty => features[basedProperty]);
|
|
71
|
+
if ((mustHave || canHave) && nav.children) {
|
|
72
|
+
nav.children = filterNavList(nav.children, features);
|
|
73
|
+
}
|
|
74
|
+
return mustHave || canHave;
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
function getCookie(name) {
|
|
79
|
+
const cookies = {};
|
|
80
|
+
const cookieString = document.cookie;
|
|
81
|
+
cookieString.split("; ").forEach(cookie => {
|
|
82
|
+
const [key, value] = cookie.split("=");
|
|
83
|
+
cookies[key] = value;
|
|
84
|
+
});
|
|
85
|
+
return cookies[name] || undefined;
|
|
86
|
+
}
|
|
87
|
+
function setCookie(name, value, options) {
|
|
88
|
+
let cookieStr = `${name}=${value};`;
|
|
89
|
+
if (options) {
|
|
90
|
+
const optsSelected = Object.keys(options);
|
|
91
|
+
for (const opt of optsSelected) {
|
|
92
|
+
cookieStr += ` ${opt}${(typeof options[opt] === "string" && `=${options[opt]}`) || ""};`;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
cookieStr += ';secure; SameSite=Strict;';
|
|
96
|
+
document.cookie = cookieStr;
|
|
97
|
+
}
|
|
98
|
+
function removeCookie(name, domain) {
|
|
99
|
+
setCookie(name, "", { expires: new Date(0).toUTCString(), domain });
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function getQueryParam(queryString) {
|
|
103
|
+
const results = new RegExp("[?&]" + queryString + "=([^&#]*)").exec(window.location.href);
|
|
104
|
+
if (results === null) {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
return decodeURIComponent(results[1]) || null;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const TOKEN_NAME = "x-wis-token";
|
|
113
|
+
class AuthInterceptor {
|
|
114
|
+
constructor(route, toast) {
|
|
115
|
+
this.route = route;
|
|
116
|
+
this.toast = toast;
|
|
117
|
+
}
|
|
118
|
+
intercept(request, next) {
|
|
119
|
+
const paramsMap = this.route.snapshot.queryParamMap;
|
|
120
|
+
const buid = getQueryParam("buid") || getQueryParam("buId") || "";
|
|
121
|
+
const empGuid = getQueryParam("empGuid") || getQueryParam("empGuId") || getQueryParam("userId") || "";
|
|
122
|
+
// const source = getQueryParam("source");
|
|
123
|
+
const authToken = getQueryParam("auth-token");
|
|
124
|
+
const token = getCookie(`sso-wis-token-${buid}`);
|
|
125
|
+
const mobile_app_token = getCookie(TOKEN_NAME);
|
|
126
|
+
const cloneReq = request.clone({
|
|
127
|
+
setHeaders: {
|
|
128
|
+
"x-tenant-id": buid,
|
|
129
|
+
"x-user-id": empGuid,
|
|
130
|
+
...(!!token && { [TOKEN_NAME]: token }),
|
|
131
|
+
...(!!authToken && { [TOKEN_NAME]: authToken }),
|
|
132
|
+
...(!!mobile_app_token && { [TOKEN_NAME]: mobile_app_token })
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
return next.handle(cloneReq).pipe(tap(() => { }, err => {
|
|
136
|
+
if (err instanceof HttpErrorResponse && err.status === 401) {
|
|
137
|
+
this.toast.displayMsg("Your session has expired. Please login again.");
|
|
138
|
+
}
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
AuthInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthInterceptor, deps: [{ token: i1.ActivatedRoute }, { token: i2.ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
143
|
+
AuthInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthInterceptor });
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthInterceptor, decorators: [{
|
|
145
|
+
type: Injectable
|
|
146
|
+
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2.ToastService }]; } });
|
|
147
|
+
|
|
148
|
+
class LoaderComponent {
|
|
149
|
+
constructor() { }
|
|
150
|
+
ngOnInit() { }
|
|
151
|
+
}
|
|
152
|
+
LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
153
|
+
LoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: LoaderComponent, selector: "mis-common-loader", ngImport: i0, template: "<div class=\"message-wrapper\" *ngIf=\"message; else noMessageLoader\">\n <span><mis-loader type=\"block\"></mis-loader></span>\n <p>{{ message }}</p>\n</div>\n<ng-template #noMessageLoader>\n <mis-loader></mis-loader>\n</ng-template>\n", styles: [".message-wrapper{max-width:343px;background-color:#fff;display:flex;flex-wrap:nowrap;align-items:center;padding:20px 16px;border-radius:6px}.message-wrapper span{position:relative;background-color:#fff;display:inline-block;width:40px;height:40px;margin-right:16px}.message-wrapper p{margin:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "mis-loader", inputs: ["mobileView"] }] });
|
|
154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoaderComponent, decorators: [{
|
|
155
|
+
type: Component,
|
|
156
|
+
args: [{ selector: "mis-common-loader", template: "<div class=\"message-wrapper\" *ngIf=\"message; else noMessageLoader\">\n <span><mis-loader type=\"block\"></mis-loader></span>\n <p>{{ message }}</p>\n</div>\n<ng-template #noMessageLoader>\n <mis-loader></mis-loader>\n</ng-template>\n", styles: [".message-wrapper{max-width:343px;background-color:#fff;display:flex;flex-wrap:nowrap;align-items:center;padding:20px 16px;border-radius:6px}.message-wrapper span{position:relative;background-color:#fff;display:inline-block;width:40px;height:40px;margin-right:16px}.message-wrapper p{margin:0}\n"] }]
|
|
157
|
+
}], ctorParameters: function () { return []; } });
|
|
158
|
+
|
|
159
|
+
/** @format */
|
|
160
|
+
class LoaderService {
|
|
161
|
+
constructor(overlay) {
|
|
162
|
+
this.overlay = overlay;
|
|
163
|
+
this.loading = false;
|
|
164
|
+
}
|
|
165
|
+
show(message) {
|
|
166
|
+
this.loading = true;
|
|
167
|
+
if (this.overlayRef?.hasAttached()) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
const { positionStrategy, width, backdropClass, hasMessage } = this.calcLoaderProperties(!!message);
|
|
171
|
+
const config = new OverlayConfig({
|
|
172
|
+
hasBackdrop: true,
|
|
173
|
+
positionStrategy,
|
|
174
|
+
scrollStrategy: this.overlay.scrollStrategies.noop(),
|
|
175
|
+
width,
|
|
176
|
+
backdropClass
|
|
177
|
+
});
|
|
178
|
+
this.overlayRef = this.overlay.create(config);
|
|
179
|
+
const portal = new ComponentPortal(LoaderComponent, null);
|
|
180
|
+
const componentRef = this.overlayRef.attach(portal);
|
|
181
|
+
if (hasMessage) {
|
|
182
|
+
componentRef.instance.message = message;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
hide() {
|
|
186
|
+
this.loading = false;
|
|
187
|
+
this.overlayRef?.detach();
|
|
188
|
+
this.overlayRef?.dispose();
|
|
189
|
+
}
|
|
190
|
+
calcLoaderProperties(hasMessage) {
|
|
191
|
+
const positionStrategy = this.overlay.position().global();
|
|
192
|
+
let width = "100vh";
|
|
193
|
+
let backdropClass = "cdk-overlay-transparent-backdrop";
|
|
194
|
+
if (hasMessage) {
|
|
195
|
+
width = "initial";
|
|
196
|
+
backdropClass = "wis-common-loader-bg";
|
|
197
|
+
positionStrategy.centerHorizontally().centerVertically();
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
positionStrategy.top("0px").right("0px");
|
|
201
|
+
}
|
|
202
|
+
return { positionStrategy, width, backdropClass, hasMessage };
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
LoaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoaderService, deps: [{ token: i1$2.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
206
|
+
LoaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoaderService, providedIn: "root" });
|
|
207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoaderService, decorators: [{
|
|
208
|
+
type: Injectable,
|
|
209
|
+
args: [{
|
|
210
|
+
providedIn: "root"
|
|
211
|
+
}]
|
|
212
|
+
}], ctorParameters: function () { return [{ type: i1$2.Overlay }]; } });
|
|
213
|
+
|
|
214
|
+
/** @format */
|
|
215
|
+
const CONSTANTS_LOGGER = {
|
|
216
|
+
APP_NAME: "wisLoggerApp",
|
|
217
|
+
ENV_VAR: "wisLoggerEnv"
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
const envMap = {
|
|
221
|
+
dev: "https://wisbff-dev.moveinsync.com",
|
|
222
|
+
qa: "https://wisbff.stage.moveinsync.com",
|
|
223
|
+
prod: "https://wisempweb.moveinsync.com",
|
|
224
|
+
uat: "https://wisbff-uat.moveinsync.com",
|
|
225
|
+
"prod-green": "https://wisempweb-green.moveinsync.com",
|
|
226
|
+
"prod-beta": "https://wisempweb-beta.workinsync.io",
|
|
227
|
+
"prod-eu": "https://wisempweb.eu.moveinsync.com",
|
|
228
|
+
"prod-eu-green": "https://wisempweb-green.eu.moveinsync.com"
|
|
229
|
+
};
|
|
230
|
+
function environmentHandler(env) {
|
|
231
|
+
if (!env) {
|
|
232
|
+
return "/bff";
|
|
233
|
+
}
|
|
234
|
+
return envMap[env];
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
class LoggerService {
|
|
238
|
+
constructor(http, appName, appEnv) {
|
|
239
|
+
this.http = http;
|
|
240
|
+
this.appName = appName;
|
|
241
|
+
this.appEnv = appEnv;
|
|
242
|
+
this.cookies = false;
|
|
243
|
+
}
|
|
244
|
+
useCookies(useCookies) {
|
|
245
|
+
this.cookies = useCookies;
|
|
246
|
+
}
|
|
247
|
+
logRequest(data, logLevel) {
|
|
248
|
+
const request = {
|
|
249
|
+
data,
|
|
250
|
+
cookies: this.cookies ? document.cookie : undefined,
|
|
251
|
+
logLevel
|
|
252
|
+
};
|
|
253
|
+
this.postLog(request);
|
|
254
|
+
}
|
|
255
|
+
postLog(request) {
|
|
256
|
+
const url = `${environmentHandler(this.appEnv)}/report-log/${this.appName}`;
|
|
257
|
+
this.http.post(`${url}`, request).subscribe();
|
|
258
|
+
}
|
|
259
|
+
info(data) {
|
|
260
|
+
this.logRequest(data, "info");
|
|
261
|
+
}
|
|
262
|
+
warn(data) {
|
|
263
|
+
this.logRequest(data, "warn");
|
|
264
|
+
}
|
|
265
|
+
error(data, componentName, serviceUrl) {
|
|
266
|
+
this.logRequest({ ...data, componentName, serviceUrl }, "error");
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
LoggerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoggerService, deps: [{ token: i1$3.HttpClient }, { token: CONSTANTS_LOGGER.APP_NAME }, { token: CONSTANTS_LOGGER.ENV_VAR }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
270
|
+
LoggerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoggerService, providedIn: "root" });
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoggerService, decorators: [{
|
|
272
|
+
type: Injectable,
|
|
273
|
+
args: [{
|
|
274
|
+
providedIn: "root"
|
|
275
|
+
}]
|
|
276
|
+
}], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: undefined, decorators: [{
|
|
277
|
+
type: Inject,
|
|
278
|
+
args: [CONSTANTS_LOGGER.APP_NAME]
|
|
279
|
+
}] }, { type: undefined, decorators: [{
|
|
280
|
+
type: Inject,
|
|
281
|
+
args: [CONSTANTS_LOGGER.ENV_VAR]
|
|
282
|
+
}] }]; } });
|
|
283
|
+
|
|
284
|
+
class LoggerModule {
|
|
285
|
+
/**
|
|
286
|
+
*
|
|
287
|
+
* @param appName any app name eg. FAQ, Floor Plan, In App Popup, etc.
|
|
288
|
+
* @param env "dev" | "qa" | "uat" | "prod" | "prod-beta" | "prod-green" | "prod-eu" | "prod-eu-green" | undefined
|
|
289
|
+
* @returns ModuleWithProviders<LoggerModule>
|
|
290
|
+
*/
|
|
291
|
+
static forChild(appName, env) {
|
|
292
|
+
return {
|
|
293
|
+
ngModule: LoggerModule,
|
|
294
|
+
providers: [
|
|
295
|
+
{
|
|
296
|
+
provide: CONSTANTS_LOGGER.APP_NAME,
|
|
297
|
+
useValue: appName
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
provide: CONSTANTS_LOGGER.ENV_VAR,
|
|
301
|
+
useValue: env
|
|
302
|
+
},
|
|
303
|
+
LoggerService
|
|
304
|
+
]
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
LoggerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoggerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
309
|
+
LoggerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: LoggerModule, imports: [CommonModule] });
|
|
310
|
+
LoggerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoggerModule, imports: [CommonModule] });
|
|
311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoggerModule, decorators: [{
|
|
312
|
+
type: NgModule,
|
|
313
|
+
args: [{
|
|
314
|
+
declarations: [],
|
|
315
|
+
imports: [CommonModule],
|
|
316
|
+
providers: []
|
|
317
|
+
}]
|
|
318
|
+
}] });
|
|
319
|
+
|
|
320
|
+
/** @format */
|
|
321
|
+
const CONSTANTS_WIS_COMMON = {
|
|
322
|
+
ENV_VAR: "wisCommonEnvironment"
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
const API_URLS = {
|
|
326
|
+
CONFIGURATIONS: "configurations"
|
|
327
|
+
};
|
|
328
|
+
class HttpService {
|
|
329
|
+
constructor(env, auth, http) {
|
|
330
|
+
this.env = env;
|
|
331
|
+
this.auth = auth;
|
|
332
|
+
this.http = http;
|
|
333
|
+
}
|
|
334
|
+
getConfigurations() {
|
|
335
|
+
return this.http.get(`${this.env.empExp}/${this.auth.userDetails.buid}/${API_URLS.CONFIGURATIONS}`);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
HttpService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpService, deps: [{ token: CONSTANTS_WIS_COMMON }, { token: AuthService }, { token: i1$3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
339
|
+
HttpService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpService });
|
|
340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpService, decorators: [{
|
|
341
|
+
type: Injectable
|
|
342
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
343
|
+
type: Inject,
|
|
344
|
+
args: [CONSTANTS_WIS_COMMON]
|
|
345
|
+
}] }, { type: AuthService }, { type: i1$3.HttpClient }]; } });
|
|
346
|
+
|
|
347
|
+
class SidenavComponent {
|
|
348
|
+
constructor() { }
|
|
349
|
+
ngOnInit() { }
|
|
350
|
+
}
|
|
351
|
+
SidenavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
352
|
+
SidenavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SidenavComponent, selector: "wis-common-sidenav", ngImport: i0, template: "<div class=\"wis-sidenav-wrapper\">\n <div class=\"wis-sidenav-header\">\n <div class=\"wis-sidenav-header-logo\">\n <img src=\"assets/sidenav/assets/Wis-icon.svg\" alt=\"\" />\n </div>\n <div class=\"wis-sidenav-header-title\">\n <h1>WIS</h1>\n </div>\n </div>\n <div class=\"wis-sidenav-body\">\n <div class=\"wis-sidenav-body-item\">\n <div class=\"wis-sidenav-body-item-icon\">\n <i class=\"fas fa-home\"></i>\n </div>\n <div class=\"wis-sidenav-body-item-text\">\n <h3>Home</h3>\n </div>\n </div>\n <div class=\"wis-sidenav-body-item\">\n <div class=\"wis-sidenav-body-item-icon\">\n <i class=\"fas fa-user\"></i>\n </div>\n <div class=\"wis-sidenav-body-item-text\">\n <h3>Profile</h3>\n </div>\n </div>\n <div class=\"wis-sidenav-body-item\">\n <div class=\"wis-sidenav-body-item-icon\">\n <i class=\"fas fa-users\"></i>\n </div>\n <div class=\"wis-sidenav-body-item-text\">\n <h3>Users</h3>\n </div>\n </div>\n <div class=\"wis-sidenav-body-item\">\n <div class=\"wis-sidenav-body-item-icon\">\n <i class=\"fas fa-cog\"></i>\n </div>\n <div class=\"wis-sidenav-body-item-text\">\n <h3>Settings</h3>\n </div>\n </div>\n </div>\n</div>\n", styles: [".wis-sidenav-wrapper{width:72px;border-right:1px solid #e0e0e0}\n"] });
|
|
353
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SidenavComponent, decorators: [{
|
|
354
|
+
type: Component,
|
|
355
|
+
args: [{ selector: "wis-common-sidenav", template: "<div class=\"wis-sidenav-wrapper\">\n <div class=\"wis-sidenav-header\">\n <div class=\"wis-sidenav-header-logo\">\n <img src=\"assets/sidenav/assets/Wis-icon.svg\" alt=\"\" />\n </div>\n <div class=\"wis-sidenav-header-title\">\n <h1>WIS</h1>\n </div>\n </div>\n <div class=\"wis-sidenav-body\">\n <div class=\"wis-sidenav-body-item\">\n <div class=\"wis-sidenav-body-item-icon\">\n <i class=\"fas fa-home\"></i>\n </div>\n <div class=\"wis-sidenav-body-item-text\">\n <h3>Home</h3>\n </div>\n </div>\n <div class=\"wis-sidenav-body-item\">\n <div class=\"wis-sidenav-body-item-icon\">\n <i class=\"fas fa-user\"></i>\n </div>\n <div class=\"wis-sidenav-body-item-text\">\n <h3>Profile</h3>\n </div>\n </div>\n <div class=\"wis-sidenav-body-item\">\n <div class=\"wis-sidenav-body-item-icon\">\n <i class=\"fas fa-users\"></i>\n </div>\n <div class=\"wis-sidenav-body-item-text\">\n <h3>Users</h3>\n </div>\n </div>\n <div class=\"wis-sidenav-body-item\">\n <div class=\"wis-sidenav-body-item-icon\">\n <i class=\"fas fa-cog\"></i>\n </div>\n <div class=\"wis-sidenav-body-item-text\">\n <h3>Settings</h3>\n </div>\n </div>\n </div>\n</div>\n", styles: [".wis-sidenav-wrapper{width:72px;border-right:1px solid #e0e0e0}\n"] }]
|
|
356
|
+
}], ctorParameters: function () { return []; } });
|
|
357
|
+
|
|
358
|
+
class WisCommonModule {
|
|
359
|
+
static forRoot(env) {
|
|
360
|
+
return {
|
|
361
|
+
ngModule: WisCommonModule,
|
|
362
|
+
providers: [{ provide: CONSTANTS_WIS_COMMON, useValue: env }, ConfigurationService, LoaderService]
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
WisCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WisCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
367
|
+
WisCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: WisCommonModule, declarations: [LoaderComponent, SidenavComponent], imports: [CommonModule, OverlayModule, LoaderModule], exports: [SidenavComponent] });
|
|
368
|
+
WisCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WisCommonModule, providers: [HttpService], imports: [CommonModule, OverlayModule, LoaderModule] });
|
|
369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WisCommonModule, decorators: [{
|
|
370
|
+
type: NgModule,
|
|
371
|
+
args: [{
|
|
372
|
+
declarations: [LoaderComponent, SidenavComponent],
|
|
373
|
+
imports: [CommonModule, OverlayModule, LoaderModule],
|
|
374
|
+
providers: [HttpService],
|
|
375
|
+
exports: [SidenavComponent]
|
|
376
|
+
}]
|
|
377
|
+
}] });
|
|
378
|
+
|
|
379
|
+
class MfeCommunicationService {
|
|
380
|
+
constructor() { }
|
|
381
|
+
}
|
|
382
|
+
MfeCommunicationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MfeCommunicationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
383
|
+
MfeCommunicationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MfeCommunicationService, providedIn: 'root' });
|
|
384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MfeCommunicationService, decorators: [{
|
|
385
|
+
type: Injectable,
|
|
386
|
+
args: [{
|
|
387
|
+
providedIn: 'root'
|
|
388
|
+
}]
|
|
389
|
+
}], ctorParameters: function () { return []; } });
|
|
390
|
+
|
|
391
|
+
/*
|
|
392
|
+
* Public API Surface of wis-common
|
|
393
|
+
*/
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Generated bundle index. Do not edit.
|
|
397
|
+
*/
|
|
398
|
+
|
|
399
|
+
export { AuthInterceptor, AuthModule, AuthService, ConfigurationService, LoaderService, LoggerModule, LoggerService, MfeCommunicationService, SidenavComponent, WisCommonModule, filterNavList, getCookie, getQueryParam, removeCookie, setCookie };
|
|
400
|
+
//# sourceMappingURL=mis-wis-common.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mis-wis-common.mjs","sources":["../../../libraries/wis-common/src/lib/modules/auth/auth.service.ts","../../../libraries/wis-common/src/lib/modules/auth/auth.module.ts","../../../libraries/wis-common/src/lib/services/configuration.service.ts","../../../libraries/wis-common/src/lib/functions/nav-filter.function.ts","../../../libraries/wis-common/src/lib/functions/cookie.function.ts","../../../libraries/wis-common/src/lib/functions/url.functions.ts","../../../libraries/wis-common/src/lib/interceptors/auth.interceptor.ts","../../../libraries/wis-common/src/lib/components/loader/loader.component.ts","../../../libraries/wis-common/src/lib/components/loader/loader.component.html","../../../libraries/wis-common/src/lib/services/loader.service.ts","../../../libraries/wis-common/src/lib/modules/logger/logger.constant.ts","../../../libraries/wis-common/src/lib/modules/logger/logger.functions.ts","../../../libraries/wis-common/src/lib/modules/logger/logger.service.ts","../../../libraries/wis-common/src/lib/modules/logger/logger.module.ts","../../../libraries/wis-common/src/lib/constants/emp-web-exp.constants.ts","../../../libraries/wis-common/src/lib/services/http.service.ts","../../../libraries/wis-common/src/lib/components/sidenav/sidenav.component.ts","../../../libraries/wis-common/src/lib/components/sidenav/sidenav.component.html","../../../libraries/wis-common/src/lib/wis-common.module.ts","../../../libraries/wis-common/src/lib/services/mfe-communication.service.ts","../../../libraries/wis-common/src/public-api.ts","../../../libraries/wis-common/src/mis-wis-common.ts"],"sourcesContent":["import { Inject, Injectable } from \"@angular/core\";\nimport { IUserInfo } from \"./auth.model\";\n\n@Injectable({\n providedIn: \"root\"\n})\nexport class AuthService {\n userDetails: IUserInfo;\n\n constructor() {}\n\n init(user: IUserInfo) {\n this.userDetails = user;\n }\n}\n","import { ErrorHandler, ModuleWithProviders, NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { AuthService } from \"./auth.service\";\n\n@NgModule({\n declarations: [],\n imports: [CommonModule],\n providers: []\n})\nexport class AuthModule {\n /**\n *\n * @returns ModuleWithProviders<AuthModule>\n */\n static forRoot(): ModuleWithProviders<AuthModule> {\n return {\n ngModule: AuthModule,\n providers: [AuthService]\n };\n }\n}\n","import { Injectable } from \"@angular/core\";\n\n@Injectable({\n providedIn: \"root\"\n})\nexport class ConfigurationService {\n constructor() {}\n}\n","import { NsWISConfigurations } from \"../models/configurations.model\";\n\nexport const filterNavList = (\n navList: NsWISConfigurations.ISidenavLink[],\n features: NsWISConfigurations.IFeaturesMap\n): NsWISConfigurations.ISidenavLink[] => {\n return navList.filter(nav => {\n const mustHave = nav.mustHaveBasedProperty && nav.mustHaveBasedProperty.every(basedProperty => features[basedProperty]);\n const canHave = nav.canHaveBasedProperty && nav.canHaveBasedProperty.some(basedProperty => features[basedProperty]);\n if ((mustHave || canHave) && nav.children) {\n nav.children = filterNavList(nav.children, features);\n }\n return mustHave || canHave;\n });\n};\n","interface ICookieOptions {\n expires?: string;\n path?: string;\n domain?: string;\n \"Max-Age\"?: string;\n Secure?: boolean;\n HttpOnly?: boolean;\n SameSite?: \"Strict\" | \"Lax\" | \"None\";\n}\n\nexport function getCookie(name: string): string {\n const cookies = {};\n const cookieString = document.cookie;\n cookieString.split(\"; \").forEach(cookie => {\n const [key, value] = cookie.split(\"=\");\n cookies[key] = value;\n });\n return cookies[name] || undefined;\n}\n\nexport function setCookie(name: string, value: string, options?: ICookieOptions): void {\n let cookieStr = `${name}=${value};`;\n if (options) {\n const optsSelected = Object.keys(options);\n for (const opt of optsSelected) {\n cookieStr += ` ${opt}${(typeof options[opt] === \"string\" && `=${options[opt]}`) || \"\"};`;\n }\n }\n cookieStr += ';secure; SameSite=Strict;'\n document.cookie = cookieStr;\n}\n\nexport function removeCookie(name: string, domain?: string): void {\n setCookie(name, \"\", { expires: new Date(0).toUTCString(), domain });\n}\n","export function getQueryParam(queryString: string): string | null {\n const results = new RegExp(\"[?&]\" + queryString + \"=([^&#]*)\").exec(window.location.href);\n if (results === null) {\n return null;\n } else {\n return decodeURIComponent(results[1]) || null;\n }\n}\n","import { Injectable } from \"@angular/core\";\nimport { HttpErrorResponse, HttpHandler, HttpInterceptor, HttpRequest } from \"@angular/common/http\";\nimport { tap } from \"rxjs/operators\";\nimport { ToastService } from \"mis-crystal-design-system/toast\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { getCookie } from \"../functions/cookie.function\";\nimport { getQueryParam } from \"../functions/url.functions\";\n\nconst TOKEN_NAME = \"x-wis-token\";\n@Injectable()\nexport class AuthInterceptor implements HttpInterceptor {\n constructor(private route: ActivatedRoute, private toast: ToastService) {}\n\n intercept(request: HttpRequest<any>, next: HttpHandler) {\n const paramsMap = this.route.snapshot.queryParamMap;\n const buid = getQueryParam(\"buid\") || getQueryParam(\"buId\") || \"\";\n const empGuid = getQueryParam(\"empGuid\") || getQueryParam(\"empGuId\") || getQueryParam(\"userId\") || \"\";\n // const source = getQueryParam(\"source\");\n const authToken = getQueryParam(\"auth-token\");\n const token = getCookie(`sso-wis-token-${buid}`);\n const mobile_app_token = getCookie(TOKEN_NAME);\n const cloneReq = request.clone({\n setHeaders: {\n \"x-tenant-id\": buid,\n \"x-user-id\": empGuid,\n ...(!!token && { [TOKEN_NAME]: token }),\n ...(!!authToken && { [TOKEN_NAME]: authToken }),\n ...(!!mobile_app_token && { [TOKEN_NAME]: mobile_app_token })\n }\n });\n return next.handle(cloneReq).pipe(\n tap(\n () => {},\n err => {\n if (err instanceof HttpErrorResponse && err.status === 401) {\n this.toast.displayMsg(\"Your session has expired. Please login again.\");\n }\n }\n )\n );\n }\n}\n","import { Component, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"mis-common-loader\",\n templateUrl: \"./loader.component.html\",\n styleUrls: [\"./loader.component.scss\"]\n})\nexport class LoaderComponent implements OnInit {\n message: string;\n constructor() {}\n\n ngOnInit(): void {}\n}\n","<div class=\"message-wrapper\" *ngIf=\"message; else noMessageLoader\">\n <span><mis-loader type=\"block\"></mis-loader></span>\n <p>{{ message }}</p>\n</div>\n<ng-template #noMessageLoader>\n <mis-loader></mis-loader>\n</ng-template>\n","/** @format */\n\nimport { GlobalPositionStrategy, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { Injectable } from \"@angular/core\";\nimport { LoaderComponent } from \"../components/loader/loader.component\";\n\n@Injectable({\n providedIn: \"root\"\n})\nexport class LoaderService {\n private overlayRef: OverlayRef;\n public loading = false;\n\n constructor(private overlay: Overlay) {}\n\n show(message?: string): void {\n this.loading = true;\n if (this.overlayRef?.hasAttached()) {\n return;\n }\n const { positionStrategy, width, backdropClass, hasMessage } = this.calcLoaderProperties(!!message);\n const config = new OverlayConfig({\n hasBackdrop: true,\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.noop(),\n width,\n backdropClass\n });\n this.overlayRef = this.overlay.create(config);\n const portal = new ComponentPortal(LoaderComponent, null);\n const componentRef = this.overlayRef.attach(portal);\n if (hasMessage) {\n componentRef.instance.message = message;\n }\n }\n\n hide(): void {\n this.loading = false;\n this.overlayRef?.detach();\n this.overlayRef?.dispose();\n }\n\n private calcLoaderProperties(hasMessage: boolean): {\n positionStrategy: GlobalPositionStrategy;\n width: string;\n backdropClass: string;\n hasMessage: boolean;\n } {\n const positionStrategy = this.overlay.position().global();\n let width = \"100vh\";\n let backdropClass = \"cdk-overlay-transparent-backdrop\";\n if (hasMessage) {\n width = \"initial\";\n backdropClass = \"wis-common-loader-bg\";\n positionStrategy.centerHorizontally().centerVertically();\n } else {\n positionStrategy.top(\"0px\").right(\"0px\");\n }\n return { positionStrategy, width, backdropClass, hasMessage };\n }\n}\n","/** @format */\n\nexport const CONSTANTS_LOGGER = {\n APP_NAME: \"wisLoggerApp\",\n ENV_VAR: \"wisLoggerEnv\"\n};\n","import { TEnvName } from \"./logger.model\";\nconst envMap = {\n dev: \"https://wisbff-dev.moveinsync.com\",\n qa: \"https://wisbff.stage.moveinsync.com\",\n prod: \"https://wisempweb.moveinsync.com\",\n uat: \"https://wisbff-uat.moveinsync.com\",\n \"prod-green\": \"https://wisempweb-green.moveinsync.com\",\n \"prod-beta\": \"https://wisempweb-beta.workinsync.io\",\n \"prod-eu\": \"https://wisempweb.eu.moveinsync.com\",\n \"prod-eu-green\": \"https://wisempweb-green.eu.moveinsync.com\"\n};\nexport function environmentHandler(env: TEnvName) {\n if (!env) {\n return \"/bff\";\n }\n return envMap[env];\n}\n","import { TEnvName } from \"./logger.model\";\nimport { CONSTANTS_LOGGER } from \"./logger.constant\";\nimport { Inject, Injectable } from \"@angular/core\";\nimport { HttpClient } from \"@angular/common/http\";\nimport { environmentHandler } from \"./logger.functions\";\n@Injectable({\n providedIn: \"root\"\n})\nexport class LoggerService {\n private cookies: boolean = false;\n\n constructor(\n private http: HttpClient,\n @Inject(CONSTANTS_LOGGER.APP_NAME) private appName: string,\n @Inject(CONSTANTS_LOGGER.ENV_VAR) private appEnv: TEnvName\n ) {}\n\n useCookies(useCookies: boolean) {\n this.cookies = useCookies;\n }\n\n private logRequest(data: any, logLevel: \"info\" | \"error\" | \"warn\") {\n const request = {\n data,\n cookies: this.cookies ? document.cookie : undefined,\n logLevel\n };\n this.postLog(request);\n }\n\n private postLog(request) {\n const url = `${environmentHandler(this.appEnv)}/report-log/${this.appName}`;\n this.http.post(`${url}`, request).subscribe();\n }\n\n info(data: any) {\n this.logRequest(data, \"info\");\n }\n\n warn(data: any) {\n this.logRequest(data, \"warn\");\n }\n\n error(data: any, componentName: string, serviceUrl?: string) {\n this.logRequest({ ...data, componentName, serviceUrl }, \"error\");\n }\n}\n","import { CONSTANTS_LOGGER } from \"./logger.constant\";\nimport { ErrorHandler, ModuleWithProviders, NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { LoggerService } from \"./logger.service\";\nimport { TEnvName } from \"./logger.model\";\n\n@NgModule({\n declarations: [],\n imports: [CommonModule],\n providers: []\n})\nexport class LoggerModule {\n /**\n *\n * @param appName any app name eg. FAQ, Floor Plan, In App Popup, etc.\n * @param env \"dev\" | \"qa\" | \"uat\" | \"prod\" | \"prod-beta\" | \"prod-green\" | \"prod-eu\" | \"prod-eu-green\" | undefined\n * @returns ModuleWithProviders<LoggerModule>\n */\n static forChild(appName: string, env?: TEnvName): ModuleWithProviders<LoggerModule> {\n return {\n ngModule: LoggerModule,\n providers: [\n {\n provide: CONSTANTS_LOGGER.APP_NAME,\n useValue: appName\n },\n {\n provide: CONSTANTS_LOGGER.ENV_VAR,\n useValue: env\n },\n LoggerService\n ]\n };\n }\n}\n","/** @format */\n\nexport const CONSTANTS_WIS_COMMON = {\n ENV_VAR: \"wisCommonEnvironment\"\n};\n","import { HttpClient } from \"@angular/common/http\";\nimport { Inject, Injectable } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\nimport { CONSTANTS_WIS_COMMON } from \"../constants/emp-web-exp.constants\";\nimport { NsWISConfigurations } from \"../models/configurations.model\";\nimport { NsWISCommon } from \"../models/env.model\";\nimport { AuthService } from \"../modules/auth/auth.service\";\n\nconst API_URLS = {\n CONFIGURATIONS: \"configurations\"\n};\n\n@Injectable()\nexport class HttpService {\n constructor(@Inject(CONSTANTS_WIS_COMMON) public env: NsWISCommon.IEnv, private auth: AuthService, private http: HttpClient) {}\n\n getConfigurations(): Observable<NsWISConfigurations.IConfigurations> {\n return this.http.get<NsWISConfigurations.IConfigurations>(`${this.env.empExp}/${this.auth.userDetails.buid}/${API_URLS.CONFIGURATIONS}`);\n }\n}\n","import { Component, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"wis-common-sidenav\",\n templateUrl: \"./sidenav.component.html\",\n styleUrls: [\"./sidenav.component.scss\"]\n})\nexport class SidenavComponent implements OnInit {\n constructor() {}\n\n ngOnInit(): void {}\n}\n","<div class=\"wis-sidenav-wrapper\">\n <div class=\"wis-sidenav-header\">\n <div class=\"wis-sidenav-header-logo\">\n <img src=\"assets/sidenav/assets/Wis-icon.svg\" alt=\"\" />\n </div>\n <div class=\"wis-sidenav-header-title\">\n <h1>WIS</h1>\n </div>\n </div>\n <div class=\"wis-sidenav-body\">\n <div class=\"wis-sidenav-body-item\">\n <div class=\"wis-sidenav-body-item-icon\">\n <i class=\"fas fa-home\"></i>\n </div>\n <div class=\"wis-sidenav-body-item-text\">\n <h3>Home</h3>\n </div>\n </div>\n <div class=\"wis-sidenav-body-item\">\n <div class=\"wis-sidenav-body-item-icon\">\n <i class=\"fas fa-user\"></i>\n </div>\n <div class=\"wis-sidenav-body-item-text\">\n <h3>Profile</h3>\n </div>\n </div>\n <div class=\"wis-sidenav-body-item\">\n <div class=\"wis-sidenav-body-item-icon\">\n <i class=\"fas fa-users\"></i>\n </div>\n <div class=\"wis-sidenav-body-item-text\">\n <h3>Users</h3>\n </div>\n </div>\n <div class=\"wis-sidenav-body-item\">\n <div class=\"wis-sidenav-body-item-icon\">\n <i class=\"fas fa-cog\"></i>\n </div>\n <div class=\"wis-sidenav-body-item-text\">\n <h3>Settings</h3>\n </div>\n </div>\n </div>\n</div>\n","import { ModuleWithProviders, NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { ConfigurationService } from \"./services/configuration.service\";\nimport { NsWISCommon } from \"./models/env.model\";\nimport { CONSTANTS_WIS_COMMON } from \"./constants/emp-web-exp.constants\";\nimport { HttpService } from \"./services/http.service\";\nimport { LoaderModule } from \"mis-crystal-design-system/loader\";\nimport { LoaderComponent } from \"./components/loader/loader.component\";\nimport { LoaderService } from \"./services/loader.service\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { SidenavComponent } from \"./components/sidenav/sidenav.component\";\n\n@NgModule({\n declarations: [LoaderComponent, SidenavComponent],\n imports: [CommonModule, OverlayModule, LoaderModule],\n providers: [HttpService],\n exports: [SidenavComponent]\n})\nexport class WisCommonModule {\n static forRoot(env: NsWISCommon.IEnv): ModuleWithProviders<WisCommonModule> {\n return {\n ngModule: WisCommonModule,\n providers: [{ provide: CONSTANTS_WIS_COMMON, useValue: env }, ConfigurationService, LoaderService]\n };\n }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MfeCommunicationService {\n\n constructor() { }\n}\n","/*\n * Public API Surface of wis-common\n */\n\nexport * from \"./lib/modules/auth/auth.service\";\nexport * from \"./lib/modules/auth/auth.module\";\nexport * from \"./lib/services/configuration.service\";\nexport * from \"./lib/models/configurations.model\";\nexport * from \"./lib/functions/nav-filter.function\";\nexport * from \"./lib/functions/cookie.function\";\nexport * from \"./lib/functions/url.functions\";\nexport * from \"./lib/interceptors/auth.interceptor\";\nexport * from \"./lib/services/loader.service\";\nexport * from \"./lib/modules/logger/logger.module\";\nexport * from \"./lib/modules/logger/logger.service\";\nexport * from \"./lib/wis-common.module\";\nexport * from \"./lib/modules/logger/logger.model\";\nexport * from \"./lib/components/sidenav/sidenav.component\";\nexport * from \"./lib/services/mfe-communication.service\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2","i1.AuthService"],"mappings":";;;;;;;;;;;;;;;MAMa,WAAW,CAAA;AAGtB,IAAA,WAAA,GAAA,GAAgB;AAEhB,IAAA,IAAI,CAAC,IAAe,EAAA;AAClB,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;KACzB;;wGAPU,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAX,WAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA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C,WAAW,CAAC;oBACxB,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC9B,iBAAA,CAAA;;;MCZY,uBAAuB,CAAA;AAElC,IAAA,WAAA,GAAA,GAAiB;;oHAFN,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,uBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cAFtB,MAAM,EAAA,CAAA,CAAA;2FAEP,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAHnC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACJD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { OnInit } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class LoaderComponent implements OnInit {
|
|
3
4
|
message: string;
|
|
4
5
|
constructor();
|
|
5
6
|
ngOnInit(): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoaderComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoaderComponent, "mis-common-loader", never, {}, {}, never, never, false>;
|
|
6
9
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { OnInit } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class SidenavComponent implements OnInit {
|
|
3
4
|
constructor();
|
|
4
5
|
ngOnInit(): void;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SidenavComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SidenavComponent, "wis-common-sidenav", never, {}, {}, never, never, false>;
|
|
5
8
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { HttpHandler, HttpInterceptor, HttpRequest } from "@angular/common/http";
|
|
2
2
|
import { ToastService } from "mis-crystal-design-system/toast";
|
|
3
3
|
import { ActivatedRoute } from "@angular/router";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class AuthInterceptor implements HttpInterceptor {
|
|
5
6
|
private route;
|
|
6
7
|
private toast;
|
|
7
8
|
constructor(route: ActivatedRoute, toast: ToastService);
|
|
8
9
|
intercept(request: HttpRequest<any>, next: HttpHandler): import("rxjs").Observable<import("@angular/common/http").HttpEvent<any>>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthInterceptor, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthInterceptor>;
|
|
9
12
|
}
|
|
@@ -8,6 +8,10 @@ export declare namespace NsWISConfigurations {
|
|
|
8
8
|
interface IBUSettings {
|
|
9
9
|
features?: IFeaturesEntity[] | null;
|
|
10
10
|
}
|
|
11
|
+
interface IMfeCommunication {
|
|
12
|
+
eventName: string;
|
|
13
|
+
eventData: any;
|
|
14
|
+
}
|
|
11
15
|
interface IFeaturesEntity {
|
|
12
16
|
driverExoPhoneNumber?: string | null;
|
|
13
17
|
thdExoPhoneNumber?: string | null;
|
|
@@ -295,6 +299,7 @@ export declare namespace NsWISConfigurations {
|
|
|
295
299
|
hideUserActivityTime?: boolean;
|
|
296
300
|
showLanguageOptionInHamburgerMenu?: boolean;
|
|
297
301
|
showMealTimings?: boolean;
|
|
302
|
+
enableTeamCalendarRMView?: boolean;
|
|
298
303
|
}
|
|
299
304
|
interface ICutoffTimeBetweenWISAppFeedback {
|
|
300
305
|
employee: number;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { ModuleWithProviders } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
2
4
|
export declare class AuthModule {
|
|
3
5
|
/**
|
|
4
6
|
*
|
|
5
7
|
* @returns ModuleWithProviders<AuthModule>
|
|
6
8
|
*/
|
|
7
9
|
static forRoot(): ModuleWithProviders<AuthModule>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AuthModule, never, [typeof i1.CommonModule], never>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AuthModule>;
|
|
8
13
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { IUserInfo } from "./auth.model";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class AuthService {
|
|
3
4
|
userDetails: IUserInfo;
|
|
4
5
|
constructor();
|
|
5
6
|
init(user: IUserInfo): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
|
|
6
9
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ModuleWithProviders } from "@angular/core";
|
|
2
2
|
import { TEnvName } from "./logger.model";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
3
5
|
export declare class LoggerModule {
|
|
4
6
|
/**
|
|
5
7
|
*
|
|
@@ -8,4 +10,7 @@ export declare class LoggerModule {
|
|
|
8
10
|
* @returns ModuleWithProviders<LoggerModule>
|
|
9
11
|
*/
|
|
10
12
|
static forChild(appName: string, env?: TEnvName): ModuleWithProviders<LoggerModule>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoggerModule, never>;
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LoggerModule, never, [typeof i1.CommonModule], never>;
|
|
15
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<LoggerModule>;
|
|
11
16
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TEnvName } from "./logger.model";
|
|
2
2
|
import { HttpClient } from "@angular/common/http";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class LoggerService {
|
|
4
5
|
private http;
|
|
5
6
|
private appName;
|
|
@@ -12,4 +13,6 @@ export declare class LoggerService {
|
|
|
12
13
|
info(data: any): void;
|
|
13
14
|
warn(data: any): void;
|
|
14
15
|
error(data: any, componentName: string, serviceUrl?: string): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoggerService, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LoggerService>;
|
|
15
18
|
}
|
|
@@ -3,10 +3,13 @@ import { Observable } from "rxjs";
|
|
|
3
3
|
import { NsWISConfigurations } from "../models/configurations.model";
|
|
4
4
|
import { NsWISCommon } from "../models/env.model";
|
|
5
5
|
import { AuthService } from "../modules/auth/auth.service";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class HttpService {
|
|
7
8
|
env: NsWISCommon.IEnv;
|
|
8
9
|
private auth;
|
|
9
10
|
private http;
|
|
10
11
|
constructor(env: NsWISCommon.IEnv, auth: AuthService, http: HttpClient);
|
|
11
12
|
getConfigurations(): Observable<NsWISConfigurations.IConfigurations>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HttpService>;
|
|
12
15
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @format */
|
|
2
2
|
import { Overlay } from "@angular/cdk/overlay";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class LoaderService {
|
|
4
5
|
private overlay;
|
|
5
6
|
private overlayRef;
|
|
@@ -8,4 +9,6 @@ export declare class LoaderService {
|
|
|
8
9
|
show(message?: string): void;
|
|
9
10
|
hide(): void;
|
|
10
11
|
private calcLoaderProperties;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoaderService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LoaderService>;
|
|
11
14
|
}
|