Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ngneat/helipopper

Package Overview
Dependencies
Maintainers
4
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngneat/helipopper - npm Package Compare versions

Comparing version 3.2.1 to 3.4.0

134

bundles/ngneat-helipopper.umd.js

@@ -46,7 +46,7 @@ (function (global, factory) {

var supportsResizeObserver = false;
if (typeof window !== "undefined") {
supportsIntersectionObserver = "IntersectionObserver" in window;
supportsResizeObserver = "ResizeObserver" in window;
if (typeof window !== 'undefined') {
supportsIntersectionObserver = 'IntersectionObserver' in window;
supportsResizeObserver = 'ResizeObserver' in window;
}
function inView(host, options) {
function inView(ngZone, host, options) {
if (options === void 0) { options = {

@@ -63,12 +63,14 @@ root: null,

}
var observer = new IntersectionObserver(function (entries) {
// Several changes may occur in the same tick, we want to check the latest entry state.
var entry = entries[entries.length - 1];
if (entry.isIntersecting) {
subscriber.next();
subscriber.complete();
}
}, options);
observer.observe(element);
return function () { return observer.disconnect(); };
return ngZone.runOutsideAngular(function () {
var observer = new IntersectionObserver(function (entries) {
// Several changes may occur in the same tick, we want to check the latest entry state.
var entry = entries[entries.length - 1];
if (entry.isIntersecting) {
subscriber.next();
subscriber.complete();
}
}, options);
observer.observe(element);
return function () { return observer.disconnect(); };
});
});

@@ -106,13 +108,13 @@ }

var ownProps = [
"variations",
"useHostWidth",
"defaultVariation",
"beforeRender",
"lazy",
"variation",
"isEnabled",
"className",
"onlyTextOverflow",
"data",
"content"
'variations',
'useHostWidth',
'defaultVariation',
'beforeRender',
'lazy',
'variation',
'isEnabled',
'className',
'onlyTextOverflow',
'data',
'content'
];

@@ -152,3 +154,3 @@ Object.keys(allProps).forEach(function (prop) {

var variation;
if (isChanged("variation", changes)) {
if (isChanged('variation', changes)) {
variation = changes.variation.currentValue;

@@ -164,3 +166,3 @@ this.variationDefined = true;

}
if (isChanged("isEnabled", changes)) {
if (isChanged('isEnabled', changes)) {
this.enabled = changes.isEnabled.currentValue;

@@ -180,3 +182,3 @@ this.setStatus();

if (this.onlyTextOverflow) {
inView(this.host)
inView(this.zone, this.host)
.pipe(operators.switchMap(function () { return overflowChanges(_this.host); }), operators.takeUntil(this.destroyed))

@@ -188,3 +190,3 @@ .subscribe(function (isElementOverflow) {

else {
inView(this.host)
inView(this.zone, this.host)
.pipe(operators.takeUntil(this.destroyed))

@@ -252,31 +254,39 @@ .subscribe(function () {

var _this = this;
this.instance = tippy__default['default'](this.host.nativeElement, Object.assign(Object.assign(Object.assign({ allowHTML: true, appendTo: document.body }, onlyTippyProps(this.globalConfig)), onlyTippyProps(this.props)), { onMount: function (instance) {
var _a, _b;
_this.isVisible = true;
_this.visible.next(true);
_this.useHostWidth && _this.listenToHostResize();
(_b = (_a = _this.globalConfig).onMount) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onCreate: function (instance) {
var _a, _b;
_this.className && instance.popper.classList.add(_this.className);
(_b = (_a = _this.globalConfig).onCreate) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onShow: function (instance) {
var _a, _b;
_this.zone.run(function () { return _this.instance.setContent(_this.resolveContent()); });
if (_this.useHostWidth) {
instance.popper.style.width = _this.hostWidth;
instance.popper.style.maxWidth = _this.hostWidth;
instance.popper.firstElementChild.style.maxWidth = _this.hostWidth;
}
(_b = (_a = _this.globalConfig).onShow) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onHidden: function (instance) {
var _a, _b;
_this.destroyView();
_this.isVisible = false;
_this.visible.next(false);
(_b = (_a = _this.globalConfig).onHidden) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
} }));
this.setStatus();
this.setProps(this.props);
this.variation === "contextMenu" && this.handleContextMenu();
if (this.content == null) {
return;
}
this.zone.runOutsideAngular(function () {
_this.instance = tippy__default['default'](_this.host.nativeElement, Object.assign(Object.assign(Object.assign({ allowHTML: true, appendTo: document.body }, onlyTippyProps(_this.globalConfig)), onlyTippyProps(_this.props)), { onMount: function (instance) {
var _a, _b;
_this.isVisible = true;
_this.visible.next(true);
_this.useHostWidth && _this.listenToHostResize();
(_b = (_a = _this.globalConfig).onMount) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onCreate: function (instance) {
var _a, _b;
_this.className && instance.popper.classList.add(_this.className);
(_b = (_a = _this.globalConfig).onCreate) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onShow: function (instance) {
var _a, _b;
_this.zone.run(function () { return _this.instance.setContent(_this.resolveContent()); });
if (_this.useHostWidth) {
// Don't access `hostWidth` multiple times since it's a getter that calls `getBoundingClientRect()`,
// which triggers the whole layout update.
var hostWidth = _this.hostWidth;
instance.popper.style.width = hostWidth;
instance.popper.style.maxWidth = hostWidth;
instance.popper.firstElementChild.style.maxWidth = hostWidth;
}
(_b = (_a = _this.globalConfig).onShow) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onHidden: function (instance) {
var _a, _b;
_this.destroyView();
_this.isVisible = false;
_this.visible.next(false);
(_b = (_a = _this.globalConfig).onHidden) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
} }));
_this.setStatus();
_this.setProps(_this.props);
_this.variation === 'contextMenu' && _this.handleContextMenu();
});
};

@@ -311,3 +321,3 @@ TippyDirective.prototype.resolveContent = function () {

var _this = this;
rxjs.fromEvent(this.host.nativeElement, "contextmenu")
rxjs.fromEvent(this.host.nativeElement, 'contextmenu')
.pipe(operators.takeUntil(this.destroyed))

@@ -355,4 +365,4 @@ .subscribe(function (event) {

{ type: i0.Directive, args: [{
selector: "[tippy]",
exportAs: "tippy"
selector: '[tippy]',
exportAs: 'tippy'
},] }

@@ -391,3 +401,3 @@ ];

useHostWidth: [{ type: i0.Input }],
content: [{ type: i0.Input, args: ["tippy",] }],
content: [{ type: i0.Input, args: ['tippy',] }],
visible: [{ type: i0.Output }]

@@ -394,0 +404,0 @@ };

@@ -1,9 +0,9 @@

import { Directive, ElementRef, EventEmitter, Inject, Injector, Input, NgZone, Output, PLATFORM_ID, ViewContainerRef } from "@angular/core";
import tippy from "tippy.js";
import { TIPPY_CONFIG, TIPPY_REF } from "./tippy.types";
import { dimensionsChanges, inView, onlyTippyProps, overflowChanges } from "./utils";
import { fromEvent, merge, Subject } from "rxjs";
import { switchMap, takeUntil } from "rxjs/operators";
import { isComponent, isString, isTemplateRef, ViewService } from "@ngneat/overview";
import { isPlatformServer } from "@angular/common";
import { Directive, ElementRef, EventEmitter, Inject, Injector, Input, NgZone, Output, PLATFORM_ID, ViewContainerRef } from '@angular/core';
import tippy from 'tippy.js';
import { TIPPY_CONFIG, TIPPY_REF } from './tippy.types';
import { dimensionsChanges, inView, onlyTippyProps, overflowChanges } from './utils';
import { fromEvent, merge, Subject } from 'rxjs';
import { switchMap, takeUntil } from 'rxjs/operators';
import { isComponent, isString, isTemplateRef, ViewService } from '@ngneat/overview';
import { isPlatformServer } from '@angular/common';
export class TippyDirective {

@@ -34,3 +34,3 @@ constructor(platformId, globalConfig, injector, viewService, vcr, zone, host) {

let variation;
if (isChanged("variation", changes)) {
if (isChanged('variation', changes)) {
variation = changes.variation.currentValue;

@@ -46,3 +46,3 @@ this.variationDefined = true;

}
if (isChanged("isEnabled", changes)) {
if (isChanged('isEnabled', changes)) {
this.enabled = changes.isEnabled.currentValue;

@@ -61,3 +61,3 @@ this.setStatus();

if (this.onlyTextOverflow) {
inView(this.host)
inView(this.zone, this.host)
.pipe(switchMap(() => overflowChanges(this.host)), takeUntil(this.destroyed))

@@ -69,3 +69,3 @@ .subscribe(isElementOverflow => {

else {
inView(this.host)
inView(this.zone, this.host)
.pipe(takeUntil(this.destroyed))

@@ -128,31 +128,39 @@ .subscribe(() => {

createInstance() {
this.instance = tippy(this.host.nativeElement, Object.assign(Object.assign(Object.assign({ allowHTML: true, appendTo: document.body }, onlyTippyProps(this.globalConfig)), onlyTippyProps(this.props)), { onMount: instance => {
var _a, _b;
this.isVisible = true;
this.visible.next(true);
this.useHostWidth && this.listenToHostResize();
(_b = (_a = this.globalConfig).onMount) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onCreate: instance => {
var _a, _b;
this.className && instance.popper.classList.add(this.className);
(_b = (_a = this.globalConfig).onCreate) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onShow: instance => {
var _a, _b;
this.zone.run(() => this.instance.setContent(this.resolveContent()));
if (this.useHostWidth) {
instance.popper.style.width = this.hostWidth;
instance.popper.style.maxWidth = this.hostWidth;
instance.popper.firstElementChild.style.maxWidth = this.hostWidth;
}
(_b = (_a = this.globalConfig).onShow) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onHidden: instance => {
var _a, _b;
this.destroyView();
this.isVisible = false;
this.visible.next(false);
(_b = (_a = this.globalConfig).onHidden) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
} }));
this.setStatus();
this.setProps(this.props);
this.variation === "contextMenu" && this.handleContextMenu();
if (this.content == null) {
return;
}
this.zone.runOutsideAngular(() => {
this.instance = tippy(this.host.nativeElement, Object.assign(Object.assign(Object.assign({ allowHTML: true, appendTo: document.body }, onlyTippyProps(this.globalConfig)), onlyTippyProps(this.props)), { onMount: instance => {
var _a, _b;
this.isVisible = true;
this.visible.next(true);
this.useHostWidth && this.listenToHostResize();
(_b = (_a = this.globalConfig).onMount) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onCreate: instance => {
var _a, _b;
this.className && instance.popper.classList.add(this.className);
(_b = (_a = this.globalConfig).onCreate) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onShow: instance => {
var _a, _b;
this.zone.run(() => this.instance.setContent(this.resolveContent()));
if (this.useHostWidth) {
// Don't access `hostWidth` multiple times since it's a getter that calls `getBoundingClientRect()`,
// which triggers the whole layout update.
const hostWidth = this.hostWidth;
instance.popper.style.width = hostWidth;
instance.popper.style.maxWidth = hostWidth;
instance.popper.firstElementChild.style.maxWidth = hostWidth;
}
(_b = (_a = this.globalConfig).onShow) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onHidden: instance => {
var _a, _b;
this.destroyView();
this.isVisible = false;
this.visible.next(false);
(_b = (_a = this.globalConfig).onHidden) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
} }));
this.setStatus();
this.setProps(this.props);
this.variation === 'contextMenu' && this.handleContextMenu();
});
}

@@ -186,3 +194,3 @@ resolveContent() {

handleContextMenu() {
fromEvent(this.host.nativeElement, "contextmenu")
fromEvent(this.host.nativeElement, 'contextmenu')
.pipe(takeUntil(this.destroyed))

@@ -228,4 +236,4 @@ .subscribe((event) => {

{ type: Directive, args: [{
selector: "[tippy]",
exportAs: "tippy"
selector: '[tippy]',
exportAs: 'tippy'
},] }

@@ -264,3 +272,3 @@ ];

useHostWidth: [{ type: Input }],
content: [{ type: Input, args: ["tippy",] }],
content: [{ type: Input, args: ['tippy',] }],
visible: [{ type: Output }]

@@ -271,2 +279,2 @@ };

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGlwcHkuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmduZWF0L2hlbGlwb3BwZXIvc3JjL2xpYi90aXBweS5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFDVCxVQUFVLEVBQ1YsWUFBWSxFQUNaLE1BQU0sRUFDTixRQUFRLEVBQ1IsS0FBSyxFQUNMLE1BQU0sRUFDTixNQUFNLEVBQ04sV0FBVyxFQUNYLGdCQUFnQixFQUNqQixNQUFNLGVBQWUsQ0FBQztBQUV2QixPQUFPLEtBQUssTUFBTSxVQUFVLENBQUM7QUFDN0IsT0FBTyxFQUFhLFlBQVksRUFBRSxTQUFTLEVBQTBDLE1BQU0sZUFBZSxDQUFDO0FBQzNHLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLEVBQUUsY0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cHMubWF4V2lkdGggPSB0aGlzLmhvc3RXaWR0aDtcbiAgICB9XG4gIH1cblxuICBuZ0FmdGVyVmlld0luaXQoKSB7XG4gICAgaWYgKHRoaXMubGF6eSkge1xuICAgICAgaWYgKHRoaXMub25seVRleHRPdmVyZmxvdykge1xuICAgICAgICBpblZpZXcodGhpcy5ob3N0KVxuICAgICAgICAgIC5waXBlKFxuICAgICAgICAgICAgc3dpdGNoTWFwKCgpID0+IG92ZXJmbG93Q2hhbmdlcyh0aGlzLmhvc3QpKSxcbiAgICAgICAgICAgIHRha2VVbnRpbCh0aGlzLmRlc3Ryb3llZClcbiAgICAgICAgICApXG4gICAgICAgICAgLnN1YnNjcmliZShpc0VsZW1lbnRPdmVyZmxvdyA9PiB7XG4gICAgICAgICAgICB0aGlzLmNoZWNrT3ZlcmZsb3coaXNFbGVtZW50T3ZlcmZsb3cpO1xuICAgICAgICAgIH0pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaW5WaWV3KHRoaXMuaG9zdClcbiAgICAgICAgICAucGlwZSh0YWtlVW50aWwodGhpcy5kZXN0cm95ZWQpKVxuICAgICAgICAgIC5zdWJzY3JpYmUoKCkgPT4ge1xuICAgICAgICAgICAgdGhpcy5jcmVhdGVJbnN0YW5jZSgpO1xuICAgICAgICAgIH0pO1xuICAgICAgfVxuICAgIH0gZWxzZSBpZiAodGhpcy5vbmx5VGV4dE92ZXJmbG93KSB7XG4gICAgICBvdmVyZmxvd0NoYW5nZXModGhpcy5ob3N0KVxuICAgICAgICAucGlwZSh0YWtlVW50aWwodGhpcy5kZXN0cm95ZWQpKVxuICAgICAgICAuc3Vic2NyaWJlKGlzRWxlbWVudE92ZXJmbG93ID0+IHtcbiAgICAgICAgICB0aGlzLmNoZWNrT3ZlcmZsb3coaXNFbGVtZW50T3ZlcmZsb3cpO1xuICAgICAgICB9KTtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhpcy5jcmVhdGVJbnN0YW5jZSgpO1xuICAgIH1cbiA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nQpKSB7XG4gICAgICAgIHRoaXMudmlld09wdGlvbnMkID0ge1xuICAgICAgICAgIGNvbnRleHQ6IHtcbiAgICAgICAgICAgICRpbXBsaWNpdDogdGhpcy5oaWRlLmJpbmQodGhpcyksXG4gICAgICAgICAgICBkYXRhOiB0aGlzLmRhdGFcbiAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfVxuXG4gICAgdGhpcy52aWV3UmVmID0gdGhpcy52aWV3U2VydmljZS5jcmVhdGVWaWV3KHRoaXMuY29udGVudCwge1xuICAgICAgdmNyOiB0aGlzLnZjcixcbiAgICAgIC4uLnRoaXMudmlld09wdGlvbnMkXG4gICAgfSk7XG5cbiAgICBsZXQgY29udGVudCA9IHRoaXMudmlld1JlZi5nZXRFbGVtZW50KCk7XG5cbiAgICBpZiAoaXNTdHJpbmcoY29udGVudCkgJiYgdGhpcy5nbG9iYWxDb25maWcuYmVmb3JlUmVuZGVyKSB7XG4gICAgICBjb250ZW50ID0gdGhpcy5nbG9iYWxDb25maWcuYmVmb3JlUmVuZGVyKGNvbnRlbnQpO1xuICAgIH1cblxuICAgIHJldHVybiBjb250ZW50O1xuICB9XG5cbiAgcHJpdmF0ZSBoYW5kbGVDb250ZXh0TWVudSgpIHtcbiAgICBmcm9tRXZlbnQodGhpcy5ob3N0Lm5hdGl2ZUVsZW1lbnQsIFwiY29udGV4dG1lbnVcIilcbiAgICAgIC5waXBlKHRha2VVbnRpbCh0aGlzLmRlc3Ryb3llZCkpXG4gICAgICAuc3Vic2NyaWJlKChldmVudDogTW91c2VFdmVudCkgPT4ge1xuICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuXG4gICAgICAgIHRoaXMuaW5zdGFuY2Uuc2V0UHJvcHMoe1xuICAgICAgICAgIGdldFJlZmVyZW5jZUNsaWVudFJlY3Q6ICgpID0+ICh7XG4gICAgICAgICAgICB3aWR0aDogMCxcbiAgICAgICAgICAgIGhlaWdodDogMCxcbiAgICAgICAgIC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uY2UucG9wcGVyLnN0eWxlLndpZHRoID0gaG9zdFdpZHRoO1xuICAgICAgICAgICAgaW5zdGFuY2UucG9wcGVyLnN0eWxlLm1heFdpZHRoID0gaG9zdFdpZHRoO1xuICAgICAgICAgICAgKGluc3RhbmNlLnBvcHBlci5maXJzdEVsZW1lbnRDaGlsZCBhcyBIVE1MRWxlbWVudCkuc3R5bGUubWF4V2lkdGggPSBob3N0V2lkdGg7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRoaXMuZ2xvYmFsQ29uZmlnLm9uU2hvdz8uKGluc3RhbmNlKTtcbiAgICAgICAgfSxcbiAgICAgICAgb25IaWRkZW46IGluc3RhbmNlID0+IHtcbiAgICAgICAgICB0aGlzLmRlc3Ryb3lWaWV3KCk7XG4gICAgICAgICAgdGhpcy5pc1Zpc2libGUgPSBmYWxzZTtcbiAgICAgICAgICB0aGlzLnZpc2libGUubmV4dChmYWxzZSk7XG4gICAgICAgICAgdGhpcy5nbG9iYWxDb25maWcub25IaWRkZW4/LihpbnN0YW5jZSk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuXG4gICAgICB0aGlzLnNldFN0YXR1cygpO1xuICAgICAgdGhpcy5zZXRQcm9wcyh0aGlzLnByb3BzKTtcblxuICAgICAgdGhpcy52YXJpYXRpb24gPT09ICdjb250ZXh0TWVudScgJiYgdGhpcy5oYW5kbGVDb250ZXh0TWVudSgpO1xuICAgIH0pO1xuICB9XG5cbiAgcHJpdmF0ZSByZXNvbHZlQ29udGVudCgpIHtcbiAgICBpZiAoIXRoaXMudmlld09wdGlvbnMkICYmICFpc1N0cmluZyh0aGlzLmNvbnRlbnQpKSB7XG4gICAgICBpZiAoaXNDb21wb25lbnQodGhpcy5jb250ZW50KSkge1xuICAgICAgICB0aGlzLnZpZXdPcHRpb25zJCA9IHtcbiAgICAgICAgICBpbmplY3RvcjogSW5qZWN0b3IuY3JlYXRlKHtcbiAgICAgICAgICAgIHByb3ZpZGVyczogW3sgcHJvdmlkZTogVEl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ggPSB0aGlzLmhvc3RXaWR0aDtcbiAgICAgIH0pO1xuICB9XG59XG5cbmZ1bmN0aW9uIGlzQ2hhbmdlZDxUPihrZXk6IGtleW9mIFQsIGNoYW5nZXM6IFQpIHtcbiAgcmV0dXJuIGtleSBpbiBjaGFuZ2VzO1xufVxuIl19

@@ -1,11 +0,11 @@

import { Observable } from "rxjs";
import { auditTime, map } from "rxjs/operators";
import { coerceElement } from "./tippy.types";
import { Observable } from 'rxjs';
import { auditTime, map } from 'rxjs/operators';
import { coerceElement } from './tippy.types';
let supportsIntersectionObserver = false;
let supportsResizeObserver = false;
if (typeof window !== "undefined") {
supportsIntersectionObserver = "IntersectionObserver" in window;
supportsResizeObserver = "ResizeObserver" in window;
if (typeof window !== 'undefined') {
supportsIntersectionObserver = 'IntersectionObserver' in window;
supportsResizeObserver = 'ResizeObserver' in window;
}
export function inView(host, options = {
export function inView(ngZone, host, options = {
root: null,

@@ -21,12 +21,14 @@ threshold: 0.3

}
const observer = new IntersectionObserver(entries => {
// Several changes may occur in the same tick, we want to check the latest entry state.
const entry = entries[entries.length - 1];
if (entry.isIntersecting) {
subscriber.next();
subscriber.complete();
}
}, options);
observer.observe(element);
return () => observer.disconnect();
return ngZone.runOutsideAngular(() => {
const observer = new IntersectionObserver(entries => {
// Several changes may occur in the same tick, we want to check the latest entry state.
const entry = entries[entries.length - 1];
if (entry.isIntersecting) {
subscriber.next();
subscriber.complete();
}
}, options);
observer.observe(element);
return () => observer.disconnect();
});
});

@@ -64,13 +66,13 @@ }

const ownProps = [
"variations",
"useHostWidth",
"defaultVariation",
"beforeRender",
"lazy",
"variation",
"isEnabled",
"className",
"onlyTextOverflow",
"data",
"content"
'variations',
'useHostWidth',
'defaultVariation',
'beforeRender',
'lazy',
'variation',
'isEnabled',
'className',
'onlyTextOverflow',
'data',
'content'
];

@@ -84,2 +86,2 @@ Object.keys(allProps).forEach(prop => {

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWx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mlhdGlvbicsXG4gICAgJ2lzRW5hYmxlZCcsXG4gICAgJ2NsYXNzTmFtZScsXG4gICAgJ29ubHlUZXh0T3ZlcmZsb3cnLFxuICAgICdkYXRhJyxcbiAgICAnY29udGVudCdcbiAgXTtcblxuICBPYmplY3Qua2V5cyhhbGxQcm9wcykuZm9yRWFjaChwcm9wID0+IHtcbiAgICBpZiAoIW93blByb3BzLmluY2x1ZGVzKHByb3ApKSB7XG4gICAgICB0aXBweVByb3BzW3Byb3BdID0gYWxsUHJvcHNbcHJvcF07XG4gICAgfVxuICB9KTtcblxuICByZXR1cm4gdGlwcHlQcm9wcztcbn1cbiJdfQ==

@@ -23,7 +23,7 @@ import * as i0 from '@angular/core';

let supportsResizeObserver = false;
if (typeof window !== "undefined") {
supportsIntersectionObserver = "IntersectionObserver" in window;
supportsResizeObserver = "ResizeObserver" in window;
if (typeof window !== 'undefined') {
supportsIntersectionObserver = 'IntersectionObserver' in window;
supportsResizeObserver = 'ResizeObserver' in window;
}
function inView(host, options = {
function inView(ngZone, host, options = {
root: null,

@@ -39,12 +39,14 @@ threshold: 0.3

}
const observer = new IntersectionObserver(entries => {
// Several changes may occur in the same tick, we want to check the latest entry state.
const entry = entries[entries.length - 1];
if (entry.isIntersecting) {
subscriber.next();
subscriber.complete();
}
}, options);
observer.observe(element);
return () => observer.disconnect();
return ngZone.runOutsideAngular(() => {
const observer = new IntersectionObserver(entries => {
// Several changes may occur in the same tick, we want to check the latest entry state.
const entry = entries[entries.length - 1];
if (entry.isIntersecting) {
subscriber.next();
subscriber.complete();
}
}, options);
observer.observe(element);
return () => observer.disconnect();
});
});

@@ -82,13 +84,13 @@ }

const ownProps = [
"variations",
"useHostWidth",
"defaultVariation",
"beforeRender",
"lazy",
"variation",
"isEnabled",
"className",
"onlyTextOverflow",
"data",
"content"
'variations',
'useHostWidth',
'defaultVariation',
'beforeRender',
'lazy',
'variation',
'isEnabled',
'className',
'onlyTextOverflow',
'data',
'content'
];

@@ -128,3 +130,3 @@ Object.keys(allProps).forEach(prop => {

let variation;
if (isChanged("variation", changes)) {
if (isChanged('variation', changes)) {
variation = changes.variation.currentValue;

@@ -140,3 +142,3 @@ this.variationDefined = true;

}
if (isChanged("isEnabled", changes)) {
if (isChanged('isEnabled', changes)) {
this.enabled = changes.isEnabled.currentValue;

@@ -155,3 +157,3 @@ this.setStatus();

if (this.onlyTextOverflow) {
inView(this.host)
inView(this.zone, this.host)
.pipe(switchMap(() => overflowChanges(this.host)), takeUntil(this.destroyed))

@@ -163,3 +165,3 @@ .subscribe(isElementOverflow => {

else {
inView(this.host)
inView(this.zone, this.host)
.pipe(takeUntil(this.destroyed))

@@ -222,31 +224,39 @@ .subscribe(() => {

createInstance() {
this.instance = tippy(this.host.nativeElement, Object.assign(Object.assign(Object.assign({ allowHTML: true, appendTo: document.body }, onlyTippyProps(this.globalConfig)), onlyTippyProps(this.props)), { onMount: instance => {
var _a, _b;
this.isVisible = true;
this.visible.next(true);
this.useHostWidth && this.listenToHostResize();
(_b = (_a = this.globalConfig).onMount) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onCreate: instance => {
var _a, _b;
this.className && instance.popper.classList.add(this.className);
(_b = (_a = this.globalConfig).onCreate) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onShow: instance => {
var _a, _b;
this.zone.run(() => this.instance.setContent(this.resolveContent()));
if (this.useHostWidth) {
instance.popper.style.width = this.hostWidth;
instance.popper.style.maxWidth = this.hostWidth;
instance.popper.firstElementChild.style.maxWidth = this.hostWidth;
}
(_b = (_a = this.globalConfig).onShow) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onHidden: instance => {
var _a, _b;
this.destroyView();
this.isVisible = false;
this.visible.next(false);
(_b = (_a = this.globalConfig).onHidden) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
} }));
this.setStatus();
this.setProps(this.props);
this.variation === "contextMenu" && this.handleContextMenu();
if (this.content == null) {
return;
}
this.zone.runOutsideAngular(() => {
this.instance = tippy(this.host.nativeElement, Object.assign(Object.assign(Object.assign({ allowHTML: true, appendTo: document.body }, onlyTippyProps(this.globalConfig)), onlyTippyProps(this.props)), { onMount: instance => {
var _a, _b;
this.isVisible = true;
this.visible.next(true);
this.useHostWidth && this.listenToHostResize();
(_b = (_a = this.globalConfig).onMount) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onCreate: instance => {
var _a, _b;
this.className && instance.popper.classList.add(this.className);
(_b = (_a = this.globalConfig).onCreate) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onShow: instance => {
var _a, _b;
this.zone.run(() => this.instance.setContent(this.resolveContent()));
if (this.useHostWidth) {
// Don't access `hostWidth` multiple times since it's a getter that calls `getBoundingClientRect()`,
// which triggers the whole layout update.
const hostWidth = this.hostWidth;
instance.popper.style.width = hostWidth;
instance.popper.style.maxWidth = hostWidth;
instance.popper.firstElementChild.style.maxWidth = hostWidth;
}
(_b = (_a = this.globalConfig).onShow) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
}, onHidden: instance => {
var _a, _b;
this.destroyView();
this.isVisible = false;
this.visible.next(false);
(_b = (_a = this.globalConfig).onHidden) === null || _b === void 0 ? void 0 : _b.call(_a, instance);
} }));
this.setStatus();
this.setProps(this.props);
this.variation === 'contextMenu' && this.handleContextMenu();
});
}

@@ -280,3 +290,3 @@ resolveContent() {

handleContextMenu() {
fromEvent(this.host.nativeElement, "contextmenu")
fromEvent(this.host.nativeElement, 'contextmenu')
.pipe(takeUntil(this.destroyed))

@@ -322,4 +332,4 @@ .subscribe((event) => {

{ type: Directive, args: [{
selector: "[tippy]",
exportAs: "tippy"
selector: '[tippy]',
exportAs: 'tippy'
},] }

@@ -358,3 +368,3 @@ ];

useHostWidth: [{ type: Input }],
content: [{ type: Input, args: ["tippy",] }],
content: [{ type: Input, args: ['tippy',] }],
visible: [{ type: Output }]

@@ -361,0 +371,0 @@ };

@@ -1,6 +0,6 @@

import { ElementRef, EventEmitter, Injector, NgZone, ViewContainerRef } from "@angular/core";
import { AfterViewInit, OnChanges, OnDestroy, OnInit } from "@angular/core";
import { NgChanges, TippyConfig, TippyProps } from "./tippy.types";
import { ViewService } from "@ngneat/overview";
import { Content } from "@ngneat/overview";
import { ElementRef, EventEmitter, Injector, NgZone, ViewContainerRef } from '@angular/core';
import { AfterViewInit, OnChanges, OnDestroy, OnInit } from '@angular/core';
import { NgChanges, TippyConfig, TippyProps } from './tippy.types';
import { ViewService } from '@ngneat/overview';
import { Content } from '@ngneat/overview';
export declare class TippyDirective implements OnChanges, AfterViewInit, OnDestroy, OnInit {

@@ -14,16 +14,16 @@ private platformId;

private host;
appendTo: TippyProps["appendTo"];
delay: TippyProps["delay"];
duration: TippyProps["duration"];
hideOnClick: TippyProps["hideOnClick"];
interactive: TippyProps["interactive"];
interactiveBorder: TippyProps["interactiveBorder"];
maxWidth: TippyProps["maxWidth"];
offset: TippyProps["offset"];
placement: TippyProps["placement"];
popperOptions: TippyProps["popperOptions"];
showOnCreate: TippyProps["showOnCreate"];
trigger: TippyProps["trigger"];
triggerTarget: TippyProps["triggerTarget"];
zIndex: TippyProps["zIndex"];
appendTo: TippyProps['appendTo'];
delay: TippyProps['delay'];
duration: TippyProps['duration'];
hideOnClick: TippyProps['hideOnClick'];
interactive: TippyProps['interactive'];
interactiveBorder: TippyProps['interactiveBorder'];
maxWidth: TippyProps['maxWidth'];
offset: TippyProps['offset'];
placement: TippyProps['placement'];
popperOptions: TippyProps['popperOptions'];
showOnCreate: TippyProps['showOnCreate'];
trigger: TippyProps['trigger'];
triggerTarget: TippyProps['triggerTarget'];
zIndex: TippyProps['zIndex'];
lazy: boolean;

@@ -30,0 +30,0 @@ variation: string;

@@ -1,6 +0,7 @@

import { Observable } from "rxjs";
import { TippyElement } from "./tippy.types";
export declare function inView(host: TippyElement, options?: IntersectionObserverInit): Observable<unknown>;
import { NgZone } from '@angular/core';
import { Observable } from 'rxjs';
import { TippyElement } from './tippy.types';
export declare function inView(ngZone: NgZone, host: TippyElement, options?: IntersectionObserverInit): Observable<unknown>;
export declare function overflowChanges(host: TippyElement): Observable<boolean>;
export declare function dimensionsChanges(target: HTMLElement): Observable<boolean>;
export declare function onlyTippyProps(allProps: any): {};
{
"name": "@ngneat/helipopper",
"version": "3.2.1",
"version": "3.4.0",
"description": "A Powerful Tooltip and Popover for Angular Applications",

@@ -5,0 +5,0 @@ "schematics": "./schematics/collection.json",

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addImportsToModuleDeclaration = exports.addImportsToModuleFile = exports.applyChanges = exports.getModuleFile = void 0;
const schematics_1 = require("@angular-devkit/schematics");

@@ -4,0 +5,0 @@ const typescript_1 = require("typescript");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LIB_NAME = void 0;
exports.LIB_NAME = '@ngneat/helipopper';
//# sourceMappingURL=schematics.consts.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isImported = exports.addEntryComponentToModule = exports.addBootstrapToModule = exports.addExportToModule = exports.addProviderToModule = exports.addImportToModule = exports.addDeclarationToModule = exports.addSymbolToNgModuleMetadata = exports.getFirstNgModuleName = exports.getDecoratorMetadata = exports.getContentOfKeyLiteral = exports.insertAfterLastOccurrence = exports.findNode = exports.getSourceNodes = exports.findNodes = exports.insertImport = void 0;
const ts = require("typescript");

@@ -4,0 +5,0 @@ const change_1 = require("./change");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.commitChanges = exports.createChangeRecorder = exports.createReplaceChange = exports.ReplaceChange = exports.RemoveChange = exports.InsertChange = exports.NoopChange = void 0;
/**

@@ -4,0 +5,0 @@ * An operation that does nothing.

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findModule = exports.findModuleFromOptions = exports.findRootModule = exports.ROUTING_MODULE_EXT = exports.MODULE_EXT = void 0;
/**

@@ -4,0 +5,0 @@ * @license

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addPackageToPackageJson = void 0;
/**

@@ -4,0 +5,0 @@ * Adds a package to the package.json

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProject = exports.getWorkspace = exports.getWorkspacePath = void 0;
const schematics_1 = require("@angular-devkit/schematics");

@@ -4,0 +5,0 @@ function getWorkspacePath(host) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc