chrv-components 1.12.223 → 1.12.225

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
@@ -4133,6 +4133,12 @@ class ChrPopoverDirective {
4133
4133
  return mayBeTemplate;
4134
4134
  }, /* @ts-ignore */
4135
4135
  ...(ngDevMode ? [{ debugName: "targetElementId" }] : /* istanbul ignore next */ []));
4136
+ this.isNativePopoverTrigger = computed(() => {
4137
+ const host = this.hostElement();
4138
+ return (host instanceof HTMLButtonElement ||
4139
+ (host instanceof HTMLInputElement && host.type === 'button'));
4140
+ }, /* @ts-ignore */
4141
+ ...(ngDevMode ? [{ debugName: "isNativePopoverTrigger" }] : /* istanbul ignore next */ []));
4136
4142
  this.updateLastKnownMousePosition = (event) => {
4137
4143
  this.lastKnownMousePosition$.next({
4138
4144
  x: event.clientX,
@@ -4198,6 +4204,9 @@ class ChrPopoverDirective {
4198
4204
  return this.isInsideRect(x, y, rect);
4199
4205
  };
4200
4206
  effect(() => {
4207
+ const target = this.targetElement();
4208
+ if (!target || typeof target.showPopover !== 'function')
4209
+ return;
4201
4210
  const open = this.isOpen();
4202
4211
  if (open)
4203
4212
  this.showPopover();
@@ -4235,9 +4244,7 @@ class ChrPopoverDirective {
4235
4244
  this.renderer.addClass(this.targetElement(), 'card');
4236
4245
  this.renderer.addClass(this.targetElement(), 'glass');
4237
4246
  this.renderer.setStyle(this.targetElement(), 'border', 'none');
4238
- const isNativePopoverTrigger = host instanceof HTMLButtonElement ||
4239
- (host instanceof HTMLInputElement && host.type === 'button');
4240
- if (!this.chrPopoverOnHover() && !isNativePopoverTrigger) {
4247
+ if (!this.chrPopoverOnHover() && !this.isNativePopoverTrigger()) {
4241
4248
  this.renderer.listen(this.hostElement(), 'click', () => {
4242
4249
  if (this.isOpen()) {
4243
4250
  this.isOpen.set(false);