@ibragim-dev-org/ui-forge-library 1.4.73 → 1.4.75
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.
|
@@ -1554,6 +1554,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
1554
1554
|
args: [PLATFORM_ID]
|
|
1555
1555
|
}] }], propDecorators: { $isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "$isOpen", required: false }] }, { type: i0.Output, args: ["$isOpenChange"] }], $durationMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "$durationMs", required: false }] }], $content: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], $button: [{ type: i0.ViewChild, args: ['buttonContainer', { isSignal: true }] }] } });
|
|
1556
1556
|
|
|
1557
|
+
/**
|
|
1558
|
+
* OverlayStackService
|
|
1559
|
+
* Hands out increasing z-index values so the most recently shown overlay (alert or dropdown)
|
|
1560
|
+
* always renders above the ones shown before it. Starts above the CDK default (1000) used by popups.
|
|
1561
|
+
*/
|
|
1562
|
+
class OverlayStackService {
|
|
1563
|
+
zIndex = 1000;
|
|
1564
|
+
next() {
|
|
1565
|
+
return String(++this.zIndex);
|
|
1566
|
+
}
|
|
1567
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OverlayStackService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1568
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OverlayStackService, providedIn: 'root' });
|
|
1569
|
+
}
|
|
1570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OverlayStackService, decorators: [{
|
|
1571
|
+
type: Injectable,
|
|
1572
|
+
args: [{ providedIn: 'root' }]
|
|
1573
|
+
}] });
|
|
1574
|
+
|
|
1557
1575
|
var AlertType;
|
|
1558
1576
|
(function (AlertType) {
|
|
1559
1577
|
AlertType["SUCCESS"] = "success";
|
|
@@ -1601,6 +1619,11 @@ class UiAlertMessagesOverlayService {
|
|
|
1601
1619
|
this.overlayRef.attach(new ComponentPortal(this.component));
|
|
1602
1620
|
this.isAttached = true;
|
|
1603
1621
|
}
|
|
1622
|
+
setZIndex(zIndex) {
|
|
1623
|
+
if (this.overlayRef) {
|
|
1624
|
+
this.overlayRef.hostElement.style.zIndex = zIndex;
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1604
1627
|
init(component) {
|
|
1605
1628
|
this.component = component;
|
|
1606
1629
|
}
|
|
@@ -1629,6 +1652,7 @@ class UiAlertMessagesService {
|
|
|
1629
1652
|
overlayRef;
|
|
1630
1653
|
timerSubscriptions = new Map();
|
|
1631
1654
|
timerState = new Map();
|
|
1655
|
+
overlayStackService = inject(OverlayStackService);
|
|
1632
1656
|
constructor(uiAlertMessagesOverlayService, router) {
|
|
1633
1657
|
this.uiAlertMessagesOverlayService = uiAlertMessagesOverlayService;
|
|
1634
1658
|
this.router = router;
|
|
@@ -1724,6 +1748,7 @@ class UiAlertMessagesService {
|
|
|
1724
1748
|
if (!this.$alerts().length) {
|
|
1725
1749
|
this.uiAlertMessagesOverlayService.attachComponent();
|
|
1726
1750
|
}
|
|
1751
|
+
this.uiAlertMessagesOverlayService.setZIndex(this.overlayStackService.next());
|
|
1727
1752
|
this.router.events
|
|
1728
1753
|
.pipe(filter((v) => v instanceof NavigationEnd), tap(() => {
|
|
1729
1754
|
this.removeAll();
|
|
@@ -3073,6 +3098,7 @@ class UiDropdownService extends UiModal {
|
|
|
3073
3098
|
width: 0,
|
|
3074
3099
|
height: 0,
|
|
3075
3100
|
});
|
|
3101
|
+
overlayStackService = inject(OverlayStackService);
|
|
3076
3102
|
connectedPositions = {
|
|
3077
3103
|
bottom: {
|
|
3078
3104
|
animationOrigin: 'top center',
|
|
@@ -3241,6 +3267,7 @@ class UiDropdownService extends UiModal {
|
|
|
3241
3267
|
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
3242
3268
|
positionStrategy: this.createPositionStrategy(attachedRef, fetchedParameters, offsetX, offsetY),
|
|
3243
3269
|
});
|
|
3270
|
+
overlayRef.hostElement.style.zIndex = this.overlayStackService.next();
|
|
3244
3271
|
if (fetchedParameters.removePrevious) {
|
|
3245
3272
|
this.subscribeToOutsideEvents(overlayRef);
|
|
3246
3273
|
}
|
|
@@ -3273,6 +3300,7 @@ class UiDropdownService extends UiModal {
|
|
|
3273
3300
|
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
3274
3301
|
positionStrategy: this.createMousePositionStrategy(event),
|
|
3275
3302
|
});
|
|
3303
|
+
overlayRef.hostElement.style.zIndex = this.overlayStackService.next();
|
|
3276
3304
|
if (fetchedParameters.removePrevious) {
|
|
3277
3305
|
this.subscribeToOutsideEvents(overlayRef);
|
|
3278
3306
|
}
|