chrv-components 1.12.140 → 1.12.142

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
@@ -10,8 +10,8 @@ import { CommonModule, AsyncPipe, DatePipe, formatDate, DATE_PIPE_DEFAULT_OPTION
10
10
  import * as i1$3 from '@angular/cdk/overlay';
11
11
  import { Overlay, CdkOverlayOrigin, CdkConnectedOverlay, CdkScrollable, CDK_CONNECTED_OVERLAY_DEFAULT_CONFIG } from '@angular/cdk/overlay';
12
12
  import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
13
- import { Subject, Observable, map, BehaviorSubject, skip, debounceTime as debounceTime$1, distinctUntilChanged, skipWhile, from, mergeMap, toArray, timer, takeUntil as takeUntil$1, of, catchError, forkJoin, take, combineLatest, switchMap, finalize, tap, interval } from 'rxjs';
14
- import { debounceTime, takeUntil, finalize as finalize$1, concatMap, switchMap as switchMap$1, tap as tap$1, catchError as catchError$1 } from 'rxjs/operators';
13
+ import { Subject, Observable, map, BehaviorSubject, skip, debounceTime as debounceTime$1, distinctUntilChanged, skipWhile, from, mergeMap, toArray, timer, takeUntil as takeUntil$1, of, catchError, forkJoin, take, combineLatest, finalize, tap, interval } from 'rxjs';
14
+ import { debounceTime, takeUntil, finalize as finalize$1, concatMap, switchMap, tap as tap$1, catchError as catchError$1 } from 'rxjs/operators';
15
15
  import * as i1$2 from '@angular/forms';
16
16
  import { NG_VALIDATORS, Validators, NgControl, ReactiveFormsModule, FormsModule, FormBuilder, FormControl } from '@angular/forms';
17
17
  import { isValid, isBefore, formatDate as formatDate$1 } from 'date-fns';
@@ -4052,6 +4052,12 @@ class ChrPopoverDirective {
4052
4052
  return mayBeTemplate;
4053
4053
  }, /* @ts-ignore */
4054
4054
  ...(ngDevMode ? [{ debugName: "targetElementId" }] : /* istanbul ignore next */ []));
4055
+ this.updateLastKnownMousePosition = (event) => {
4056
+ this.lastKnownMousePosition$.next({
4057
+ x: event.clientX,
4058
+ y: event.clientY,
4059
+ });
4060
+ };
4055
4061
  // private isInsideHostBoundingBox = (event: MouseEvent) => {
4056
4062
  // const hostRect = this.hostElement().getBoundingClientRect();
4057
4063
  // return this.isInsideRect(event, hostRect);
@@ -4082,19 +4088,12 @@ class ChrPopoverDirective {
4082
4088
  .pipe(map(([hostHovered, targetHovered, position]) => hostHovered ||
4083
4089
  targetHovered ||
4084
4090
  this.isInsideHost(position.x, position.y) ||
4085
- this.isInsideTarget(position.x, position.y)), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef), switchMap((isInside) => {
4086
- if (isInside) {
4087
- return of(true);
4088
- }
4089
- else {
4090
- return timer(100).pipe(map(() => false));
4091
- }
4092
- }))
4091
+ this.isInsideTarget(position.x, position.y)), distinctUntilChanged(), debounceTime$1(100), takeUntilDestroyed(this.destroyRef))
4093
4092
  .subscribe((isInside) => {
4094
4093
  if (isInside && !this.isOpen()) {
4095
4094
  this.showPopover();
4096
4095
  }
4097
- else {
4096
+ else if (this.isOpen()) {
4098
4097
  this.hidePopover();
4099
4098
  }
4100
4099
  });
@@ -4106,10 +4105,10 @@ class ChrPopoverDirective {
4106
4105
  // hover: true,
4107
4106
  // position: { x: event.clientX, y: event.clientY },
4108
4107
  // });
4109
- this.lastKnownMousePosition$.next({
4110
- x: event.clientX,
4111
- y: event.clientY,
4112
- });
4108
+ // this.lastKnownMousePosition$.next({
4109
+ // x: event.clientX,
4110
+ // y: event.clientY,
4111
+ // });
4113
4112
  this.isHostHovered$.next(true);
4114
4113
  // if (!this.isOpen()) {
4115
4114
  // this.showPopover();
@@ -4130,10 +4129,10 @@ class ChrPopoverDirective {
4130
4129
  // hover: false,
4131
4130
  // position: { x: event.clientX, y: event.clientY },
4132
4131
  // });
4133
- this.lastKnownMousePosition$.next({
4134
- x: event.clientX,
4135
- y: event.clientY,
4136
- });
4132
+ // this.lastKnownMousePosition$.next({
4133
+ // x: event.clientX,
4134
+ // y: event.clientY,
4135
+ // });
4137
4136
  this.isHostHovered$.next(false);
4138
4137
  });
4139
4138
  };
