@bnsights/bbsf-utilities 1.0.34 → 1.0.36
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 +8 -0
- package/karma.conf.js +44 -0
- package/ng-package.json +10 -0
- package/package.json +20 -28
- package/src/lib/bbsf-utilities.module.ts +52 -0
- package/src/lib/shared/authentication/auth.service.ts +242 -0
- package/src/lib/shared/config/environment.ts +16 -0
- package/src/lib/shared/config/word/constants.js +133 -0
- package/src/lib/shared/config/word/docx-document.js +482 -0
- package/src/lib/shared/config/word/helpers/index.js +3 -0
- package/src/lib/shared/config/word/helpers/render-document-file.js +334 -0
- package/src/lib/shared/config/word/helpers/xml-builder.js +2165 -0
- package/src/lib/shared/config/word/html-to-docx.js +259 -0
- package/src/lib/shared/config/word/index.js +63 -0
- package/src/lib/shared/config/word/namespaces.js +40 -0
- package/src/lib/shared/config/word/schemas/content-types.js +26 -0
- package/src/lib/shared/config/word/schemas/core.js +44 -0
- package/src/lib/shared/config/word/schemas/document-rels.js +17 -0
- package/src/lib/shared/config/word/schemas/document.template.js +119 -0
- package/src/lib/shared/config/word/schemas/font-table.js +41 -0
- package/src/lib/shared/config/word/schemas/generic-rels.js +11 -0
- package/src/lib/shared/config/word/schemas/index.js +12 -0
- package/src/lib/shared/config/word/schemas/numbering.js +18 -0
- package/src/lib/shared/config/word/schemas/rels.js +12 -0
- package/src/lib/shared/config/word/schemas/settings.js +14 -0
- package/src/lib/shared/config/word/schemas/styles.js +152 -0
- package/src/lib/shared/config/word/schemas/theme.js +199 -0
- package/src/lib/shared/config/word/schemas/web-settings.js +10 -0
- package/src/lib/shared/config/word/utils/color-conversion.js +60 -0
- package/src/lib/shared/config/word/utils/list.js +55 -0
- package/src/lib/shared/config/word/utils/unit-conversion.js +53 -0
- package/src/lib/shared/config/word/utils/url.js +8 -0
- package/src/lib/shared/config/word/utils/vnode.js +3 -0
- package/src/lib/shared/config/word/word-work/assets/contentTypesXml.ts +1 -0
- package/src/lib/shared/config/word/word-work/assets/documentXmlRels.ts +1 -0
- package/src/lib/shared/config/word/word-work/assets/index.ts +3 -0
- package/src/lib/shared/config/word/word-work/assets/relsXml.ts +1 -0
- package/src/lib/shared/config/word/word-work/index.ts +8 -0
- package/src/lib/shared/config/word/word-work/internal.ts +69 -0
- package/src/lib/shared/config/word/word-work/templates/documentTemplate.ts +58 -0
- package/src/lib/shared/config/word/word-work/templates/index.ts +3 -0
- package/src/lib/shared/config/word/word-work/templates/mhtDocumentTemplate.ts +21 -0
- package/src/lib/shared/config/word/word-work/templates/mhtPartTemplate.ts +14 -0
- package/src/lib/shared/config/word/word-work/utils.ts +27 -0
- package/src/lib/shared/models/AreaModel.ts +5 -0
- package/{lib/shared/models/ErrorModel.d.ts → src/lib/shared/models/ErrorModel.ts} +5 -2
- package/src/lib/shared/models/RequestOptionsModel.ts +13 -0
- package/src/lib/shared/models/WordDocumentModel.ts +19 -0
- package/src/lib/shared/services/AppearanceConfiguration.service.ts +30 -0
- package/src/lib/shared/services/configuration.service.ts +18 -0
- package/src/lib/shared/services/controlvalidation.service.ts +194 -0
- package/src/lib/shared/services/environment.service.ts +56 -0
- package/src/lib/shared/services/masterlayout.service.ts +89 -0
- package/src/lib/shared/services/requesthandler.service.ts +241 -0
- package/src/lib/shared/services/stylesbundle.service.ts +52 -0
- package/src/lib/shared/services/translate.service.ts +8 -0
- package/src/lib/shared/services/translationresolver.service.ts +16 -0
- package/src/lib/shared/services/utility.service.ts +94 -0
- package/src/lib/shared/services/word-document.service.ts +36 -0
- package/src/public-api.ts +27 -0
- package/src/test.ts +26 -0
- package/tsconfig.lib.json +39 -0
- package/tsconfig.lib.prod.json +11 -0
- package/tsconfig.spec.json +17 -0
- package/tslint.json +17 -0
- package/bnsights-bbsf-utilities-1.0.34.tgz +0 -0
- package/bnsights-bbsf-utilities.d.ts +0 -4
- package/bnsights-bbsf-utilities.metadata.json +0 -1
- package/bundles/bnsights-bbsf-utilities.umd.js +0 -4865
- package/bundles/bnsights-bbsf-utilities.umd.js.map +0 -1
- package/esm2015/bnsights-bbsf-utilities.js +0 -5
- package/esm2015/lib/bbsf-utilities.module.js +0 -52
- package/esm2015/lib/shared/authentication/auth.service.js +0 -236
- package/esm2015/lib/shared/config/environment.js +0 -12
- package/esm2015/lib/shared/config/word/constants.js +0 -105
- package/esm2015/lib/shared/config/word/docx-document.js +0 -351
- package/esm2015/lib/shared/config/word/helpers/index.js +0 -4
- package/esm2015/lib/shared/config/word/helpers/render-document-file.js +0 -278
- package/esm2015/lib/shared/config/word/helpers/xml-builder.js +0 -1765
- package/esm2015/lib/shared/config/word/html-to-docx.js +0 -195
- package/esm2015/lib/shared/config/word/index.js +0 -55
- package/esm2015/lib/shared/config/word/namespaces.js +0 -37
- package/esm2015/lib/shared/config/word/schemas/content-types.js +0 -26
- package/esm2015/lib/shared/config/word/schemas/core.js +0 -29
- package/esm2015/lib/shared/config/word/schemas/document-rels.js +0 -16
- package/esm2015/lib/shared/config/word/schemas/document.template.js +0 -109
- package/esm2015/lib/shared/config/word/schemas/font-table.js +0 -40
- package/esm2015/lib/shared/config/word/schemas/generic-rels.js +0 -11
- package/esm2015/lib/shared/config/word/schemas/index.js +0 -13
- package/esm2015/lib/shared/config/word/schemas/numbering.js +0 -19
- package/esm2015/lib/shared/config/word/schemas/rels.js +0 -11
- package/esm2015/lib/shared/config/word/schemas/settings.js +0 -13
- package/esm2015/lib/shared/config/word/schemas/styles.js +0 -149
- package/esm2015/lib/shared/config/word/schemas/theme.js +0 -200
- package/esm2015/lib/shared/config/word/schemas/web-settings.js +0 -9
- package/esm2015/lib/shared/config/word/utils/color-conversion.js +0 -60
- package/esm2015/lib/shared/config/word/utils/list.js +0 -51
- package/esm2015/lib/shared/config/word/utils/unit-conversion.js +0 -30
- package/esm2015/lib/shared/config/word/utils/url.js +0 -9
- package/esm2015/lib/shared/config/word/utils/vnode.js +0 -3
- package/esm2015/lib/shared/config/word/word-work/templates/documentTemplate.js +0 -54
- package/esm2015/lib/shared/config/word/word-work/templates/index.js +0 -4
- package/esm2015/lib/shared/config/word/word-work/templates/mhtDocumentTemplate.js +0 -22
- package/esm2015/lib/shared/config/word/word-work/templates/mhtPartTemplate.js +0 -10
- package/esm2015/lib/shared/config/word/word-work/utils.js +0 -26
- package/esm2015/lib/shared/models/AreaModel.js +0 -3
- package/esm2015/lib/shared/models/ErrorModel.js +0 -3
- package/esm2015/lib/shared/models/RequestOptionsModel.js +0 -11
- package/esm2015/lib/shared/models/WordDocumentModel.js +0 -8
- package/esm2015/lib/shared/services/AppearanceConfiguration.service.js +0 -37
- package/esm2015/lib/shared/services/configuration.service.js +0 -26
- package/esm2015/lib/shared/services/controlvalidation.service.js +0 -168
- package/esm2015/lib/shared/services/environment.service.js +0 -48
- package/esm2015/lib/shared/services/masterlayout.service.js +0 -96
- package/esm2015/lib/shared/services/requesthandler.service.js +0 -206
- package/esm2015/lib/shared/services/stylesbundle.service.js +0 -56
- package/esm2015/lib/shared/services/translate.service.js +0 -13
- package/esm2015/lib/shared/services/translationresolver.service.js +0 -20
- package/esm2015/lib/shared/services/utility.service.js +0 -96
- package/esm2015/lib/shared/services/word-document.service.js +0 -39
- package/esm2015/public-api.js +0 -20
- package/fesm2015/bnsights-bbsf-utilities.js +0 -4634
- package/fesm2015/bnsights-bbsf-utilities.js.map +0 -1
- package/lib/bbsf-utilities.module.d.ts +0 -6
- package/lib/shared/authentication/auth.service.d.ts +0 -41
- package/lib/shared/config/environment.d.ts +0 -1
- package/lib/shared/config/word/constants.d.ts +0 -124
- package/lib/shared/config/word/docx-document.d.ts +0 -73
- package/lib/shared/config/word/helpers/index.d.ts +0 -1
- package/lib/shared/config/word/helpers/render-document-file.d.ts +0 -4
- package/lib/shared/config/word/helpers/xml-builder.d.ts +0 -14
- package/lib/shared/config/word/html-to-docx.d.ts +0 -1
- package/lib/shared/config/word/index.d.ts +0 -1
- package/lib/shared/config/word/namespaces.d.ts +0 -36
- package/lib/shared/config/word/schemas/content-types.d.ts +0 -1
- package/lib/shared/config/word/schemas/core.d.ts +0 -1
- package/lib/shared/config/word/schemas/document-rels.d.ts +0 -1
- package/lib/shared/config/word/schemas/document.template.d.ts +0 -4
- package/lib/shared/config/word/schemas/font-table.d.ts +0 -1
- package/lib/shared/config/word/schemas/generic-rels.d.ts +0 -1
- package/lib/shared/config/word/schemas/index.d.ts +0 -12
- package/lib/shared/config/word/schemas/numbering.d.ts +0 -1
- package/lib/shared/config/word/schemas/rels.d.ts +0 -1
- package/lib/shared/config/word/schemas/settings.d.ts +0 -1
- package/lib/shared/config/word/schemas/styles.d.ts +0 -1
- package/lib/shared/config/word/schemas/theme.d.ts +0 -1
- package/lib/shared/config/word/schemas/web-settings.d.ts +0 -1
- package/lib/shared/config/word/utils/color-conversion.d.ts +0 -7
- package/lib/shared/config/word/utils/list.d.ts +0 -6
- package/lib/shared/config/word/utils/unit-conversion.d.ts +0 -29
- package/lib/shared/config/word/utils/url.d.ts +0 -1
- package/lib/shared/config/word/utils/vnode.d.ts +0 -1
- package/lib/shared/config/word/word-work/templates/documentTemplate.d.ts +0 -12
- package/lib/shared/config/word/word-work/templates/index.d.ts +0 -3
- package/lib/shared/config/word/word-work/templates/mhtDocumentTemplate.d.ts +0 -1
- package/lib/shared/config/word/word-work/templates/mhtPartTemplate.d.ts +0 -1
- package/lib/shared/config/word/word-work/utils.d.ts +0 -1
- package/lib/shared/models/AreaModel.d.ts +0 -4
- package/lib/shared/models/RequestOptionsModel.d.ts +0 -11
- package/lib/shared/models/WordDocumentModel.d.ts +0 -16
- package/lib/shared/services/AppearanceConfiguration.service.d.ts +0 -11
- package/lib/shared/services/configuration.service.d.ts +0 -7
- package/lib/shared/services/controlvalidation.service.d.ts +0 -19
- package/lib/shared/services/environment.service.d.ts +0 -13
- package/lib/shared/services/masterlayout.service.d.ts +0 -24
- package/lib/shared/services/requesthandler.service.d.ts +0 -32
- package/lib/shared/services/stylesbundle.service.d.ts +0 -9
- package/lib/shared/services/translate.service.d.ts +0 -3
- package/lib/shared/services/translationresolver.service.d.ts +0 -8
- package/lib/shared/services/utility.service.d.ts +0 -21
- package/lib/shared/services/word-document.service.d.ts +0 -5
- package/public-api.d.ts +0 -16
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { Injectable, OnDestroy, Pipe } from '@angular/core';
|
|
2
|
+
import { HttpClient, HttpErrorResponse, HttpHeaders, HttpParams } from "@angular/common/http";
|
|
3
|
+
import { RequestOptionsModel } from '../models/RequestOptionsModel';
|
|
4
|
+
import { AuthService } from '../authentication/auth.service';
|
|
5
|
+
import { EnvironmentService } from './environment.service';
|
|
6
|
+
import { Observable, Subject, throwError } from 'rxjs';
|
|
7
|
+
import { UtilityService } from './utility.service';
|
|
8
|
+
import { map, takeUntil, tap } from 'rxjs/operators';
|
|
9
|
+
import { BBSFTranslateService } from './translate.service';
|
|
10
|
+
import { plainToClass } from 'class-transformer';
|
|
11
|
+
import { Router } from '@angular/router';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@Injectable()
|
|
15
|
+
export class RequestHandlerService implements OnDestroy {
|
|
16
|
+
private requestOptions: RequestOptionsModel = new RequestOptionsModel();
|
|
17
|
+
private currentLanguage = "";
|
|
18
|
+
public onDestroy$: Subject<void> = new Subject<void>();
|
|
19
|
+
constructor
|
|
20
|
+
(
|
|
21
|
+
private http: HttpClient,
|
|
22
|
+
private authService: AuthService,
|
|
23
|
+
private environmentService: EnvironmentService,
|
|
24
|
+
private utilityService: UtilityService,
|
|
25
|
+
private bbsfTranslateService: BBSFTranslateService,
|
|
26
|
+
private router: Router
|
|
27
|
+
) {
|
|
28
|
+
//using localStorage to avoid call getCurrentLanguage() because it is not all to use async in constructor
|
|
29
|
+
|
|
30
|
+
this.bbsfTranslateService.onLangChange.subscribe((event) => {
|
|
31
|
+
if (this.currentLanguage != event.lang) {
|
|
32
|
+
this.currentLanguage = event.lang;
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public getLuckyNumber(): Observable<number> {
|
|
38
|
+
|
|
39
|
+
return Observable.create((subject: Subject<number>) => {
|
|
40
|
+
setInterval(() => {
|
|
41
|
+
const number = Math.floor(Math.random() * 10);
|
|
42
|
+
console.log(number)
|
|
43
|
+
subject.next(number);
|
|
44
|
+
}, 1000);
|
|
45
|
+
}).pipe(
|
|
46
|
+
takeUntil(this.onDestroy$));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
get<T>(Url: string, params?: HttpParams, responseType?: new () => T, requestOptions?: RequestOptionsModel): Observable<T> {
|
|
51
|
+
if (requestOptions)
|
|
52
|
+
this.requestOptions = requestOptions;
|
|
53
|
+
|
|
54
|
+
let headers = this.getHeaders();
|
|
55
|
+
if (!this.requestOptions.disableBlockUI)
|
|
56
|
+
this.utilityService.startBlockUI();
|
|
57
|
+
let object: T;
|
|
58
|
+
return this.http.get<T>(this.environmentService.getApiUrl() + Url, { headers: headers, params: params }).pipe(
|
|
59
|
+
takeUntil(this.onDestroy$),
|
|
60
|
+
tap((result) => {
|
|
61
|
+
if (!this.requestOptions.disableBlockUI)
|
|
62
|
+
this.utilityService.stopBlockUI();
|
|
63
|
+
}, error => {
|
|
64
|
+
if (!this.requestOptions.disableErrorHandler)
|
|
65
|
+
this.handleError(error);
|
|
66
|
+
}), map((data: T) => {
|
|
67
|
+
if (this.requestOptions.castResponsetoClass)
|
|
68
|
+
return plainToClass(responseType, data, { excludeExtraneousValues: true });
|
|
69
|
+
else
|
|
70
|
+
return data;
|
|
71
|
+
})
|
|
72
|
+
) as Observable<T>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
post<T>(Url: string, model?: any, responseType?: new () => T, params?: HttpParams, requestOptions?: RequestOptionsModel): Observable<T> {
|
|
76
|
+
|
|
77
|
+
if (requestOptions)
|
|
78
|
+
this.requestOptions = requestOptions;
|
|
79
|
+
|
|
80
|
+
let headers = this.getHeaders();
|
|
81
|
+
if (!this.requestOptions.disableBlockUI)
|
|
82
|
+
this.utilityService.startBlockUI();
|
|
83
|
+
return this.http.post<T>(this.environmentService.getApiUrl() + Url, model, { headers: headers, params: params, responseType: this.requestOptions.responseType }).pipe(
|
|
84
|
+
takeUntil(this.onDestroy$),
|
|
85
|
+
tap((result) => {
|
|
86
|
+
if (!this.requestOptions.disableBlockUI)
|
|
87
|
+
this.utilityService.stopBlockUI();
|
|
88
|
+
}, error => {
|
|
89
|
+
if (!this.requestOptions.disableErrorHandler)
|
|
90
|
+
this.handleError(error);
|
|
91
|
+
}), map((data: T) => {
|
|
92
|
+
if (this.requestOptions.castResponsetoClass)
|
|
93
|
+
return plainToClass(responseType, data, { excludeExtraneousValues: true });
|
|
94
|
+
else
|
|
95
|
+
return data;
|
|
96
|
+
})
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
delete<T>(Url: string, deletedId: string, requestOptions?: RequestOptionsModel, responseType?: new () => T, params?: HttpParams): Observable<T> {
|
|
101
|
+
if (requestOptions)
|
|
102
|
+
this.requestOptions = requestOptions;
|
|
103
|
+
|
|
104
|
+
let headers = this.getHeaders();
|
|
105
|
+
if (!this.requestOptions.disableBlockUI)
|
|
106
|
+
this.utilityService.startBlockUI();
|
|
107
|
+
return this.http.delete<T>(this.environmentService.getApiUrl() + Url + `/${deletedId}`, { headers: headers, params: params }).pipe(
|
|
108
|
+
takeUntil(this.onDestroy$),
|
|
109
|
+
tap((result) => {
|
|
110
|
+
if (!this.requestOptions.disableBlockUI)
|
|
111
|
+
this.utilityService.stopBlockUI();
|
|
112
|
+
}, error => {
|
|
113
|
+
if (!this.requestOptions.disableErrorHandler)
|
|
114
|
+
this.handleError(error);
|
|
115
|
+
}), map((data: T) => {
|
|
116
|
+
if (this.requestOptions.castResponsetoClass)
|
|
117
|
+
return plainToClass(responseType, data, { excludeExtraneousValues: true });
|
|
118
|
+
else
|
|
119
|
+
return data;
|
|
120
|
+
})
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
put<T>(Url: string, model?: any, params?: HttpParams, responseType?: new () => T, requestOptions?: RequestOptionsModel): Observable<T> {
|
|
125
|
+
if (requestOptions)
|
|
126
|
+
this.requestOptions = requestOptions;
|
|
127
|
+
|
|
128
|
+
let headers = this.getHeaders();
|
|
129
|
+
if (!this.requestOptions.disableBlockUI)
|
|
130
|
+
this.utilityService.startBlockUI();
|
|
131
|
+
return this.http.put<T>(this.environmentService.getApiUrl() + Url, model, { headers: headers, params: params, responseType: this.requestOptions.responseType }).pipe(
|
|
132
|
+
takeUntil(this.onDestroy$),
|
|
133
|
+
tap((result) => {
|
|
134
|
+
if (!this.requestOptions.disableBlockUI)
|
|
135
|
+
this.utilityService.stopBlockUI();
|
|
136
|
+
}, error => {
|
|
137
|
+
if (!this.requestOptions.disableErrorHandler)
|
|
138
|
+
this.handleError(error);
|
|
139
|
+
}), map((data: T) => {
|
|
140
|
+
if (this.requestOptions.castResponsetoClass)
|
|
141
|
+
return plainToClass(responseType, data, { excludeExtraneousValues: true });
|
|
142
|
+
else
|
|
143
|
+
return data;
|
|
144
|
+
})
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
patch<T>(Url: string, model?: any, responseType?: new () => T, params?: HttpParams, requestOptions?: RequestOptionsModel): Observable<T> {
|
|
149
|
+
|
|
150
|
+
if (requestOptions)
|
|
151
|
+
this.requestOptions = requestOptions;
|
|
152
|
+
|
|
153
|
+
let headers = new HttpHeaders({
|
|
154
|
+
'Content-Type': 'application/json',
|
|
155
|
+
'Authorization': this.authService.authorizationHeaderValue(),
|
|
156
|
+
|
|
157
|
+
});
|
|
158
|
+
this.currentLanguage = localStorage.getItem('language');
|
|
159
|
+
headers = headers.set('Accept-Language', this.currentLanguage.toString());
|
|
160
|
+
headers = headers.set('ignore-cookies', 'true');
|
|
161
|
+
if (!this.requestOptions.disableBlockUI)
|
|
162
|
+
this.utilityService.startBlockUI();
|
|
163
|
+
|
|
164
|
+
return this.http.patch<T>(this.environmentService.getApiUrl() + Url, model, { headers: headers, params: params, responseType: this.requestOptions.responseType }).pipe(
|
|
165
|
+
takeUntil(this.onDestroy$),
|
|
166
|
+
tap((result) => {
|
|
167
|
+
if (!this.requestOptions.disableBlockUI)
|
|
168
|
+
this.utilityService.stopBlockUI();
|
|
169
|
+
}, error => {
|
|
170
|
+
if (!this.requestOptions.disableErrorHandler)
|
|
171
|
+
this.handleError(error);
|
|
172
|
+
}), map((data: T) => {
|
|
173
|
+
if (this.requestOptions.castResponsetoClass)
|
|
174
|
+
return plainToClass(responseType, data, { excludeExtraneousValues: true })
|
|
175
|
+
else
|
|
176
|
+
return data;
|
|
177
|
+
})
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
download<T>(Url: string, params?: HttpParams, requestOptions?: RequestOptionsModel): Observable<T> {
|
|
181
|
+
if (requestOptions)
|
|
182
|
+
this.requestOptions = requestOptions;
|
|
183
|
+
|
|
184
|
+
let headers = this.getHeaders();
|
|
185
|
+
if (!this.requestOptions.disableBlockUI)
|
|
186
|
+
this.utilityService.startBlockUI();
|
|
187
|
+
return this.http.get<T>(this.environmentService.getApiUrl() + Url, { headers: headers, params: params, responseType: this.requestOptions.responseType }).pipe(
|
|
188
|
+
takeUntil(this.onDestroy$),
|
|
189
|
+
tap((result) => {
|
|
190
|
+
if (!this.requestOptions.disableBlockUI)
|
|
191
|
+
this.utilityService.stopBlockUI();
|
|
192
|
+
}, error => {
|
|
193
|
+
if (!this.requestOptions.disableErrorHandler)
|
|
194
|
+
this.handleError(error);
|
|
195
|
+
})
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
public destroyHandler(): void {
|
|
200
|
+
this.onDestroy$.next();
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
ngOnDestroy(): void {
|
|
204
|
+
console.log("clearInterval")
|
|
205
|
+
this.destroyHandler()
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
private handleError(err: HttpErrorResponse) {
|
|
209
|
+
var isEnglish = this.utilityService.getCurrentLanguage() == "en";
|
|
210
|
+
if (err.error instanceof ErrorEvent) {
|
|
211
|
+
this.utilityService.notifyErrorMessage()
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
if (err.status == 400)
|
|
215
|
+
throwError(err);//error 400 is thrown to be catch by the Form component to handle Fluent validation errors
|
|
216
|
+
else if (err.status == 401)
|
|
217
|
+
this.router.navigate(["/Admin/account/login"])
|
|
218
|
+
else if (err.status == 403)
|
|
219
|
+
this.utilityService.notifyErrorMessage(isEnglish ? "Sorry, You're not authorized to access this action" : "عذرا ليس لديك الصلاحيه لهذا الطلب")
|
|
220
|
+
else if (err.status == 510)
|
|
221
|
+
this.utilityService.notifyErrorMessage(isEnglish ? "Can not delete this item as it is related to others" : "لا يمكن حذف هذا العنصر لأنه مرتبط بعناصر أخرى")
|
|
222
|
+
else if (err.status == 515)
|
|
223
|
+
this.utilityService.notifyErrorMessage((err.error ? err.error.Message : err.message))
|
|
224
|
+
else {
|
|
225
|
+
console.log(`error message is: ${err.error ? err.error.Message : err.message}`)
|
|
226
|
+
this.utilityService.notifyErrorMessage(this.utilityService.getResourceValue("ErrorMassage"))
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
this.utilityService.stopBlockUI();
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
private getHeaders() {
|
|
233
|
+
return new HttpHeaders({
|
|
234
|
+
'Content-Type': 'application/json',
|
|
235
|
+
'Authorization': this.authService.authorizationHeaderValue(),
|
|
236
|
+
'Client-Local-Time-Zone': Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
237
|
+
'Accept-Language': localStorage.getItem('language'),
|
|
238
|
+
'ignore-cookies': 'true'
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DOCUMENT } from '@angular/common';
|
|
2
|
+
import { Inject, Injectable } from '@angular/core';
|
|
3
|
+
import { BlockUI, NgBlockUI } from 'ng-block-ui';
|
|
4
|
+
import { BBSFTranslateService } from './translate.service';
|
|
5
|
+
|
|
6
|
+
@Injectable({
|
|
7
|
+
providedIn: 'root'
|
|
8
|
+
})
|
|
9
|
+
export class StylesBundleService {
|
|
10
|
+
|
|
11
|
+
constructor(@Inject(DOCUMENT) private document: Document, private translateService: BBSFTranslateService) { }
|
|
12
|
+
|
|
13
|
+
loadThemes(lang: string, bundleEnglishName: string, bundleArabicName: string) {
|
|
14
|
+
if (lang == "ar") {
|
|
15
|
+
this.loadStyleBundle(bundleArabicName.toString())
|
|
16
|
+
document.querySelector('html').setAttribute("b-lang", "ar"); //use b-lang instead of lang to fix firefox number inputs in Arabic locale
|
|
17
|
+
document.querySelector('html').setAttribute("dir", "rtl");
|
|
18
|
+
} else {
|
|
19
|
+
this.loadStyleBundle(bundleEnglishName.toString())
|
|
20
|
+
document.querySelector('html').setAttribute("b-lang", "en");
|
|
21
|
+
document.querySelector('html').setAttribute("dir", "ltr");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
loadThemesColor(theme: string, bundleDarkName: string, bundleLightName: string) {
|
|
27
|
+
if (theme == "Light")
|
|
28
|
+
this.loadStyleBundle(bundleLightName.toString());
|
|
29
|
+
else
|
|
30
|
+
this.loadStyleBundle(bundleDarkName.toString())
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
loadStyleBundle(styleName: string) {
|
|
34
|
+
const head = this.document.getElementsByTagName('head')[0];
|
|
35
|
+
|
|
36
|
+
let themeLink = this.document.getElementById('client-theme') as HTMLLinkElement;
|
|
37
|
+
|
|
38
|
+
if (themeLink && themeLink.href.includes(styleName)) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
else if (themeLink && !themeLink.href.includes(styleName)) {
|
|
42
|
+
themeLink.remove();
|
|
43
|
+
}
|
|
44
|
+
const style = this.document.createElement('link');
|
|
45
|
+
style.id = 'client-theme';
|
|
46
|
+
style.rel = 'stylesheet';
|
|
47
|
+
style.href = `${styleName}`;
|
|
48
|
+
head.appendChild(style);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Injectable } from "@angular/core";
|
|
2
|
+
import { Resolve } from "@angular/router";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
import { BBSFTranslateService } from "./translate.service";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@Injectable({ providedIn: 'root' })
|
|
8
|
+
export class TranslationResolverService implements Resolve<any> {
|
|
9
|
+
constructor(private translateService: BBSFTranslateService) {}
|
|
10
|
+
|
|
11
|
+
resolve(): Observable<any> {
|
|
12
|
+
return this.translateService.getTranslation(
|
|
13
|
+
this.translateService.currentLang
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Injectable, Optional, Host, SkipSelf, Component } from '@angular/core';
|
|
2
|
+
import { ToastrService } from 'ngx-toastr';
|
|
3
|
+
import { BlockUI, NgBlockUI } from 'ng-block-ui';
|
|
4
|
+
import { AuthService } from '../authentication/auth.service';
|
|
5
|
+
import { BBSFTranslateService } from './translate.service';
|
|
6
|
+
import { AppInjector } from '../../bbsf-utilities.module';
|
|
7
|
+
import { EnvironmentService } from './environment.service';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@Injectable({
|
|
12
|
+
providedIn: 'root'
|
|
13
|
+
})
|
|
14
|
+
export class UtilityService {
|
|
15
|
+
|
|
16
|
+
isCreatedBefore = false;
|
|
17
|
+
@BlockUI() blockUI: NgBlockUI;
|
|
18
|
+
|
|
19
|
+
constructor(private translator: BBSFTranslateService, private authService: AuthService, private environmentService: EnvironmentService,) {
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
getResourceValue(Key: string): string {
|
|
25
|
+
let ResourceValue = this.translator.instant(Key)
|
|
26
|
+
return ResourceValue;
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
getCurrentLanguage() {
|
|
31
|
+
let currentLanguage = this.environmentService.getDefaultLanguage();
|
|
32
|
+
let lang = localStorage.getItem('language');
|
|
33
|
+
if (lang)
|
|
34
|
+
currentLanguage = lang;
|
|
35
|
+
else
|
|
36
|
+
localStorage.setItem('language', currentLanguage);
|
|
37
|
+
return currentLanguage;
|
|
38
|
+
}
|
|
39
|
+
isCurrentLanguageEnglish() {
|
|
40
|
+
return this.getCurrentLanguage() == "en"
|
|
41
|
+
}
|
|
42
|
+
isCurrentLanguageArabic() {
|
|
43
|
+
return this.getCurrentLanguage() == "ar"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
notifySuccessMessage(Message?: string, title?: string, time?: number, showHeader: boolean = true) {
|
|
47
|
+
|
|
48
|
+
let MessageTemplate = this.getResourceValue("SuccessMessage");
|
|
49
|
+
let titleTemplate: string;
|
|
50
|
+
if (Message) {
|
|
51
|
+
MessageTemplate = Message;
|
|
52
|
+
}
|
|
53
|
+
if (title) {
|
|
54
|
+
titleTemplate = title;
|
|
55
|
+
}
|
|
56
|
+
let toaster = AppInjector.get(ToastrService);
|
|
57
|
+
showHeader ? toaster.success(MessageTemplate, titleTemplate) : toaster.success(MessageTemplate);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
notifyErrorMessage(Message?: string, title?: string, time?: number, showHeader: boolean = true) {
|
|
61
|
+
|
|
62
|
+
let MessageTemplate = this.getResourceValue("ErrorMessage");
|
|
63
|
+
let titleTemplate = this.getResourceValue("Error");
|
|
64
|
+
if (Message) {
|
|
65
|
+
MessageTemplate = Message;
|
|
66
|
+
}
|
|
67
|
+
if (title) {
|
|
68
|
+
titleTemplate = title;
|
|
69
|
+
}
|
|
70
|
+
const toaster = AppInjector.get(ToastrService);
|
|
71
|
+
showHeader ? toaster.error(MessageTemplate, titleTemplate) : toaster.error(MessageTemplate);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
notifyWarningMessage(Message?: string, title?: string, time?: number, showHeader: boolean = true) {
|
|
75
|
+
|
|
76
|
+
let MessageTemplate = this.getResourceValue("WarningMessage");
|
|
77
|
+
let titleTemplate = this.getResourceValue("Warning");
|
|
78
|
+
if (Message) {
|
|
79
|
+
MessageTemplate = Message;
|
|
80
|
+
}
|
|
81
|
+
if (title) {
|
|
82
|
+
titleTemplate = title;
|
|
83
|
+
}
|
|
84
|
+
const toaster = AppInjector.get(ToastrService);
|
|
85
|
+
showHeader ? toaster.warning(MessageTemplate, titleTemplate) : toaster.warning(MessageTemplate);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
startBlockUI() {
|
|
89
|
+
this.blockUI.start();
|
|
90
|
+
}
|
|
91
|
+
stopBlockUI() {
|
|
92
|
+
this.blockUI.stop();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { generateContainer as GenerateDOCX } from '../config//word/index';
|
|
3
|
+
import { WordDocumentModel } from '../models/WordDocumentModel';
|
|
4
|
+
@Injectable({
|
|
5
|
+
providedIn: 'root',
|
|
6
|
+
})
|
|
7
|
+
export class WordDocumentService {
|
|
8
|
+
async generateWordByteFile(model: WordDocumentModel) {
|
|
9
|
+
let documentOptions: any = {};
|
|
10
|
+
if (model.options.isLandscape) documentOptions.orientation = 'landscape';
|
|
11
|
+
documentOptions.pageSize = {
|
|
12
|
+
width: model.options.pageWidth * 15,
|
|
13
|
+
height: model.options.pageHeight * 15,
|
|
14
|
+
};
|
|
15
|
+
documentOptions.margins = {
|
|
16
|
+
top: model.options.top * 15,
|
|
17
|
+
right: model.options.right * 15,
|
|
18
|
+
bottom: model.options.bottom * 15,
|
|
19
|
+
left: model.options.left * 15,
|
|
20
|
+
header: model.options.top * 15*2,
|
|
21
|
+
footer: model.options.bottom * 15*2,
|
|
22
|
+
gutter: 0,
|
|
23
|
+
};
|
|
24
|
+
documentOptions.footer = true;
|
|
25
|
+
documentOptions.header = true;
|
|
26
|
+
documentOptions.pageNumber = model.options.showPaging;
|
|
27
|
+
documentOptions.table = { row: { cantSplit: true } };
|
|
28
|
+
var fileBuffer = await GenerateDOCX(
|
|
29
|
+
model.body,
|
|
30
|
+
model.header,
|
|
31
|
+
documentOptions,
|
|
32
|
+
model.footer
|
|
33
|
+
);
|
|
34
|
+
return fileBuffer;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of @bnsights/bbsf-utilities
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from './lib/bbsf-utilities.module';
|
|
6
|
+
|
|
7
|
+
export * from './lib/shared/services/utility.service';
|
|
8
|
+
export * from './lib/shared/services/environment.service';
|
|
9
|
+
export * from './lib/shared/services/requesthandler.service'
|
|
10
|
+
export * from './lib/shared/services/stylesbundle.service'
|
|
11
|
+
export * from './lib/shared/services/translate.service'
|
|
12
|
+
export * from './lib/shared/services/controlvalidation.service'
|
|
13
|
+
export * from './lib/shared/services/masterlayout.service'
|
|
14
|
+
export * from './lib/shared/services/translationresolver.service'
|
|
15
|
+
export * from './lib/shared/services/AppearanceConfiguration.service'
|
|
16
|
+
export * from './lib/shared/services/configuration.service'
|
|
17
|
+
export * from './lib/shared/services/word-document.service'
|
|
18
|
+
|
|
19
|
+
export * from './lib/shared/config/environment';
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export * from './lib/shared/authentication/auth.service';
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export * from './lib/shared/models/RequestOptionsModel';
|
|
26
|
+
export * from './lib/shared/models/WordDocumentModel';
|
|
27
|
+
|
package/src/test.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
2
|
+
|
|
3
|
+
import 'zone.js/dist/zone';
|
|
4
|
+
import 'zone.js/dist/zone-testing';
|
|
5
|
+
import { getTestBed } from '@angular/core/testing';
|
|
6
|
+
import {
|
|
7
|
+
BrowserDynamicTestingModule,
|
|
8
|
+
platformBrowserDynamicTesting
|
|
9
|
+
} from '@angular/platform-browser-dynamic/testing';
|
|
10
|
+
|
|
11
|
+
declare const require: {
|
|
12
|
+
context(path: string, deep?: boolean, filter?: RegExp): {
|
|
13
|
+
keys(): string[];
|
|
14
|
+
<T>(id: string): T;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// First, initialize the Angular testing environment.
|
|
19
|
+
getTestBed().initTestEnvironment(
|
|
20
|
+
BrowserDynamicTestingModule,
|
|
21
|
+
platformBrowserDynamicTesting()
|
|
22
|
+
);
|
|
23
|
+
// Then we find all the tests.
|
|
24
|
+
const context = require.context('./', true, /\.spec\.ts$/);
|
|
25
|
+
// And load the modules.
|
|
26
|
+
context.keys().map(context);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "../../out-tsc/lib",
|
|
5
|
+
"target": "es2015",
|
|
6
|
+
"module": "es2020",
|
|
7
|
+
"baseUrl": "src/lib",
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"declarationMap": true,
|
|
10
|
+
"noImplicitAny": false,
|
|
11
|
+
"inlineSources": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"allowSyntheticDefaultImports": true,
|
|
15
|
+
"moduleResolution": "node",
|
|
16
|
+
"importHelpers": true,
|
|
17
|
+
"allowJs": true,
|
|
18
|
+
"types": [
|
|
19
|
+
"node"
|
|
20
|
+
],
|
|
21
|
+
"lib": [
|
|
22
|
+
"dom",
|
|
23
|
+
"es2018"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"angularCompilerOptions": {
|
|
27
|
+
"skipTemplateCodegen": true,
|
|
28
|
+
"strictMetadataEmit": false,
|
|
29
|
+
"enableResourceInlining": true,
|
|
30
|
+
"fullTemplateTypeCheck": true,
|
|
31
|
+
"resolveJsonModule": true,
|
|
32
|
+
"esModuleInterop": true,
|
|
33
|
+
"allowSyntheticDefaultImports":true
|
|
34
|
+
},
|
|
35
|
+
"exclude": [
|
|
36
|
+
"src/test.ts",
|
|
37
|
+
"**/*.spec.ts"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "./tsconfig.lib.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"declarationMap": false
|
|
6
|
+
},
|
|
7
|
+
"angularCompilerOptions": {
|
|
8
|
+
// "enableIvy": false
|
|
9
|
+
"compilationMode": "partial"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "../../tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "../../out-tsc/spec",
|
|
6
|
+
"types": [
|
|
7
|
+
"jasmine"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"src/test.ts"
|
|
12
|
+
],
|
|
13
|
+
"include": [
|
|
14
|
+
"**/*.spec.ts",
|
|
15
|
+
"**/*.d.ts"
|
|
16
|
+
]
|
|
17
|
+
}
|
package/tslint.json
ADDED
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"AppInjector":{"__symbolic":"error","message":"Variable not initialized","line":18,"character":11,"module":"./lib/bbsf-utilities.module"},"BBSFUtilitiesModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":20,"character":1},"arguments":[{"declarations":[],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":24,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ng-block-ui","name":"BlockUIModule","line":25,"character":4},"member":"forRoot"}},{"__symbolic":"reference","module":"@angular/http","name":"HttpModule","line":26,"character":4},{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":27,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ngx-toastr","name":"ToastrModule","line":28,"character":4},"member":"forRoot"}}],"exports":[],"providers":[{"__symbolic":"reference","name":"UtilityService"},{"__symbolic":"reference","name":"EnvironmentService"},{"__symbolic":"reference","name":"AuthService"},{"__symbolic":"reference","name":"RequestHandlerService"},{"__symbolic":"reference","name":"StylesBundleService"},{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateService","line":40,"character":4},{"__symbolic":"reference","name":"BBSFTranslateService"},{"__symbolic":"reference","name":"ControlValidationService"},{"__symbolic":"reference","name":"MasterLayoutService"},{"__symbolic":"reference","name":"ConfigurationService"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":49,"character":32}]}]}},"UtilityService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":10,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"blockUI":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"ng-block-ui","name":"BlockUI","line":16,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"BBSFTranslateService"},{"__symbolic":"reference","name":"AuthService"},{"__symbolic":"reference","name":"EnvironmentService"}]}],"getResourceValue":[{"__symbolic":"method"}],"getCurrentLanguage":[{"__symbolic":"method"}],"isCurrentLanguageEnglish":[{"__symbolic":"method"}],"isCurrentLanguageArabic":[{"__symbolic":"method"}],"notifySuccessMessage":[{"__symbolic":"method"}],"notifyErrorMessage":[{"__symbolic":"method"}],"notifyWarningMessage":[{"__symbolic":"method"}],"startBlockUI":[{"__symbolic":"method"}],"stopBlockUI":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"EnvironmentService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":4,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"getEnvironmentObject":[{"__symbolic":"method"}],"getBaseUrl":[{"__symbolic":"method"}],"getApiUrl":[{"__symbolic":"method"}],"getProductionMode":[{"__symbolic":"method"}],"getDefaultLanguage":[{"__symbolic":"method"}],"getIdentityServerUrl":[{"__symbolic":"method"}],"getIsIdentityServerExternal":[{"__symbolic":"method"}],"getIsIdentityServerClientId":[{"__symbolic":"method"}],"getIsIdentityServerClientSecret":[{"__symbolic":"method"}]},"statics":{"AreaList":[],"ɵprov":{}}},"RequestHandlerService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":13,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":20,"character":20},{"__symbolic":"reference","name":"AuthService"},{"__symbolic":"reference","name":"EnvironmentService"},{"__symbolic":"reference","name":"UtilityService"},{"__symbolic":"reference","name":"BBSFTranslateService"},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":25,"character":22}]}],"getLuckyNumber":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"post":[{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}],"put":[{"__symbolic":"method"}],"patch":[{"__symbolic":"method"}],"download":[{"__symbolic":"method"}],"destroyHandler":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"handleError":[{"__symbolic":"method"}],"getHeaders":[{"__symbolic":"method"}]}},"StylesBundleService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":10,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":10,"character":22}]}],null],"parameters":[{"__symbolic":"error","message":"Could not resolve type","line":10,"character":50,"context":{"typeName":"Document"},"module":"./lib/shared/services/stylesbundle.service"},{"__symbolic":"reference","name":"BBSFTranslateService"}]}],"loadThemes":[{"__symbolic":"method"}],"loadThemesColor":[{"__symbolic":"method"}],"loadStyleBundle":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"BBSFTranslateService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateService","line":6,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":3,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{},"statics":{"ɵprov":{}}},"ControlValidationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":12,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"UtilityService"}]}],"blockUI":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"ng-block-ui","name":"BlockUI","line":27,"character":3}}]}],"showGlobalError":[{"__symbolic":"method"}],"RemoveGlobalError":[{"__symbolic":"method"}],"showInputErro":[{"__symbolic":"method"}],"removeElementsByClass":[{"__symbolic":"method"}],"renderServerErrors":[{"__symbolic":"method"}],"hasControlName":[{"__symbolic":"method"}],"setFieldError":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"MasterLayoutService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":9,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":15,"character":20},{"__symbolic":"reference","name":"RequestHandlerService"},{"__symbolic":"reference","name":"AuthService"},{"__symbolic":"reference","name":"StylesBundleService"},{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateService","line":19,"character":23},{"__symbolic":"reference","name":"EnvironmentService"}]}],"switchLang":[{"__symbolic":"method"}],"reloadComponent":[{"__symbolic":"method"}],"changeLanguage":[{"__symbolic":"method"}],"getUserClaims":[{"__symbolic":"method"}],"logError":[{"__symbolic":"method"}],"updateUserInfo":[{"__symbolic":"method"}],"switchRole":[{"__symbolic":"method"}],"updateRole":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"TranslationResolverService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"BBSFTranslateService"}]}],"resolve":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"AppearanceConfigurationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":4,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ConfigurationService"}]}],"getLayoutTheme":[{"__symbolic":"method"}],"getFooterText":[{"__symbolic":"method"}],"getPageTitle":[{"__symbolic":"method"}],"getFavIcon":[{"__symbolic":"method"}],"getCustomStyles":[{"__symbolic":"method"}],"getLogo":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ConfigurationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":4,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":9,"character":36}]}],"getConfigurationValue":[{"__symbolic":"method"}]},"statics":{"JsonData":[],"ɵprov":{}}},"WordDocumentService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":3,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"generateWordByteFile":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"environment":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"assign"},"arguments":[{},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"window"},"member":"Environment"}]},"AuthService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":16,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":34,"character":22},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":35,"character":18},{"__symbolic":"reference","name":"EnvironmentService"},{"__symbolic":"reference","name":"BBSFTranslateService"},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":38,"character":20}]}],"getUserManager":[{"__symbolic":"method"}],"login":[{"__symbolic":"method"}],"getUser":[{"__symbolic":"method"}],"storUser":[{"__symbolic":"method"}],"revokeAccessToken":[{"__symbolic":"method"}],"signinSilent":[{"__symbolic":"method"}],"completeAuthentication":[{"__symbolic":"method"}],"refreshToken":[{"__symbolic":"method"}],"getCurrentUser":[{"__symbolic":"method"}],"isAuthenticated":[{"__symbolic":"method"}],"isUserInRole":[{"__symbolic":"method"}],"authorizationHeaderValue":[{"__symbolic":"method"}],"name":[{"__symbolic":"method"}],"setUrl":[{"__symbolic":"method"}],"getUrl":[{"__symbolic":"method"}],"signinSilentCallback":[{"__symbolic":"method"}],"signout":[{"__symbolic":"method"}],"clearUserSessionClaims":[{"__symbolic":"method"}]},"statics":{"user":null,"UserClaims":null,"ɵprov":{}}},"RequestOptionsModel":{"__symbolic":"class","members":{}},"WordDocumentModel":{"__symbolic":"class","members":{}},"DocumentOptionsModel":{"__symbolic":"class","members":{}}},"origins":{"AppInjector":"./lib/bbsf-utilities.module","BBSFUtilitiesModule":"./lib/bbsf-utilities.module","UtilityService":"./lib/shared/services/utility.service","EnvironmentService":"./lib/shared/services/environment.service","RequestHandlerService":"./lib/shared/services/requesthandler.service","StylesBundleService":"./lib/shared/services/stylesbundle.service","BBSFTranslateService":"./lib/shared/services/translate.service","ControlValidationService":"./lib/shared/services/controlvalidation.service","MasterLayoutService":"./lib/shared/services/masterlayout.service","TranslationResolverService":"./lib/shared/services/translationresolver.service","AppearanceConfigurationService":"./lib/shared/services/AppearanceConfiguration.service","ConfigurationService":"./lib/shared/services/configuration.service","WordDocumentService":"./lib/shared/services/word-document.service","environment":"./lib/shared/config/environment","AuthService":"./lib/shared/authentication/auth.service","RequestOptionsModel":"./lib/shared/models/RequestOptionsModel","WordDocumentModel":"./lib/shared/models/WordDocumentModel","DocumentOptionsModel":"./lib/shared/models/WordDocumentModel"},"importAs":"@bnsights/bbsf-utilities"}
|