intelica-library-ui 0.1.11 → 0.1.12
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/fesm2022/intelica-library-ui.mjs +308 -25
- package/fesm2022/intelica-library-ui.mjs.map +1 -1
- package/lib/constants/cookieConfigurtaion.d.ts +9 -0
- package/lib/dto/authentication.d.ts +23 -0
- package/lib/dto/environment.d.ts +9 -0
- package/lib/dto/featureFlagResponses.d.ts +10 -0
- package/lib/dto/sessionInformation.d.ts +9 -0
- package/lib/dto/term.d.ts +4 -0
- package/lib/interceptor/error.interceptor.d.ts +2 -0
- package/lib/interceptor/refreshToken.interceptor.d.ts +2 -0
- package/lib/pipes/term.pipes.d.ts +9 -0
- package/lib/services/config.service.d.ts +13 -0
- package/lib/services/featureFlag.service.d.ts +10 -0
- package/lib/services/globalFeatureFlag.service.d.ts +16 -0
- package/lib/services/globalTerm.service.d.ts +13 -0
- package/lib/services/sweet-alert.service.d.ts +11 -0
- package/lib/services/term.service.d.ts +10 -0
- package/package.json +1 -1
- package/public-api.d.ts +8 -2
- package/lib/intelica-library-ui.component.d.ts +0 -5
- package/lib/intelica-library-ui.service.d.ts +0 -6
|
@@ -1,42 +1,325 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable,
|
|
2
|
+
import { inject, Injectable, signal, Pipe } from '@angular/core';
|
|
3
|
+
import { getCookie, Cookies, setCookie } from 'typescript-cookie';
|
|
4
|
+
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
5
|
+
import Swal from 'sweetalert2';
|
|
6
|
+
import { catchError, throwError, from, switchMap } from 'rxjs';
|
|
3
7
|
|
|
4
|
-
class
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
class ConfigService {
|
|
9
|
+
Http = inject(HttpClient);
|
|
10
|
+
environment;
|
|
11
|
+
SessionInformation = null;
|
|
12
|
+
async init() {
|
|
13
|
+
const environment = `${window.location.protocol}//${window.location.hostname}${window.location.hostname === "localhost" ? ":9000" : ""}/environment/environment.json`;
|
|
14
|
+
if (getCookie("data") != undefined)
|
|
15
|
+
this.SessionInformation = JSON.parse(getCookie("data") ?? "");
|
|
16
|
+
this.environment = await this.Http.get(environment).toPromise();
|
|
17
|
+
console.log("getCookie('data')", getCookie("data"));
|
|
18
|
+
console.log("this.environment", this.environment);
|
|
19
|
+
}
|
|
20
|
+
SetSessionInformation() {
|
|
21
|
+
this.SessionInformation = JSON.parse(getCookie("data") ?? "");
|
|
22
|
+
}
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
24
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ConfigService, providedIn: "root" });
|
|
8
25
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type:
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ConfigService, decorators: [{
|
|
27
|
+
type: Injectable,
|
|
28
|
+
args: [{ providedIn: "root" }]
|
|
29
|
+
}] });
|
|
30
|
+
function InitializeConfigService(confg) {
|
|
31
|
+
return () => confg.init();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
class TermService {
|
|
35
|
+
_http = inject(HttpClient);
|
|
36
|
+
_config = inject(ConfigService);
|
|
37
|
+
GetTerms(languageCode, pageRoot) {
|
|
38
|
+
return this._http.get(`${this._config.environment?.configurationPath}/TermPage/GetPageTerm/${languageCode}/${pageRoot}`);
|
|
39
|
+
}
|
|
40
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
41
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermService, providedIn: "root" });
|
|
42
|
+
}
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermService, decorators: [{
|
|
44
|
+
type: Injectable,
|
|
45
|
+
args: [{ providedIn: "root" }]
|
|
46
|
+
}] });
|
|
47
|
+
|
|
48
|
+
class GlobalTermService {
|
|
49
|
+
terms = [];
|
|
50
|
+
languageCode = "";
|
|
51
|
+
TermsReady = signal(false);
|
|
52
|
+
PageRoot = "";
|
|
53
|
+
termService = inject(TermService);
|
|
54
|
+
Initialize(pageRoot) {
|
|
55
|
+
let languageCode = getCookie("language") ?? "EN";
|
|
56
|
+
this.PageRoot = pageRoot;
|
|
57
|
+
if (pageRoot == "") {
|
|
58
|
+
this.TermsReady.set(true);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
this.termService.GetTerms(languageCode, pageRoot).subscribe(response => {
|
|
62
|
+
this.terms = response;
|
|
63
|
+
this.TermsReady.set(true);
|
|
64
|
+
this.SetTerms();
|
|
65
|
+
this.languageCode = languageCode;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
async SetTerms() {
|
|
69
|
+
while (true) {
|
|
70
|
+
await sleep(10);
|
|
71
|
+
if (document.querySelectorAll("[data-term]").length > 1)
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
let textsToChange = document.querySelectorAll("[data-term]");
|
|
75
|
+
textsToChange.forEach(async (element) => {
|
|
76
|
+
let dataValue = element.getAttribute("data-term");
|
|
77
|
+
let newText = this.terms.find(x => x.termName == dataValue)?.termValue ?? "";
|
|
78
|
+
element.innerHTML = newText;
|
|
79
|
+
element.setAttribute("placeholder", newText);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GlobalTermService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
83
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GlobalTermService, providedIn: "root" });
|
|
84
|
+
}
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GlobalTermService, decorators: [{
|
|
86
|
+
type: Injectable,
|
|
87
|
+
args: [{ providedIn: "root" }]
|
|
88
|
+
}] });
|
|
89
|
+
function sleep(ms) {
|
|
90
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// import GlobalTermService from "../services/globalTerm.service";
|
|
94
|
+
class TermPipe {
|
|
95
|
+
globalTermService = inject(GlobalTermService);
|
|
96
|
+
transform(termName, language, mode = 1) {
|
|
97
|
+
let term = this.globalTermService.terms.find(x => x.termName == termName)?.termValue ?? "-";
|
|
98
|
+
if (mode == 2)
|
|
99
|
+
term = term.substring(0, 1);
|
|
100
|
+
if (mode == 3)
|
|
101
|
+
term = term.toUpperCase();
|
|
102
|
+
return term;
|
|
103
|
+
}
|
|
104
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
105
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: TermPipe, isStandalone: true, name: "term" });
|
|
106
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermPipe, providedIn: "root" });
|
|
107
|
+
}
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermPipe, decorators: [{
|
|
109
|
+
type: Injectable,
|
|
110
|
+
args: [{ providedIn: "root" }]
|
|
111
|
+
}, {
|
|
112
|
+
type: Pipe,
|
|
113
|
+
args: [{ name: "term" }]
|
|
114
|
+
}] });
|
|
115
|
+
|
|
116
|
+
class SweetAlertService {
|
|
117
|
+
options = {
|
|
118
|
+
text: "",
|
|
119
|
+
customClass: {
|
|
120
|
+
image: "image-class-custom",
|
|
121
|
+
container: "container-class-custom",
|
|
122
|
+
confirmButton: "confirm-class-custom",
|
|
123
|
+
cancelButton: "cancel-class-custom",
|
|
124
|
+
},
|
|
125
|
+
showCloseButton: true,
|
|
126
|
+
closeButtonHtml: '<i class="fa fa-times"></i>',
|
|
127
|
+
imageUrl: "", //assetUrl("images/Incontrol-logo.svg"),
|
|
128
|
+
showCancelButton: false,
|
|
129
|
+
confirmButtonText: "Ok",
|
|
130
|
+
cancelButtonText: "",
|
|
131
|
+
html: "",
|
|
132
|
+
};
|
|
133
|
+
messageBox(message) {
|
|
134
|
+
let options = { ...this.options };
|
|
135
|
+
options.showCancelButton = false;
|
|
136
|
+
options.text = message;
|
|
137
|
+
return Swal.fire(options);
|
|
138
|
+
}
|
|
139
|
+
messageTextBox(message = "", swHtml = false) {
|
|
140
|
+
let options = this.options;
|
|
141
|
+
options.showCancelButton = false;
|
|
142
|
+
if (!swHtml)
|
|
143
|
+
options.text = message.length === 0 ? "Something went wrong!" : message;
|
|
144
|
+
else
|
|
145
|
+
options.html = message;
|
|
146
|
+
Swal.fire(options);
|
|
147
|
+
}
|
|
148
|
+
confirmBox(message, confirmButtonText, cancelButtonText, title, html, popupClass) {
|
|
149
|
+
let options = { ...this.options };
|
|
150
|
+
options.title = title ?? "";
|
|
151
|
+
options.showCancelButton = cancelButtonText == "" ? false : true;
|
|
152
|
+
options.text = message;
|
|
153
|
+
options.confirmButtonText = confirmButtonText;
|
|
154
|
+
options.cancelButtonText = cancelButtonText;
|
|
155
|
+
options.html = html;
|
|
156
|
+
if (popupClass) {
|
|
157
|
+
options.customClass = {
|
|
158
|
+
popup: popupClass,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
return Swal.fire(options);
|
|
162
|
+
}
|
|
163
|
+
messageHTMLBox(title, html, confirmButtonText) {
|
|
164
|
+
let options = { ...this.options };
|
|
165
|
+
options.showCancelButton = false;
|
|
166
|
+
options.title = title;
|
|
167
|
+
options.html = html;
|
|
168
|
+
options.confirmButtonText = confirmButtonText;
|
|
169
|
+
return Swal.fire(options);
|
|
170
|
+
}
|
|
171
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SweetAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
172
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SweetAlertService, providedIn: "root" });
|
|
173
|
+
}
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SweetAlertService, decorators: [{
|
|
10
175
|
type: Injectable,
|
|
11
176
|
args: [{
|
|
12
|
-
providedIn:
|
|
177
|
+
providedIn: "root",
|
|
13
178
|
}]
|
|
14
|
-
}], ctorParameters: () => [] });
|
|
15
|
-
|
|
16
|
-
class IntelicaLibraryUiComponent {
|
|
17
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: IntelicaLibraryUiComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: IntelicaLibraryUiComponent, isStandalone: true, selector: "lib-intelica-library-ui", ngImport: i0, template: `
|
|
19
|
-
<p>
|
|
20
|
-
intelica-library-ui works!
|
|
21
|
-
</p>
|
|
22
|
-
`, isInline: true, styles: [""] });
|
|
23
|
-
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: IntelicaLibraryUiComponent, decorators: [{
|
|
25
|
-
type: Component,
|
|
26
|
-
args: [{ selector: 'lib-intelica-library-ui', imports: [], template: `
|
|
27
|
-
<p>
|
|
28
|
-
intelica-library-ui works!
|
|
29
|
-
</p>
|
|
30
|
-
` }]
|
|
31
179
|
}] });
|
|
32
180
|
|
|
181
|
+
// import { CookieAttributes } from "typescript-cookie/dist/types";
|
|
182
|
+
const domain = window.location.hostname.split(".").slice(-2).join(".");
|
|
183
|
+
const secure = !domain.includes("localhost");
|
|
184
|
+
const CookieAttributesGeneral = { domain: domain, path: "/", secure: secure };
|
|
185
|
+
|
|
186
|
+
class FeatureFlagService {
|
|
187
|
+
_http = inject(HttpClient);
|
|
188
|
+
_configService = inject(ConfigService);
|
|
189
|
+
GetByPageRoot(pageRoot) {
|
|
190
|
+
return this._http.get(`${this._configService.environment?.configurationPath}/FeatureFlag/${pageRoot}`);
|
|
191
|
+
}
|
|
192
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FeatureFlagService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
193
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FeatureFlagService, providedIn: "root" });
|
|
194
|
+
}
|
|
195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FeatureFlagService, decorators: [{
|
|
196
|
+
type: Injectable,
|
|
197
|
+
args: [{ providedIn: "root" }]
|
|
198
|
+
}] });
|
|
199
|
+
|
|
200
|
+
class GlobalFeatureFlagService {
|
|
201
|
+
featureFlagDataService;
|
|
202
|
+
pageRoot = "";
|
|
203
|
+
IsReady = signal(false);
|
|
204
|
+
FeatureFlagsSignal = signal([]);
|
|
205
|
+
constructor(featureFlagDataService) {
|
|
206
|
+
this.featureFlagDataService = featureFlagDataService;
|
|
207
|
+
}
|
|
208
|
+
Initialize(pageRoot) {
|
|
209
|
+
this.pageRoot = pageRoot;
|
|
210
|
+
this.IsReady.set(true);
|
|
211
|
+
// this.featureFlagDataService.GetByPageRoot(pageRoot).subscribe(response => {
|
|
212
|
+
// // this.FeatureFlags = response;
|
|
213
|
+
// this.FeatureFlagsSignal.set(response);
|
|
214
|
+
// this.IsReady.set(true);
|
|
215
|
+
// });
|
|
216
|
+
}
|
|
217
|
+
Exists(featureFlagName) {
|
|
218
|
+
return !(this.FeatureFlagsSignal().find(x => x.name == featureFlagName) == null);
|
|
219
|
+
}
|
|
220
|
+
Refresh() {
|
|
221
|
+
this.Initialize(this.pageRoot);
|
|
222
|
+
}
|
|
223
|
+
GetPageRoot() {
|
|
224
|
+
return this.pageRoot;
|
|
225
|
+
}
|
|
226
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GlobalFeatureFlagService, deps: [{ token: FeatureFlagService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
227
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GlobalFeatureFlagService, providedIn: "root" });
|
|
228
|
+
}
|
|
229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GlobalFeatureFlagService, decorators: [{
|
|
230
|
+
type: Injectable,
|
|
231
|
+
args: [{ providedIn: "root" }]
|
|
232
|
+
}], ctorParameters: () => [{ type: FeatureFlagService }] });
|
|
233
|
+
|
|
234
|
+
// import { SpinnerService } from "./spinner/spinner.service";
|
|
235
|
+
const ErrorInterceptor = (req, next) => {
|
|
236
|
+
const commonFeatureFlagService = inject(GlobalFeatureFlagService);
|
|
237
|
+
// const spinnerService = inject(SpinnerService);
|
|
238
|
+
const sweetAlertService = inject(SweetAlertService);
|
|
239
|
+
const configService = inject(ConfigService);
|
|
240
|
+
const HeaderSettings = {};
|
|
241
|
+
if (!req.url.includes("environment.json")) {
|
|
242
|
+
HeaderSettings["Accept"] = "application/json";
|
|
243
|
+
HeaderSettings["Content-Type"] = "application/json";
|
|
244
|
+
HeaderSettings["Authorization"] = getCookie("token") ?? "";
|
|
245
|
+
HeaderSettings["RefreshToken"] = getCookie("refreshToken") ?? "";
|
|
246
|
+
HeaderSettings["ClientID"] = configService.environment?.clientID ?? "";
|
|
247
|
+
HeaderSettings["PageRoot"] = commonFeatureFlagService.GetPageRoot();
|
|
248
|
+
HeaderSettings["LanguageCode"] = getCookie("language") ?? "";
|
|
249
|
+
}
|
|
250
|
+
let _request = req.clone({ headers: new HttpHeaders(HeaderSettings) });
|
|
251
|
+
return next(_request).pipe(catchError(handleErrorResponse));
|
|
252
|
+
function handleErrorResponse(error) {
|
|
253
|
+
console.log(error, "error");
|
|
254
|
+
// spinnerService.hide();
|
|
255
|
+
if (error.status == 500)
|
|
256
|
+
sweetAlertService.messageBox(error.error.message);
|
|
257
|
+
if (error.status == 400)
|
|
258
|
+
sweetAlertService.messageBox(error.error.message);
|
|
259
|
+
if (error.status == 409)
|
|
260
|
+
sweetAlertService.messageBox(error.error.message);
|
|
261
|
+
if (error.status == 401)
|
|
262
|
+
sweetAlertService.messageBox("No tiene acceso al recurso solicitado");
|
|
263
|
+
if (error.status == 503 || error.status == 0)
|
|
264
|
+
sweetAlertService.messageBox("El servicio que se necesita consumir no esta activo o no responde.");
|
|
265
|
+
if (error.status == 405)
|
|
266
|
+
sweetAlertService.messageBox("Los parametros enviados al servicio no coinciden.");
|
|
267
|
+
if (error.status == 404)
|
|
268
|
+
sweetAlertService.messageBox("Recurso no encontrado.");
|
|
269
|
+
return throwError(() => {
|
|
270
|
+
error.error, error.message;
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
const RefreshTokenInterceptor = (req, next) => {
|
|
276
|
+
const configService = inject(ConfigService);
|
|
277
|
+
const httpClient = inject(HttpClient);
|
|
278
|
+
const commonFeatureFlagService = inject(GlobalFeatureFlagService);
|
|
279
|
+
let _request = req.clone();
|
|
280
|
+
let authenticationLocation = `${configService.environment?.authenticationWeb}?callback=${window.location.href}&clientID=${configService.environment?.clientID}`;
|
|
281
|
+
let path = `${configService.environment?.authenticationPath ?? ""}/Authenticate/ValidateToken`;
|
|
282
|
+
let validateTokenQuery = {
|
|
283
|
+
token: getCookie("token") ?? "",
|
|
284
|
+
refreshToken: getCookie("refreshToken") ?? "",
|
|
285
|
+
ip: req.url,
|
|
286
|
+
clientID: configService.environment?.clientID ?? "",
|
|
287
|
+
pageRoot: commonFeatureFlagService.GetPageRoot(),
|
|
288
|
+
controller: "",
|
|
289
|
+
httpVerb: "GET",
|
|
290
|
+
businessUserClientGroupID: getCookie("businessUserClientGroupID") ?? "",
|
|
291
|
+
};
|
|
292
|
+
if (!req.url.includes("ValidateToken") && !req.url.includes("environment.json") && !req.url.includes("GetAuthenticationFromCache"))
|
|
293
|
+
return from(httpClient.post(path, validateTokenQuery)).pipe(switchMap((response) => {
|
|
294
|
+
if (response.expired) {
|
|
295
|
+
Cookies.remove("token", CookieAttributesGeneral);
|
|
296
|
+
Cookies.remove("refreshToken", CookieAttributesGeneral);
|
|
297
|
+
Cookies.remove("data", CookieAttributesGeneral);
|
|
298
|
+
Cookies.remove("businessUserClientGroupID", CookieAttributesGeneral);
|
|
299
|
+
Cookies.remove("defaultClientID", CookieAttributesGeneral);
|
|
300
|
+
Cookies.remove("defaultClientGroupID", CookieAttributesGeneral);
|
|
301
|
+
window.location.href = authenticationLocation;
|
|
302
|
+
return next(_request);
|
|
303
|
+
}
|
|
304
|
+
if (response.unauthorized)
|
|
305
|
+
window.location.href = window.location.origin;
|
|
306
|
+
if (response.newToken != "")
|
|
307
|
+
setCookie("token", response.newToken, CookieAttributesGeneral);
|
|
308
|
+
return next(_request);
|
|
309
|
+
}));
|
|
310
|
+
else
|
|
311
|
+
return next(_request);
|
|
312
|
+
};
|
|
313
|
+
|
|
33
314
|
/*
|
|
34
315
|
* Public API Surface of intelica-library-ui
|
|
35
316
|
*/
|
|
317
|
+
// export * from "./lib/intelica-library-ui.service";
|
|
318
|
+
// export * from "./lib/intelica-library-ui.component";
|
|
36
319
|
|
|
37
320
|
/**
|
|
38
321
|
* Generated bundle index. Do not edit.
|
|
39
322
|
*/
|
|
40
323
|
|
|
41
|
-
export {
|
|
324
|
+
export { ConfigService, CookieAttributesGeneral, ErrorInterceptor, InitializeConfigService, RefreshTokenInterceptor, SweetAlertService, TermPipe, TermService };
|
|
42
325
|
//# sourceMappingURL=intelica-library-ui.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intelica-library-ui.mjs","sources":["../../../projects/intelica-library-ui/src/lib/intelica-library-ui.service.ts","../../../projects/intelica-library-ui/src/lib/intelica-library-ui.component.ts","../../../projects/intelica-library-ui/src/public-api.ts","../../../projects/intelica-library-ui/src/intelica-library-ui.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class IntelicaLibraryUiService {\r\n\r\n constructor() { }\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'lib-intelica-library-ui',\r\n imports: [],\r\n template: `\r\n <p>\r\n intelica-library-ui works!\r\n </p>\r\n `,\r\n styles: ``\r\n})\r\nexport class IntelicaLibraryUiComponent {\r\n\r\n}\r\n","/*\r\n * Public API Surface of intelica-library-ui\r\n */\r\n\r\nexport * from './lib/intelica-library-ui.service';\r\nexport * from './lib/intelica-library-ui.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,wBAAwB,CAAA;AAEnC,IAAA,WAAA,GAAA;uGAFW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cAFvB,MAAM,EAAA,CAAA;;2FAEP,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCQY,0BAA0B,CAAA;uGAA1B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA1B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0BAA0B,EAP3B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGU,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAVtC,SAAS;+BACE,yBAAyB,EAAA,OAAA,EAC1B,EAAE,EACD,QAAA,EAAA,CAAA;;;;AAIT,EAAA,CAAA,EAAA;;;ACTH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"intelica-library-ui.mjs","sources":["../../../projects/intelica-library-ui/src/lib/services/config.service.ts","../../../projects/intelica-library-ui/src/lib/services/term.service.ts","../../../projects/intelica-library-ui/src/lib/services/globalTerm.service.ts","../../../projects/intelica-library-ui/src/lib/pipes/term.pipes.ts","../../../projects/intelica-library-ui/src/lib/services/sweet-alert.service.ts","../../../projects/intelica-library-ui/src/lib/constants/cookieConfigurtaion.ts","../../../projects/intelica-library-ui/src/lib/services/featureFlag.service.ts","../../../projects/intelica-library-ui/src/lib/services/globalFeatureFlag.service.ts","../../../projects/intelica-library-ui/src/lib/interceptor/error.interceptor.ts","../../../projects/intelica-library-ui/src/lib/interceptor/refreshToken.interceptor.ts","../../../projects/intelica-library-ui/src/public-api.ts","../../../projects/intelica-library-ui/src/intelica-library-ui.ts"],"sourcesContent":["import { HttpClient } from \"@angular/common/http\";\r\nimport { inject, Injectable } from \"@angular/core\";\r\nimport { environment } from \"../dto/environment\";\r\nimport { getCookie } from \"typescript-cookie\";\r\nimport { SessionInformation } from \"../dto/sessionInformation\";\r\n\r\n@Injectable({ providedIn: \"root\" })\r\nexport class ConfigService {\r\n\tprivate readonly Http = inject(HttpClient);\r\n\tenvironment?: environment;\r\n\tSessionInformation: SessionInformation | null = null;\r\n\tasync init() {\r\n\t\tconst environment = `${window.location.protocol}//${window.location.hostname}${window.location.hostname === \"localhost\" ? \":9000\" : \"\"}/environment/environment.json`;\r\n\t\tif (getCookie(\"data\") != undefined) this.SessionInformation = JSON.parse(getCookie(\"data\") ?? \"\");\r\n\t\tthis.environment = await this.Http.get<environment>(environment).toPromise();\r\n\t\tconsole.log(\"getCookie('data')\", getCookie(\"data\"));\r\n\t\tconsole.log(\"this.environment\", this.environment);\r\n\t}\r\n\tSetSessionInformation() {\r\n\t\tthis.SessionInformation = JSON.parse(getCookie(\"data\") ?? \"\");\r\n\t}\r\n}\r\n\r\nexport function InitializeConfigService(confg: ConfigService) {\r\n\treturn () => confg.init();\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { TermPageResponse } from \"../dto/term\";\r\nimport { ConfigService } from \"./config.service\";\r\n@Injectable({ providedIn: \"root\" })\r\nexport class TermService {\r\n\tprivate readonly _http = inject(HttpClient);\r\n\tprivate readonly _config = inject(ConfigService);\r\n\tGetTerms(languageCode: string, pageRoot: string): Observable<TermPageResponse[]> {\r\n\t\treturn this._http.get<TermPageResponse[]>(`${this._config.environment?.configurationPath}/TermPage/GetPageTerm/${languageCode}/${pageRoot}`);\r\n\t}\r\n}\r\n","import { inject, Injectable, signal } from \"@angular/core\";\r\nimport { getCookie } from \"typescript-cookie\";\r\nimport { TermPageResponse } from \"../dto/term\";\r\nimport { TermService } from \"./term.service\";\r\n\r\n@Injectable({ providedIn: \"root\" })\r\nexport default class GlobalTermService {\r\n\tterms: TermPageResponse[] = [];\r\n\tlanguageCode: string = \"\";\r\n\tTermsReady = signal<boolean>(false);\r\n\tPageRoot: string = \"\";\r\n\tprivate readonly termService = inject(TermService);\r\n\r\n\tInitialize(pageRoot: string): void {\r\n\t\tlet languageCode = getCookie(\"language\") ?? \"EN\";\r\n\t\tthis.PageRoot = pageRoot;\r\n\t\tif (pageRoot == \"\") {\r\n\t\t\tthis.TermsReady.set(true);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.termService.GetTerms(languageCode, pageRoot).subscribe(response => {\r\n\t\t\tthis.terms = response;\r\n\t\t\tthis.TermsReady.set(true);\r\n\t\t\tthis.SetTerms();\r\n\t\t\tthis.languageCode = languageCode;\r\n\t\t});\r\n\t}\r\n\r\n\tasync SetTerms() {\r\n\t\twhile (true) {\r\n\t\t\tawait sleep(10);\r\n\t\t\tif (document.querySelectorAll(\"[data-term]\").length > 1) break;\r\n\t\t}\r\n\t\tlet textsToChange = document.querySelectorAll(\"[data-term]\");\r\n\t\ttextsToChange.forEach(async element => {\r\n\t\t\tlet dataValue = element.getAttribute(\"data-term\");\r\n\t\t\tlet newText = this.terms.find(x => x.termName == dataValue)?.termValue ?? \"\";\r\n\t\t\telement.innerHTML = newText;\r\n\t\t\telement.setAttribute(\"placeholder\", newText);\r\n\t\t});\r\n\t}\r\n}\r\n\r\nfunction sleep(ms: number): Promise<void> {\r\n\treturn new Promise(resolve => setTimeout(resolve, ms));\r\n}\r\n","import { inject, Injectable, Pipe, PipeTransform } from \"@angular/core\";\r\nimport GlobalTermService from \"../services/globalTerm.service\";\r\n// import GlobalTermService from \"../services/globalTerm.service\";\r\n\r\n@Injectable({ providedIn: \"root\" })\r\n@Pipe({ name: \"term\" })\r\nexport class TermPipe implements PipeTransform {\r\n\tprivate readonly globalTermService = inject(GlobalTermService);\r\n\ttransform(termName: string, language: string, mode: number = 1): string {\r\n\t\tlet term = this.globalTermService.terms.find(x => x.termName == termName)?.termValue ?? \"-\";\r\n\t\tif (mode == 2) term = term.substring(0, 1);\r\n\t\tif (mode == 3) term = term.toUpperCase();\r\n\t\treturn term;\r\n\t}\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport Swal, { SweetAlertOptions, SweetAlertResult } from \"sweetalert2\";\r\n\r\n@Injectable({\r\n\tprovidedIn: \"root\",\r\n})\r\nexport class SweetAlertService {\r\n\toptions: SweetAlertOptions = {\r\n\t\ttext: \"\",\r\n\t\tcustomClass: {\r\n\t\t\timage: \"image-class-custom\",\r\n\t\t\tcontainer: \"container-class-custom\",\r\n\t\t\tconfirmButton: \"confirm-class-custom\",\r\n\t\t\tcancelButton: \"cancel-class-custom\",\r\n\t\t},\r\n\t\tshowCloseButton: true,\r\n\t\tcloseButtonHtml: '<i class=\"fa fa-times\"></i>',\r\n\t\timageUrl: \"\", //assetUrl(\"images/Incontrol-logo.svg\"),\r\n\t\tshowCancelButton: false,\r\n\t\tconfirmButtonText: \"Ok\",\r\n\t\tcancelButtonText: \"\",\r\n\t\thtml: \"\",\r\n\t};\r\n\r\n\tmessageBox(message: string): Promise<SweetAlertResult<any>> {\r\n\t\tlet options = { ...this.options };\r\n\t\toptions.showCancelButton = false;\r\n\t\toptions.text = message;\r\n\t\treturn Swal.fire(options);\r\n\t}\r\n\r\n\tmessageTextBox(message: string = \"\", swHtml: boolean = false) {\r\n\t\tlet options = this.options;\r\n\t\toptions.showCancelButton = false;\r\n\t\tif (!swHtml) options.text = message.length === 0 ? \"Something went wrong!\" : message;\r\n\t\telse options.html = message;\r\n\t\tSwal.fire(options);\r\n\t}\r\n\r\n\tconfirmBox(message: string, confirmButtonText: string, cancelButtonText: string, title?: string, html?: string, popupClass?: string): Promise<SweetAlertResult<any>> {\r\n\t\tlet options = { ...this.options };\r\n\t\toptions.title = title ?? \"\";\r\n\t\toptions.showCancelButton = cancelButtonText == \"\" ? false : true;\r\n\t\toptions.text = message;\r\n\t\toptions.confirmButtonText = confirmButtonText;\r\n\t\toptions.cancelButtonText = cancelButtonText;\r\n\t\toptions.html = html;\r\n\t\tif (popupClass) {\r\n\t\t\toptions.customClass = {\r\n\t\t\t\tpopup: popupClass,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn Swal.fire(options);\r\n\t}\r\n\r\n\tmessageHTMLBox(title: string, html: string, confirmButtonText: string): Promise<SweetAlertResult<any>> {\r\n\t\tlet options = { ...this.options };\r\n\t\toptions.showCancelButton = false;\r\n\t\toptions.title = title;\r\n\t\toptions.html = html;\r\n\t\toptions.confirmButtonText = confirmButtonText;\r\n\t\treturn Swal.fire(options);\r\n\t}\r\n}\r\n","// import { CookieAttributes } from \"typescript-cookie/dist/types\";\r\nconst domain = window.location.hostname.split(\".\").slice(-2).join(\".\");\r\nconst secure = !domain.includes(\"localhost\");\r\nexport const CookieAttributesGeneral: CookieAttributes = { domain: domain, path: \"/\", secure: secure };\r\n\r\nexport interface CookieAttributes {\r\n\tpath?: string;\r\n\tdomain?: string;\r\n\texpires?: number | Date;\r\n\tsameSite?: \"strict\" | \"Strict\" | \"lax\" | \"Lax\" | \"none\" | \"None\";\r\n\tsecure?: boolean;\r\n\t[property: string]: any;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Injectable, inject } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { ConfigService } from \"./config.service\";\r\nimport { FeatureFlagPageRootResponse } from \"../dto/featureFlagResponses\";\r\n\r\n@Injectable({ providedIn: \"root\" })\r\nexport class FeatureFlagService {\r\n\tprivate readonly _http = inject(HttpClient);\r\n\tprivate readonly _configService = inject(ConfigService);\r\n\tGetByPageRoot(pageRoot: string): Observable<FeatureFlagPageRootResponse[]> {\r\n\t\treturn this._http.get<FeatureFlagPageRootResponse[]>(`${this._configService.environment?.configurationPath}/FeatureFlag/${pageRoot}`);\r\n\t}\r\n}\r\n","import { Injectable, signal } from \"@angular/core\";\r\nimport { FeatureFlagService } from \"./featureFlag.service\";\r\nimport { FeatureFlagPageRootResponse } from \"../dto/featureFlagResponses\";\r\n\r\n@Injectable({ providedIn: \"root\" })\r\nexport default class GlobalFeatureFlagService {\r\n\tprivate pageRoot: string = \"\";\r\n\tIsReady = signal<boolean>(false);\r\n\tFeatureFlagsSignal = signal<FeatureFlagPageRootResponse[]>([]);\r\n\r\n\tconstructor(private featureFlagDataService: FeatureFlagService) {}\r\n\tInitialize(pageRoot: string): void {\r\n\t\tthis.pageRoot = pageRoot;\r\n\t\tthis.IsReady.set(true);\r\n\t\t// this.featureFlagDataService.GetByPageRoot(pageRoot).subscribe(response => {\r\n\t\t// \t//\t\tthis.FeatureFlags = response;\r\n\t\t// \tthis.FeatureFlagsSignal.set(response);\r\n\t\t// \tthis.IsReady.set(true);\r\n\t\t// });\r\n\t}\r\n\tExists(featureFlagName: string): boolean {\r\n\t\treturn !(this.FeatureFlagsSignal().find(x => x.name == featureFlagName) == null);\r\n\t}\r\n\tRefresh(): void {\r\n\t\tthis.Initialize(this.pageRoot);\r\n\t}\r\n\tGetPageRoot(): string {\r\n\t\treturn this.pageRoot;\r\n\t}\r\n}\r\n","import { HttpErrorResponse, HttpHeaders, HttpInterceptorFn } from \"@angular/common/http\";\r\nimport { inject } from \"@angular/core\";\r\nimport { catchError, throwError } from \"rxjs\";\r\nimport { getCookie } from \"typescript-cookie\";\r\nimport CommonFeatureFlagService from \"../services/globalFeatureFlag.service\";\r\nimport { ConfigService } from \"../services/config.service\";\r\nimport { SweetAlertService } from \"../services/sweet-alert.service\";\r\n// import { SpinnerService } from \"./spinner/spinner.service\";\r\n\r\nexport const ErrorInterceptor: HttpInterceptorFn = (req, next) => {\r\n\tconst commonFeatureFlagService = inject(CommonFeatureFlagService);\r\n\t// const spinnerService = inject(SpinnerService);\r\n\tconst sweetAlertService = inject(SweetAlertService);\r\n\tconst configService: ConfigService = inject(ConfigService);\r\n\tconst HeaderSettings: { [name: string]: string | string[] } = {};\r\n\r\n\tif (!req.url.includes(\"environment.json\")) {\r\n\t\tHeaderSettings[\"Accept\"] = \"application/json\";\r\n\t\tHeaderSettings[\"Content-Type\"] = \"application/json\";\r\n\t\tHeaderSettings[\"Authorization\"] = getCookie(\"token\") ?? \"\";\r\n\t\tHeaderSettings[\"RefreshToken\"] = getCookie(\"refreshToken\") ?? \"\";\r\n\t\tHeaderSettings[\"ClientID\"] = configService.environment?.clientID ?? \"\";\r\n\t\tHeaderSettings[\"PageRoot\"] = commonFeatureFlagService.GetPageRoot();\r\n\t\tHeaderSettings[\"LanguageCode\"] = getCookie(\"language\") ?? \"\";\r\n\t}\r\n\r\n\tlet _request = req.clone({ headers: new HttpHeaders(HeaderSettings) });\r\n\treturn next(_request).pipe(catchError(handleErrorResponse));\r\n\r\n\tfunction handleErrorResponse(error: HttpErrorResponse) {\r\n\t\tconsole.log(error, \"error\");\r\n\t\t// spinnerService.hide();\r\n\t\tif (error.status == 500) sweetAlertService.messageBox(error.error.message);\r\n\t\tif (error.status == 400) sweetAlertService.messageBox(error.error.message);\r\n\t\tif (error.status == 409) sweetAlertService.messageBox(error.error.message);\r\n\t\tif (error.status == 401) sweetAlertService.messageBox(\"No tiene acceso al recurso solicitado\");\r\n\t\tif (error.status == 503 || error.status == 0) sweetAlertService.messageBox(\"El servicio que se necesita consumir no esta activo o no responde.\");\r\n\t\tif (error.status == 405) sweetAlertService.messageBox(\"Los parametros enviados al servicio no coinciden.\");\r\n\t\tif (error.status == 404) sweetAlertService.messageBox(\"Recurso no encontrado.\");\r\n\t\treturn throwError(() => {\r\n\t\t\terror.error, error.message;\r\n\t\t});\r\n\t}\r\n};\r\n","import CommonFeatureFlagService from \"../services/globalFeatureFlag.service\";\r\nimport { HttpClient, HttpInterceptorFn } from \"@angular/common/http\";\r\nimport { inject } from \"@angular/core\";\r\nimport { from, switchMap } from \"rxjs\";\r\nimport { getCookie, setCookie, Cookies } from \"typescript-cookie\";\r\nimport { ConfigService } from \"../services/config.service\";\r\nimport { ValidateTokenQuery, ValidateTokenResponse } from \"../dto/authentication\";\r\nimport { CookieAttributesGeneral } from \"../constants/cookieConfigurtaion\";\r\n\r\nexport const RefreshTokenInterceptor: HttpInterceptorFn = (req, next) => {\r\n\tconst configService: ConfigService = inject(ConfigService);\r\n\tconst httpClient = inject(HttpClient);\r\n\tconst commonFeatureFlagService = inject(CommonFeatureFlagService);\r\n\tlet _request = req.clone();\r\n\tlet authenticationLocation = `${configService.environment?.authenticationWeb}?callback=${window.location.href}&clientID=${configService.environment?.clientID}`;\r\n\tlet path = `${configService.environment?.authenticationPath ?? \"\"}/Authenticate/ValidateToken`;\r\n\r\n\tlet validateTokenQuery: ValidateTokenQuery = {\r\n\t\ttoken: getCookie(\"token\") ?? \"\",\r\n\t\trefreshToken: getCookie(\"refreshToken\") ?? \"\",\r\n\t\tip: req.url,\r\n\t\tclientID: configService.environment?.clientID ?? \"\",\r\n\t\tpageRoot: commonFeatureFlagService.GetPageRoot(),\r\n\t\tcontroller: \"\",\r\n\t\thttpVerb: \"GET\",\r\n\t\tbusinessUserClientGroupID: getCookie(\"businessUserClientGroupID\") ?? \"\",\r\n\t};\r\n\r\n\tif (!req.url.includes(\"ValidateToken\") && !req.url.includes(\"environment.json\") && !req.url.includes(\"GetAuthenticationFromCache\"))\r\n\t\treturn from(httpClient.post<ValidateTokenResponse>(path, validateTokenQuery)).pipe(\r\n\t\t\tswitchMap((response: ValidateTokenResponse) => {\r\n\t\t\t\tif (response.expired) {\r\n\t\t\t\t\tCookies.remove(\"token\", CookieAttributesGeneral);\r\n\t\t\t\t\tCookies.remove(\"refreshToken\", CookieAttributesGeneral);\r\n\t\t\t\t\tCookies.remove(\"data\", CookieAttributesGeneral);\r\n\t\t\t\t\tCookies.remove(\"businessUserClientGroupID\", CookieAttributesGeneral);\r\n\t\t\t\t\tCookies.remove(\"defaultClientID\", CookieAttributesGeneral);\r\n\t\t\t\t\tCookies.remove(\"defaultClientGroupID\", CookieAttributesGeneral);\r\n\t\t\t\t\twindow.location.href = authenticationLocation;\r\n\t\t\t\t\treturn next(_request);\r\n\t\t\t\t}\r\n\t\t\t\tif (response.unauthorized) window.location.href = window.location.origin;\r\n\t\t\t\tif (response.newToken != \"\") setCookie(\"token\", response.newToken, CookieAttributesGeneral);\r\n\t\t\t\treturn next(_request);\r\n\t\t\t})\r\n\t\t);\r\n\telse return next(_request);\r\n};\r\n","/*\r\n * Public API Surface of intelica-library-ui\r\n */\r\n\r\n// export * from \"./lib/intelica-library-ui.service\";\r\n// export * from \"./lib/intelica-library-ui.component\";\r\nexport * from \"./lib/pipes/term.pipes\";\r\nexport * from \"./lib/services/config.service\";\r\nexport * from \"./lib/services/sweet-alert.service\";\r\nexport * from \"./lib/services/globalTerm.service\";\r\nexport * from \"./lib/services/term.service\";\r\nexport * from \"./lib/constants/cookieConfigurtaion\";\r\nexport * from \"./lib/interceptor/error.interceptor\";\r\nexport * from \"./lib/interceptor/refreshToken.interceptor\";\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.FeatureFlagService","CommonFeatureFlagService"],"mappings":";;;;;;;MAOa,aAAa,CAAA;AACR,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AAC1C,IAAA,WAAW;IACX,kBAAkB,GAA8B,IAAI;AACpD,IAAA,MAAM,IAAI,GAAA;AACT,QAAA,MAAM,WAAW,GAAG,CAAG,EAAA,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAK,EAAA,EAAA,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAA,EAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,WAAW,GAAG,OAAO,GAAG,EAAE,+BAA+B;AACrK,QAAA,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS;AAAE,YAAA,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,M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AAI,CAAwB,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,IAAI,CACjF,SAAS,CAAC,CAAC,QAA+B,KAAI;AAC7C,YAAA,IAAI,QAAQ,CAAC,OAAO,EAAE;AACrB,gBAAA,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,uBAAuB,CAAC;AAChD,gBAAA,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,uBAAuB,CAAC;AACvD,gBAAA,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC;AAC/C,gBAAA,OAAO,CAAC,MAAM,CAAC,2BAA2B,EAAE,uBAAuB,CAAC;AACpE,gBAAA,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;AAC1D,gBAAA,OAAO,CAAC,MAAM,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;AAC/D,gBAAA,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,sBAAsB;AAC7C,gBAAA,OAAO,IAAI,CAAC,QAAQ,CAAC;;YAEtB,IAAI,QAAQ,CAAC,YAAY;gBAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM;AACxE,YAAA,IAAI,QAAQ,CAAC,QAAQ,IAAI,EAAE;gBAAE,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAC;AAC3F,YAAA,OAAO,IAAI,CAAC,QAAQ,CAAC;SACrB,CAAC,CACF;;AACG,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC;AAC3B;;AC/CA;;AAEG;AAEH;AACA;;ACLA;;AAEG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const CookieAttributesGeneral: CookieAttributes;
|
|
2
|
+
export interface CookieAttributes {
|
|
3
|
+
path?: string;
|
|
4
|
+
domain?: string;
|
|
5
|
+
expires?: number | Date;
|
|
6
|
+
sameSite?: "strict" | "Strict" | "lax" | "Lax" | "none" | "None";
|
|
7
|
+
secure?: boolean;
|
|
8
|
+
[property: string]: any;
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface ValidateTokenResponse {
|
|
2
|
+
expired: boolean;
|
|
3
|
+
unauthorized: boolean;
|
|
4
|
+
newToken: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ValidateTokenQuery {
|
|
7
|
+
token: string;
|
|
8
|
+
refreshToken: string;
|
|
9
|
+
ip: string;
|
|
10
|
+
clientID: string;
|
|
11
|
+
pageRoot: string;
|
|
12
|
+
controller: string;
|
|
13
|
+
httpVerb: string;
|
|
14
|
+
businessUserClientGroupID: string;
|
|
15
|
+
}
|
|
16
|
+
export interface RefreshTokenResponse {
|
|
17
|
+
validRefreshToken: boolean;
|
|
18
|
+
token: string;
|
|
19
|
+
}
|
|
20
|
+
export interface RefreshTokenQuery {
|
|
21
|
+
refreshToken: string;
|
|
22
|
+
clientID: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface FeatureFlagPageRootResponse {
|
|
2
|
+
name: string;
|
|
3
|
+
allUser: boolean;
|
|
4
|
+
featureFlagDetails: FeatureFlagDetailSimpleResponse[];
|
|
5
|
+
}
|
|
6
|
+
export interface FeatureFlagDetailSimpleResponse {
|
|
7
|
+
featureFlagDetailID: string;
|
|
8
|
+
featureFlagID: string;
|
|
9
|
+
businessUserID: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeTransform } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TermPipe implements PipeTransform {
|
|
4
|
+
private readonly globalTermService;
|
|
5
|
+
transform(termName: string, language: string, mode?: number): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TermPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TermPipe, "term", true>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TermPipe>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { environment } from "../dto/environment";
|
|
2
|
+
import { SessionInformation } from "../dto/sessionInformation";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ConfigService {
|
|
5
|
+
private readonly Http;
|
|
6
|
+
environment?: environment;
|
|
7
|
+
SessionInformation: SessionInformation | null;
|
|
8
|
+
init(): Promise<void>;
|
|
9
|
+
SetSessionInformation(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigService>;
|
|
12
|
+
}
|
|
13
|
+
export declare function InitializeConfigService(confg: ConfigService): () => Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { FeatureFlagPageRootResponse } from "../dto/featureFlagResponses";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class FeatureFlagService {
|
|
5
|
+
private readonly _http;
|
|
6
|
+
private readonly _configService;
|
|
7
|
+
GetByPageRoot(pageRoot: string): Observable<FeatureFlagPageRootResponse[]>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FeatureFlagService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FeatureFlagService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FeatureFlagService } from "./featureFlag.service";
|
|
2
|
+
import { FeatureFlagPageRootResponse } from "../dto/featureFlagResponses";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export default class GlobalFeatureFlagService {
|
|
5
|
+
private featureFlagDataService;
|
|
6
|
+
private pageRoot;
|
|
7
|
+
IsReady: import("@angular/core").WritableSignal<boolean>;
|
|
8
|
+
FeatureFlagsSignal: import("@angular/core").WritableSignal<FeatureFlagPageRootResponse[]>;
|
|
9
|
+
constructor(featureFlagDataService: FeatureFlagService);
|
|
10
|
+
Initialize(pageRoot: string): void;
|
|
11
|
+
Exists(featureFlagName: string): boolean;
|
|
12
|
+
Refresh(): void;
|
|
13
|
+
GetPageRoot(): string;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GlobalFeatureFlagService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GlobalFeatureFlagService>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TermPageResponse } from "../dto/term";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export default class GlobalTermService {
|
|
4
|
+
terms: TermPageResponse[];
|
|
5
|
+
languageCode: string;
|
|
6
|
+
TermsReady: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
+
PageRoot: string;
|
|
8
|
+
private readonly termService;
|
|
9
|
+
Initialize(pageRoot: string): void;
|
|
10
|
+
SetTerms(): Promise<void>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GlobalTermService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GlobalTermService>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SweetAlertOptions, SweetAlertResult } from "sweetalert2";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SweetAlertService {
|
|
4
|
+
options: SweetAlertOptions;
|
|
5
|
+
messageBox(message: string): Promise<SweetAlertResult<any>>;
|
|
6
|
+
messageTextBox(message?: string, swHtml?: boolean): void;
|
|
7
|
+
confirmBox(message: string, confirmButtonText: string, cancelButtonText: string, title?: string, html?: string, popupClass?: string): Promise<SweetAlertResult<any>>;
|
|
8
|
+
messageHTMLBox(title: string, html: string, confirmButtonText: string): Promise<SweetAlertResult<any>>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SweetAlertService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SweetAlertService>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { TermPageResponse } from "../dto/term";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TermService {
|
|
5
|
+
private readonly _http;
|
|
6
|
+
private readonly _config;
|
|
7
|
+
GetTerms(languageCode: string, pageRoot: string): Observable<TermPageResponse[]>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TermService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TermService>;
|
|
10
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./lib/pipes/term.pipes";
|
|
2
|
+
export * from "./lib/services/config.service";
|
|
3
|
+
export * from "./lib/services/sweet-alert.service";
|
|
4
|
+
export * from "./lib/services/globalTerm.service";
|
|
5
|
+
export * from "./lib/services/term.service";
|
|
6
|
+
export * from "./lib/constants/cookieConfigurtaion";
|
|
7
|
+
export * from "./lib/interceptor/error.interceptor";
|
|
8
|
+
export * from "./lib/interceptor/refreshToken.interceptor";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class IntelicaLibraryUiComponent {
|
|
3
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<IntelicaLibraryUiComponent, never>;
|
|
4
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<IntelicaLibraryUiComponent, "lib-intelica-library-ui", never, {}, {}, never, never, true, never>;
|
|
5
|
-
}
|