chrv-components 1.12.141 → 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
@@ -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,12 +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))
4091
+ this.isInsideTarget(position.x, position.y)), distinctUntilChanged(), debounceTime$1(100), takeUntilDestroyed(this.destroyRef))
4086
4092
  .subscribe((isInside) => {
4087
4093
  if (isInside && !this.isOpen()) {
4088
4094
  this.showPopover();
4089
4095
  }
4090
- else {
4096
+ else if (this.isOpen()) {
4091
4097
  this.hidePopover();
4092
4098
  }
4093
4099
  });
@@ -4099,10 +4105,10 @@ class ChrPopoverDirective {
4099
4105
  // hover: true,
4100
4106
  // position: { x: event.clientX, y: event.clientY },
4101
4107
  // });
4102
- this.lastKnownMousePosition$.next({
4103
- x: event.clientX,
4104
- y: event.clientY,
4105
- });
4108
+ // this.lastKnownMousePosition$.next({
4109
+ // x: event.clientX,
4110
+ // y: event.clientY,
4111
+ // });
4106
4112
  this.isHostHovered$.next(true);
4107
4113
  // if (!this.isOpen()) {
4108
4114
  // this.showPopover();
@@ -4123,10 +4129,10 @@ class ChrPopoverDirective {
4123
4129
  // hover: false,
4124
4130
  // position: { x: event.clientX, y: event.clientY },
4125
4131
  // });
4126
- this.lastKnownMousePosition$.next({
4127
- x: event.clientX,
4128
- y: event.clientY,
4129
- });
4132
+ // this.lastKnownMousePosition$.next({
4133
+ // x: event.clientX,
4134
+ // y: event.clientY,
4135
+ // });
4130
4136
  this.isHostHovered$.next(false);
4131
4137
  });
4132
4138
  };
@@ -4138,10 +4144,10 @@ class ChrPopoverDirective {
4138
4144
  // hover: true,
4139
4145
  // position: { x: event.clientX, y: event.clientY },
4140
4146
  // });
4141
- this.lastKnownMousePosition$.next({
4142
- x: event.clientX,
4143
- y: event.clientY,
4144
- });
4147
+ // this.lastKnownMousePosition$.next({
4148
+ // x: event.clientX,
4149
+ // y: event.clientY,
4150
+ // });
4145
4151
  this.isTargetHovered$.next(true);
4146
4152
  // this.isInsidePopover$.next(true);
4147
4153
  });
@@ -4155,10 +4161,10 @@ class ChrPopoverDirective {
4155
4161
  // hover: false,
4156
4162
  // position: { x: event.clientX, y: event.clientY },
4157
4163
  // });
4158
- this.lastKnownMousePosition$.next({
4159
- x: event.clientX,
4160
- y: event.clientY,
4161
- });
4164
+ // this.lastKnownMousePosition$.next({
4165
+ // x: event.clientX,
4166
+ // y: event.clientY,
4167
+ // });
4162
4168
  this.isTargetHovered$.next(false);
4163
4169
  // setTimeout(() => {
4164
4170
  // if (!this.isInsideHost() && !this.isInsideTargetBoundingBox(event))
@@ -4229,7 +4235,7 @@ class ChrPopoverDirective {
4229
4235
  this.renderer.setStyle(this.targetElement(), 'border', 'none');
4230
4236
  }
4231
4237
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ChrPopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4232
- 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 }); }
4233
4239
  }
4234
4240
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ChrPopoverDirective, decorators: [{
4235
4241
  type: Directive,
@@ -4237,6 +4243,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
4237
4243
  selector: '[chrPopover]',
4238
4244
  host: {
4239
4245
  '(keyup.escape)': 'hidePopover()',
4246
+ '(document:mousemove)': 'updateLastKnownMousePosition($event)',
4240
4247
  },
4241
4248
  }]
4242
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 }] }] } });