@osovitny/anatoly 3.20.25 → 3.20.27
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.
- package/fesm2022/osovitny-anatoly.mjs +52 -51
- package/fesm2022/osovitny-anatoly.mjs.map +1 -1
- package/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -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';
|
|
@@ -10477,41 +10482,6 @@ function loggerCallback(logLevel, message, containsPii) {
|
|
|
10477
10482
|
}
|
|
10478
10483
|
}
|
|
10479
10484
|
|
|
10480
|
-
class AppService extends ApiServiceBase {
|
|
10481
|
-
constructor(http) {
|
|
10482
|
-
super(http);
|
|
10483
|
-
this.http = http;
|
|
10484
|
-
this.baseUrl = `${ApiUrl}/app`;
|
|
10485
|
-
}
|
|
10486
|
-
loadAppInitializerSettings() {
|
|
10487
|
-
//Logging
|
|
10488
|
-
let stopwatch = new Stopwatch("@osovitny/anatoly. AppService: loadAppInitializerSettings");
|
|
10489
|
-
stopwatch.start();
|
|
10490
|
-
return this.get('loadAppInitializerSettings').pipe(map$1(data => {
|
|
10491
|
-
//Logging
|
|
10492
|
-
stopwatch.stop();
|
|
10493
|
-
stopwatch.printElapsedAsMilliseconds();
|
|
10494
|
-
if (data) {
|
|
10495
|
-
let appCoreSettings = JSON.stringify(data.core);
|
|
10496
|
-
let appMSALSettings = JSON.stringify(data.msal);
|
|
10497
|
-
appCoreSettings = appCoreSettings.replace(/--APPNAME--/g, g_AppName);
|
|
10498
|
-
sessionStorage.setItem(SessionStorageKeys.appCoreSettings, appCoreSettings);
|
|
10499
|
-
sessionStorage.setItem(SessionStorageKeys.appMSALSettings, appMSALSettings);
|
|
10500
|
-
resetAppCoreSettings();
|
|
10501
|
-
resetMsalSettings();
|
|
10502
|
-
}
|
|
10503
|
-
}));
|
|
10504
|
-
}
|
|
10505
|
-
static { this.ɵfac = function AppService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AppService)(i0.ɵɵinject(i1.HttpClient)); }; }
|
|
10506
|
-
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AppService, factory: AppService.ɵfac, providedIn: 'root' }); }
|
|
10507
|
-
}
|
|
10508
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppService, [{
|
|
10509
|
-
type: Injectable,
|
|
10510
|
-
args: [{
|
|
10511
|
-
providedIn: 'root'
|
|
10512
|
-
}]
|
|
10513
|
-
}], () => [{ type: i1.HttpClient }], null); })();
|
|
10514
|
-
|
|
10515
10485
|
/*
|
|
10516
10486
|
<file>
|
|
10517
10487
|
Project:
|
|
@@ -10532,8 +10502,6 @@ class AppService extends ApiServiceBase {
|
|
|
10532
10502
|
*/
|
|
10533
10503
|
//Node
|
|
10534
10504
|
const MSALProviders = [
|
|
10535
|
-
//Init
|
|
10536
|
-
AppService,
|
|
10537
10505
|
MsalService,
|
|
10538
10506
|
MsalBroadcastService,
|
|
10539
10507
|
{
|
|
@@ -10543,18 +10511,15 @@ const MSALProviders = [
|
|
|
10543
10511
|
},
|
|
10544
10512
|
{
|
|
10545
10513
|
provide: MSAL_INSTANCE,
|
|
10546
|
-
useFactory: MSALInstanceFactory
|
|
10547
|
-
deps: [AppService]
|
|
10514
|
+
useFactory: MSALInstanceFactory
|
|
10548
10515
|
},
|
|
10549
10516
|
{
|
|
10550
10517
|
provide: MSAL_GUARD_CONFIG,
|
|
10551
|
-
useFactory: MSALGuardConfigFactory
|
|
10552
|
-
deps: [AppService]
|
|
10518
|
+
useFactory: MSALGuardConfigFactory
|
|
10553
10519
|
},
|
|
10554
10520
|
{
|
|
10555
10521
|
provide: MSAL_INTERCEPTOR_CONFIG,
|
|
10556
|
-
useFactory: MSALInterceptorConfigFactory
|
|
10557
|
-
deps: [AppService]
|
|
10522
|
+
useFactory: MSALInterceptorConfigFactory
|
|
10558
10523
|
},
|
|
10559
10524
|
//App
|
|
10560
10525
|
AuthService,
|
|
@@ -11281,6 +11246,42 @@ class AnatolyBillingModule {
|
|
|
11281
11246
|
KendoModule,
|
|
11282
11247
|
AnatolyUIModule], exports: [BuyAccessButtonComponent, SubscribePlanButtonComponent, OrderSummaryComponent, PaymentMethodsComponent, PaymentOptionsComponent, BraintreeDialog, PaypalButtonComponent, PaypalSubscribeButtonComponent, PayPalComponent, StripeDialog] }); })();
|
|
11283
11248
|
|
|
11249
|
+
class AppService extends ApiServiceBase {
|
|
11250
|
+
constructor(http) {
|
|
11251
|
+
super(http);
|
|
11252
|
+
this.http = http;
|
|
11253
|
+
this.baseUrl = `${ApiUrl}/app`;
|
|
11254
|
+
this.ignoreInterceptors = true;
|
|
11255
|
+
}
|
|
11256
|
+
loadAppInitializerSettings() {
|
|
11257
|
+
//Logging
|
|
11258
|
+
let stopwatch = new Stopwatch("@osovitny/anatoly. AppService: loadAppInitializerSettings");
|
|
11259
|
+
stopwatch.start();
|
|
11260
|
+
return this.get('loadAppInitializerSettings').pipe(map$1(data => {
|
|
11261
|
+
//Logging
|
|
11262
|
+
stopwatch.stop();
|
|
11263
|
+
stopwatch.printElapsedAsMilliseconds();
|
|
11264
|
+
if (data) {
|
|
11265
|
+
let appCoreSettings = JSON.stringify(data.core);
|
|
11266
|
+
let appMSALSettings = JSON.stringify(data.msal);
|
|
11267
|
+
appCoreSettings = appCoreSettings.replace(/--APPNAME--/g, g_AppName);
|
|
11268
|
+
sessionStorage.setItem(SessionStorageKeys.appCoreSettings, appCoreSettings);
|
|
11269
|
+
sessionStorage.setItem(SessionStorageKeys.appMSALSettings, appMSALSettings);
|
|
11270
|
+
resetAppCoreSettings();
|
|
11271
|
+
resetMsalSettings();
|
|
11272
|
+
}
|
|
11273
|
+
}));
|
|
11274
|
+
}
|
|
11275
|
+
static { this.ɵfac = function AppService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AppService)(i0.ɵɵinject(i1.HttpClient)); }; }
|
|
11276
|
+
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AppService, factory: AppService.ɵfac, providedIn: 'root' }); }
|
|
11277
|
+
}
|
|
11278
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppService, [{
|
|
11279
|
+
type: Injectable,
|
|
11280
|
+
args: [{
|
|
11281
|
+
providedIn: 'root'
|
|
11282
|
+
}]
|
|
11283
|
+
}], () => [{ type: i1.HttpClient }], null); })();
|
|
11284
|
+
|
|
11284
11285
|
/*
|
|
11285
11286
|
<file>
|
|
11286
11287
|
Project:
|