@bnsights/bbsf-utilities 1.0.27 → 1.0.29
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 +9 -0
- package/bnsights-bbsf-utilities-1.0.29.tgz +0 -0
- package/bnsights-bbsf-utilities.metadata.json +1 -1
- package/bundles/bnsights-bbsf-utilities.umd.js +651 -577
- package/bundles/bnsights-bbsf-utilities.umd.js.map +1 -1
- package/esm2015/lib/shared/authentication/auth.service.js +88 -38
- package/esm2015/lib/shared/services/environment.service.js +13 -1
- package/esm2015/lib/shared/services/masterlayout.service.js +27 -18
- package/esm2015/lib/shared/services/requesthandler.service.js +3 -3
- package/fesm2015/bnsights-bbsf-utilities.js +426 -358
- package/fesm2015/bnsights-bbsf-utilities.js.map +1 -1
- package/lib/shared/authentication/auth.service.d.ts +7 -3
- package/lib/shared/services/environment.service.d.ts +3 -0
- package/lib/shared/services/masterlayout.service.d.ts +9 -6
- package/package.json +1 -1
- package/bnsights-bbsf-utilities-1.0.27.tgz +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as i1$
|
|
1
|
+
import * as i1$1 from '@angular/common';
|
|
2
2
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, Inject,
|
|
5
|
-
import * as
|
|
4
|
+
import { Injectable, Inject, Injector, NgModule } from '@angular/core';
|
|
5
|
+
import * as i1$2 from '@angular/router';
|
|
6
6
|
import { Router, RouterModule } from '@angular/router';
|
|
7
7
|
import * as i1 from '@ngx-translate/core';
|
|
8
8
|
import { TranslateService } from '@ngx-translate/core';
|
|
@@ -10,10 +10,10 @@ import { BlockUI, BlockUIModule } from 'ng-block-ui';
|
|
|
10
10
|
import { ToastrService, ToastrModule } from 'ngx-toastr';
|
|
11
11
|
import { HttpModule } from '@angular/http';
|
|
12
12
|
import { __awaiter, __decorate } from 'tslib';
|
|
13
|
-
import * as i1$
|
|
13
|
+
import * as i1$3 from '@angular/common/http';
|
|
14
14
|
import { HttpHeaders, HttpClient, HttpParams } from '@angular/common/http';
|
|
15
15
|
import { UserManager, WebStorageStateStore } from 'oidc-client';
|
|
16
|
-
import {
|
|
16
|
+
import { Subject, Observable, throwError, BehaviorSubject } from 'rxjs';
|
|
17
17
|
import { takeUntil, tap, map } from 'rxjs/operators';
|
|
18
18
|
import { plainToClass } from 'class-transformer';
|
|
19
19
|
|
|
@@ -53,6 +53,18 @@ class EnvironmentService {
|
|
|
53
53
|
let Url = environment["BBSF_IdentityServerUrl"];
|
|
54
54
|
return Url;
|
|
55
55
|
}
|
|
56
|
+
getIsIdentityServerExternal() {
|
|
57
|
+
let Mode = environment["BBSF_IsExternalIdentityServer"];
|
|
58
|
+
return Mode;
|
|
59
|
+
}
|
|
60
|
+
getIsIdentityServerClientId() {
|
|
61
|
+
let Mode = environment["BBSF_IdentityServer_Client_Id"];
|
|
62
|
+
return Mode;
|
|
63
|
+
}
|
|
64
|
+
getIsIdentityServerClientSecret() {
|
|
65
|
+
let Mode = environment["BBSF_IdentityServer_Client_Secret"];
|
|
66
|
+
return Mode;
|
|
67
|
+
}
|
|
56
68
|
}
|
|
57
69
|
EnvironmentService.AreaList = [];
|
|
58
70
|
EnvironmentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function EnvironmentService_Factory() { return new EnvironmentService(); }, token: EnvironmentService, providedIn: "root" });
|
|
@@ -71,241 +83,6 @@ BBSFTranslateService.decorators = [
|
|
|
71
83
|
},] }
|
|
72
84
|
];
|
|
73
85
|
|
|
74
|
-
class AuthService {
|
|
75
|
-
constructor(http, environmentService, translateService, router) {
|
|
76
|
-
this.http = http;
|
|
77
|
-
this.environmentService = environmentService;
|
|
78
|
-
this.translateService = translateService;
|
|
79
|
-
this.router = router;
|
|
80
|
-
// Observable navItem source
|
|
81
|
-
this._authNavStatusSource = new BehaviorSubject(false);
|
|
82
|
-
// Observable navItem stream
|
|
83
|
-
this.authNavStatus$ = this._authNavStatusSource.asObservable();
|
|
84
|
-
// Observable navItem source
|
|
85
|
-
this._userSource = new Subject();
|
|
86
|
-
this.UserStatus$ = this._userSource.asObservable();
|
|
87
|
-
this.manager = new UserManager({
|
|
88
|
-
authority: this.environmentService.getIdentityServerUrl(),
|
|
89
|
-
client_id: 'angular_spa',
|
|
90
|
-
redirect_uri: this.environmentService.getIdentityServerUrl() + '/Admin/authentication/auth-callback',
|
|
91
|
-
post_logout_redirect_uri: this.environmentService.getBaseUrl(),
|
|
92
|
-
response_type: "id_token token",
|
|
93
|
-
scope: "openid profile email IdentityServerApi",
|
|
94
|
-
filterProtocolClaims: true,
|
|
95
|
-
loadUserInfo: true,
|
|
96
|
-
automaticSilentRenew: true,
|
|
97
|
-
silent_redirect_uri: this.environmentService.getIdentityServerUrl() + '/assets/silent-callback.html',
|
|
98
|
-
userStore: new WebStorageStateStore({ store: window.localStorage })
|
|
99
|
-
});
|
|
100
|
-
this.redirectUrl = "";
|
|
101
|
-
this.manager.getUser().then((user) => __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
this.manager.storeUser(user);
|
|
103
|
-
AuthService.user = user;
|
|
104
|
-
this.user = user;
|
|
105
|
-
this._authNavStatusSource.next(yield this.isAuthenticated());
|
|
106
|
-
}));
|
|
107
|
-
this.manager.events.addAccessTokenExpired(_ => {
|
|
108
|
-
this._authNavStatusSource.next(false);
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
login() {
|
|
112
|
-
return this.manager.signinRedirect();
|
|
113
|
-
}
|
|
114
|
-
getUser() {
|
|
115
|
-
this.manager.getUser().then((user) => __awaiter(this, void 0, void 0, function* () {
|
|
116
|
-
;
|
|
117
|
-
AuthService.user = user;
|
|
118
|
-
this.user = user;
|
|
119
|
-
this._authNavStatusSource.next(yield this.isAuthenticated());
|
|
120
|
-
}));
|
|
121
|
-
}
|
|
122
|
-
storUser(User) {
|
|
123
|
-
this.manager.storeUser(User);
|
|
124
|
-
}
|
|
125
|
-
revokeAccessToken() {
|
|
126
|
-
this.manager.revokeAccessToken();
|
|
127
|
-
}
|
|
128
|
-
signinSilent() {
|
|
129
|
-
let x = this.manager.signinSilentCallback();
|
|
130
|
-
x.then(s => {
|
|
131
|
-
//console.log(s)
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
completeAuthentication() {
|
|
135
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
-
this.user = yield this.manager.signinRedirectCallback();
|
|
137
|
-
AuthService.user = this.user;
|
|
138
|
-
if (!localStorage.getItem("language") || localStorage.getItem("language") == this.user.profile.locale)
|
|
139
|
-
localStorage.setItem("language", this.user.profile.locale);
|
|
140
|
-
if (this.translateService.currentLang != localStorage.getItem("language")) {
|
|
141
|
-
this.translateService.resetLang(this.translateService.currentLang);
|
|
142
|
-
yield this.translateService.reloadLang(localStorage.getItem("language")).subscribe((res) => {
|
|
143
|
-
console.log(res);
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
this._userSource.next(AuthService.user);
|
|
147
|
-
this._authNavStatusSource.next(yield this.isAuthenticated());
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
refreshToken(token) {
|
|
151
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
-
const httpOptions = {
|
|
153
|
-
headers: new HttpHeaders({
|
|
154
|
-
'Content-Type': 'application/json',
|
|
155
|
-
'Authorization': token
|
|
156
|
-
})
|
|
157
|
-
};
|
|
158
|
-
this.manager.revokeAccessToken();
|
|
159
|
-
return yield this.http.post(`${this.environmentService.getIdentityServerUrl()}/users/refresh-token`, httpOptions, { withCredentials: true }).subscribe((user) => {
|
|
160
|
-
this._userSource.next(user);
|
|
161
|
-
AuthService.user = user;
|
|
162
|
-
this.user = user;
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
getCurrentUser() {
|
|
167
|
-
return this.manager.getUser();
|
|
168
|
-
}
|
|
169
|
-
isAuthenticated() {
|
|
170
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
-
let user = yield this.manager.getUser().then(user => {
|
|
172
|
-
return user;
|
|
173
|
-
});
|
|
174
|
-
return this.user != null && !this.user.expired;
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
isUserInRole(allowedPermission) {
|
|
178
|
-
let selectedPermissionSetID = Number.parseInt(this.user.profile["selectedpermissionsetid"]);
|
|
179
|
-
return allowedPermission.includes(selectedPermissionSetID);
|
|
180
|
-
}
|
|
181
|
-
authorizationHeaderValue() {
|
|
182
|
-
return AuthService.user ? `${AuthService.user.token_type} ${AuthService.user.access_token}` : "";
|
|
183
|
-
}
|
|
184
|
-
name() {
|
|
185
|
-
return AuthService.user != null ? AuthService.user.profile.given_name : '';
|
|
186
|
-
}
|
|
187
|
-
setUrl(url) {
|
|
188
|
-
localStorage.setItem("redirectUrl", url);
|
|
189
|
-
}
|
|
190
|
-
getUrl() {
|
|
191
|
-
return localStorage.getItem("redirectUrl");
|
|
192
|
-
}
|
|
193
|
-
signinSilentCallback() {
|
|
194
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
195
|
-
let user = yield this.manager.signinSilentCallback();
|
|
196
|
-
//await this.manager.storeUser(user);
|
|
197
|
-
AuthService.user = user;
|
|
198
|
-
console.log("Token from signinSilentCallback :" + AuthService.user);
|
|
199
|
-
this.user = user;
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
signout() {
|
|
203
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
204
|
-
if (yield !this.isAuthenticated())
|
|
205
|
-
this.router.navigate(['/Admin/account/login']),
|
|
206
|
-
localStorage.clear();
|
|
207
|
-
yield this.manager.signoutRedirect();
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
AuthService.user = null;
|
|
212
|
-
AuthService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AuthService_Factory() { return new AuthService(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(EnvironmentService), i0.ɵɵinject(BBSFTranslateService), i0.ɵɵinject(i4.Router)); }, token: AuthService, providedIn: "root" });
|
|
213
|
-
AuthService.decorators = [
|
|
214
|
-
{ type: Injectable, args: [{
|
|
215
|
-
providedIn: 'root'
|
|
216
|
-
},] }
|
|
217
|
-
];
|
|
218
|
-
AuthService.ctorParameters = () => [
|
|
219
|
-
{ type: HttpClient },
|
|
220
|
-
{ type: EnvironmentService },
|
|
221
|
-
{ type: BBSFTranslateService },
|
|
222
|
-
{ type: Router }
|
|
223
|
-
];
|
|
224
|
-
|
|
225
|
-
class UtilityService {
|
|
226
|
-
constructor(translator, authService, environmentService) {
|
|
227
|
-
this.translator = translator;
|
|
228
|
-
this.authService = authService;
|
|
229
|
-
this.environmentService = environmentService;
|
|
230
|
-
this.isCreatedBefore = false;
|
|
231
|
-
}
|
|
232
|
-
getResourceValue(Key) {
|
|
233
|
-
let ResourceValue = this.translator.instant(Key);
|
|
234
|
-
return ResourceValue;
|
|
235
|
-
}
|
|
236
|
-
getCurrentLanguage() {
|
|
237
|
-
let currentLanguage = this.environmentService.getDefaultLanguage();
|
|
238
|
-
let lang = localStorage.getItem('language');
|
|
239
|
-
if (lang)
|
|
240
|
-
currentLanguage = lang;
|
|
241
|
-
else
|
|
242
|
-
localStorage.setItem('language', currentLanguage);
|
|
243
|
-
return currentLanguage;
|
|
244
|
-
}
|
|
245
|
-
isCurrentLanguageEnglish() {
|
|
246
|
-
return this.getCurrentLanguage() == "en";
|
|
247
|
-
}
|
|
248
|
-
isCurrentLanguageArabic() {
|
|
249
|
-
return this.getCurrentLanguage() == "ar";
|
|
250
|
-
}
|
|
251
|
-
notifySuccessMessage(Message, title, time, showHeader = true) {
|
|
252
|
-
let MessageTemplate = this.getResourceValue("SuccessMessage");
|
|
253
|
-
let titleTemplate;
|
|
254
|
-
if (Message) {
|
|
255
|
-
MessageTemplate = Message;
|
|
256
|
-
}
|
|
257
|
-
if (title) {
|
|
258
|
-
titleTemplate = title;
|
|
259
|
-
}
|
|
260
|
-
let toaster = AppInjector.get(ToastrService);
|
|
261
|
-
showHeader ? toaster.success(MessageTemplate, titleTemplate) : toaster.success(MessageTemplate);
|
|
262
|
-
}
|
|
263
|
-
notifyErrorMessage(Message, title, time, showHeader = true) {
|
|
264
|
-
let MessageTemplate = this.getResourceValue("ErrorMessage");
|
|
265
|
-
let titleTemplate = this.getResourceValue("Error");
|
|
266
|
-
if (Message) {
|
|
267
|
-
MessageTemplate = Message;
|
|
268
|
-
}
|
|
269
|
-
if (title) {
|
|
270
|
-
titleTemplate = title;
|
|
271
|
-
}
|
|
272
|
-
const toaster = AppInjector.get(ToastrService);
|
|
273
|
-
showHeader ? toaster.error(MessageTemplate, titleTemplate) : toaster.error(MessageTemplate);
|
|
274
|
-
}
|
|
275
|
-
notifyWarningMessage(Message, title, time, showHeader = true) {
|
|
276
|
-
let MessageTemplate = this.getResourceValue("WarningMessage");
|
|
277
|
-
let titleTemplate = this.getResourceValue("Warning");
|
|
278
|
-
if (Message) {
|
|
279
|
-
MessageTemplate = Message;
|
|
280
|
-
}
|
|
281
|
-
if (title) {
|
|
282
|
-
titleTemplate = title;
|
|
283
|
-
}
|
|
284
|
-
const toaster = AppInjector.get(ToastrService);
|
|
285
|
-
showHeader ? toaster.warning(MessageTemplate, titleTemplate) : toaster.warning(MessageTemplate);
|
|
286
|
-
}
|
|
287
|
-
startBlockUI() {
|
|
288
|
-
this.blockUI.start();
|
|
289
|
-
}
|
|
290
|
-
stopBlockUI() {
|
|
291
|
-
this.blockUI.stop();
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
UtilityService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UtilityService_Factory() { return new UtilityService(i0.ɵɵinject(BBSFTranslateService), i0.ɵɵinject(AuthService), i0.ɵɵinject(EnvironmentService)); }, token: UtilityService, providedIn: "root" });
|
|
295
|
-
UtilityService.decorators = [
|
|
296
|
-
{ type: Injectable, args: [{
|
|
297
|
-
providedIn: 'root'
|
|
298
|
-
},] }
|
|
299
|
-
];
|
|
300
|
-
UtilityService.ctorParameters = () => [
|
|
301
|
-
{ type: BBSFTranslateService },
|
|
302
|
-
{ type: AuthService },
|
|
303
|
-
{ type: EnvironmentService }
|
|
304
|
-
];
|
|
305
|
-
__decorate([
|
|
306
|
-
BlockUI()
|
|
307
|
-
], UtilityService.prototype, "blockUI", void 0);
|
|
308
|
-
|
|
309
86
|
class RequestOptionsModel {
|
|
310
87
|
constructor() {
|
|
311
88
|
this.disableSuccessNotification = false;
|
|
@@ -474,14 +251,14 @@ class RequestHandlerService {
|
|
|
474
251
|
}
|
|
475
252
|
else {
|
|
476
253
|
if (err.status == 400)
|
|
477
|
-
throwError(err); //error 400 is thrown to be catch by the Form component to handle Fluent validation errors
|
|
254
|
+
throwError(err); //error 400 is thrown to be catch by the Form component to handle Fluent validation errors
|
|
478
255
|
else if (err.status == 401)
|
|
479
256
|
this.router.navigate(["/Admin/account/login"]);
|
|
480
257
|
else if (err.status == 403)
|
|
481
258
|
this.utilityService.notifyErrorMessage(isEnglish ? "Sorry, You're not authorized to access this action" : "عذرا ليس لديك الصلاحيه لهذا الطلب");
|
|
482
259
|
else if (err.status == 510)
|
|
483
260
|
this.utilityService.notifyErrorMessage(isEnglish ? "Can not delete this item as it is related to others" : "لا يمكن حذف هذا العنصر لأنه مرتبط بعناصر أخرى");
|
|
484
|
-
else if (err.status == 515)
|
|
261
|
+
else if (err.status == 515 || err.status == 516)
|
|
485
262
|
this.utilityService.notifyErrorMessage((err.error ? err.error.Message : err.message));
|
|
486
263
|
else {
|
|
487
264
|
console.log(`error message is: ${err.error ? err.error.Message : err.message}`);
|
|
@@ -551,7 +328,7 @@ class StylesBundleService {
|
|
|
551
328
|
head.appendChild(style);
|
|
552
329
|
}
|
|
553
330
|
}
|
|
554
|
-
StylesBundleService.ɵprov = i0.ɵɵdefineInjectable({ factory: function StylesBundleService_Factory() { return new StylesBundleService(i0.ɵɵinject(i1$
|
|
331
|
+
StylesBundleService.ɵprov = i0.ɵɵdefineInjectable({ factory: function StylesBundleService_Factory() { return new StylesBundleService(i0.ɵɵinject(i1$1.DOCUMENT), i0.ɵɵinject(BBSFTranslateService)); }, token: StylesBundleService, providedIn: "root" });
|
|
555
332
|
StylesBundleService.decorators = [
|
|
556
333
|
{ type: Injectable, args: [{
|
|
557
334
|
providedIn: 'root'
|
|
@@ -562,48 +339,412 @@ StylesBundleService.ctorParameters = () => [
|
|
|
562
339
|
{ type: BBSFTranslateService }
|
|
563
340
|
];
|
|
564
341
|
|
|
565
|
-
class
|
|
566
|
-
constructor(
|
|
567
|
-
this.
|
|
568
|
-
this.
|
|
569
|
-
this.
|
|
342
|
+
class MasterLayoutService {
|
|
343
|
+
constructor(router, http, authService, stylesBundleService, translate, environmentService) {
|
|
344
|
+
this.router = router;
|
|
345
|
+
this.http = http;
|
|
346
|
+
this.authService = authService;
|
|
347
|
+
this.stylesBundleService = stylesBundleService;
|
|
348
|
+
this.translate = translate;
|
|
349
|
+
this.environmentService = environmentService;
|
|
350
|
+
this.ApiUrl = '/api/Home/';
|
|
570
351
|
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
352
|
+
switchLang(lang, bundleEnglishName, bundleArabicName) {
|
|
353
|
+
this.changeLanguage(lang).subscribe((result) => {
|
|
354
|
+
this.updateUserInfo().subscribe((Value) => {
|
|
355
|
+
let UserInfoObject = Value;
|
|
356
|
+
this.authService.getUser();
|
|
357
|
+
this.authService.user.profile = Object.assign(this.authService.user.profile, UserInfoObject);
|
|
358
|
+
this.authService.storUser(this.authService.user);
|
|
359
|
+
this.stylesBundleService.loadThemes(lang, bundleEnglishName, bundleArabicName);
|
|
360
|
+
localStorage.setItem('language', lang);
|
|
361
|
+
this.translate.use(lang);
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
reloadComponent() {
|
|
366
|
+
let currentUrl = this.router.url;
|
|
367
|
+
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
|
|
368
|
+
this.router.onSameUrlNavigation = 'reload';
|
|
369
|
+
this.router.navigate([currentUrl]);
|
|
370
|
+
}
|
|
371
|
+
changeLanguage(key) {
|
|
372
|
+
let params = new HttpParams();
|
|
373
|
+
params = params.append('UserId', this.authService.user.profile.id);
|
|
374
|
+
params = params.append('LanguageKey', key);
|
|
375
|
+
return this.http.post(this.ApiUrl + 'UpdateLanguage', null, null, params);
|
|
376
|
+
}
|
|
377
|
+
getUserClaims() {
|
|
378
|
+
return this.http.get(this.ApiUrl + 'GetUserClaims', null, null);
|
|
379
|
+
}
|
|
380
|
+
logError(error) {
|
|
381
|
+
let params = new HttpParams();
|
|
382
|
+
params = params.append('error', error);
|
|
383
|
+
return this.http.post(this.ApiUrl + 'LogError', null, null, params);
|
|
384
|
+
}
|
|
385
|
+
updateUserInfo() {
|
|
386
|
+
if (this.environmentService.getIsIdentityServerExternal())
|
|
387
|
+
return this.getUserClaims();
|
|
388
|
+
return this.http.get('/connect/userinfo');
|
|
389
|
+
}
|
|
390
|
+
switchRole(permissionSetID) {
|
|
391
|
+
this.updateRole(permissionSetID).subscribe((result) => {
|
|
392
|
+
this.updateUserInfo().subscribe((Value) => {
|
|
393
|
+
let UserInfoObject = Value;
|
|
394
|
+
this.authService.getUser();
|
|
395
|
+
this.authService.user.profile = Object.assign(this.authService.user.profile, UserInfoObject);
|
|
396
|
+
this.authService.storUser(this.authService.user);
|
|
397
|
+
});
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
updateRole(permissionSetID) {
|
|
401
|
+
let params = new HttpParams();
|
|
402
|
+
params = params.append('UserId', this.authService.user.profile.id);
|
|
403
|
+
params = params.append('RoleID', permissionSetID);
|
|
404
|
+
return this.http.post(this.ApiUrl + 'SwitchRole', null, null, params);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
MasterLayoutService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MasterLayoutService_Factory() { return new MasterLayoutService(i0.ɵɵinject(i1$2.Router), i0.ɵɵinject(RequestHandlerService), i0.ɵɵinject(AuthService), i0.ɵɵinject(StylesBundleService), i0.ɵɵinject(i1.TranslateService), i0.ɵɵinject(EnvironmentService)); }, token: MasterLayoutService, providedIn: "root" });
|
|
408
|
+
MasterLayoutService.decorators = [
|
|
409
|
+
{ type: Injectable, args: [{
|
|
410
|
+
providedIn: 'root',
|
|
411
|
+
},] }
|
|
412
|
+
];
|
|
413
|
+
MasterLayoutService.ctorParameters = () => [
|
|
414
|
+
{ type: Router },
|
|
415
|
+
{ type: RequestHandlerService },
|
|
416
|
+
{ type: AuthService },
|
|
417
|
+
{ type: StylesBundleService },
|
|
418
|
+
{ type: TranslateService },
|
|
419
|
+
{ type: EnvironmentService }
|
|
420
|
+
];
|
|
421
|
+
|
|
422
|
+
class AuthService {
|
|
423
|
+
constructor(injector, http, environmentService, translateService, router) {
|
|
424
|
+
this.injector = injector;
|
|
425
|
+
this.http = http;
|
|
426
|
+
this.environmentService = environmentService;
|
|
427
|
+
this.translateService = translateService;
|
|
428
|
+
this.router = router;
|
|
429
|
+
// Observable navItem source
|
|
430
|
+
this._authNavStatusSource = new BehaviorSubject(false);
|
|
431
|
+
// Observable navItem stream
|
|
432
|
+
this.authNavStatus$ = this._authNavStatusSource.asObservable();
|
|
433
|
+
// Observable navItem source
|
|
434
|
+
this._userSource = new Subject();
|
|
435
|
+
this.UserStatus$ = this._userSource.asObservable();
|
|
436
|
+
this.manager = this.getUserManager();
|
|
437
|
+
this.redirectUrl = '';
|
|
438
|
+
this.manager.getUser().then((user) => __awaiter(this, void 0, void 0, function* () {
|
|
439
|
+
this.manager.storeUser(user);
|
|
440
|
+
AuthService.user = user;
|
|
441
|
+
this.user = user;
|
|
442
|
+
this._authNavStatusSource.next(yield this.isAuthenticated());
|
|
443
|
+
}));
|
|
444
|
+
this.manager.events.addAccessTokenExpired((_) => {
|
|
445
|
+
this._authNavStatusSource.next(false);
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
getUserManager() {
|
|
449
|
+
let user = null;
|
|
450
|
+
let isExternal = this.environmentService.getIsIdentityServerExternal().toLowerCase() == "true";
|
|
451
|
+
if (isExternal) {
|
|
452
|
+
user = new UserManager({
|
|
453
|
+
authority: this.environmentService.getIdentityServerUrl(),
|
|
454
|
+
client_id: this.environmentService.getIsIdentityServerClientId(),
|
|
455
|
+
client_secret: this.environmentService.getIsIdentityServerClientSecret(),
|
|
456
|
+
redirect_uri: this.environmentService.getBaseUrl() +
|
|
457
|
+
'/Admin/authentication/auth-callback',
|
|
458
|
+
post_logout_redirect_uri: this.environmentService.getBaseUrl(),
|
|
459
|
+
response_type: 'code',
|
|
460
|
+
scope: 'openid profile email',
|
|
461
|
+
filterProtocolClaims: true,
|
|
462
|
+
loadUserInfo: true,
|
|
463
|
+
automaticSilentRenew: true,
|
|
464
|
+
silent_redirect_uri: this.environmentService.getBaseUrl() + '/assets/silent-callback.html',
|
|
465
|
+
userStore: new WebStorageStateStore({ store: window.localStorage }),
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
else {
|
|
469
|
+
user = new UserManager({
|
|
470
|
+
authority: this.environmentService.getIdentityServerUrl(),
|
|
471
|
+
client_id: 'angular_spa',
|
|
472
|
+
redirect_uri: this.environmentService.getBaseUrl() +
|
|
473
|
+
'/Admin/authentication/auth-callback',
|
|
474
|
+
post_logout_redirect_uri: this.environmentService.getBaseUrl(),
|
|
475
|
+
response_type: 'id_token token',
|
|
476
|
+
scope: 'openid profile email IdentityServerApi',
|
|
477
|
+
filterProtocolClaims: true,
|
|
478
|
+
loadUserInfo: true,
|
|
479
|
+
automaticSilentRenew: true,
|
|
480
|
+
silent_redirect_uri: this.environmentService.getBaseUrl() + '/assets/silent-callback.html',
|
|
481
|
+
userStore: new WebStorageStateStore({ store: window.localStorage }),
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
return user;
|
|
485
|
+
}
|
|
486
|
+
login() {
|
|
487
|
+
return this.manager.signinRedirect();
|
|
488
|
+
}
|
|
489
|
+
getUser() {
|
|
490
|
+
this.manager.getUser().then((user) => __awaiter(this, void 0, void 0, function* () {
|
|
491
|
+
AuthService.user = user;
|
|
492
|
+
this.user = user;
|
|
493
|
+
this._authNavStatusSource.next(yield this.isAuthenticated());
|
|
494
|
+
}));
|
|
495
|
+
}
|
|
496
|
+
storUser(User) {
|
|
497
|
+
this.manager.storeUser(User);
|
|
498
|
+
}
|
|
499
|
+
revokeAccessToken() {
|
|
500
|
+
this.manager.revokeAccessToken();
|
|
501
|
+
}
|
|
502
|
+
signinSilent() {
|
|
503
|
+
let x = this.manager.signinSilentCallback();
|
|
504
|
+
x.then((s) => {
|
|
505
|
+
//console.log(s)
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
completeAuthentication() {
|
|
509
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
510
|
+
this.user = yield this.manager.signinRedirectCallback();
|
|
511
|
+
AuthService.user = this.user;
|
|
512
|
+
this._userSource.next(AuthService.user);
|
|
513
|
+
this._authNavStatusSource.next(yield this.isAuthenticated());
|
|
514
|
+
let isExternal = this.environmentService.getIsIdentityServerExternal().toLowerCase() == "true";
|
|
515
|
+
if (isExternal) {
|
|
516
|
+
const masterLayoutService = this.injector.get(MasterLayoutService);
|
|
517
|
+
let userClaims = yield masterLayoutService
|
|
518
|
+
.getUserClaims()
|
|
519
|
+
.toPromise()
|
|
520
|
+
.then((e) => {
|
|
521
|
+
AuthService.UserClaims = e;
|
|
522
|
+
});
|
|
523
|
+
AuthService.user.profile = Object.assign(AuthService.user.profile, AuthService.UserClaims);
|
|
524
|
+
}
|
|
525
|
+
this.storUser(AuthService.user);
|
|
526
|
+
if (!localStorage.getItem('language') ||
|
|
527
|
+
localStorage.getItem('language') == this.user.profile.locale)
|
|
528
|
+
localStorage.setItem('language', this.user.profile.locale);
|
|
529
|
+
if (this.translateService.currentLang != localStorage.getItem('language')) {
|
|
530
|
+
this.translateService.resetLang(this.translateService.currentLang);
|
|
531
|
+
yield this.translateService
|
|
532
|
+
.reloadLang(localStorage.getItem('language'))
|
|
533
|
+
.subscribe((res) => {
|
|
534
|
+
console.log(res);
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
this._userSource.next(AuthService.user);
|
|
538
|
+
this._authNavStatusSource.next(yield this.isAuthenticated());
|
|
539
|
+
this.user = AuthService.user;
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
refreshToken(token) {
|
|
543
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
544
|
+
const httpOptions = {
|
|
545
|
+
headers: new HttpHeaders({
|
|
546
|
+
'Content-Type': 'application/json',
|
|
547
|
+
Authorization: token,
|
|
548
|
+
}),
|
|
549
|
+
};
|
|
550
|
+
this.manager.revokeAccessToken();
|
|
551
|
+
return yield this.http
|
|
552
|
+
.post(`${this.environmentService.getIdentityServerUrl()}/users/refresh-token`, httpOptions, { withCredentials: true })
|
|
553
|
+
.subscribe((user) => {
|
|
554
|
+
this._userSource.next(user);
|
|
555
|
+
AuthService.user = user;
|
|
556
|
+
this.user = user;
|
|
557
|
+
});
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
getCurrentUser() {
|
|
561
|
+
return this.manager.getUser();
|
|
562
|
+
}
|
|
563
|
+
isAuthenticated() {
|
|
564
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
565
|
+
let user = yield this.manager.getUser().then((user) => {
|
|
566
|
+
return user;
|
|
567
|
+
});
|
|
568
|
+
return this.user != null && !this.user.expired;
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
isUserInRole(allowedPermission) {
|
|
572
|
+
let selectedPermissionSetID = Number.parseInt(this.user.profile['selectedpermissionsetid']);
|
|
573
|
+
return allowedPermission.includes(selectedPermissionSetID);
|
|
574
|
+
}
|
|
575
|
+
authorizationHeaderValue() {
|
|
576
|
+
return AuthService.user
|
|
577
|
+
? `${AuthService.user.token_type} ${AuthService.user.access_token}`
|
|
578
|
+
: '';
|
|
579
|
+
}
|
|
580
|
+
name() {
|
|
581
|
+
return AuthService.user != null ? AuthService.user.profile.given_name : '';
|
|
582
|
+
}
|
|
583
|
+
setUrl(url) {
|
|
584
|
+
localStorage.setItem('redirectUrl', url);
|
|
585
|
+
}
|
|
586
|
+
getUrl() {
|
|
587
|
+
return localStorage.getItem('redirectUrl');
|
|
588
|
+
}
|
|
589
|
+
signinSilentCallback() {
|
|
590
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
591
|
+
let user = yield this.manager.signinSilentCallback();
|
|
592
|
+
//await this.manager.storeUser(user);
|
|
593
|
+
AuthService.user = user;
|
|
594
|
+
console.log('Token from signinSilentCallback :' + AuthService.user);
|
|
595
|
+
this.user = user;
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
signout() {
|
|
599
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
600
|
+
if (yield !this.isAuthenticated())
|
|
601
|
+
this.router.navigate(['/Admin/account/login']), localStorage.clear();
|
|
602
|
+
yield this.manager.signoutRedirect();
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
AuthService.user = null;
|
|
607
|
+
AuthService.UserClaims = null;
|
|
608
|
+
AuthService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AuthService_Factory() { return new AuthService(i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i1$3.HttpClient), i0.ɵɵinject(EnvironmentService), i0.ɵɵinject(BBSFTranslateService), i0.ɵɵinject(i1$2.Router)); }, token: AuthService, providedIn: "root" });
|
|
609
|
+
AuthService.decorators = [
|
|
610
|
+
{ type: Injectable, args: [{
|
|
611
|
+
providedIn: 'root',
|
|
612
|
+
},] }
|
|
613
|
+
];
|
|
614
|
+
AuthService.ctorParameters = () => [
|
|
615
|
+
{ type: Injector },
|
|
616
|
+
{ type: HttpClient },
|
|
617
|
+
{ type: EnvironmentService },
|
|
618
|
+
{ type: BBSFTranslateService },
|
|
619
|
+
{ type: Router }
|
|
620
|
+
];
|
|
621
|
+
|
|
622
|
+
class UtilityService {
|
|
623
|
+
constructor(translator, authService, environmentService) {
|
|
624
|
+
this.translator = translator;
|
|
625
|
+
this.authService = authService;
|
|
626
|
+
this.environmentService = environmentService;
|
|
627
|
+
this.isCreatedBefore = false;
|
|
628
|
+
}
|
|
629
|
+
getResourceValue(Key) {
|
|
630
|
+
let ResourceValue = this.translator.instant(Key);
|
|
631
|
+
return ResourceValue;
|
|
632
|
+
}
|
|
633
|
+
getCurrentLanguage() {
|
|
634
|
+
let currentLanguage = this.environmentService.getDefaultLanguage();
|
|
635
|
+
let lang = localStorage.getItem('language');
|
|
636
|
+
if (lang)
|
|
637
|
+
currentLanguage = lang;
|
|
638
|
+
else
|
|
639
|
+
localStorage.setItem('language', currentLanguage);
|
|
640
|
+
return currentLanguage;
|
|
641
|
+
}
|
|
642
|
+
isCurrentLanguageEnglish() {
|
|
643
|
+
return this.getCurrentLanguage() == "en";
|
|
644
|
+
}
|
|
645
|
+
isCurrentLanguageArabic() {
|
|
646
|
+
return this.getCurrentLanguage() == "ar";
|
|
647
|
+
}
|
|
648
|
+
notifySuccessMessage(Message, title, time, showHeader = true) {
|
|
649
|
+
let MessageTemplate = this.getResourceValue("SuccessMessage");
|
|
650
|
+
let titleTemplate;
|
|
651
|
+
if (Message) {
|
|
652
|
+
MessageTemplate = Message;
|
|
653
|
+
}
|
|
654
|
+
if (title) {
|
|
655
|
+
titleTemplate = title;
|
|
656
|
+
}
|
|
657
|
+
let toaster = AppInjector.get(ToastrService);
|
|
658
|
+
showHeader ? toaster.success(MessageTemplate, titleTemplate) : toaster.success(MessageTemplate);
|
|
659
|
+
}
|
|
660
|
+
notifyErrorMessage(Message, title, time, showHeader = true) {
|
|
661
|
+
let MessageTemplate = this.getResourceValue("ErrorMessage");
|
|
662
|
+
let titleTemplate = this.getResourceValue("Error");
|
|
663
|
+
if (Message) {
|
|
664
|
+
MessageTemplate = Message;
|
|
665
|
+
}
|
|
666
|
+
if (title) {
|
|
667
|
+
titleTemplate = title;
|
|
668
|
+
}
|
|
669
|
+
const toaster = AppInjector.get(ToastrService);
|
|
670
|
+
showHeader ? toaster.error(MessageTemplate, titleTemplate) : toaster.error(MessageTemplate);
|
|
671
|
+
}
|
|
672
|
+
notifyWarningMessage(Message, title, time, showHeader = true) {
|
|
673
|
+
let MessageTemplate = this.getResourceValue("WarningMessage");
|
|
674
|
+
let titleTemplate = this.getResourceValue("Warning");
|
|
675
|
+
if (Message) {
|
|
676
|
+
MessageTemplate = Message;
|
|
677
|
+
}
|
|
678
|
+
if (title) {
|
|
679
|
+
titleTemplate = title;
|
|
680
|
+
}
|
|
681
|
+
const toaster = AppInjector.get(ToastrService);
|
|
682
|
+
showHeader ? toaster.warning(MessageTemplate, titleTemplate) : toaster.warning(MessageTemplate);
|
|
683
|
+
}
|
|
684
|
+
startBlockUI() {
|
|
685
|
+
this.blockUI.start();
|
|
686
|
+
}
|
|
687
|
+
stopBlockUI() {
|
|
688
|
+
this.blockUI.stop();
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
UtilityService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UtilityService_Factory() { return new UtilityService(i0.ɵɵinject(BBSFTranslateService), i0.ɵɵinject(AuthService), i0.ɵɵinject(EnvironmentService)); }, token: UtilityService, providedIn: "root" });
|
|
692
|
+
UtilityService.decorators = [
|
|
693
|
+
{ type: Injectable, args: [{
|
|
694
|
+
providedIn: 'root'
|
|
695
|
+
},] }
|
|
696
|
+
];
|
|
697
|
+
UtilityService.ctorParameters = () => [
|
|
698
|
+
{ type: BBSFTranslateService },
|
|
699
|
+
{ type: AuthService },
|
|
700
|
+
{ type: EnvironmentService }
|
|
701
|
+
];
|
|
702
|
+
__decorate([
|
|
703
|
+
BlockUI()
|
|
704
|
+
], UtilityService.prototype, "blockUI", void 0);
|
|
705
|
+
|
|
706
|
+
class ControlValidationService {
|
|
707
|
+
constructor(utilityService) {
|
|
708
|
+
this.utilityService = utilityService;
|
|
709
|
+
this.requestOptions = new RequestOptionsModel();
|
|
710
|
+
this.isCreatedBefor = false;
|
|
711
|
+
}
|
|
712
|
+
showGlobalError(errorMessage, formId, deleteOld) {
|
|
713
|
+
let globalErorrElement = document.getElementsByClassName('alert alert-InvalidValidation bg-light-danger text-danger');
|
|
714
|
+
if (globalErorrElement.length > 0) {
|
|
715
|
+
this.removeElementsByClass('alert alert-InvalidValidation bg-light-danger text-danger');
|
|
716
|
+
}
|
|
717
|
+
if (this.isCreatedBefor == true) {
|
|
718
|
+
this.removeElementsByClass('alert alert-InvalidValidation bg-light-danger text-danger');
|
|
719
|
+
}
|
|
720
|
+
// tslint:disable-next-line: prefer-const
|
|
721
|
+
if (!formId)
|
|
722
|
+
formId = "currentForm";
|
|
723
|
+
var object = document.getElementById(formId);
|
|
724
|
+
const tagName = 'div';
|
|
725
|
+
// tslint:disable-next-line: prefer-const
|
|
726
|
+
var elementToAppend = document.createElement(tagName); // Your tag name here
|
|
727
|
+
let message = "";
|
|
728
|
+
if (!errorMessage || (typeof errorMessage == "string")) {
|
|
729
|
+
if (localStorage.getItem('language') == "ar")
|
|
730
|
+
message = errorMessage ? errorMessage : "لديك بعص الأخطاء . من فضلك قم بالمراجعه ";
|
|
731
|
+
else
|
|
732
|
+
message = errorMessage ? errorMessage : "You have some validation errors. Please check below";
|
|
733
|
+
elementToAppend.innerHTML = "<ul class='list-unstyled m-0 py-3 d-flex align-items-center fs-6'><li><i class='fa fa-times-circle text-danger me-3 fs-2'></i>" + message + "</li></ul>";
|
|
734
|
+
elementToAppend.className += 'alert alert-InvalidValidation bg-light-danger text-danger';
|
|
735
|
+
elementToAppend.id += 'errorId';
|
|
736
|
+
// tslint:disable-next-line: prefer-for-of
|
|
737
|
+
const elementToAppen = elementToAppend.cloneNode(true);
|
|
738
|
+
// let targetElement = object.getElementsByClassName("b-control")[0];
|
|
739
|
+
object.insertBefore(elementToAppen, object.firstChild);
|
|
740
|
+
}
|
|
741
|
+
else {
|
|
742
|
+
elementToAppend.innerHTML = "<ul>";
|
|
743
|
+
for (const iterator of errorMessage) {
|
|
744
|
+
elementToAppend.innerHTML = "<li>" + iterator + "</li>";
|
|
745
|
+
}
|
|
746
|
+
elementToAppend.innerHTML = "</ul>";
|
|
747
|
+
elementToAppend.className += 'alert alert-InvalidValidation bg-light-danger text-danger';
|
|
607
748
|
elementToAppend.id += 'errorId';
|
|
608
749
|
// tslint:disable-next-line: prefer-for-of
|
|
609
750
|
const elementToAppen = elementToAppend.cloneNode(true);
|
|
@@ -723,79 +864,6 @@ __decorate([
|
|
|
723
864
|
BlockUI()
|
|
724
865
|
], ControlValidationService.prototype, "blockUI", void 0);
|
|
725
866
|
|
|
726
|
-
class MasterLayoutService {
|
|
727
|
-
constructor(router, http, authService, stylesBundleService, translate) {
|
|
728
|
-
this.router = router;
|
|
729
|
-
this.http = http;
|
|
730
|
-
this.authService = authService;
|
|
731
|
-
this.stylesBundleService = stylesBundleService;
|
|
732
|
-
this.translate = translate;
|
|
733
|
-
this.ApiUrl = "/api/Home/";
|
|
734
|
-
}
|
|
735
|
-
switchLang(lang, bundleEnglishName, bundleArabicName) {
|
|
736
|
-
this.changeLanguage(lang).subscribe((result) => {
|
|
737
|
-
this.updateUserInfo().subscribe((Value) => {
|
|
738
|
-
let UserInfoObject = Value;
|
|
739
|
-
this.authService.getUser();
|
|
740
|
-
this.authService.user.profile = Object.assign(this.authService.user.profile, UserInfoObject);
|
|
741
|
-
this.authService.storUser(this.authService.user);
|
|
742
|
-
this.stylesBundleService.loadThemes(lang, bundleEnglishName, bundleArabicName);
|
|
743
|
-
localStorage.setItem('language', lang);
|
|
744
|
-
this.translate.use(lang);
|
|
745
|
-
});
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
reloadComponent() {
|
|
749
|
-
let currentUrl = this.router.url;
|
|
750
|
-
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
|
|
751
|
-
this.router.onSameUrlNavigation = 'reload';
|
|
752
|
-
this.router.navigate([currentUrl]);
|
|
753
|
-
}
|
|
754
|
-
changeLanguage(key) {
|
|
755
|
-
let params = new HttpParams();
|
|
756
|
-
params = params.append("UserId", this.authService.user.profile.id);
|
|
757
|
-
params = params.append("LanguageKey", key);
|
|
758
|
-
return this.http.post(this.ApiUrl + 'UpdateLanguage', null, null, params);
|
|
759
|
-
}
|
|
760
|
-
logError(error) {
|
|
761
|
-
let params = new HttpParams();
|
|
762
|
-
params = params.append("error", error);
|
|
763
|
-
return this.http.post(this.ApiUrl + 'LogError', null, null, params);
|
|
764
|
-
}
|
|
765
|
-
updateUserInfo() {
|
|
766
|
-
return this.http.get('/connect/userinfo');
|
|
767
|
-
}
|
|
768
|
-
switchRole(permissionSetID) {
|
|
769
|
-
this.updateRole(permissionSetID).subscribe((result) => {
|
|
770
|
-
this.updateUserInfo().subscribe((Value) => {
|
|
771
|
-
let UserInfoObject = Value;
|
|
772
|
-
this.authService.getUser();
|
|
773
|
-
this.authService.user.profile = Object.assign(this.authService.user.profile, UserInfoObject);
|
|
774
|
-
this.authService.storUser(this.authService.user);
|
|
775
|
-
});
|
|
776
|
-
});
|
|
777
|
-
}
|
|
778
|
-
updateRole(permissionSetID) {
|
|
779
|
-
let params = new HttpParams();
|
|
780
|
-
params = params.append("UserId", this.authService.user.profile.id);
|
|
781
|
-
params = params.append("RoleID", permissionSetID);
|
|
782
|
-
return this.http.post(this.ApiUrl + 'SwitchRole', null, null, params);
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
MasterLayoutService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MasterLayoutService_Factory() { return new MasterLayoutService(i0.ɵɵinject(i4.Router), i0.ɵɵinject(RequestHandlerService), i0.ɵɵinject(AuthService), i0.ɵɵinject(StylesBundleService), i0.ɵɵinject(i1.TranslateService)); }, token: MasterLayoutService, providedIn: "root" });
|
|
786
|
-
MasterLayoutService.decorators = [
|
|
787
|
-
{ type: Injectable, args: [{
|
|
788
|
-
providedIn: 'root'
|
|
789
|
-
},] }
|
|
790
|
-
];
|
|
791
|
-
MasterLayoutService.ctorParameters = () => [
|
|
792
|
-
{ type: Router },
|
|
793
|
-
{ type: RequestHandlerService },
|
|
794
|
-
{ type: AuthService },
|
|
795
|
-
{ type: StylesBundleService },
|
|
796
|
-
{ type: TranslateService }
|
|
797
|
-
];
|
|
798
|
-
|
|
799
867
|
class ConfigurationService {
|
|
800
868
|
constructor(httpClient) {
|
|
801
869
|
this.httpClient = httpClient;
|
|
@@ -808,7 +876,7 @@ class ConfigurationService {
|
|
|
808
876
|
}
|
|
809
877
|
}
|
|
810
878
|
ConfigurationService.JsonData = [];
|
|
811
|
-
ConfigurationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ConfigurationService_Factory() { return new ConfigurationService(i0.ɵɵinject(i1$
|
|
879
|
+
ConfigurationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ConfigurationService_Factory() { return new ConfigurationService(i0.ɵɵinject(i1$3.HttpClient)); }, token: ConfigurationService, providedIn: "root" });
|
|
812
880
|
ConfigurationService.decorators = [
|
|
813
881
|
{ type: Injectable, args: [{
|
|
814
882
|
providedIn: 'root'
|