@osovitny/anatoly 3.21.32 → 3.21.34
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,128 @@ 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
|
+
constructor() {
|
|
317
|
+
}
|
|
318
|
+
static getConfiguredLogLevel() {
|
|
319
|
+
const appCoreSettings = AppCoreSettings;
|
|
320
|
+
const configuredValue = appCoreSettings?.logging?.logLevel?.default
|
|
321
|
+
?? appCoreSettings?.logging?.logLevel?.Default
|
|
322
|
+
?? appCoreSettings?.logging?.logLevel
|
|
323
|
+
?? appCoreSettings?.logging?.default
|
|
324
|
+
?? appCoreSettings?.logging?.Default
|
|
325
|
+
?? appCoreSettings?.diagnostics?.logLevel
|
|
326
|
+
?? appCoreSettings?.logLevel
|
|
327
|
+
?? LoggingService.getMsalLogLevel();
|
|
328
|
+
return LoggingService.toLogLevel(configuredValue);
|
|
329
|
+
}
|
|
330
|
+
static getMsalLogLevel() {
|
|
331
|
+
try {
|
|
332
|
+
const json = sessionStorage.getItem(SessionStorageKeys.appMSALSettings);
|
|
333
|
+
return json ? JSON.parse(json)?.app?.system?.loggerOptions?.logLevel : null;
|
|
334
|
+
}
|
|
335
|
+
catch {
|
|
336
|
+
return null;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
static toLogLevel(value) {
|
|
340
|
+
if (value === null || typeof value === 'undefined') {
|
|
341
|
+
return AnatolyLogLevel.Off;
|
|
342
|
+
}
|
|
343
|
+
if (typeof value === 'number') {
|
|
344
|
+
return value;
|
|
345
|
+
}
|
|
346
|
+
const normalized = `${value}`.toLowerCase();
|
|
347
|
+
switch (normalized) {
|
|
348
|
+
case '0':
|
|
349
|
+
case 'error':
|
|
350
|
+
return AnatolyLogLevel.Error;
|
|
351
|
+
case '1':
|
|
352
|
+
case 'warn':
|
|
353
|
+
case 'warning':
|
|
354
|
+
return AnatolyLogLevel.Warning;
|
|
355
|
+
case '2':
|
|
356
|
+
case 'info':
|
|
357
|
+
case 'information':
|
|
358
|
+
return AnatolyLogLevel.Info;
|
|
359
|
+
case '3':
|
|
360
|
+
case 'debug':
|
|
361
|
+
case 'trace':
|
|
362
|
+
case 'verbose':
|
|
363
|
+
return AnatolyLogLevel.Verbose;
|
|
364
|
+
default:
|
|
365
|
+
return AnatolyLogLevel.Off;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
static shouldLog(level) {
|
|
369
|
+
return LoggingService.getConfiguredLogLevel() >= level;
|
|
370
|
+
}
|
|
371
|
+
static debug(info, ...optionalParams) {
|
|
372
|
+
if (LoggingService.shouldLog(AnatolyLogLevel.Verbose)) {
|
|
373
|
+
console.debug(info, ...optionalParams);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
static info(info, ...optionalParams) {
|
|
377
|
+
if (LoggingService.shouldLog(AnatolyLogLevel.Info)) {
|
|
378
|
+
console.info(info, ...optionalParams);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
static warn(info, ...optionalParams) {
|
|
382
|
+
if (LoggingService.shouldLog(AnatolyLogLevel.Warning)) {
|
|
383
|
+
console.warn(info, ...optionalParams);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
static error(error, ...optionalParams) {
|
|
387
|
+
if (LoggingService.shouldLog(AnatolyLogLevel.Error)) {
|
|
388
|
+
console.error(error, ...optionalParams);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
debug(info, ...optionalParams) {
|
|
392
|
+
LoggingService.debug(info, ...optionalParams);
|
|
393
|
+
}
|
|
394
|
+
info(info, ...optionalParams) {
|
|
395
|
+
LoggingService.info(info, ...optionalParams);
|
|
396
|
+
}
|
|
397
|
+
warn(info, ...optionalParams) {
|
|
398
|
+
LoggingService.warn(info, ...optionalParams);
|
|
399
|
+
}
|
|
400
|
+
error(error, ...optionalParams) {
|
|
401
|
+
LoggingService.error(error, ...optionalParams);
|
|
402
|
+
}
|
|
403
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LoggingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
404
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LoggingService, providedIn: "root" }); }
|
|
405
|
+
}
|
|
406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LoggingService, decorators: [{
|
|
407
|
+
type: Injectable,
|
|
408
|
+
args: [{
|
|
409
|
+
providedIn: "root",
|
|
410
|
+
}]
|
|
411
|
+
}], ctorParameters: () => [] });
|
|
412
|
+
|
|
291
413
|
/*
|
|
292
414
|
<file>
|
|
293
415
|
Project:
|
|
@@ -303,6 +425,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
303
425
|
Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
|
|
304
426
|
</file>
|
|
305
427
|
*/
|
|
428
|
+
//App
|
|
306
429
|
class Stopwatch {
|
|
307
430
|
constructor(name) {
|
|
308
431
|
this.name = name;
|
|
@@ -310,7 +433,7 @@ class Stopwatch {
|
|
|
310
433
|
this.stopTime = 0;
|
|
311
434
|
this.running = false;
|
|
312
435
|
this.performance = !!window.performance;
|
|
313
|
-
|
|
436
|
+
LoggingService.info(this.name + ' started.');
|
|
314
437
|
}
|
|
315
438
|
currentTime() {
|
|
316
439
|
return this.performance ? window.performance.now() : new Date().getTime();
|
|
@@ -334,7 +457,7 @@ class Stopwatch {
|
|
|
334
457
|
}
|
|
335
458
|
printElapsedAsMilliseconds() {
|
|
336
459
|
let elapsed = this.getElapsedMilliseconds();
|
|
337
|
-
|
|
460
|
+
LoggingService.info(`${this.name} stopped. Execution time: ${elapsed} ms`);
|
|
338
461
|
}
|
|
339
462
|
}
|
|
340
463
|
|
|
@@ -1575,6 +1698,7 @@ class Guid {
|
|
|
1575
1698
|
Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
|
|
1576
1699
|
</file>
|
|
1577
1700
|
*/
|
|
1701
|
+
//App
|
|
1578
1702
|
const MSALStorageKeys = {
|
|
1579
1703
|
//LocalStorage
|
|
1580
1704
|
redirectTo: 'msal.app.redirectTo'
|
|
@@ -1594,11 +1718,11 @@ class MSALStorage {
|
|
|
1594
1718
|
return;
|
|
1595
1719
|
}
|
|
1596
1720
|
localStorage.setItem(MSALStorageKeys.redirectTo, redirectTo);
|
|
1597
|
-
|
|
1721
|
+
LoggingService.info(`msal.app: redirect state saved: ${redirectTo}. Called by: ${calledBy}`);
|
|
1598
1722
|
}
|
|
1599
1723
|
static getRedirectState(calledBy) {
|
|
1600
1724
|
let redirectTo = localStorage.getItem(MSALStorageKeys.redirectTo);
|
|
1601
|
-
|
|
1725
|
+
LoggingService.info(`msal.app: redirect state requested: ${redirectTo}. Called by: ${calledBy}`);
|
|
1602
1726
|
if (!MSALStorage.hasRedirectValue(redirectTo)) {
|
|
1603
1727
|
MSALStorage.clearRedirectState(calledBy);
|
|
1604
1728
|
return null;
|
|
@@ -1607,7 +1731,7 @@ class MSALStorage {
|
|
|
1607
1731
|
}
|
|
1608
1732
|
static clearRedirectState(calledBy) {
|
|
1609
1733
|
localStorage.removeItem(MSALStorageKeys.redirectTo);
|
|
1610
|
-
|
|
1734
|
+
LoggingService.info(`msal.app: redirect state cleared. Called by: ${calledBy}`);
|
|
1611
1735
|
}
|
|
1612
1736
|
}
|
|
1613
1737
|
|
|
@@ -1798,7 +1922,7 @@ const PolicyType = {
|
|
|
1798
1922
|
*/
|
|
1799
1923
|
|
|
1800
1924
|
class AuthService extends ApiServiceBase {
|
|
1801
|
-
constructor(http, router, appContext, msalGuardConfig, msalService, msalBroadcastService) {
|
|
1925
|
+
constructor(http, router, appContext, msalGuardConfig, msalService, msalBroadcastService, logger) {
|
|
1802
1926
|
super(http);
|
|
1803
1927
|
this.http = http;
|
|
1804
1928
|
this.router = router;
|
|
@@ -1806,6 +1930,7 @@ class AuthService extends ApiServiceBase {
|
|
|
1806
1930
|
this.msalGuardConfig = msalGuardConfig;
|
|
1807
1931
|
this.msalService = msalService;
|
|
1808
1932
|
this.msalBroadcastService = msalBroadcastService;
|
|
1933
|
+
this.logger = logger;
|
|
1809
1934
|
this.msalDestroying$ = new Subject();
|
|
1810
1935
|
}
|
|
1811
1936
|
ngOnDestroy() {
|
|
@@ -1835,10 +1960,10 @@ class AuthService extends ApiServiceBase {
|
|
|
1835
1960
|
this.resetPasswordPolicy = MSALB2C.getPolicyByType(PolicyType.resetPassword);
|
|
1836
1961
|
this.msalService.handleRedirectObservable().subscribe({
|
|
1837
1962
|
next: (result) => {
|
|
1838
|
-
|
|
1963
|
+
this.logger.info(`iam.msal: handleRedirectObservable`);
|
|
1839
1964
|
},
|
|
1840
1965
|
error: (error) => {
|
|
1841
|
-
|
|
1966
|
+
this.logger.error(error);
|
|
1842
1967
|
}
|
|
1843
1968
|
});
|
|
1844
1969
|
this.msalService.instance.enableAccountStorageEvents();
|
|
@@ -1858,7 +1983,7 @@ class AuthService extends ApiServiceBase {
|
|
|
1858
1983
|
.subscribe((msg) => {
|
|
1859
1984
|
switch (msg.eventType) {
|
|
1860
1985
|
case EventType.INITIALIZE_END:
|
|
1861
|
-
|
|
1986
|
+
this.logger.info(`iam.msal: INITIALIZE_END fired`);
|
|
1862
1987
|
break;
|
|
1863
1988
|
case EventType.ACCOUNT_ADDED:
|
|
1864
1989
|
case EventType.ACCOUNT_REMOVED:
|
|
@@ -1953,13 +2078,13 @@ class AuthService extends ApiServiceBase {
|
|
|
1953
2078
|
* Initial status before interaction occurs
|
|
1954
2079
|
*/
|
|
1955
2080
|
case InteractionStatus.Startup:
|
|
1956
|
-
|
|
2081
|
+
this.logger.info(`iam.msal: InteractionStatus.Startup`);
|
|
1957
2082
|
break;
|
|
1958
2083
|
/**
|
|
1959
2084
|
* Status set when interaction is complete
|
|
1960
2085
|
*/
|
|
1961
2086
|
case InteractionStatus.None:
|
|
1962
|
-
|
|
2087
|
+
this.logger.info(`iam.msal: InteractionStatus.None`);
|
|
1963
2088
|
MSALRedirect.handle(this.router, 'msalBroadcastService.inProgress$ InteractionStatus.None');
|
|
1964
2089
|
this.checkAndSetActiveAccount();
|
|
1965
2090
|
setTimeout(() => {
|
|
@@ -2045,20 +2170,20 @@ class AuthService extends ApiServiceBase {
|
|
|
2045
2170
|
};
|
|
2046
2171
|
}
|
|
2047
2172
|
//Logging
|
|
2048
|
-
|
|
2173
|
+
this.logger.info("iam.msal.sso: SSO in progress");
|
|
2049
2174
|
if (cls) {
|
|
2050
2175
|
QSUtils.clearKey("cls=1", true, true);
|
|
2051
2176
|
}
|
|
2052
2177
|
return this.msalService.ssoSilent(ssoSilentRequest).pipe(map$1(response => {
|
|
2053
2178
|
QSUtils.clearSSO();
|
|
2054
2179
|
//Logging
|
|
2055
|
-
|
|
2180
|
+
this.logger.info("iam.msal.sso: SSO have been successfully done");
|
|
2056
2181
|
return response.accessToken;
|
|
2057
2182
|
}), catchError(error => {
|
|
2058
2183
|
QSUtils.clearSSO();
|
|
2059
2184
|
//Logging
|
|
2060
|
-
|
|
2061
|
-
|
|
2185
|
+
this.logger.info("iam.msal.sso: SSO silent token acquisition failed");
|
|
2186
|
+
this.logger.error(error);
|
|
2062
2187
|
if (error instanceof InteractionRequiredAuthError) {
|
|
2063
2188
|
return this.acquireToken();
|
|
2064
2189
|
}
|
|
@@ -2075,7 +2200,7 @@ class AuthService extends ApiServiceBase {
|
|
|
2075
2200
|
return this.msalService.acquireTokenSilent(silentRequest).pipe(map$1(response => {
|
|
2076
2201
|
return response.accessToken;
|
|
2077
2202
|
}), catchError(error => {
|
|
2078
|
-
|
|
2203
|
+
this.logger.info("iam.msal.sso: Silent token acquisition failed.");
|
|
2079
2204
|
if (error instanceof InteractionRequiredAuthError) {
|
|
2080
2205
|
return this.acquireToken();
|
|
2081
2206
|
}
|
|
@@ -2153,6 +2278,11 @@ class AuthService extends ApiServiceBase {
|
|
|
2153
2278
|
}
|
|
2154
2279
|
}
|
|
2155
2280
|
//MSAL check
|
|
2281
|
+
/*
|
|
2282
|
+
Only checks MSAL's current active account. It does not start login or
|
|
2283
|
+
token acquisition by itself; it only decides whether this request
|
|
2284
|
+
should call getAccessToken() at all.
|
|
2285
|
+
*/
|
|
2156
2286
|
isUserAuthenticated() {
|
|
2157
2287
|
return this.msalService.instance.getActiveAccount() != null;
|
|
2158
2288
|
}
|
|
@@ -2200,7 +2330,7 @@ class AuthService extends ApiServiceBase {
|
|
|
2200
2330
|
};
|
|
2201
2331
|
this.login(resetPasswordFlowRequest);
|
|
2202
2332
|
}
|
|
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 }); }
|
|
2333
|
+
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
2334
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthService, providedIn: 'root' }); }
|
|
2205
2335
|
}
|
|
2206
2336
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthService, decorators: [{
|
|
@@ -2211,45 +2341,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
2211
2341
|
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i1$1.Router }, { type: AppContextService }, { type: undefined, decorators: [{
|
|
2212
2342
|
type: Inject,
|
|
2213
2343
|
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: () => [] });
|
|
2344
|
+
}] }, { type: i4.MsalService }, { type: i4.MsalBroadcastService }, { type: LoggingService }] });
|
|
2253
2345
|
|
|
2254
2346
|
/*
|
|
2255
2347
|
<file>
|
|
@@ -2579,7 +2671,8 @@ class AnatolyHttpInterceptor {
|
|
|
2579
2671
|
}
|
|
2580
2672
|
}
|
|
2581
2673
|
//4. getCurrentContext
|
|
2582
|
-
if (
|
|
2674
|
+
if (lowerCaseUrl.indexOf('getcurrentcontext') > -1) {
|
|
2675
|
+
// Only checks MSAL's current active account. It does not start login or token acquisition by itself; it only decides whether this request should call getAccessToken() at all.
|
|
2583
2676
|
authorizationTokenRequired = this.authService.isUserAuthenticated();
|
|
2584
2677
|
}
|
|
2585
2678
|
// Change Url if need it -------------------------------------------->
|
|
@@ -2612,7 +2705,7 @@ class AnatolyHttpInterceptor {
|
|
|
2612
2705
|
let requestStarted = false;
|
|
2613
2706
|
let handleRequest = () => {
|
|
2614
2707
|
requestStarted = true;
|
|
2615
|
-
this.onRequestStart(loadingRequired);
|
|
2708
|
+
this.onRequestStart(loadingRequired, req.url);
|
|
2616
2709
|
return this.handleHttpRequest(req, next);
|
|
2617
2710
|
};
|
|
2618
2711
|
if (authorizationTokenRequired) {
|
|
@@ -2628,23 +2721,25 @@ class AnatolyHttpInterceptor {
|
|
|
2628
2721
|
}
|
|
2629
2722
|
return request$.pipe(finalize(() => {
|
|
2630
2723
|
if (requestStarted) {
|
|
2631
|
-
this.onRequestEnd(loadingRequired);
|
|
2724
|
+
this.onRequestEnd(loadingRequired, req.url);
|
|
2632
2725
|
}
|
|
2633
2726
|
}));
|
|
2634
2727
|
}
|
|
2635
2728
|
catch (err) {
|
|
2636
2729
|
this.logger.error("An error occurred: " + err);
|
|
2637
|
-
this.onRequestEnd(loadingRequired);
|
|
2730
|
+
this.onRequestEnd(loadingRequired, req.url);
|
|
2638
2731
|
}
|
|
2639
2732
|
}
|
|
2640
2733
|
//Events
|
|
2641
|
-
onRequestStart(loadingRequired) {
|
|
2734
|
+
onRequestStart(loadingRequired, url) {
|
|
2642
2735
|
if (loadingRequired) {
|
|
2736
|
+
this.logger.info('@osovitny/anatoly.loading.show', url);
|
|
2643
2737
|
this.loadingService.show();
|
|
2644
2738
|
}
|
|
2645
2739
|
}
|
|
2646
|
-
onRequestEnd(loadingRequired) {
|
|
2740
|
+
onRequestEnd(loadingRequired, url) {
|
|
2647
2741
|
if (loadingRequired) {
|
|
2742
|
+
this.logger.info('@osovitny/anatoly.loading.hide', url);
|
|
2648
2743
|
this.loadingService.hide();
|
|
2649
2744
|
}
|
|
2650
2745
|
}
|
|
@@ -2811,8 +2906,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
2811
2906
|
*/
|
|
2812
2907
|
//Node
|
|
2813
2908
|
class LocalizationService {
|
|
2814
|
-
constructor(translate) {
|
|
2909
|
+
constructor(translate, logger) {
|
|
2815
2910
|
this.translate = translate;
|
|
2911
|
+
this.logger = logger;
|
|
2816
2912
|
this.subs = new Subs();
|
|
2817
2913
|
//i10n
|
|
2818
2914
|
this.supportedLanguages = ['en', 'ru', 'es'];
|
|
@@ -2840,7 +2936,7 @@ class LocalizationService {
|
|
|
2840
2936
|
//dates
|
|
2841
2937
|
this.dateFnsLocale = { locale: enUS };
|
|
2842
2938
|
this.subs.sink = this.translate.onLangChange.subscribe((event) => {
|
|
2843
|
-
|
|
2939
|
+
this.logger.info('Language Changed');
|
|
2844
2940
|
this.langchange.emit(event.lang);
|
|
2845
2941
|
});
|
|
2846
2942
|
}
|
|
@@ -2932,7 +3028,7 @@ class LocalizationService {
|
|
|
2932
3028
|
}
|
|
2933
3029
|
return formatDistanceToNow(d, this.dateFnsLocale);
|
|
2934
3030
|
}
|
|
2935
|
-
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 }); }
|
|
3031
|
+
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 }); }
|
|
2936
3032
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LocalizationService, providedIn: 'root' }); }
|
|
2937
3033
|
}
|
|
2938
3034
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LocalizationService, decorators: [{
|
|
@@ -2940,7 +3036,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
2940
3036
|
args: [{
|
|
2941
3037
|
providedIn: 'root'
|
|
2942
3038
|
}]
|
|
2943
|
-
}], ctorParameters: () => [{ type: i1$3.TranslateService }], propDecorators: { langchange: [{
|
|
3039
|
+
}], ctorParameters: () => [{ type: i1$3.TranslateService }, { type: LoggingService }], propDecorators: { langchange: [{
|
|
2944
3040
|
type: Output
|
|
2945
3041
|
}] } });
|
|
2946
3042
|
|
|
@@ -3599,8 +3695,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
3599
3695
|
*/
|
|
3600
3696
|
//Node
|
|
3601
3697
|
class GoogleAnalyticsService {
|
|
3602
|
-
constructor(router) {
|
|
3698
|
+
constructor(router, logger) {
|
|
3603
3699
|
this.router = router;
|
|
3700
|
+
this.logger = logger;
|
|
3604
3701
|
}
|
|
3605
3702
|
subscribe() {
|
|
3606
3703
|
this.subscription = this.router.events.subscribe({
|
|
@@ -3632,19 +3729,19 @@ class GoogleAnalyticsService {
|
|
|
3632
3729
|
}
|
|
3633
3730
|
}
|
|
3634
3731
|
catch (err) {
|
|
3635
|
-
|
|
3732
|
+
this.logger.error('Google Analytics event error', err);
|
|
3636
3733
|
}
|
|
3637
3734
|
}
|
|
3638
3735
|
get ga() {
|
|
3639
3736
|
let ga = window.gtag;
|
|
3640
3737
|
return ga;
|
|
3641
3738
|
}
|
|
3642
|
-
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 }); }
|
|
3739
|
+
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 }); }
|
|
3643
3740
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: GoogleAnalyticsService }); }
|
|
3644
3741
|
}
|
|
3645
3742
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: GoogleAnalyticsService, decorators: [{
|
|
3646
3743
|
type: Injectable
|
|
3647
|
-
}], ctorParameters: () => [{ type: i1$1.Router }] });
|
|
3744
|
+
}], ctorParameters: () => [{ type: i1$1.Router }, { type: LoggingService }] });
|
|
3648
3745
|
|
|
3649
3746
|
/*
|
|
3650
3747
|
<file>
|
|
@@ -4005,6 +4102,7 @@ class DOM {
|
|
|
4005
4102
|
Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
|
|
4006
4103
|
</file>
|
|
4007
4104
|
*/
|
|
4105
|
+
//App
|
|
4008
4106
|
class QSUtils {
|
|
4009
4107
|
static getValue(url, name) {
|
|
4010
4108
|
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
|
|
@@ -4045,7 +4143,7 @@ class QSUtils {
|
|
|
4045
4143
|
}
|
|
4046
4144
|
if (newURL && reload) {
|
|
4047
4145
|
if (clearStorage) {
|
|
4048
|
-
|
|
4146
|
+
LoggingService.info("Clearing Storage");
|
|
4049
4147
|
localStorage.clear();
|
|
4050
4148
|
sessionStorage.clear();
|
|
4051
4149
|
}
|
|
@@ -5571,10 +5669,11 @@ class PayPalComponent {
|
|
|
5571
5669
|
set payPalButtonContainer(content) {
|
|
5572
5670
|
this.payPalButtonContainerElem = content;
|
|
5573
5671
|
}
|
|
5574
|
-
constructor(paypalScriptService, cdr, ngZone) {
|
|
5672
|
+
constructor(paypalScriptService, cdr, ngZone, logger) {
|
|
5575
5673
|
this.paypalScriptService = paypalScriptService;
|
|
5576
5674
|
this.cdr = cdr;
|
|
5577
5675
|
this.ngZone = ngZone;
|
|
5676
|
+
this.logger = logger;
|
|
5578
5677
|
/**
|
|
5579
5678
|
* If enabled, paypal SDK script will be loaded. Useful if you want to have multiple PayPal components on the same page
|
|
5580
5679
|
* sharing base configuration. In such a case only a single component may register script.
|
|
@@ -5636,7 +5735,7 @@ class PayPalComponent {
|
|
|
5636
5735
|
}
|
|
5637
5736
|
}
|
|
5638
5737
|
catch (error) {
|
|
5639
|
-
|
|
5738
|
+
this.logger.error(error);
|
|
5640
5739
|
}
|
|
5641
5740
|
}
|
|
5642
5741
|
this.cdr.detectChanges();
|
|
@@ -5832,7 +5931,7 @@ class PayPalComponent {
|
|
|
5832
5931
|
return (c == "x" ? r : (r & 0x7) | 0x8).toString(16);
|
|
5833
5932
|
});
|
|
5834
5933
|
}
|
|
5835
|
-
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 }); }
|
|
5934
|
+
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 }); }
|
|
5836
5935
|
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: `
|
|
5837
5936
|
<div #payPalButtonContainer [id]="payPalButtonContainerId"></div>
|
|
5838
5937
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -5847,7 +5946,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
5847
5946
|
`,
|
|
5848
5947
|
standalone: false
|
|
5849
5948
|
}]
|
|
5850
|
-
}], ctorParameters: () => [{ type: PayPalScriptService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { config: [{
|
|
5949
|
+
}], ctorParameters: () => [{ type: PayPalScriptService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: LoggingService }], propDecorators: { config: [{
|
|
5851
5950
|
type: Input
|
|
5852
5951
|
}], registerScript: [{
|
|
5853
5952
|
type: Input
|
|
@@ -9218,16 +9317,16 @@ function loggerCallback(logLevel, message, containsPii) {
|
|
|
9218
9317
|
}
|
|
9219
9318
|
switch (logLevel) {
|
|
9220
9319
|
case LogLevel.Error:
|
|
9221
|
-
|
|
9320
|
+
LoggingService.error(message);
|
|
9222
9321
|
return;
|
|
9223
9322
|
case LogLevel.Info:
|
|
9224
|
-
|
|
9323
|
+
LoggingService.info(message);
|
|
9225
9324
|
return;
|
|
9226
9325
|
case LogLevel.Verbose:
|
|
9227
|
-
|
|
9326
|
+
LoggingService.debug(message);
|
|
9228
9327
|
return;
|
|
9229
9328
|
case LogLevel.Warning:
|
|
9230
|
-
|
|
9329
|
+
LoggingService.warn(message);
|
|
9231
9330
|
return;
|
|
9232
9331
|
}
|
|
9233
9332
|
}
|
|
@@ -10136,5 +10235,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
10136
10235
|
* Generated bundle index. Do not edit.
|
|
10137
10236
|
*/
|
|
10138
10237
|
|
|
10139
|
-
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 };
|
|
10238
|
+
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 };
|
|
10140
10239
|
//# sourceMappingURL=osovitny-anatoly.mjs.map
|