@osovitny/anatoly 3.21.33 → 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
- console.log(this.name + ' started.');
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
- console.log(`${this.name} stopped. Execution time: ${elapsed} ms`);
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
- console.log(`msal.app: redirect state saved: ${redirectTo}. Called by: ${calledBy}`);
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
- console.log(`msal.app: redirect state requested: ${redirectTo}. Called by: ${calledBy}`);
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
- console.log(`msal.app: redirect state cleared. Called by: ${calledBy}`);
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
- console.log(`iam.msal: handleRedirectObservable`);
1963
+ this.logger.info(`iam.msal: handleRedirectObservable`);
1839
1964
  },
1840
1965
  error: (error) => {
1841
- console.log(error);
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
- console.log(`iam.msal: INITIALIZE_END fired`);
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
- console.log(`iam.msal: InteractionStatus.Startup`);
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
- console.log(`iam.msal: InteractionStatus.None`);
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
- console.log("iam.msal.sso: SSO in progress");
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
- console.log("iam.msal.sso: SSO have been successfully done");
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
- console.log("iam.msal.sso: SSO silent token acquisition failed");
2061
- console.error(error);
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
- console.log("iam.msal.sso: Silent token acquisition failed.");
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>
@@ -2613,7 +2705,7 @@ class AnatolyHttpInterceptor {
2613
2705
  let requestStarted = false;
2614
2706
  let handleRequest = () => {
2615
2707
  requestStarted = true;
2616
- this.onRequestStart(loadingRequired);
2708
+ this.onRequestStart(loadingRequired, req.url);
2617
2709
  return this.handleHttpRequest(req, next);
2618
2710
  };
2619
2711
  if (authorizationTokenRequired) {
@@ -2629,23 +2721,25 @@ class AnatolyHttpInterceptor {
2629
2721
  }
2630
2722
  return request$.pipe(finalize(() => {
2631
2723
  if (requestStarted) {
2632
- this.onRequestEnd(loadingRequired);
2724
+ this.onRequestEnd(loadingRequired, req.url);
2633
2725
  }
2634
2726
  }));
2635
2727
  }
2636
2728
  catch (err) {
2637
2729
  this.logger.error("An error occurred: " + err);
2638
- this.onRequestEnd(loadingRequired);
2730
+ this.onRequestEnd(loadingRequired, req.url);
2639
2731
  }
2640
2732
  }
2641
2733
  //Events
2642
- onRequestStart(loadingRequired) {
2734
+ onRequestStart(loadingRequired, url) {
2643
2735
  if (loadingRequired) {
2736
+ this.logger.info('@osovitny/anatoly.loading.show', url);
2644
2737
  this.loadingService.show();
2645
2738
  }
2646
2739
  }
2647
- onRequestEnd(loadingRequired) {
2740
+ onRequestEnd(loadingRequired, url) {
2648
2741
  if (loadingRequired) {
2742
+ this.logger.info('@osovitny/anatoly.loading.hide', url);
2649
2743
  this.loadingService.hide();
2650
2744
  }
2651
2745
  }
@@ -2812,8 +2906,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
2812
2906
  */
2813
2907
  //Node
2814
2908
  class LocalizationService {
2815
- constructor(translate) {
2909
+ constructor(translate, logger) {
2816
2910
  this.translate = translate;
2911
+ this.logger = logger;
2817
2912
  this.subs = new Subs();
2818
2913
  //i10n
2819
2914
  this.supportedLanguages = ['en', 'ru', 'es'];
@@ -2841,7 +2936,7 @@ class LocalizationService {
2841
2936
  //dates
2842
2937
  this.dateFnsLocale = { locale: enUS };
2843
2938
  this.subs.sink = this.translate.onLangChange.subscribe((event) => {
2844
- console.log('Language Changed');
2939
+ this.logger.info('Language Changed');
2845
2940
  this.langchange.emit(event.lang);
2846
2941
  });
2847
2942
  }
@@ -2933,7 +3028,7 @@ class LocalizationService {
2933
3028
  }
2934
3029
  return formatDistanceToNow(d, this.dateFnsLocale);
2935
3030
  }
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 }); }
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 }); }
2937
3032
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LocalizationService, providedIn: 'root' }); }
2938
3033
  }
2939
3034
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: LocalizationService, decorators: [{
@@ -2941,7 +3036,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
2941
3036
  args: [{
2942
3037
  providedIn: 'root'
2943
3038
  }]
2944
- }], ctorParameters: () => [{ type: i1$3.TranslateService }], propDecorators: { langchange: [{
3039
+ }], ctorParameters: () => [{ type: i1$3.TranslateService }, { type: LoggingService }], propDecorators: { langchange: [{
2945
3040
  type: Output
2946
3041
  }] } });
