@osovitny/anatoly 3.19.8 → 3.19.10

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.
@@ -85,6 +85,18 @@ const IsProdMode = !IsDevMode;
85
85
  const ClientApps = AppCoreSettings?.clientApps;
86
86
  //Api
87
87
  const ApiUrl = `${AppCoreSettings?.api.url}`;
88
+ function formatUrl(url) {
89
+ let newUrl = url;
90
+ if (url) {
91
+ if (url.startsWith("http")) {
92
+ return url;
93
+ }
94
+ const isCDNEnabled = AppCoreSettings.cdn?.enabled;
95
+ const cdnUrl = AppCoreSettings.cdn?.url;
96
+ newUrl = isCDNEnabled ? cdnUrl + url : url;
97
+ }
98
+ return newUrl;
99
+ }
88
100
 
89
101
  /*
90
102
  <file>
@@ -2411,29 +2423,36 @@ class LoadingService extends BehaviorSubject {
2411
2423
  //Public
2412
2424
  this.isFreezed = false;
2413
2425
  }
2414
- show() {
2415
- this.counter++;
2426
+ setTimeout(fn, timeout = 500) {
2416
2427
  let that = this;
2417
2428
  setTimeout(() => {
2429
+ if (fn)
2430
+ fn(that);
2431
+ }, timeout);
2432
+ }
2433
+ show() {
2434
+ this.counter++;
2435
+ this.setTimeout((that) => {
2418
2436
  if (that.counter > 0) {
2419
2437
  that.next(true);
2420
2438
  }
2421
- }, 500);
2439
+ });
2422
2440
  }
2423
2441
  hide() {
2424
2442
  if (this.counter <= 0) {
2425
2443
  return;
2426
2444
  }
2427
2445
  this.counter--;
2428
- if (this.counter == 0) {
2429
- this.next(false);
2430
- }
2446
+ this.setTimeout((that) => {
2447
+ if (that.counter == 0) {
2448
+ that.next(false);
2449
+ }
2450
+ });
2431
2451
  }
2432
2452
  freeze(timeout = 1000) {
2433
2453
  this.isFreezed = true;
2434
- let that = this;
2435
- setTimeout(() => {
2436
- this.isFreezed = false;
2454
+ this.setTimeout((that) => {
2455
+ that.isFreezed = false;
2437
2456
  }, timeout);
2438
2457
  }
2439
2458
  reset() {
@@ -4576,16 +4595,10 @@ class ReplacerDirectiveBase {
4576
4595
  this.el = el;
4577
4596
  this.renderer = renderer;
4578
4597
  }
4579
- setCDN2Attribute(name, value) {
4580
- if (value) {
4581
- if (value.startsWith("http")) {
4582
- this.setAttribute(name, value);
4583
- return;
4584
- }
4585
- const isCDNEnabled = AppCoreSettings.cdn.enabled;
4586
- const cdnUrl = AppCoreSettings.cdn.url;
4587
- const newSrc = isCDNEnabled ? cdnUrl + value : value;
4588
- this.setAttribute(name, newSrc);
4598
+ setUrlAttribute(name, url) {
4599
+ if (url) {
4600
+ let newUrl = formatUrl(url);
4601
+ this.setAttribute(name, newUrl);
4589
4602
  }
4590
4603
  }
4591
4604
  setAttribute(name, value) {
@@ -4624,7 +4637,7 @@ class ImageReplacerDirective extends ReplacerDirectiveBase {
4624
4637
  }
4625
4638
  }
4626
4639
  setSrc(value) {
4627
- this.setCDN2Attribute('src', value);
4640
+ this.setUrlAttribute('src', value);
4628
4641
  }
4629
4642
  static { this.ɵfac = /*@__PURE__*/ (() => { let ɵImageReplacerDirective_BaseFactory; return function ImageReplacerDirective_Factory(__ngFactoryType__) { return (ɵImageReplacerDirective_BaseFactory || (ɵImageReplacerDirective_BaseFactory = i0.ɵɵgetInheritedFactory(ImageReplacerDirective)))(__ngFactoryType__ || ImageReplacerDirective); }; })(); }
4630
4643
  static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ImageReplacerDirective, selectors: [["img"]], inputs: { src: "src" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature] }); }
@@ -7842,7 +7855,7 @@ class AReplacerDirective extends ReplacerDirectiveBase {
7842
7855
  setHref(value) {
7843
7856
  if (value) {
7844
7857
  if (value.indexOf("assets") > -1) {
7845
- this.setCDN2Attribute('href', value);
7858
+ this.setUrlAttribute('href', value);
7846
7859
  }
7847
7860
  else {
7848
7861
  this.setAttribute('href', value);
@@ -11018,5 +11031,5 @@ class AnatolyModule {
11018
11031
  * Generated bundle index. Do not edit.
11019
11032
  */
11020
11033
 
11021
- export { AReplacerDirective, AddressComponent, AdminGuard, Alerts, AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyIAMModule, AnatolyIAMPagesModule, AnatolyModule, AnatolyUIModule, ApiServiceBase, ApiUrl, AppContextService, AppCoreSettings, AppName, AppSettings, AppVersion, AppsGoServiceBase, AuthService, AuthenticationGuard, BillingUtils, BraintreeDialog, Browser, 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, DiscountCodesApiService, 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, ListBase, LoadingComponent, LoadingService, LocalStorageService, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, MSALUtils, ModerationStatus, ModerationStatusDropdownlist, NativeElementDirective, NoMobileSupportComponent, NodataComponent, NotificationService, OrderSummaryComponent, PageBase, PageSpinnerComponent, PagedPageBase, PayPalComponent, PayPalScriptService, PaymentMethod, PaymentMethodsComponent, PaymentOptionsComponent, PaymentStage, PaymentType, PaymentsApiService, PaymentsService, PaypalButtonComponent, PaypalSubscribeButtonComponent, 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, getAppSettingsById, getAppSettingsByName, getCurrentApp, getLocalizationInjector, is, throwIfAlreadyLoaded, timeFormats, translateLoaderFactory };
11034
+ export { AReplacerDirective, AddressComponent, AdminGuard, Alerts, AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyIAMModule, AnatolyIAMPagesModule, AnatolyModule, AnatolyUIModule, ApiServiceBase, ApiUrl, AppContextService, AppCoreSettings, AppName, AppSettings, AppVersion, AppsGoServiceBase, AuthService, AuthenticationGuard, BillingUtils, BraintreeDialog, Browser, 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, DiscountCodesApiService, 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, ListBase, LoadingComponent, LoadingService, LocalStorageService, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, MSALUtils, ModerationStatus, ModerationStatusDropdownlist, NativeElementDirective, NoMobileSupportComponent, NodataComponent, NotificationService, OrderSummaryComponent, PageBase, PageSpinnerComponent, PagedPageBase, PayPalComponent, PayPalScriptService, PaymentMethod, PaymentMethodsComponent, PaymentOptionsComponent, PaymentStage, PaymentType, PaymentsApiService, PaymentsService, PaypalButtonComponent, PaypalSubscribeButtonComponent, 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, getAppSettingsById, getAppSettingsByName, getCurrentApp, getLocalizationInjector, is, throwIfAlreadyLoaded, timeFormats, translateLoaderFactory };
11022
11035
  //# sourceMappingURL=osovitny-anatoly.mjs.map