chrv-components 1.12.104 → 1.12.106
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
|
|
@@ -4010,6 +4010,8 @@ class ChrPopoverDirectiveDirective {
|
|
|
4010
4010
|
...(ngDevMode ? [{ debugName: "chrPopoverPosition" }] : /* istanbul ignore next */ []));
|
|
4011
4011
|
this.chrPopoverOnHover = input(false, /* @ts-ignore */
|
|
4012
4012
|
...(ngDevMode ? [{ debugName: "chrPopoverOnHover" }] : /* istanbul ignore next */ []));
|
|
4013
|
+
this.isOpen = signal(false, /* @ts-ignore */
|
|
4014
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
4013
4015
|
this.renderer = inject(Renderer2);
|
|
4014
4016
|
this.hostElementRef = inject(ElementRef);
|
|
4015
4017
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
@@ -4063,13 +4065,13 @@ class ChrPopoverDirectiveDirective {
|
|
|
4063
4065
|
this.setupHostListeners = () => {
|
|
4064
4066
|
this.renderer.listen(this.hostElement(), 'mouseenter', (event) => {
|
|
4065
4067
|
this.isInsideHost.set(true);
|
|
4066
|
-
this.
|
|
4068
|
+
this.shopPopover();
|
|
4067
4069
|
});
|
|
4068
4070
|
this.renderer.listen(this.hostElement(), 'mouseleave', (event) => {
|
|
4069
4071
|
this.isInsideHost.set(false);
|
|
4070
4072
|
setTimeout(() => {
|
|
4071
4073
|
if (!this.isInsideTarget() && !this.isInsideHostBoundingBox(event)) {
|
|
4072
|
-
this.
|
|
4074
|
+
this.hidePopover();
|
|
4073
4075
|
}
|
|
4074
4076
|
}, 100);
|
|
4075
4077
|
});
|
|
@@ -4077,25 +4079,29 @@ class ChrPopoverDirectiveDirective {
|
|
|
4077
4079
|
this.setupTargetListeners = () => {
|
|
4078
4080
|
this.renderer.listen(this.targetElement(), 'mouseenter', (event) => {
|
|
4079
4081
|
this.isInsideTarget.set(true);
|
|
4080
|
-
this.
|
|
4082
|
+
this.shopPopover();
|
|
4081
4083
|
});
|
|
4082
4084
|
this.renderer.listen(this.targetElement(), 'mouseleave', (event) => {
|
|
4083
4085
|
this.isInsideTarget.set(false);
|
|
4084
4086
|
setTimeout(() => {
|
|
4085
4087
|
if (!this.isInsideHost() && !this.isInsideTargetBoundingBox(event))
|
|
4086
|
-
this.
|
|
4088
|
+
this.hidePopover();
|
|
4087
4089
|
}, 100);
|
|
4088
4090
|
});
|
|
4089
4091
|
};
|
|
4090
|
-
this.
|
|
4092
|
+
this.shopPopover = () => {
|
|
4093
|
+
this.isOpen.set(true);
|
|
4091
4094
|
this.targetElement().showPopover({ source: this.hostElement() });
|
|
4092
4095
|
};
|
|
4093
|
-
this.
|
|
4096
|
+
this.hidePopover = () => {
|
|
4097
|
+
this.isOpen.set(false);
|
|
4094
4098
|
this.targetElement().hidePopover();
|
|
4095
4099
|
};
|
|
4096
|
-
this.
|
|
4100
|
+
this.hideIfOutsideHostAndTarget = () => {
|
|
4101
|
+
if (!this.isOpen())
|
|
4102
|
+
return;
|
|
4097
4103
|
if (!this.isInsideHost() && !this.isInsideTarget())
|
|
4098
|
-
this.
|
|
4104
|
+
this.hidePopover();
|
|
4099
4105
|
};
|
|
4100
4106
|
}
|
|
4101
4107
|
ngOnInit() {
|
|
@@ -4124,15 +4130,15 @@ class ChrPopoverDirectiveDirective {
|
|
|
4124
4130
|
this.renderer.setStyle(this.targetElement(), 'border', 'none');
|
|
4125
4131
|
}
|
|
4126
4132
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ChrPopoverDirectiveDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4127
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: ChrPopoverDirectiveDirective, 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 }, chrPopoverOnHover: { classPropertyName: "chrPopoverOnHover", publicName: "chrPopoverOnHover", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keyup.escape": "
|
|
4133
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: ChrPopoverDirectiveDirective, 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 }, chrPopoverOnHover: { classPropertyName: "chrPopoverOnHover", publicName: "chrPopoverOnHover", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keyup.escape": "hidePopover()", "mousedown": "hideIfOutsideHostAndTarget()" } }, ngImport: i0 }); }
|
|
4128
4134
|
}
|
|
4129
4135
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ChrPopoverDirectiveDirective, decorators: [{
|
|
4130
4136
|
type: Directive,
|
|
4131
4137
|
args: [{
|
|
4132
4138
|
selector: '[chrPopover]',
|
|
4133
4139
|
host: {
|
|
4134
|
-
'(keyup.escape)': '
|
|
4135
|
-
'(mousedown)': '
|
|
4140
|
+
'(keyup.escape)': 'hidePopover()',
|
|
4141
|
+
'(mousedown)': 'hideIfOutsideHostAndTarget()',
|
|
4136
4142
|
},
|
|
4137
4143
|
}]
|
|
4138
4144
|
}], propDecorators: { chrPopover: [{ type: i0.Input, args: [{ isSignal: true, alias: "chrPopover", required: true }] }], chrPopoverPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "chrPopoverPosition", required: false }] }], chrPopoverOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "chrPopoverOnHover", required: false }] }] } });
|