@@ -4145,10 +4144,10 @@ class ChrPopoverDirective {
4145
4144
  // hover: true,
4146
4145
  // position: { x: event.clientX, y: event.clientY },
4147
4146
  // });
4148
- this.lastKnownMousePosition$.next({
4149
- x: event.clientX,
4150
- y: event.clientY,
4151
- });
4147
+ // this.lastKnownMousePosition$.next({
4148
+ // x: event.clientX,
4149
+ // y: event.clientY,
4150
+ // });
4152
4151
  this.isTargetHovered$.next(true);
4153
4152
  // this.isInsidePopover$.next(true);
4154
4153
  });
@@ -4162,10 +4161,10 @@ class ChrPopoverDirective {
4162
4161
  // hover: false,
4163
4162
  // position: { x: event.clientX, y: event.clientY },
4164
4163
  // });
4165
- this.lastKnownMousePosition$.next({
4166
- x: event.clientX,
4167
- y: event.clientY,
4168
- });
4164
+ // this.lastKnownMousePosition$.next({
4165
+ // x: event.clientX,
4166
+ // y: event.clientY,
4167
+ // });
4169
4168
  this.isTargetHovered$.next(false);
4170
4169
  // setTimeout(() => {
4171
4170
  // if (!this.isInsideHost() && !this.isInsideTargetBoundingBox(event))
@@ -4236,7 +4235,7 @@ class ChrPopoverDirective {
4236
4235
  this.renderer.setStyle(this.targetElement(), 'border', 'none');
4237
4236
  }
4238
4237
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ChrPopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4239
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: ChrPopoverDirective, isStandalone: true, selector: "[chrPopover]", inputs: { chrPopover: { classPropertyName: "chrPopover", publicName: "chrPopover", isSignal: true, isRequired: true, transformFunction: null }, chrPopoverPosition: { classPropertyName: "chrPopoverPosition", publicName: "chrPopoverPosition", isSignal: true, isRequired: false, transformFunction: null }, chrPopoverData: { classPropertyName: "chrPopoverData", publicName: "chrPopoverData", isSignal: true, isRequired: false, transformFunction: null }, chrPopoverOnHover: { classPropertyName: "chrPopoverOnHover", publicName: "chrPopoverOnHover", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keyup.escape": "hidePopover()" } }, ngImport: i0 }); }
4238
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: ChrPopoverDirective, isStandalone: true, selector: "[chrPopover]", inputs: { chrPopover: { classPropertyName: "chrPopover", publicName: "chrPopover", isSignal: true, isRequired: true, transformFunction: null }, chrPopoverPosition: { classPropertyName: "chrPopoverPosition", publicName: "chrPopoverPosition", isSignal: true, isRequired: false, transformFunction: null }, chrPopoverData: { classPropertyName: "chrPopoverData", publicName: "chrPopoverData", isSignal: true, isRequired: false, transformFunction: null }, chrPopoverOnHover: { classPropertyName: "chrPopoverOnHover", publicName: "chrPopoverOnHover", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keyup.escape": "hidePopover()", "document:mousemove": "updateLastKnownMousePosition($event)" } }, ngImport: i0 }); }
4240
4239
  }
4241
4240
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ChrPopoverDirective, decorators: [{
4242
4241
  type: Directive,
@@ -4244,6 +4243,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
4244
4243
  selector: '[chrPopover]',
4245
4244
  host: {
4246
4245
  '(keyup.escape)': 'hidePopover()',
4246
+ '(document:mousemove)': 'updateLastKnownMousePosition($event)',
4247
4247
  },
4248
4248
  }]
4249
4249
  }], propDecorators: { chrPopover: [{ type: i0.Input, args: [{ isSignal: true, alias: "chrPopover", required: true }] }], chrPopoverPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "chrPopoverPosition", required: false }] }], chrPopoverData: [{ type: i0.Input, args: [{ isSignal: true, alias: "chrPopoverData", required: false }] }], chrPopoverOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "chrPopoverOnHover", required: false }] }] } });
@@ -5507,7 +5507,7 @@ class LegacyToastService {
5507
5507
  this.currentToastSubject.next(null);
5508
5508
  }),
5509
5509
  //Small delay between toasts
5510
- switchMap$1(() => timer(500)));
5510
+ switchMap(() => timer(500)));
5511
5511
  }))
5512
5512
  .subscribe();
5513
5513
  }