@osovitny/anatoly 3.19.8 → 3.19.9

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>
@@ -4576,16 +4588,10 @@ class ReplacerDirectiveBase {
4576
4588
  this.el = el;
4577
4589
  this.renderer = renderer;
4578
4590
  }
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);
4591
+ setUrlAttribute(name, url) {
4592
+ if (url) {
4593
+ let newUrl = formatUrl(url);
4594
+ this.setAttribute(name, newUrl);
4589
4595
  }
4590
4596
  }
4591
4597
  setAttribute(name, value) {
@@ -4624,7 +4630,7 @@ class ImageReplacerDirective extends ReplacerDirectiveBase {
4624
4630
  }
4625
4631
  }
4626
4632
  setSrc(value) {
4627
- this.setCDN2Attribute('src', value);
4633
+ this.setUrlAttribute('src', value);
4628
4634
  }
4629
4635
  static { this.ɵfac = /*@__PURE__*/ (() => { let ɵImageReplacerDirective_BaseFactory; return function ImageReplacerDirective_Factory(__ngFactoryType__) { return (ɵImageReplacerDirective_BaseFactory || (ɵImageReplacerDirective_BaseFactory = i0.ɵɵgetInheritedFactory(ImageReplacerDirective)))(__ngFactoryType__ || ImageReplacerDirective); }; })(); }
4630
4636
  static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ImageReplacerDirective, selectors: [["img"]], inputs: { src: "src" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature] }); }
@@ -7842,7 +7848,7 @@ class AReplacerDirective extends ReplacerDirectiveBase {
7842
7848
  setHref(value) {
7843
7849
  if (value) {
7844
7850
  if (value.indexOf("assets") > -1) {
7845
- this.setCDN2Attribute('href', value);
7851
+ this.setUrlAttribute('href', value);
7846
7852
  }
7847
7853
  else {
7848
7854
  this.setAttribute('href', value);
@@ -11018,5 +11024,5 @@ class AnatolyModule {
11018
11024
  * Generated bundle index. Do not edit.
11019
11025
  */
11020
11026
 
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 };
11027
+ 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
11028
  //# sourceMappingURL=osovitny-anatoly.mjs.map