2947
3042
 
@@ -3600,8 +3695,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
3600
3695
  */
3601
3696
  //Node
3602
3697
  class GoogleAnalyticsService {
3603
- constructor(router) {
3698
+ constructor(router, logger) {
3604
3699
  this.router = router;
3700
+ this.logger = logger;
3605
3701
  }
3606
3702
  subscribe() {
3607
3703
  this.subscription = this.router.events.subscribe({
@@ -3633,19 +3729,19 @@ class GoogleAnalyticsService {
3633
3729
  }
3634
3730
  }
3635
3731
  catch (err) {
3636
- console.error('Google Analytics event error', err);
3732
+ this.logger.error('Google Analytics event error', err);
3637
3733
  }
3638
3734
  }
3639
3735
  get ga() {
3640
3736
  let ga = window.gtag;
3641
3737
  return ga;
3642
3738
  }
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 }); }
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 }); }
3644
3740
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: GoogleAnalyticsService }); }
3645
3741
  }
3646
3742
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: GoogleAnalyticsService, decorators: [{
3647
3743
  type: Injectable
3648
- }], ctorParameters: () => [{ type: i1$1.Router }] });
3744
+ }], ctorParameters: () => [{ type: i1$1.Router }, { type: LoggingService }] });
3649
3745
 
3650
3746
  /*
3651
3747
  <file>
@@ -4006,6 +4102,7 @@ class DOM {
4006
4102
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
4007
4103
  </file>
4008
4104
  */
4105
+ //App
4009
4106
  class QSUtils {
4010
4107
  static getValue(url, name) {
4011
4108
  name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
@@ -4046,7 +4143,7 @@ class QSUtils {
4046
4143
  }
4047
4144
  if (newURL && reload) {
4048
4145
  if (clearStorage) {
4049
- console.log("Clearing Storage");
4146
+ LoggingService.info("Clearing Storage");
4050
4147
  localStorage.clear();
4051
4148
  sessionStorage.clear();
4052
4149
  }
@@ -5572,10 +5669,11 @@ class PayPalComponent {
5572
5669
  set payPalButtonContainer(content) {
5573
5670
  this.payPalButtonContainerElem = content;
5574
5671
  }
5575
- constructor(paypalScriptService, cdr, ngZone) {
5672
+ constructor(paypalScriptService, cdr, ngZone, logger) {
5576
5673
  this.paypalScriptService = paypalScriptService;
5577
5674
  this.cdr = cdr;
5578
5675
  this.ngZone = ngZone;
5676
+ this.logger = logger;
5579
5677
  /**
5580
5678
  * If enabled, paypal SDK script will be loaded. Useful if you want to have multiple PayPal components on the same page
5581
5679
  * sharing base configuration. In such a case only a single component may register script.
@@ -5637,7 +5735,7 @@ class PayPalComponent {
5637
5735
  }
5638
5736
  }
5639
5737
  catch (error) {
5640
- console.error(error);
5738
+ this.logger.error(error);
5641
5739
  }
5642
5740
  }
5643
5741
  this.cdr.detectChanges();
@@ -5833,7 +5931,7 @@ class PayPalComponent {
5833
5931
  return (c == "x" ? r : (r & 0x7) | 0x8).toString(16);
5834
5932
  });
5835
5933
  }
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 }); }
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 }); }
5837
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: `
5838
5936
  <div #payPalButtonContainer [id]="payPalButtonContainerId"></div>
5839
5937
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -5848,7 +5946,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
5848
5946
  `,
5849
5947
  standalone: false
5850
5948
  }]
5851
- }], 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: [{
5852
5950
  type: Input
5853
5951
  }], registerScript: [{
5854
5952
  type: Input
@@ -9219,16 +9317,16 @@ function loggerCallback(logLevel, message, containsPii) {
9219
9317
  }
9220
9318
  switch (logLevel) {
9221
9319
  case LogLevel.Error:
9222
- console.error(message);
9320
+ LoggingService.error(message);
9223
9321
  return;
9224
9322
  case LogLevel.Info:
9225
- console.info(message);
9323
+ LoggingService.info(message);
9226
9324
  return;
9227
9325
  case LogLevel.Verbose:
9228
- console.debug(message);
9326
+ LoggingService.debug(message);
9229
9327
  return;
9230
9328
  case LogLevel.Warning:
9231
- console.warn(message);
9329
+ LoggingService.warn(message);
9232
9330
  return;
9233
9331
  }
9234
9332
  }
@@ -10137,5 +10235,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
10137
10235
  * Generated bundle index. Do not edit.
10138
10236
  */
10139
10237
 
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 };
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 };
10141
10239
  //# sourceMappingURL=osovitny-anatoly.mjs.map