@osovitny/anatoly 3.20.17 → 3.20.18

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, APP_INITIALIZER } from '@angular/core';
2
+ import { Injectable, EventEmitter, Component, Output, Input, Inject, Pipe, NgModule, Directive, ChangeDetectionStrategy, ViewChild, ViewEncapsulation, HostListener, HostBinding, APP_INITIALIZER, provideAppInitializer, inject } from '@angular/core';
3
3
  import { BehaviorSubject, forkJoin, Subject, filter, takeUntil, map as map$1, catchError, of, merge, timer, fromEvent, firstValueFrom, lastValueFrom } from 'rxjs';
4
4
  import { map, tap, mergeMap } from 'rxjs/operators';
5
5
  import * as i1 from '@angular/common/http';
6
- import { HttpResponse, HttpClient, provideHttpClient, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
6
+ import { HttpResponse, HttpClient, HTTP_INTERCEPTORS, HttpClientModule, 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';
@@ -105,12 +105,6 @@ const AppContextStorageKeys = {
105
105
  </file>
106
106
  */
107
107
  //App
108
- //VadimOS: old approach
109
- /*
110
- export const AppCoreSettings = JSON.parse(
111
- ((document.getElementById('appCoreSettings')) as HTMLInputElement).getAttribute('data-appcoresettings')
112
- );
113
- */
114
108
  function getAppCoreSettings() {
115
109
  const json = sessionStorage.getItem(SessionStorageKeys.appCoreSettings);
116
110
  return json ? JSON.parse(json) : null;
@@ -140,9 +134,9 @@ let AppVersion;
140
134
  let IsDevMode = true;
141
135
  let IsProdMode = !IsDevMode;
142
136
  let ClientApps;
143
- resetAppCoreSettings();
144
137
  const AppName = g_AppName;
145
138
  const ApiUrl = g_ApiUrl;
139
+ resetAppCoreSettings();
146
140
 
147
141
  /*
148
142
  <file>
@@ -2562,6 +2556,7 @@ class LoadingService extends BehaviorSubject {
2562
2556
  Authors:
2563
2557
  Vadim Osovitny vadim.osovitny@osovitny.com
2564
2558
  Anatoly Osovitny anatoly.osovitny@osovitny.com
2559
+ Leon Malyan leon.malyan@osovitny.com
2565
2560
 
2566
2561
  Created:
2567
2562
  25 March 2020
@@ -10230,40 +10225,6 @@ class SafeHtmlPipe {
10230
10225
  </file>
10231
10226
  */
10232
10227
 
10233
- class AppService extends ApiServiceBase {
10234
- constructor(http) {
10235
- super(http);
10236
- this.http = http;
10237
- this.baseUrl = `${ApiUrl}/app`;
10238
- }
10239
- loadAppInitializerSettings() {
10240
- //Logging
10241
- let stopwatch = new Stopwatch("@osovitny/anatoly. AppService: loadAppInitializerSettings");
10242
- stopwatch.start();
10243
- return this.get('loadAppInitializerSettings').pipe(map$1(data => {
10244
- //Logging
10245
- stopwatch.stop();
10246
- stopwatch.printElapsedAsMilliseconds();
10247
- if (data) {
10248
- let appCoreSettings = JSON.stringify(data.core);
10249
- let appMSALSettings = JSON.stringify(data.msal);
10250
- appCoreSettings = appCoreSettings.replace(/--APPNAME--/g, g_AppName);
10251
- sessionStorage.setItem(SessionStorageKeys.appCoreSettings, appCoreSettings);
10252
- sessionStorage.setItem(SessionStorageKeys.appMSALSettings, appMSALSettings);
10253
- resetAppCoreSettings();
10254
- }
10255
- }));
10256
- }
10257
- static { this.ɵfac = function AppService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AppService)(i0.ɵɵinject(i1.HttpClient)); }; }
10258
- static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AppService, factory: AppService.ɵfac, providedIn: 'root' }); }
10259
- }
10260
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppService, [{
10261
- type: Injectable,
10262
- args: [{
10263
- providedIn: 'root'
10264
- }]
10265
- }], () => [{ type: i1.HttpClient }], null); })();
10266
-
10267
10228
  /*
10268
10229
  <file>
10269
10230
  Project:
@@ -10280,30 +10241,18 @@ class AppService extends ApiServiceBase {
10280
10241
  </file>
10281
10242
  */
10282
10243
  //Node
10283
- let InjectorInstance;
10244
+ let InjectorInstance$1;
10284
10245
  class AnatolyCoreModule {
10285
10246
  constructor(injector) {
10286
10247
  this.injector = injector;
10287
- InjectorInstance = this.injector;
10248
+ InjectorInstance$1 = this.injector;
10288
10249
  }
10289
10250
  static { this.ɵfac = function AnatolyCoreModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AnatolyCoreModule)(i0.ɵɵinject(i0.Injector)); }; }
