@osovitny/anatoly 3.21.33 → 3.21.35
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.
|
@@ -288,6 +288,135 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
288
288
|
type: Injectable
|
|
289
289
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
290
290
|
|
|
291
|
+
/*
|
|
292
|
+
<file>
|
|
293
|
+
Project:
|
|
294
|
+
@osovitny/anatoly
|
|
295
|
+
|
|
296
|
+
Authors:
|
|
297
|
+
Vadim Osovitny vadim.osovitny@osovitny.com
|
|
298
|
+
Anatoly Osovitny anatoly.osovitny@osovitny.com
|
|
299
|
+
|
|
300
|
+
Created:
|
|
301
|
+
26 Jun 2020
|
|
302
|
+
|
|
303
|
+
Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
|
|
304
|
+
</file>
|
|
305
|
+
*/
|
|
306
|
+
//Node
|
|
307
|
+
var AnatolyLogLevel;
|
|
308
|
+
(function (AnatolyLogLevel) {
|
|
309
|
+
AnatolyLogLevel[AnatolyLogLevel["Off"] = -1] = "Off";
|
|
310
|
+
AnatolyLogLevel[AnatolyLogLevel["Error"] = 0] = "Error";
|
|
311
|
+
AnatolyLogLevel[AnatolyLogLevel["Warning"] = 1] = "Warning";
|
|
312
|
+
AnatolyLogLevel[AnatolyLogLevel["Info"] = 2] = "Info";
|
|
313
|
+
AnatolyLogLevel[AnatolyLogLevel["Verbose"] = 3] = "Verbose";
|
|
314
|
+
})(AnatolyLogLevel || (AnatolyLogLevel = {}));
|
|
315
|
+
class LoggingService {
|
|
316
|
+
static { this.packagePrefix = '@osovitny/anatoly'; }
|
|
317
|
+
constructor() {
|
|
318
|
+
}
|
|
319
|
+
static getEventName(eventName) {
|
|
320
|
+
return `${LoggingService.packagePrefix}.${eventName}`;
|
|
321
|
+
}
|
|
322
|
+
static getConfiguredLogLevel() {
|
|
323
|
+
const appCoreSettings = AppCoreSettings;
|
|
324
|
+
const configuredValue = appCoreSettings?.logging?.logLevel?.default
|
|
325
|
+
?? appCoreSettings?.logging?.logLevel?.Default
|
|
326
|
+
?? appCoreSettings?.logging?.logLevel
|
|
327
|
+
?? appCoreSettings?.logging?.default
|
|
328
|
+
?? appCoreSettings?.logging?.Default
|
|
329
|
+
?? appCoreSettings?.diagnostics?.logLevel
|
|
330
|
+
?? appCoreSettings?.logLevel
|
|
331
|
+
?? LoggingService.getMsalLogLevel();
|
|
332
|
+
return LoggingService.toLogLevel(configuredValue);
|
|
333
|
+
}
|
|
334
|
+
static getMsalLogLevel() {
|
|
335
|
+
try {
|
|
336
|
+
const json = sessionStorage.getItem(SessionStorageKeys.appMSALSettings);
|
|
337
|
+
return json ? JSON.parse(json)?.app?.system?.loggerOptions?.logLevel : null;
|
|
338
|
+
}
|
|
339
|
+
catch {
|
|
340
|
+
return null;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
static toLogLevel(value) {
|
|
344
|
+
if (value === null || typeof value === 'undefined') {
|
|
345
|
+
return AnatolyLogLevel.Off;
|
|
346
|
+
}
|
|
347
|
+
if (typeof value === 'number') {
|
|
348
|
+
return value;
|
|
349
|
+
}
|
|
350
|
+
const normalized = `${value}`.toLowerCase();
|
|
351
|
+
switch (normalized) {
|
|
352
|
+
case '0':
|
|
353
|
+
case 'error':
|
|
354
|
+
return AnatolyLogLevel.Error;
|
|
355
|
+
case '1':
|
|
356
|
+
case 'warn':
|
|
357
|
+
case 'warning':
|
|
358
|
+
return AnatolyLogLevel.Warning;
|
|
359
|
+
case '2':
|
|
360
|
+
case 'info':
|
|
361
|
+
case 'information':
|
|
362
|
+
return AnatolyLogLevel.Info;
|
|
363
|
+
case '3':
|
|
364
|
+
case 'debug':
|
|
365
|
+
case 'trace':
|
|
366
|
+
case 'verbose':
|
|
367
|
+
return AnatolyLogLevel.Verbose;
|
|
368
|
+
default:
|
|
369
|
+
return AnatolyLogLevel.Off;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
static shouldLog(level) {
|
|
373
|
+
return LoggingService.getConfiguredLogLevel() >= level;
|
|
374
|
+
}
|
|
375
|
+
static debug(info, ...optionalParams) {
|
|
376
|
+
if (LoggingService.shouldLog(AnatolyLogLevel.Verbose)) {
|
|
377
|
+
console.debug(info, ...optionalParams);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
static info(info, ...optionalParams) {
|
|
381
|
+
if (LoggingService.shouldLog(AnatolyLogLevel.Info)) {
|
|
382
|
+
console.info(info, ...optionalParams);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
static warn(info, ...optionalParams) {
|
|
386
|
+
if (LoggingService.shouldLog(AnatolyLogLevel.Warning)) {
|
|
387
|
+
console.warn(info, ...optionalParams);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
static error(error, ...optionalParams) {
|
|
391
|
+
if (LoggingService.shouldLog(AnatolyLogLevel.Error)) {
|
|
392
|
+
console.error(error, ...optionalParams);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
debug(info, ...optionalParams) {
|
|
396
|
+
LoggingService.debug(info, ...optionalParams);
|
|
397
|
+
}
|
|
398
|
+
info(info, ...optionalParams) {
|
|
399
|
+
LoggingService.info(info, ...optionalParams);
|
|
400
|
+
}
|
|
401
|
+
warn(info, ...optionalParams) {
|
|
402
|
+
LoggingService.warn(info, ...optionalParams);
|
|
403
|
+
}
|
|
404
|
+
error(error, ...optionalParams) {
|
|
405
|
+
LoggingService.error(error, ...optionalParams);
|
|
406
|
+
}
|
|
407
|
+
getEventName(eventName) {
|
|
408
|
+
return LoggingService.getEventName(eventName);
|
|
409
|
+
}
|
|
410
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LoggingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
411
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LoggingService, providedIn: "root" }); }
|
|
412
|
+
}
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LoggingService, decorators: [{
|
|
414
|
+
type: Injectable,
|
|
415
|
+
args: [{
|
|
416
|
+
providedIn: "root",
|
|
417
|
+
}]
|
|
418
|
+
}], ctorParameters: () => [] });
|
|
419
|
+
|
|
291
420
|
/*
|
|
292
421
|
<file>
|
|
293
422
|
Project:
|
|
@@ -303,6 +432,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
303
432
|
Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
|
|
304
433
|
</file>
|
|
305
434
|
*/
|
|
435
|
+
//App
|
|
306
436
|
class Stopwatch {
|
|
307
437
|
constructor(name) {
|
|
308
438
|
this.name = name;
|
|
@@ -310,7 +440,7 @@ class Stopwatch {
|
|
|
310
440
|
this.stopTime = 0;
|
|
311
441
|
this.running = false;
|
|
312
442
|
this.performance = !!window.performance;
|
|
313
|
-
|
|
443
|
+
LoggingService.info(this.name + ' started.');
|
|
314
444
|
}
|
|
315
445
|
currentTime() {
|
|
316
446
|
return this.performance ? window.performance.now() : new Date().getTime();
|
|
@@ -334,7 +464,7 @@ class Stopwatch {
|
|
|
334
464
|
}
|
|
335
465
|
printElapsedAsMilliseconds() {
|
|
336
466
|
let elapsed = this.getElapsedMilliseconds();
|
|
337
|
-
|
|
467
|
+
LoggingService.info(`${this.name} stopped. Execution time: ${elapsed} ms`);
|
|
338
468
|
}
|
|
339
469
|
}
|
|
340
470
|
|
|
@@ -1575,6 +1705,7 @@ class Guid {
|
|
|
1575
1705
|
Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
|
|
1576
1706
|
</file>
|
|
1577
1707
|
*/
|
|
1708
|
+
//App
|
|
1578
1709
|
const MSALStorageKeys = {
|
|
1579
1710
|
//LocalStorage
|
|
1580
1711
|
redirectTo: 'msal.app.redirectTo'
|
|
@@ -1594,11 +1725,11 @@ class MSALStorage {
|
|
|
1594
1725
|
return;
|
|
1595
1726
|
}
|
|
1596
1727
|
localStorage.setItem(MSALStorageKeys.redirectTo, redirectTo);
|
|
1597
|
-
|
|
1728
|
+
LoggingService.info(`msal.app: redirect state saved: ${redirectTo}. Called by: ${calledBy}`);
|
|
1598
1729
|
}
|
|
1599
1730
|
static getRedirectState(calledBy) {
|
|
1600
1731
|
let redirectTo = localStorage.getItem(MSALStorageKeys.redirectTo);
|
|
1601
|
-
|
|
1732
|
+
LoggingService.info(`msal.app: redirect state requested: ${redirectTo}. Called by: ${calledBy}`);
|
|
1602
1733
|
if (!MSALStorage.hasRedirectValue(redirectTo)) {
|
|
1603
1734
|
MSALStorage.clearRedirectState(calledBy);
|
|
1604
1735
|
return null;
|
|
@@ -1607,7 +1738,7 @@ class MSALStorage {
|
|
|
1607
1738
|
}
|
|
1608
1739
|
static clearRedirectState(calledBy) {
|
|
1609
1740
|
localStorage.removeItem(MSALStorageKeys.redirectTo);
|
|
1610
|
-
|
|
1741
|
+
LoggingService.info(`msal.app: redirect state cleared. Called by: ${calledBy}`);
|
|
1611
1742
|
}
|
|
1612
1743
|
}
|
|
1613
1744
|
|
|
@@ -1798,7 +1929,7 @@ const PolicyType = {
|
|
|
1798
1929
|
*/
|
|
1799
1930
|
|
|
1800
1931
|
class AuthService extends ApiServiceBase {
|
|
1801
|
-
constructor(http, router, appContext, msalGuardConfig, msalService, msalBroadcastService) {
|
|
1932
|
+
constructor(http, router, appContext, msalGuardConfig, msalService, msalBroadcastService, logger) {
|
|
1802
1933
|
super(http);
|
|
1803
1934
|
this.http = http;
|
|
1804
1935
|
this.router = router;
|
|
@@ -1806,6 +1937,7 @@ class AuthService extends ApiServiceBase {
|
|
|
1806
1937
|
this.msalGuardConfig = msalGuardConfig;
|
|
1807
1938
|
this.msalService = msalService;
|
|
1808
1939
|
this.msalBroadcastService = msalBroadcastService;
|
|
1940
|
+
this.logger = logger;
|
|
1809
1941
|
this.msalDestroying$ = new Subject();
|
|
1810
1942
|
}
|
|
1811
1943
|
ngOnDestroy() {
|
|
@@ -1835,10 +1967,10 @@ class AuthService extends ApiServiceBase {
|
|
|
1835
1967
|
this.resetPasswordPolicy = MSALB2C.getPolicyByType(PolicyType.resetPassword);
|
|
1836
1968
|
this.msalService.handleRedirectObservable().subscribe({
|
|
1837
1969
|
next: (result) => {
|
|
1838
|
-
|
|
1970
|
+
this.logger.info(`iam.msal: handleRedirectObservable`);
|
|
1839
1971
|
},
|
|
1840
1972
|
error: (error) => {
|
|
1841
|
-
|
|
1973
|
+
this.logger.error(error);
|
|
1842
1974
|
}
|
|
1843
1975
|
});
|
|
1844
1976
|
this.msalService.instance.enableAccountStorageEvents();
|
|
@@ -1858,7 +1990,7 @@ class AuthService extends ApiServiceBase {
|
|
|
1858
1990
|
.subscribe((msg) => {
|
|
1859
1991
|
switch (msg.eventType) {
|
|
1860
1992
|
case EventType.INITIALIZE_END:
|
|
1861
|
-
|
|
1993
|
+
this.logger.info(`iam.msal: INITIALIZE_END fired`);
|
|
1862
1994
|
break;
|
|
1863
1995
|
case EventType.ACCOUNT_ADDED:
|
|
1864
1996
|
case EventType.ACCOUNT_REMOVED:
|
|
@@ -1953,13 +2085,13 @@ class AuthService extends ApiServiceBase {
|
|
|
1953
2085
|
* Initial status before interaction occurs
|
|
1954
2086
|
*/
|
|
1955
2087
|
case InteractionStatus.Startup:
|
|
1956
|
-
|
|
2088
|
+
this.logger.info(`iam.msal: InteractionStatus.Startup`);
|
|
1957
2089
|
break;
|
|
1958
2090
|
/**
|
|
1959
2091
|
* Status set when interaction is complete
|
|
1960
2092
|
*/
|
|
1961
2093
|
case InteractionStatus.None:
|
|
1962
|
-
|
|
2094
|
+
this.logger.info(`iam.msal: InteractionStatus.None`);
|
|
1963
2095
|
MSALRedirect.handle(this.router, 'msalBroadcastService.inProgress$ InteractionStatus.None');
|
|
1964
2096
|
this.checkAndSetActiveAccount();
|
|
1965
2097
|
setTimeout(() => {
|
|
@@ -2045,20 +2177,20 @@ class AuthService extends ApiServiceBase {
|
|
|
2045
2177
|
};
|
|
2046
2178
|
}
|
|
2047
2179
|
//Logging
|
|
2048
|
-
|
|
2180
|
+
this.logger.info("iam.msal.sso: SSO in progress");
|
|
2049
2181
|
if (cls) {
|
|
2050
2182
|
QSUtils.clearKey("cls=1", true, true);
|
|
2051
2183
|
}
|
|
2052
2184
|
return this.msalService.ssoSilent(ssoSilentRequest).pipe(map$1(response => {
|
|
2053
2185
|
QSUtils.clearSSO();
|
|
2054
2186
|
//Logging
|
|
2055
|
-
|
|
2187
|
+
this.logger.info("iam.msal.sso: SSO have been successfully done");
|
|
2056
2188
|
return response.accessToken;
|
|
2057
2189
|
}), catchError(error => {
|
|
2058
2190
|
QSUtils.clearSSO();
|
|
2059
2191
|
//Logging
|
|
2060
|
-
|
|
2061
|
-
|
|
2192
|
+
this.logger.info("iam.msal.sso: SSO silent token acquisition failed");
|
|
2193
|
+
this.logger.error(error);
|
|
2062
2194
|
if (error instanceof InteractionRequiredAuthError) {
|
|
2063
2195
|
return this.acquireToken();
|
|
2064
2196
|
}
|
|
@@ -2075,7 +2207,7 @@ class AuthService extends ApiServiceBase {
|
|
|
2075
2207
|
return this.msalService.acquireTokenSilent(silentRequest).pipe(map$1(response => {
|
|
2076
2208
|
return response.accessToken;
|
|
2077
2209
|
}), catchError(error => {
|
|
2078
|
-
|
|
2210
|
+
this.logger.info("iam.msal.sso: Silent token acquisition failed.");
|
|
2079
2211
|
if (error instanceof InteractionRequiredAuthError) {
|
|
2080
2212
|
return this.acquireToken();
|
|
2081
2213
|
}
|
|
@@ -2153,6 +2285,11 @@ class AuthService extends ApiServiceBase {
|
|
|
2153
2285
|
}
|
|
2154
2286
|
}
|
|
2155
2287
|
//MSAL check
|
|
2288
|
+
/*
|
|
2289
|
+
Only checks MSAL's current active account. It does not start login or
|
|
2290
|
+
token acquisition by itself; it only decides whether this request
|
|
2291
|
+
should call getAccessToken() at all.
|
|
2292
|
+
*/
|
|
2156
2293
|
isUserAuthenticated() {
|
|
2157
2294
|
return this.msalService.instance.getActiveAccount() != null;
|
|
2158
2295
|
}
|
|
@@ -2200,7 +2337,7 @@ class AuthService extends ApiServiceBase {
|
|
|
2200
2337
|
};
|
|
2201
2338
|
this.login(resetPasswordFlowRequest);
|
|
2202
2339
|
}
|
|
2203
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthService, deps: [{ token: i1.HttpClient }, { token: i1$1.Router }, { token: AppContextService }, { token: MSAL_GUARD_CONFIG }, { token: i4.MsalService }, { token: i4.MsalBroadcastService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2340
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthService, deps: [{ token: i1.HttpClient }, { token: i1$1.Router }, { token: AppContextService }, { token: MSAL_GUARD_CONFIG }, { token: i4.MsalService }, { token: i4.MsalBroadcastService }, { token: LoggingService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2204
2341
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthService, providedIn: 'root' }); }
|
|
2205
2342
|
}
|
|
2206
2343
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthService, decorators: [{
|
|
@@ -2211,45 +2348,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
2211
2348
|
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i1$1.Router }, { type: AppContextService }, { type: undefined, decorators: [{
|
|
2212
2349
|
type: Inject,
|
|
2213
2350
|
args: [MSAL_GUARD_CONFIG]
|
|
2214
|
-
}] }, { type: i4.MsalService }, { type: i4.MsalBroadcastService }] });
|
|
2215
|
-
|
|
2216
|
-
/*
|
|
2217
|
-
<file>
|
|
2218
|
-
Project:
|
|
2219
|
-
@osovitny/anatoly
|
|
2220
|
-
|
|
2221
|
-
Authors:
|
|
2222
|
-
Vadim Osovitny vadim.osovitny@osovitny.com
|
|
2223
|
-
Anatoly Osovitny anatoly.osovitny@osovitny.com
|
|
2224
|
-
|
|
2225
|
-
Created:
|
|
2226
|
-
26 Jun 2020
|
|
2227
|
-
|
|
2228
|
-
Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
|
|
2229
|
-
</file>
|
|
2230
|
-
*/
|
|
2231
|
-
//Node
|
|
2232
|
-
class LoggingService {
|
|
2233
|
-
constructor() {
|
|
2234
|
-
}
|
|
2235
|
-
info(info) {
|
|
2236
|
-
console.info(info);
|
|
2237
|
-
}
|
|
2238
|
-
warn(info) {
|
|
2239
|
-
console.warn(info);
|
|
2240
|
-
}
|
|
2241
|
-
error(error) {
|
|
2242
|
-
console.error(error);
|
|
2243
|
-
}
|
|
2244
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LoggingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2245
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LoggingService, providedIn: "root" }); }
|
|
2246
|
-
}
|
|
2247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LoggingService, decorators: [{
|
|
2248
|
-
type: Injectable,
|
|
2249
|
-
args: [{
|
|
2250
|
-
providedIn: "root",
|
|
2251
|
-
}]
|
|
2252
|
-
}], ctorParameters: () => [] });
|
|
2351
|
+
}] }, { type: i4.MsalService }, { type: i4.MsalBroadcastService }, { type: LoggingService }] });
|
|
2253
2352
|
|
|
2254
2353
|
/*
|
|
2255
2354
|
<file>
|
|
@@ -2613,7 +2712,7 @@ class AnatolyHttpInterceptor {
|
|
|
2613
2712
|
let requestStarted = false;
|
|
2614
2713
|
let handleRequest = () => {
|
|
2615
2714
|
requestStarted = true;
|
|
2616
|
-
this.onRequestStart(loadingRequired);
|
|
2715
|
+
this.onRequestStart(loadingRequired, req.url);
|
|
2617
2716
|
return this.handleHttpRequest(req, next);
|
|
2618
2717
|
};
|
|
2619
2718
|
if (authorizationTokenRequired) {
|
|
@@ -2629,23 +2728,25 @@ class AnatolyHttpInterceptor {
|
|
|
2629
2728
|
}
|
|
2630
2729
|
return request$.pipe(finalize(() => {
|
|
2631
2730
|
if (requestStarted) {
|
|
2632
|
-
this.onRequestEnd(loadingRequired);
|
|
2731
|
+
this.onRequestEnd(loadingRequired, req.url);
|
|
2633
2732
|
}
|
|
2634
2733
|
}));
|
|
2635
2734
|
}
|
|
2636
2735
|
catch (err) {
|
|
2637
2736
|
this.logger.error("An error occurred: " + err);
|
|
2638
|
-
this.onRequestEnd(loadingRequired);
|
|
2737
|
+
this.onRequestEnd(loadingRequired, req.url);
|
|
2639
2738
|
}
|
|
2640
2739
|
}
|
|
2641
2740
|
//Events
|
|
2642
|
-
onRequestStart(loadingRequired) {
|
|
2741
|
+
onRequestStart(loadingRequired, url) {
|
|
2643
2742
|
if (loadingRequired) {
|
|
2743
|
+
this.logger.info(this.logger.getEventName('loading.show'), url);
|
|
2644
2744
|
this.loadingService.show();
|
|
2645
2745
|
}
|
|
2646
2746
|
}
|
|
2647
|
-
onRequestEnd(loadingRequired) {
|
|
2747
|
+
onRequestEnd(loadingRequired, url) {
|
|
2648
2748
|
if (loadingRequired) {
|
|
2749
|
+
this.logger.info(this.logger.getEventName('loading.hide'), url);
|
|
2649
2750
|
this.loadingService.hide();
|
|
2650
2751
|
}
|
|
2651
2752
|
}
|
|
@@ -2812,8 +2913,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
2812
2913
|
*/
|
|
2813
2914
|
//Node
|
|
2814
2915
|
class LocalizationService {
|
|
2815
|
-
constructor(translate) {
|
|
2916
|
+
constructor(translate, logger) {
|
|
2816
2917
|
this.translate = translate;
|
|
2918
|
+
this.logger = logger;
|
|
2817
2919
|
this.subs = new Subs();
|
|
2818
2920
|
//i10n
|
|
2819
2921
|
this.supportedLanguages = ['en', 'ru', 'es'];
|
|
@@ -2841,7 +2943,7 @@ class LocalizationService {
|
|
|
2841
2943
|
//dates
|
|
2842
2944
|
this.dateFnsLocale = { locale: enUS };
|
|
2843
2945
|
this.subs.sink = this.translate.onLangChange.subscribe((event) => {
|
|
2844
|
-
|
|
2946
|
+
this.logger.info('Language Changed');
|
|
2845
2947
|
this.langchange.emit(event.lang);
|
|
2846
2948
|
});
|
|
2847
2949
|
}
|
|
@@ -2933,7 +3035,7 @@ class LocalizationService {
|
|
|
2933
3035
|
}
|
|
2934
3036
|
return formatDistanceToNow(d, this.dateFnsLocale);
|
|
2935
3037
|
}
|
|
2936
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LocalizationService, deps: [{ token: i1$3.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3038
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LocalizationService, deps: [{ token: i1$3.TranslateService }, { token: LoggingService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2937
3039
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LocalizationService, providedIn: 'root' }); }
|
|
2938
3040
|
}
|
|
2939
3041
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LocalizationService, decorators: [{
|
|
@@ -2941,7 +3043,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
2941
3043
|
args: [{
|
|
2942
3044
|
providedIn: 'root'
|
|
2943
3045
|
}]
|
|
2944
|
-
}], ctorParameters: () => [{ type: i1$3.TranslateService }], propDecorators: { langchange: [{
|
|
3046
|
+
}], ctorParameters: () => [{ type: i1$3.TranslateService }, { type: LoggingService }], propDecorators: { langchange: [{
|
|
2945
3047
|
type: Output
|
|
2946
3048
|
}] } });
|
|
2947
3049
|
|
|
@@ -3600,8 +3702,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
3600
3702
|
*/
|
|
3601
3703
|
//Node
|
|
3602
3704
|
class GoogleAnalyticsService {
|
|
3603
|
-
constructor(router) {
|
|
3705
|
+
constructor(router, logger) {
|
|
3604
3706
|
this.router = router;
|
|
3707
|
+
this.logger = logger;
|
|
3605
3708
|
}
|
|
3606
3709
|
subscribe() {
|
|
3607
3710
|
this.subscription = this.router.events.subscribe({
|
|
@@ -3633,19 +3736,19 @@ class GoogleAnalyticsService {
|
|
|
3633
3736
|
}
|
|
3634
3737
|
}
|
|
3635
3738
|
catch (err) {
|
|
3636
|
-
|
|
3739
|
+
this.logger.error('Google Analytics event error', err);
|
|
3637
3740
|
}
|
|
3638
3741
|
}
|
|
3639
3742
|
get ga() {
|
|
3640
3743
|
let ga = window.gtag;
|
|
3641
3744
|
return ga;
|
|
3642
3745
|
}
|
|
3643
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: GoogleAnalyticsService, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3746
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: GoogleAnalyticsService, deps: [{ token: i1$1.Router }, { token: LoggingService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3644
3747
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: GoogleAnalyticsService }); }
|
|
3645
3748
|
}
|
|
3646
3749
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: GoogleAnalyticsService, decorators: [{
|
|
3647
3750
|
type: Injectable
|
|
3648
|
-
}], ctorParameters: () => [{ type: i1$1.Router }] });
|
|
3751
|
+
}], ctorParameters: () => [{ type: i1$1.Router }, { type: LoggingService }] });
|
|
3649
3752
|
|
|
3650
3753
|
/*
|
|
3651
3754
|
<file>
|
|
@@ -4006,6 +4109,7 @@ class DOM {
|
|
|
4006
4109
|
Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
|
|
4007
4110
|
</file>
|
|
4008
4111
|
*/
|
|
4112
|
+
//App
|
|
4009
4113
|
class QSUtils {
|
|
4010
4114
|
static getValue(url, name) {
|
|
4011
4115
|
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
|
|
@@ -4046,7 +4150,7 @@ class QSUtils {
|
|
|
4046
4150
|
}
|
|
4047
4151
|
if (newURL && reload) {
|
|
4048
4152
|
if (clearStorage) {
|
|
4049
|
-
|
|
4153
|
+
LoggingService.info("Clearing Storage");
|
|
4050
4154
|
localStorage.clear();
|
|
4051
4155
|
sessionStorage.clear();
|
|
4052
4156
|
}
|
|
@@ -5572,10 +5676,11 @@ class PayPalComponent {
|
|
|
5572
5676
|
set payPalButtonContainer(content) {
|
|
5573
5677
|
this.payPalButtonContainerElem = content;
|
|
5574
5678
|
}
|
|
5575
|
-
constructor(paypalScriptService, cdr, ngZone) {
|
|
5679
|
+
constructor(paypalScriptService, cdr, ngZone, logger) {
|
|
5576
5680
|
this.paypalScriptService = paypalScriptService;
|
|
5577
5681
|
this.cdr = cdr;
|
|
5578
5682
|
this.ngZone = ngZone;
|
|
5683
|
+
this.logger = logger;
|
|
5579
5684
|
/**
|
|
5580
5685
|
* If enabled, paypal SDK script will be loaded. Useful if you want to have multiple PayPal components on the same page
|
|
5581
5686
|
* sharing base configuration. In such a case only a single component may register script.
|
|
@@ -5637,7 +5742,7 @@ class PayPalComponent {
|
|
|
5637
5742
|
}
|
|
5638
5743
|
}
|
|
5639
5744
|
catch (error) {
|
|
5640
|
-
|
|
5745
|
+
this.logger.error(error);
|
|
5641
5746
|
}
|
|
5642
5747
|
}
|
|
5643
5748
|
this.cdr.detectChanges();
|
|
@@ -5833,7 +5938,7 @@ class PayPalComponent {
|
|
|
5833
5938
|
return (c == "x" ? r : (r & 0x7) | 0x8).toString(16);
|
|
5834
5939
|
});
|
|
5835
5940
|
}
|
|
5836
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: PayPalComponent, deps: [{ token: PayPalScriptService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5941
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: PayPalComponent, deps: [{ token: PayPalScriptService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: LoggingService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5837
5942
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.15", type: PayPalComponent, isStandalone: false, selector: "anatoly-billing-paypal-container", inputs: { config: "config", registerScript: "registerScript" }, outputs: { scriptLoaded: "scriptLoaded" }, viewQueries: [{ propertyName: "payPalButtonContainer", first: true, predicate: ["payPalButtonContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
5838
5943
|
<div #payPalButtonContainer [id]="payPalButtonContainerId"></div>
|
|
5839
5944
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -5848,7 +5953,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
5848
5953
|
`,
|
|
5849
5954
|
standalone: false
|
|
5850
5955
|
}]
|
|
5851
|
-
}], ctorParameters: () => [{ type: PayPalScriptService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { config: [{
|
|
5956
|
+
}], ctorParameters: () => [{ type: PayPalScriptService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: LoggingService }], propDecorators: { config: [{
|
|
5852
5957
|
type: Input
|
|
5853
5958
|
}], registerScript: [{
|
|
5854
5959
|
type: Input
|
|
@@ -9219,16 +9324,16 @@ function loggerCallback(logLevel, message, containsPii) {
|
|
|
9219
9324
|
}
|
|
9220
9325
|
switch (logLevel) {
|
|
9221
9326
|
case LogLevel.Error:
|
|
9222
|
-
|
|
9327
|
+
LoggingService.error(message);
|
|
9223
9328
|
return;
|
|
9224
9329
|
case LogLevel.Info:
|
|
9225
|
-
|
|
9330
|
+
LoggingService.info(message);
|
|
9226
9331
|
return;
|
|
9227
9332
|
case LogLevel.Verbose:
|
|
9228
|
-
|
|
9333
|
+
LoggingService.debug(message);
|
|
9229
9334
|
return;
|
|
9230
9335
|
case LogLevel.Warning:
|
|
9231
|
-
|
|
9336
|
+
LoggingService.warn(message);
|
|
9232
9337
|
return;
|
|
9233
9338
|
}
|
|
9234
9339
|
}
|
|
@@ -10137,5 +10242,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
10137
10242
|
* Generated bundle index. Do not edit.
|
|
10138
10243
|
*/
|
|
10139
10244
|
|
|
10140
|
-
export { AReplacerDirective, AddressComponent, AdminGuard, Alerts, AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyIAMModule, AnatolyIAMPagesModule, AnatolyModule, AnatolyUIModule, ApiServiceBase, ApiUrl, AppContextService, AppCoreSettings, AppName, AppVersion, AppsGoServiceBase, AssetGroupType, AuthService, AuthenticationGuard, BillingService, BillingUtils, BraintreeDialog, BrowserService, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckIconComponent, ClientApps, CompanyComponent, ComponentBase, ContactUsDialog, ContactUsForm, ControlPanelComponent, Convert, Copy2ClipboardComponent, CoreApiService, CountryDropdownlist, CurrenciesApiService, CurrenciesStorageService, DOM, DataPagerComponent, DataViewType, DateConvert, DefaultEditorOptions, DialogBase, DigitalMarketingService, DiscountCodeStatus, DiscountCodeType, EditComponentBase, EditPageBase, EmailsApiService, EnumEditComponentBase, FeatureWillBeReadyComponent, FileSizePipe, FormValidationSummaryComponent, GABillingEvents, GAEvents, GlobalErrorHandler, GoServiceBase, GoogleAnalyticsService, GridEditServiceBase, GridReadServiceBase, Guid, HoveringDirective, HtmlEditorComponent, HtmlEditorComponentBase, IdleService, ImageReplacerDirective, InjectorInstance$1 as InjectorInstance, IsDevMode, IsProdMode, ItemValidationSummaryComponent, L10nUtils, LanguageDropdownlist, LibName, ListBase, LoadingComponent, LoadingService, LocalStorageService, LocalizationModule, LocalizationService, LocalizePipe, LoggingService, MSALUtils, Message2User, Message2UserComponent, Message2UserService, Mode, ModerationStatus, ModerationStatusDropdownlist, NativeElementDirective, NoMobileSupportComponent, NodataComponent, NotificationService, OrderSummaryComponent, PageBase, PageSpinnerComponent, PagedPageBase, PayPalComponent, PayPalScriptService, PaymentMethod, PaymentMethodsComponent, PaymentOptionsComponent, PaymentStage, PaymentType, PaymentsApiService, PaymentsService, PaypalButtonComponent, PaypalSubscribeButtonComponent, PromoCodesApiService, PublishStatus, PublishStatusDropdownlist, QSUtils, ReplaceTextPipe, SafeHtmlPipe, ScriptService, ServiceBase, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, StarterGuard, StarterService, Stopwatch, StripeDialog, Subs, SubscribePlanButtonComponent, SubscriptionProvider, SubscriptionsApiService, TimezoneDropdownlist, TransactionsApiService, UrlSlugComponent, Utils, ValidationSummaryComponent, XmlFormatter, YouAgreeToOurTermsComponent, dateFormats, dateTimeFormats, formatAssetsUrl, formatUrl, getAppCoreSettings, getAppSettingsById, getAppSettingsByName, getCurrentApp, getLocalizationInjector, is, resetAppCoreSettings, throwIfAlreadyLoaded, timeFormats, translateLoaderFactory };
|
|
10245
|
+
export { AReplacerDirective, AddressComponent, AdminGuard, Alerts, AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyIAMModule, AnatolyIAMPagesModule, AnatolyLogLevel, AnatolyModule, AnatolyUIModule, ApiServiceBase, ApiUrl, AppContextService, AppCoreSettings, AppName, AppVersion, AppsGoServiceBase, AssetGroupType, AuthService, AuthenticationGuard, BillingService, BillingUtils, BraintreeDialog, BrowserService, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckIconComponent, ClientApps, CompanyComponent, ComponentBase, ContactUsDialog, ContactUsForm, ControlPanelComponent, Convert, Copy2ClipboardComponent, CoreApiService, CountryDropdownlist, CurrenciesApiService, CurrenciesStorageService, DOM, DataPagerComponent, DataViewType, DateConvert, DefaultEditorOptions, DialogBase, DigitalMarketingService, DiscountCodeStatus, DiscountCodeType, EditComponentBase, EditPageBase, EmailsApiService, EnumEditComponentBase, FeatureWillBeReadyComponent, FileSizePipe, FormValidationSummaryComponent, GABillingEvents, GAEvents, GlobalErrorHandler, GoServiceBase, GoogleAnalyticsService, GridEditServiceBase, GridReadServiceBase, Guid, HoveringDirective, HtmlEditorComponent, HtmlEditorComponentBase, IdleService, ImageReplacerDirective, InjectorInstance$1 as InjectorInstance, IsDevMode, IsProdMode, ItemValidationSummaryComponent, L10nUtils, LanguageDropdownlist, LibName, ListBase, LoadingComponent, LoadingService, LocalStorageService, LocalizationModule, LocalizationService, LocalizePipe, LoggingService, MSALUtils, Message2User, Message2UserComponent, Message2UserService, Mode, ModerationStatus, ModerationStatusDropdownlist, NativeElementDirective, NoMobileSupportComponent, NodataComponent, NotificationService, OrderSummaryComponent, PageBase, PageSpinnerComponent, PagedPageBase, PayPalComponent, PayPalScriptService, PaymentMethod, PaymentMethodsComponent, PaymentOptionsComponent, PaymentStage, PaymentType, PaymentsApiService, PaymentsService, PaypalButtonComponent, PaypalSubscribeButtonComponent, PromoCodesApiService, PublishStatus, PublishStatusDropdownlist, QSUtils, ReplaceTextPipe, SafeHtmlPipe, ScriptService, ServiceBase, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, StarterGuard, StarterService, Stopwatch, StripeDialog, Subs, SubscribePlanButtonComponent, SubscriptionProvider, SubscriptionsApiService, TimezoneDropdownlist, TransactionsApiService, UrlSlugComponent, Utils, ValidationSummaryComponent, XmlFormatter, YouAgreeToOurTermsComponent, dateFormats, dateTimeFormats, formatAssetsUrl, formatUrl, getAppCoreSettings, getAppSettingsById, getAppSettingsByName, getCurrentApp, getLocalizationInjector, is, resetAppCoreSettings, throwIfAlreadyLoaded, timeFormats, translateLoaderFactory };
|
|
10141
10246
|
//# sourceMappingURL=osovitny-anatoly.mjs.map
|