chrv-components 1.12.133 → 1.12.135
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
|
|
@@ -4022,7 +4022,6 @@ class ChrPopoverDirective {
|
|
|
4022
4022
|
...(ngDevMode ? [{ debugName: "hostElement" }] : /* istanbul ignore next */ []));
|
|
4023
4023
|
this.isHostHovered$ = new Subject();
|
|
4024
4024
|
this.isTargetHovered$ = new Subject();
|
|
4025
|
-
this.lastKnowMousePosition = new Subject();
|
|
4026
4025
|
// private readonly isInsidePopover$ = new BehaviorSubject<boolean>(false);
|
|
4027
4026
|
this.destroyRef = inject(DestroyRef);
|
|
4028
4027
|
// private readonly isInsideHost = signal(false);
|
|
@@ -4064,39 +4063,24 @@ class ChrPopoverDirective {
|
|
|
4064
4063
|
// if (y < rect.top || y >= rect.bottom) return false;
|
|
4065
4064
|
// return true;
|
|
4066
4065
|
// };
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
};
|
|
4066
|
+
// updateMousePosition = (event: MouseEvent) => {
|
|
4067
|
+
// this.lastKnowMousePosition.next({
|
|
4068
|
+
// x: event.clientX,
|
|
4069
|
+
// y: event.clientY,
|
|
4070
|
+
// });
|
|
4071
|
+
// };
|
|
4073
4072
|
this.setupSubject = () => {
|
|
4074
|
-
combineLatest([
|
|
4075
|
-
|
|
4076
|
-
this.isTargetHovered$,
|
|
4077
|
-
this.lastKnowMousePosition,
|
|
4078
|
-
])
|
|
4079
|
-
.pipe(map(([hostHovered, targetHovered, mouse]) => hostHovered.hover ||
|
|
4073
|
+
combineLatest([this.isHostHovered$, this.isTargetHovered$])
|
|
4074
|
+
.pipe(map(([hostHovered, targetHovered]) => hostHovered.hover ||
|
|
4080
4075
|
targetHovered.hover ||
|
|
4081
4076
|
this.isInsideHost(hostHovered.position?.x, hostHovered.position.y) ||
|
|
4082
|
-
this.isInsideTarget(targetHovered.position?.x, targetHovered.position.y)), switchMap((isInside) =>
|
|
4083
|
-
if (isInside) {
|
|
4084
|
-
return of(true);
|
|
4085
|
-
}
|
|
4086
|
-
else {
|
|
4087
|
-
return timer(100).pipe(map(() => false));
|
|
4088
|
-
}
|
|
4089
|
-
}), takeUntilDestroyed(this.destroyRef))
|
|
4077
|
+
this.isInsideTarget(targetHovered.position?.x, targetHovered.position.y)), switchMap((isInside) => timer(100).pipe(map(() => isInside))), takeUntilDestroyed(this.destroyRef))
|
|
4090
4078
|
.subscribe((isInside) => {
|
|
4091
|
-
if (isInside) {
|
|
4092
|
-
|
|
4093
|
-
this.showPopover();
|
|
4094
|
-
}
|
|
4079
|
+
if (isInside && !this.isOpen()) {
|
|
4080
|
+
this.showPopover();
|
|
4095
4081
|
}
|
|
4096
4082
|
else {
|
|
4097
|
-
|
|
4098
|
-
this.hidePopover();
|
|
4099
|
-
}
|
|
4083
|
+
this.hidePopover();
|
|
4100
4084
|
}
|
|
4101
4085
|
});
|
|
4102
4086
|
};
|
|
@@ -4217,7 +4201,7 @@ class ChrPopoverDirective {
|
|
|
4217
4201
|
this.renderer.setStyle(this.targetElement(), 'border', 'none');
|
|
4218
4202
|
}
|
|
4219
4203
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ChrPopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4220
|
-
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: {
|
|
4204
|
+
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 }); }
|
|
4221
4205
|
}
|
|
4222
4206
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ChrPopoverDirective, decorators: [{
|
|
4223
4207
|
type: Directive,
|
|
@@ -4225,7 +4209,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
4225
4209
|
selector: '[chrPopover]',
|
|
4226
4210
|
host: {
|
|
4227
4211
|
'(keyup.escape)': 'hidePopover()',
|
|
4228
|
-
'window:mousemove': 'updaeMousePosition($event)',
|
|
4229
4212
|
},
|
|
4230
4213
|
}]
|
|
4231
4214
|
}], 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 }] }] } });
|