@acorex/components 16.20.3 → 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.
|
@@ -733,44 +733,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
733
733
|
}] } });
|
|
734
734
|
|
|
735
735
|
class AXLoadingService {
|
|
736
|
-
injection;
|
|
737
736
|
overlayService;
|
|
738
737
|
_stack = [];
|
|
739
|
-
constructor(
|
|
740
|
-
this.injection = injection;
|
|
738
|
+
constructor(overlayService) {
|
|
741
739
|
this.overlayService = overlayService;
|
|
742
740
|
}
|
|
743
741
|
show(location) {
|
|
744
|
-
let host;
|
|
742
|
+
let host = null;
|
|
745
743
|
if (location) {
|
|
746
744
|
host = location.closest('.ax-loading-host');
|
|
747
745
|
}
|
|
748
|
-
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);
|
|
749
754
|
const com = this.overlayService.show(AXLoadingIndicatorComponent, {}, {
|
|
755
|
+
containerElement: backdrop,
|
|
756
|
+
hasBackdrop: false,
|
|
750
757
|
closeOnClickOutside: false,
|
|
751
|
-
|
|
752
|
-
hasBackdrop: true,
|
|
753
|
-
backdropClass: ['ax-loading-overlay'],
|
|
754
|
-
scroll: 'block'
|
|
758
|
+
scroll: 'block',
|
|
755
759
|
});
|
|
756
760
|
const id = new Date().getTime();
|
|
757
|
-
this._stack.push({ id, component: com });
|
|
761
|
+
this._stack.push({ id, component: com, backdrop });
|
|
758
762
|
return id;
|
|
759
763
|
}
|
|
760
764
|
hide(id) {
|
|
761
|
-
const
|
|
762
|
-
if (
|
|
763
|
-
|
|
764
|
-
|
|
765
|
+
const item = this._stack.find((c) => c.id === id);
|
|
766
|
+
if (item) {
|
|
767
|
+
item.component.dispose();
|
|
768
|
+
item.backdrop?.remove();
|
|
769
|
+
this._stack = this._stack.filter((c) => c.id !== id);
|
|
765
770
|
}
|
|
766
771
|
}
|
|
767
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXLoadingService, deps: [{ token:
|
|
772
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXLoadingService, deps: [{ token: AXOverlayService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
768
773
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXLoadingService, providedIn: 'root' });
|
|
769
774
|
}
|
|
770
775
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXLoadingService, decorators: [{
|
|
771
776
|
type: Injectable,
|
|
772
777
|
args: [{ providedIn: 'root' }]
|
|
773
|
-
}], ctorParameters: () => [{ type:
|
|
778
|
+
}], ctorParameters: () => [{ type: AXOverlayService }] });
|
|
774
779
|
|
|
775
780
|
class AXPageComponent {
|
|
776
781
|
el;
|