@osovitny/anatoly 3.20.24 → 3.20.26

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.
@@ -1,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, Component, Output, Input, Inject, Pipe, NgModule, Directive, ChangeDetectionStrategy, ViewChild, ViewEncapsulation, HostListener, HostBinding, provideAppInitializer, inject } from '@angular/core';
2
+ import { inject, Injectable, EventEmitter, Component, Output, Input, Inject, Pipe, NgModule, Directive, ChangeDetectionStrategy, ViewChild, ViewEncapsulation, HostListener, HostBinding, provideAppInitializer } from '@angular/core';
3
3
  import { BehaviorSubject, forkJoin, Subject, filter, takeUntil, map as map$1, catchError, of, merge, timer, fromEvent, firstValueFrom } from 'rxjs';
4
4
  import { map, tap, mergeMap } from 'rxjs/operators';
5
5
  import * as i1 from '@angular/common/http';
6
- import { HttpResponse, HttpClient, HTTP_INTERCEPTORS, provideHttpClient } from '@angular/common/http';
6
+ import { HttpClient, HttpBackend, HttpResponse, HTTP_INTERCEPTORS, provideHttpClient } from '@angular/common/http';
7
7
  import * as i1$1 from '@angular/common';
8
8
  import { DOCUMENT, CommonModule } from '@angular/common';
9
9
  import { format, formatDistance, formatDistanceToNow } from 'date-fns';
@@ -156,6 +156,11 @@ resetAppCoreSettings();
156
156
  class ApiServiceBase {
157
157
  constructor(http) {
158
158
  this.http = http;
159
+ this.ignoreInterceptors = false;
160
+ this._httpNoInterceptors = new HttpClient(inject(HttpBackend));
161
+ }
162
+ get _http() {
163
+ return this.ignoreInterceptors ? this._httpNoInterceptors : this.http;
159
164
  }
160
165
  serializeParams(data) {
161
166
  return data ? ('?' + $.param(data)) : "";
@@ -166,32 +171,32 @@ class ApiServiceBase {
166
171
  responseType = 'json';
167
172
  }
168
173
  var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
169
- return this.http.get(url, { responseType: responseType }).pipe(map(res => res));
174
+ return this._http.get(url, { responseType: responseType }).pipe(map(res => res));
170
175
  }
171
176
  post(action, data, responseType) {
172
177
  if (!responseType) {
173
178
  responseType = 'text';
174
179
  }
175
180
  var url = `${this.baseUrl}/${action}`;
176
- return this.http.post(url, data, { responseType: responseType });
181
+ return this._http.post(url, data, { responseType: responseType });
177
182
  }
178
183
  postQS(action, data, responseType) {
179
184
  if (!responseType) {
180
185
  responseType = 'text';
181
186
  }
182
187
  var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
183
- return this.http.post(url, null, { responseType: responseType });
188
+ return this._http.post(url, null, { responseType: responseType });
184
189
  }
185
190
  delete(action, data, responseType) {
186
191
  if (!responseType) {
187
192
  responseType = 'text';
188
193
  }
189
194
  var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
190
- return this.http.delete(url, { responseType: responseType });
195
+ return this._http.delete(url, { responseType: responseType });
191
196
  }
192
197
  //gets
193
198
  getExternalTextFile(url) {
194
- return this.http.get(url);
199
+ return this._http.get(url);
195
200
  }
196
201
  //Json Files
197
202
  __getJsonFile(url) {
@@ -205,7 +210,7 @@ class ApiServiceBase {
205
210
  else {
206
211
  url = url + '?v=' + version;
207
212
  }
208
- return this.http.get(url);
213
+ return this._http.get(url);
209
214
  }
210
215
  getLibJsonFile(fileName) {
211
216
  const url = AppCoreSettings.assetsLibUrl + '/jsons';
@@ -1759,15 +1764,19 @@ class MSALUtils {
1759
1764
  }
1760
1765
  static getApi() {
1761
1766
  let map = new Map();
1762
- let api = MSALApiConfig;
1763
- map.set(api.uri, api.scopes);
1767
+ if (MSALApiConfig) {
1768
+ let api = MSALApiConfig;
1769
+ map.set(api.uri, api.scopes);
1770
+ }
1764
1771
  return map;
1765
1772
  }
1766
1773
  static getApiScopes() {
1767
1774
  let scopes = [];
1768
- let api = MSALApiConfig;
1769
- for (const scope of api.scopes) {
1770
- scopes.push(scope);
1775
+ if (MSALApiConfig) {
1776
+ let api = MSALApiConfig;
1777
+ for (const scope of api.scopes) {
1778
+ scopes.push(scope);
1779
+ }
1771
1780
  }
1772
1781
  return scopes;
1773
1782
  }
@@ -10478,6 +10487,7 @@ class AppService extends ApiServiceBase {
10478
10487
  super(http);
10479
10488
  this.http = http;
10480
10489
  this.baseUrl = `${ApiUrl}/app`;
10490
+ this.ignoreInterceptors = true;
10481
10491
  }
10482
10492
  loadAppInitializerSettings() {
10483
10493
  //Logging