@ibragim-dev-org/ui-forge-library 1.4.74 → 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";
|
|
@@ -1598,10 +1616,14 @@ class UiAlertMessagesOverlayService {
|
|
|
1598
1616
|
positionStrategy: strategy,
|
|
1599
1617
|
});
|
|
1600
1618
|
this.overlayRef = this.overlay.create(config);
|
|
1601
|
-
this.overlayRef.hostElement.style.zIndex = '1001';
|
|
1602
1619
|
this.overlayRef.attach(new ComponentPortal(this.component));
|
|
1603
1620
|
this.isAttached = true;
|
|
1604
1621
|
}
|
|
1622
|
+
setZIndex(zIndex) {
|
|
1623
|
+
if (this.overlayRef) {
|
|
1624
|
+
this.overlayRef.hostElement.style.zIndex = zIndex;
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1605
1627
|
init(component) {
|
|
1606
1628
|
this.component = component;
|
|
1607
1629
|
}
|
|
@@ -1630,6 +1652,7 @@ class UiAlertMessagesService {
|
|
|
1630
1652
|
overlayRef;
|
|
1631
1653
|
timerSubscriptions = new Map();
|
|
1632
1654
|
timerState = new Map();
|
|
1655
|
+
overlayStackService = inject(OverlayStackService);
|
|
1633
1656
|
constructor(uiAlertMessagesOverlayService, router) {
|
|
1634
1657
|
this.uiAlertMessagesOverlayService = uiAlertMessagesOverlayService;
|
|
1635
1658
|
this.router = router;
|
|
@@ -1725,6 +1748,7 @@ class UiAlertMessagesService {
|
|
|
1725
1748
|
if (!this.$alerts().length) {
|
|
1726
1749
|
this.uiAlertMessagesOverlayService.attachComponent();
|
|
1727
1750
|
}
|
|
1751
|
+
this.uiAlertMessagesOverlayService.setZIndex(this.overlayStackService.next());
|
|
1728
1752
|
this.router.events
|
|
1729
1753
|
.pipe(filter((v) => v instanceof NavigationEnd), tap(() => {
|
|
1730
1754
|
this.removeAll();
|
|
@@ -3074,6 +3098,7 @@ class UiDropdownService extends UiModal {
|
|
|
3074
3098
|
width: 0,
|
|
3075
3099
|
height: 0,
|
|
3076
3100
|
});
|
|
3101
|
+
overlayStackService = inject(OverlayStackService);
|
|
3077
3102
|
connectedPositions = {
|
|
3078
3103
|
bottom: {
|
|
3079
3104
|
animationOrigin: 'top center',
|
|
@@ -3242,6 +3267,7 @@ class UiDropdownService extends UiModal {
|
|
|
3242
3267
|
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
3243
3268
|
positionStrategy: this.createPositionStrategy(attachedRef, fetchedParameters, offsetX, offsetY),
|
|
3244
3269
|
});
|
|
3270
|
+
overlayRef.hostElement.style.zIndex = this.overlayStackService.next();
|
|
3245
3271
|
if (fetchedParameters.removePrevious) {
|
|
3246
3272
|
this.subscribeToOutsideEvents(overlayRef);
|
|
3247
3273
|
}
|
|
@@ -3274,6 +3300,7 @@ class UiDropdownService extends UiModal {
|
|
|
3274
3300
|
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
3275
3301
|
positionStrategy: this.createMousePositionStrategy(event),
|
|
3276
3302
|
});
|
|
3303
|
+
overlayRef.hostElement.style.zIndex = this.overlayStackService.next();
|
|
3277
3304
|
if (fetchedParameters.removePrevious) {
|
|
3278
3305
|
this.subscribeToOutsideEvents(overlayRef);
|
|
3279
3306
|
}
|