@acorex/components 16.20.4 → 16.20.5

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.
@@ -739,27 +739,33 @@ class AXLoadingService {
739
739
  this.overlayService = overlayService;
740
740
  }
741
741
  show(location) {
742
- debugger;
743
- let host;
742
+ let host = null;
744
743
  if (location) {
745
744
  host = location.closest('.ax-loading-host');
746
745
  }
747
- const containerElement = (host || location);
746
+ const containerElement = (host || location || document.body);
747
+ const backdrop = document.createElement('div');
748
+ backdrop.classList.add('ax-loading-overlay');
749
+ const computed = getComputedStyle(containerElement);
750
+ if (computed.position === 'static') {
751
+ containerElement.style.position = 'relative';
752
+ }
753
+ containerElement.appendChild(backdrop);
748
754
  const com = this.overlayService.show(AXLoadingIndicatorComponent, {}, {
749
- closeOnClickOutside: false,
750
- containerElement,
755
+ containerElement: backdrop,
751
756
  hasBackdrop: false,
752
- backdropClass: ['ax-loading-overlay'],
757
+ closeOnClickOutside: false,
753
758
  scroll: 'block',
754
759
  });
755
760
  const id = new Date().getTime();
756
- this._stack.push({ id, component: com });
761
+ this._stack.push({ id, component: com, backdrop });
757
762
  return id;
758
763
  }
759
764
  hide(id) {
760
- const f = this._stack.find((c) => c.id === id);
761
- if (f) {
762
- f.component.dispose();
765
+ const item = this._stack.find((c) => c.id === id);
766
+ if (item) {
767
+ item.component.dispose();
768
+ item.backdrop?.remove();
763
769
  this._stack = this._stack.filter((c) => c.id !== id);
764
770
  }
765
771
  }