@osovitny/anatoly 3.20.25 → 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
|
|
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 {
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
195
|
+
return this._http.delete(url, { responseType: responseType });
|
|
191
196
|
}
|
|
192
197
|
//gets
|
|
193
198
|
getExternalTextFile(url) {
|
|
194
|
-
return this.
|
|
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.
|
|
213
|
+
return this._http.get(url);
|
|
209
214
|
}
|
|
210
215
|
getLibJsonFile(fileName) {
|
|
211
216
|
const url = AppCoreSettings.assetsLibUrl + '/jsons';
|
|
@@ -10482,6 +10487,7 @@ class AppService extends ApiServiceBase {
|
|
|
10482
10487
|
super(http);
|
|
10483
10488
|
this.http = http;
|
|
10484
10489
|
this.baseUrl = `${ApiUrl}/app`;
|
|
10490
|
+
this.ignoreInterceptors = true;
|
|
10485
10491
|
}
|
|
10486
10492
|
loadAppInitializerSettings() {
|
|
10487
10493
|
//Logging
|