10290
10251
  static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AnatolyCoreModule }); }
10291
10252
  static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
10292
- provideHttpClient(),
10293
- provideAppInitializer(() => {
10294
- const appService = inject(AppService);
10295
- return lastValueFrom(appService.loadAppInitializerSettings().pipe(map$1(() => {
10296
- //Localization
10297
- const translate = InjectorInstance.get(TranslateService);
10298
- const localizationService = InjectorInstance.get(LocalizationService);
10299
- const lang = localizationService.configureSettings(translate);
10300
- translate.use(lang);
10301
- })));
10302
- }),
10303
10253
  //Guards
10304
10254
  StarterGuard,
10305
10255
  //Services
10306
- AppService,
10307
10256
  BrowserService,
10308
10257
  DigitalMarketingService,
10309
10258
  GoogleAnalyticsService,
@@ -10336,21 +10285,9 @@ class AnatolyCoreModule {
10336
10285
  LocalizationModule
10337
10286
  ],
10338
10287
  providers: [
10339
- provideHttpClient(),
10340
- provideAppInitializer(() => {
10341
- const appService = inject(AppService);
10342
- return lastValueFrom(appService.loadAppInitializerSettings().pipe(map$1(() => {
10343
- //Localization
10344
- const translate = InjectorInstance.get(TranslateService);
10345
- const localizationService = InjectorInstance.get(LocalizationService);
10346
- const lang = localizationService.configureSettings(translate);
10347
- translate.use(lang);
10348
- })));
10349
- }),
10350
10288
  //Guards
10351
10289
  StarterGuard,
10352
10290
  //Services
10353
- AppService,
10354
10291
  BrowserService,
10355
10292
  DigitalMarketingService,
10356
10293
  GoogleAnalyticsService,
@@ -11287,6 +11224,40 @@ class AnatolyBillingModule {
11287
11224
  KendoModule,
11288
11225
  AnatolyUIModule], exports: [BuyAccessButtonComponent, SubscribePlanButtonComponent, OrderSummaryComponent, PaymentMethodsComponent, PaymentOptionsComponent, BraintreeDialog, PaypalButtonComponent, PaypalSubscribeButtonComponent, PayPalComponent, StripeDialog] }); })();
11289
11226
 
11227
+ class AppService extends ApiServiceBase {
11228
+ constructor(http) {
11229
+ super(http);
11230
+ this.http = http;
11231
+ this.baseUrl = `${ApiUrl}/app`;
11232
+ }
11233
+ loadAppInitializerSettings() {
11234
+ //Logging
11235
+ let stopwatch = new Stopwatch("@osovitny/anatoly. AppService: loadAppInitializerSettings");
11236
+ stopwatch.start();
11237
+ return this.get('loadAppInitializerSettings').pipe(map$1(data => {
11238
+ //Logging
11239
+ stopwatch.stop();
11240
+ stopwatch.printElapsedAsMilliseconds();
11241
+ if (data) {
11242
+ let appCoreSettings = JSON.stringify(data.core);
11243
+ let appMSALSettings = JSON.stringify(data.msal);
11244
+ appCoreSettings = appCoreSettings.replace(/--APPNAME--/g, g_AppName);
11245
+ sessionStorage.setItem(SessionStorageKeys.appCoreSettings, appCoreSettings);
11246
+ sessionStorage.setItem(SessionStorageKeys.appMSALSettings, appMSALSettings);
11247
+ resetAppCoreSettings();
11248
+ }
11249
+ }));
11250
+ }
11251
+ static { this.ɵfac = function AppService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AppService)(i0.ɵɵinject(i1.HttpClient)); }; }
11252
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AppService, factory: AppService.ɵfac, providedIn: 'root' }); }
11253
+ }
11254
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppService, [{
11255
+ type: Injectable,
11256
+ args: [{
11257
+ providedIn: 'root'
11258
+ }]
11259
+ }], () => [{ type: i1.HttpClient }], null); })();
11260
+
11290
11261
  /*
11291
11262
  <file>
11292
11263
  Project:
@@ -11302,10 +11273,28 @@ class AnatolyBillingModule {
11302
11273
  </file>
11303
11274
  */
11304
11275
  //Node
11276
+ let InjectorInstance;
11305
11277
  class AnatolyModule {
11306
- static { this.ɵfac = function AnatolyModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AnatolyModule)(); }; }
11278
+ constructor(injector) {
11279
+ this.injector = injector;
11280
+ InjectorInstance = this.injector;
11281
+ }
11282
+ static { this.ɵfac = function AnatolyModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AnatolyModule)(i0.ɵɵinject(i0.Injector)); }; }
11307
11283
  static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AnatolyModule }); }
