chrv-components 1.12.135 → 1.12.137

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.
Binary file
@@ -4020,8 +4020,14 @@ class ChrPopoverDirective {
4020
4020
  this.viewContainerRef = inject(ViewContainerRef);
4021
4021
  this.hostElement = computed(() => this.hostElementRef.nativeElement, /* @ts-ignore */
4022
4022
  ...(ngDevMode ? [{ debugName: "hostElement" }] : /* istanbul ignore next */ []));
4023
- this.isHostHovered$ = new Subject();
4024
- this.isTargetHovered$ = new Subject();
4023
+ this.isHostHovered$ = new BehaviorSubject({
4024
+ hover: false,
4025
+ position: { x: 0, y: 0 },
4026
+ });
4027
+ this.isTargetHovered$ = new BehaviorSubject({
4028
+ hover: false,
4029
+ position: { x: 0, y: 0 },
4030
+ });
4025
4031
  // private readonly isInsidePopover$ = new BehaviorSubject<boolean>(false);
4026
4032
  this.destroyRef = inject(DestroyRef);
4027
4033
  // private readonly isInsideHost = signal(false);
@@ -4073,8 +4079,8 @@ class ChrPopoverDirective {
4073
4079
  combineLatest([this.isHostHovered$, this.isTargetHovered$])
4074
4080
  .pipe(map(([hostHovered, targetHovered]) => hostHovered.hover ||
4075
4081
  targetHovered.hover ||
4076
- this.isInsideHost(hostHovered.position?.x, hostHovered.position.y) ||
4077
- this.isInsideTarget(targetHovered.position?.x, targetHovered.position.y)), switchMap((isInside) => timer(100).pipe(map(() => isInside))), takeUntilDestroyed(this.destroyRef))
4082
+ this.isInsideHost(targetHovered.position.x, targetHovered.position.y) ||
4083
+ this.isInsideTarget(hostHovered.position.x, hostHovered.position.y)), switchMap((isInside) => timer(100).pipe(map(() => isInside))), takeUntilDestroyed(this.destroyRef))
4078
4084
  .subscribe((isInside) => {
4079
4085
  if (isInside && !this.isOpen()) {
4080
4086
  this.showPopover();