@ibragim-dev-org/ui-forge-library 1.4.70 → 1.4.71
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i2 from '@angular/router';
|
|
2
2
|
import { NavigationEnd, NavigationStart, ActivationEnd } from '@angular/router';
|
|
3
|
-
import { BehaviorSubject, filter, take, scheduled, fromEvent, asyncScheduler, mergeAll, tap, debounceTime, Subject, Subscription, timer, switchMap, interval, takeWhile, finalize, takeUntil as takeUntil$1 } from 'rxjs';
|
|
3
|
+
import { BehaviorSubject, filter, take, scheduled, fromEvent, asyncScheduler, mergeAll, tap, debounceTime, Subject, Subscription, timer, switchMap, interval, takeWhile, finalize, ReplaySubject, takeUntil as takeUntil$1 } from 'rxjs';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { model, effect, Directive, Injectable, output, Input, input, PLATFORM_ID, Inject, EventEmitter, Output, signal, inject, Pipe, Attribute, ChangeDetectionStrategy, Component, computed, viewChild, untracked, Injector, afterRenderEffect, contentChildren, contentChild, ViewChildren } from '@angular/core';
|
|
6
6
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -2333,8 +2333,9 @@ class UiPopupInstance {
|
|
|
2333
2333
|
triggerPulse$ = new Subject();
|
|
2334
2334
|
isHide$ = new Subject();
|
|
2335
2335
|
closed = new Subject();
|
|
2336
|
-
|
|
2337
|
-
|
|
2336
|
+
// Replayed so a container that subscribes after close() (before its first change detection) still closes.
|
|
2337
|
+
shouldClose = new ReplaySubject(1);
|
|
2338
|
+
closing = false;
|
|
2338
2339
|
constructor(overlayRef, destroyRef, onClose = () => { }, options = {
|
|
2339
2340
|
startOrigin: 'center center',
|
|
2340
2341
|
endOrigin: 'center center',
|
|
@@ -2358,11 +2359,14 @@ class UiPopupInstance {
|
|
|
2358
2359
|
}), takeUntilDestroyed(this.destroyRef))
|
|
2359
2360
|
.subscribe();
|
|
2360
2361
|
}
|
|
2362
|
+
get isClosing() {
|
|
2363
|
+
return this.closing;
|
|
2364
|
+
}
|
|
2361
2365
|
close() {
|
|
2362
|
-
if (this.
|
|
2366
|
+
if (this.closing) {
|
|
2363
2367
|
return;
|
|
2364
2368
|
}
|
|
2365
|
-
this.
|
|
2369
|
+
this.closing = true;
|
|
2366
2370
|
this.onClose();
|
|
2367
2371
|
this.shouldClose.next();
|
|
2368
2372
|
this.shouldClose.complete();
|
|
@@ -2593,7 +2597,9 @@ class UiPopupContainerDirective {
|
|
|
2593
2597
|
topStart: animationParams.topStart,
|
|
2594
2598
|
topEnd: animationParams.topEnd,
|
|
2595
2599
|
});
|
|
2596
|
-
this
|
|
2600
|
+
if (!this.popupInstance.isClosing) {
|
|
2601
|
+
this.$isShow.set(true);
|
|
2602
|
+
}
|
|
2597
2603
|
}), takeUntil$1(this.destroyAnimationOrigin$), takeUntilDestroyed(this.destroyRef))
|
|
2598
2604
|
.subscribe();
|
|
2599
2605
|
if (isBrowser()) {
|
|
@@ -3536,7 +3542,10 @@ class HoverTipDirective {
|
|
|
3536
3542
|
$offsetX = input(0, { ...(ngDevMode ? { debugName: "$offsetX" } : {}), alias: 'appHoverTipOffsetX' });
|
|
3537
3543
|
$offsetY = input(0, { ...(ngDevMode ? { debugName: "$offsetY" } : {}), alias: 'appHoverTipOffsetY' });
|
|
3538
3544
|
tipId = `hover-tip-${HoverTipDirective.instanceCounter++}`;
|
|
3539
|
-
|
|
3545
|
+
// Derived from the service: the tip can also be closed externally (Escape, closeAll on scroll/navigation).
|
|
3546
|
+
get isOpen() {
|
|
3547
|
+
return this.uiDropdownService.instances.some((instance) => instance.id === this.tipId);
|
|
3548
|
+
}
|
|
3540
3549
|
constructor(hostRef, uiDropdownService, destroyRef) {
|
|
3541
3550
|
this.hostRef = hostRef;
|
|
3542
3551
|
this.uiDropdownService = uiDropdownService;
|
|
@@ -3572,14 +3581,12 @@ class HoverTipDirective {
|
|
|
3572
3581
|
return;
|
|
3573
3582
|
}
|
|
3574
3583
|
this.uiDropdownService.openTip(text, this.hostRef.nativeElement, this.tipId, this.$position(), this.$offsetY(), this.$offsetX());
|
|
3575
|
-
this.isOpen = true;
|
|
3576
3584
|
}
|
|
3577
3585
|
closeTip() {
|
|
3578
3586
|
if (!this.isOpen) {
|
|
3579
3587
|
return;
|
|
3580
3588
|
}
|
|
3581
3589
|
this.uiDropdownService.closeById(this.tipId);
|
|
3582
|
-
this.isOpen = false;
|
|
3583
3590
|
}
|
|
3584
3591
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: HoverTipDirective, deps: [{ token: i0.ElementRef }, { token: UiDropdownService }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3585
3592
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: HoverTipDirective, isStandalone: true, selector: "[appHoverTip]", inputs: { $text: { classPropertyName: "$text", publicName: "appHoverTip", isSignal: true, isRequired: true, transformFunction: null }, $debounceTime: { classPropertyName: "$debounceTime", publicName: "$debounceTime", isSignal: true, isRequired: false, transformFunction: null }, $position: { classPropertyName: "$position", publicName: "appHoverTipPosition", isSignal: true, isRequired: false, transformFunction: null }, $offsetX: { classPropertyName: "$offsetX", publicName: "appHoverTipOffsetX", isSignal: true, isRequired: false, transformFunction: null }, $offsetY: { classPropertyName: "$offsetY", publicName: "appHoverTipOffsetY", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|