11308
- static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
11284
+ static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
11285
+ provideHttpClient(),
11286
+ provideAppInitializer(() => {
11287
+ const appService = inject(AppService);
11288
+ return lastValueFrom(appService.loadAppInitializerSettings().pipe(map$1(() => {
11289
+ //Localization
11290
+ const translate = InjectorInstance.get(TranslateService);
11291
+ const localizationService = InjectorInstance.get(LocalizationService);
11292
+ const lang = localizationService.configureSettings(translate);
11293
+ translate.use(lang);
11294
+ })));
11295
+ }),
11296
+ AppService
11297
+ ], imports: [CommonModule,
11309
11298
  AnatolyCoreModule,
11310
11299
  AnatolyDataModule,
11311
11300
  AnatolyIAMModule,
@@ -11329,9 +11318,23 @@ class AnatolyModule {
11329
11318
  AnatolyDataModule,
11330
11319
  AnatolyIAMModule,
11331
11320
  AnatolyUIModule
11321
+ ],
11322
+ providers: [
11323
+ provideHttpClient(),
11324
+ provideAppInitializer(() => {
11325
+ const appService = inject(AppService);
11326
+ return lastValueFrom(appService.loadAppInitializerSettings().pipe(map$1(() => {
11327
+ //Localization
11328
+ const translate = InjectorInstance.get(TranslateService);
11329
+ const localizationService = InjectorInstance.get(LocalizationService);
11330
+ const lang = localizationService.configureSettings(translate);
11331
+ translate.use(lang);
11332
+ })));
11333
+ }),
11334
+ AppService
11332
11335
  ]
11333
11336
  }]
11334
- }], null, null); })();
11337
+ }], () => [{ type: i0.Injector }], null); })();
11335
11338
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AnatolyModule, { imports: [CommonModule,
11336
11339
  AnatolyCoreModule,
11337
11340
  AnatolyDataModule,
@@ -11350,5 +11353,5 @@ class AnatolyModule {
11350
11353
  * Generated bundle index. Do not edit.
11351
11354
  */
11352
11355
 
11353
- export { AReplacerDirective, AddressComponent, AdminGuard, Alerts, AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyIAMModule, AnatolyIAMPagesModule, AnatolyModule, AnatolyUIModule, ApiServiceBase, ApiUrl, AppContextService, AppCoreSettings, AppName, AppSettings, AppVersion, AppsGoServiceBase, 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, IsDevMode, IsProdMode, ItemValidationSummaryComponent, L10nUtils, LanguageDropdownlist, ListBase, LoadingComponent, LoadingService, LocalStorageService, LocalizationModule, LocalizationService, LocalizePipe, LoggingService, MSALUtils, 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, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, StarterGuard, StarterService, Stopwatch, StripeDialog, Subs, SubscribePlanButtonComponent, SubscriptionProvider, SubscriptionsApiService, TimezoneDropdownlist, TransactionsApiService, UrlSlugComponent, Utils, ValidationSummaryComponent, XmlFormatter, YouAgreeToOurTermsComponent, dateFormats, dateTimeFormats, formatUrl, getAppCoreSettings, getAppSettingsById, getAppSettingsByName, getCurrentApp, getLocalizationInjector, initializeMsalFactory, is, resetAppCoreSettings, throwIfAlreadyLoaded, timeFormats, translateLoaderFactory };
11356
+ export { AReplacerDirective, AddressComponent, AdminGuard, Alerts, AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyIAMModule, AnatolyIAMPagesModule, AnatolyModule, AnatolyUIModule, ApiServiceBase, ApiUrl, AppContextService, AppCoreSettings, AppName, AppSettings, AppVersion, AppsGoServiceBase, 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, ListBase, LoadingComponent, LoadingService, LocalStorageService, LocalizationModule, LocalizationService, LocalizePipe, LoggingService, MSALUtils, 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, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, StarterGuard, StarterService, Stopwatch, StripeDialog, Subs, SubscribePlanButtonComponent, SubscriptionProvider, SubscriptionsApiService, TimezoneDropdownlist, TransactionsApiService, UrlSlugComponent, Utils, ValidationSummaryComponent, XmlFormatter, YouAgreeToOurTermsComponent, dateFormats, dateTimeFormats, formatUrl, getAppCoreSettings, getAppSettingsById, getAppSettingsByName, getCurrentApp, getLocalizationInjector, initializeMsalFactory, is, resetAppCoreSettings, throwIfAlreadyLoaded, timeFormats, translateLoaderFactory };
11354
11357
  //# sourceMappingURL=osovitny-anatoly.mjs.map