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

@ngneat/helipopper

Package Overview
Dependencies
Maintainers
3
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 1.0.0 to 1.1.0

schematics/collection.json

78

bundles/ngneat-helipopper.umd.js

@@ -342,7 +342,10 @@ (function (global, factory) {

var icon = "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" fit=\"\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\">\n<path d=\"M12.793 12l4.039-4.025c0.219-0.219 0.224-0.578 0.012-0.802-0.213-0.225-0.563-0.231-0.782-0.011l-4.062 4.049-4.062-4.049c-0.219-0.22-0.569-0.213-0.782 0.011s-0.208 0.583 0.012 0.802l4.039 4.025-4.039 4.025c-0.22 0.219-0.224 0.578-0.012 0.802 0.108 0.115 0.252 0.172 0.397 0.172 0.138 0 0.278-0.053 0.385-0.161l4.062-4.049 4.062 4.049c0.107 0.108 0.245 0.161 0.385 0.161 0.144 0 0.287-0.058 0.397-0.172 0.212-0.225 0.207-0.583-0.012-0.802l-4.039-4.025z\"></path>\n</svg>\n ";
var HelipopperDirective = /** @class */ (function () {
function HelipopperDirective(host, appRef, zone, config) {
function HelipopperDirective(host, appRef, zone, resolver, hostInjector, config) {
this.host = host;
this.appRef = appRef;
this.zone = zone;
this.resolver = resolver;
this.hostInjector = hostInjector;
this.config = config;

@@ -352,2 +355,3 @@ this.helipopperOptions = {};

this.helipopperAppendTo = document.body;
this.helipopperClose = new rxjs.Subject();
this._destroy = new rxjs.Subject();

@@ -403,11 +407,4 @@ this._placement = 'top';

var _this = this;
var _content;
if (content instanceof core.TemplateRef) {
_content = this.resolveTemplate(content);
}
else {
_content = this.mergedConfig.beforeRender(content);
}
this._content = content;
if (this.instance) {
this.instance.setContent(_content);
this.checkOverflow();

@@ -418,3 +415,3 @@ }

.pipe(operators.takeUntil(this._destroy))
.subscribe(function () { return _this.create(_content); });
.subscribe(function () { return _this.create(); });
}

@@ -463,3 +460,3 @@ },

HelipopperDirective.prototype.ngOnDestroy = function () {
this.tplPortal && this.destroyTemplate();
this.destroyView();
this.instance && this.instance.destroy();

@@ -469,7 +466,11 @@ this.instance = null;

};
HelipopperDirective.prototype.create = function (content) {
HelipopperDirective.prototype.destroyView = function () {
this.tplPortal && this.destroyTemplate();
this.innerComponentRef && this.destroyComponent();
};
HelipopperDirective.prototype.create = function () {
var _this = this;
this.zone.runOutsideAngular(function () { return _this.createInstance(content); });
this.zone.runOutsideAngular(function () { return _this.createInstance(); });
};
HelipopperDirective.prototype.createInstance = function (content) {
HelipopperDirective.prototype.createInstance = function () {
var _this = this;

@@ -484,3 +485,3 @@ if (this.showOnlyOnTextOverflow) {

this.helipopperTrigger = this.resolveTrigger();
this.instance = tippy(this._tooltipHost, __assign(__assign({ content: content, appendTo: this.getParent(), arrow: !this.isTooltip, allowHTML: true, zIndex: 1000000, trigger: this.helipopperTrigger, placement: this._placement, triggerTarget: this._tooltipTarget,
this.instance = tippy(this._tooltipHost, __assign(__assign({ content: undefined, appendTo: this.getParent(), arrow: !this.isTooltip, allowHTML: true, zIndex: 1000000, trigger: this.helipopperTrigger, placement: this._placement, triggerTarget: this._tooltipTarget,
// TODO: Merge the following methods with the passed config

@@ -490,5 +491,8 @@ onCreate: function (instance) {

}, onShow: function (instance) {
_this.zone.run(function () { return _this.instance.setContent(_this.resolveContent()); });
_this.isPopper && _this.addCloseButton(instance);
}, onHidden: function (instance) {
_this.isPopper && _this.removeCloseButton(instance);
_this.destroyView();
_this.helipopperClose.next();
} }, this.resolveTheme()), this.helipopperOptions));

@@ -547,6 +551,6 @@ this.markDisabled(this._disabled);

closeButtonElement.innerHTML = closeIcon;
var closeButtonSubcription = rxjs.fromEvent(closeButtonElement, 'click').subscribe(function () { return _this.hide(); });
var closeButtonSubscription = rxjs.fromEvent(closeButtonElement, 'click').subscribe(function () { return _this.hide(); });
popper.appendChild(closeButtonElement);
instance.closeButtonElement = closeButtonElement;
instance.closeButtonSubscription = closeButtonSubcription;
instance.closeButtonSubscription = closeButtonSubscription;
};

@@ -568,6 +572,7 @@ HelipopperDirective.prototype.removeCloseButton = function (instance) {

this.tplPortal.destroy();
this.tplPortal = null;
};
HelipopperDirective.prototype.createConfig = function (config) {
var defaults = {
closeIcon: "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" fit=\"\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\">\n<path d=\"M12.793 12l4.039-4.025c0.219-0.219 0.224-0.578 0.012-0.802-0.213-0.225-0.563-0.231-0.782-0.011l-4.062 4.049-4.062-4.049c-0.219-0.22-0.569-0.213-0.782 0.011s-0.208 0.583 0.012 0.802l4.039 4.025-4.039 4.025c-0.22 0.219-0.224 0.578-0.012 0.802 0.108 0.115 0.252 0.172 0.397 0.172 0.138 0 0.278-0.053 0.385-0.161l4.062-4.049 4.062 4.049c0.107 0.108 0.245 0.161 0.385 0.161 0.144 0 0.287-0.058 0.397-0.172 0.212-0.225 0.207-0.583-0.012-0.802l-4.039-4.025z\"></path>\n</svg>\n ",
closeIcon: icon,
beforeRender: function (content) {

@@ -579,2 +584,29 @@ return content;

};
HelipopperDirective.prototype.resolveComponent = function (content) {
var factory = this.resolver.resolveComponentFactory(content);
var injector = this.injector || this.hostInjector;
this.innerComponentRef = factory.create(injector);
this.appRef.attachView(this.innerComponentRef.hostView);
this.innerComponentRef.hostView.detectChanges();
return this.innerComponentRef.location.nativeElement;
};
HelipopperDirective.prototype.destroyComponent = function () {
this.innerComponentRef.destroy();
this.appRef.attachView(this.innerComponentRef.hostView);
this.innerComponentRef = null;
};
HelipopperDirective.prototype.resolveContent = function () {
var content = this._content;
var finalContent;
if (content instanceof core.TemplateRef) {
finalContent = this.resolveTemplate(content);
}
else if (typeof content === 'string') {
finalContent = this.mergedConfig.beforeRender(content);
}
else {
finalContent = this.resolveComponent(content);
}
return finalContent;
};
HelipopperDirective.ctorParameters = function () { return [

@@ -584,2 +616,4 @@ { type: core.ElementRef },

{ type: core.NgZone },
{ type: core.ComponentFactoryResolver },
{ type: core.Injector },
{ type: undefined, decorators: [{ type: core.Inject, args: [HELIPOPPER_CONFIG,] }] }

@@ -612,2 +646,5 @@ ]; };

__decorate([
core.Input('helipopperInjector')
], HelipopperDirective.prototype, "injector", void 0);
__decorate([
core.Input('helipopperPlacement')

@@ -627,5 +664,8 @@ ], HelipopperDirective.prototype, "placement", null);

], HelipopperDirective.prototype, "helipopper", null);
__decorate([
core.Output()
], HelipopperDirective.prototype, "helipopperClose", void 0);
HelipopperDirective = __decorate([
core.Directive({ selector: "[helipopper]", exportAs: 'helipopper' }),
__param(3, core.Inject(HELIPOPPER_CONFIG))
__param(5, core.Inject(HELIPOPPER_CONFIG))
], HelipopperDirective);

@@ -632,0 +672,0 @@ return HelipopperDirective;

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("tippy.js"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@ngneat/helipopper",["exports","@angular/core","tippy.js","rxjs","rxjs/operators"],t):t(((e=e||self).ngneat=e.ngneat||{},e.ngneat.helipopper={}),e.ng.core,e.tippy,e.rxjs,e.rxjs.operators)}(this,(function(e,t,o,i,n){"use strict";o=o&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o;var r=function(){return(r=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function p(e,t,o,i){var n,r=arguments.length,p=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(p=(r<3?n(p):r>3?n(t,o,p):n(t,o))||p);return r>3&&p&&Object.defineProperty(t,o,p),p}function s(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var i,n,r=o.call(e),p=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)p.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return p}var l="IntersectionObserver"in window;var c="ResizeObserver"in window;function a(e,t){return c?function(e,t){void 0===t&&(t={box:"border-box"});return new i.Observable((function(o){var i=new ResizeObserver((function(e){var t=s(e,1)[0];t.borderBoxSize?o.next({width:t.borderBoxSize.inlineSize,height:t.borderBoxSize.blockSize}):o.next({width:t.target.offsetWidth,height:t.target.offsetHeight})}));return i.observe(e,t),function(){return i.disconnect()}}))}(e,t).pipe(n.auditTime(150)):function(e){return i.fromEvent(window,"resize").pipe(n.auditTime(150),n.map((function(){return{width:e.offsetWidth,height:e.offsetHeight}})),n.distinctUntilChanged((function(e,t){return e.width===t.width&&e.height===t.height})))}(e)}function h(e){return e instanceof t.ElementRef?e.nativeElement:e}function u(e){return e.onStable.pipe(n.take(1))}function f(e,t){Array.isArray(t)?t.forEach((function(t){return e.classList.add(t)})):e.classList.add(t)}var d=function(){function e(e){this.viewRef=e.createEmbeddedView({}),this.viewRef.detectChanges()}return Object.defineProperty(e.prototype,"elementRef",{get:function(){return this.viewRef.rootNodes[0]},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.viewRef.destroy()},e}(),y=new t.InjectionToken("HELIPOPPER_CONFIG"),v=function(){function e(e,t,o,n){this.host=e,this.appRef=t,this.zone=o,this.config=n,this.helipopperOptions={},this.showOnlyOnTextOverflow=!1,this.helipopperAppendTo=document.body,this._destroy=new i.Subject,this._placement="top",this._disabled=!1,this._variation="tooltip",this.mergedConfig=this.createConfig(n)}var c,v;return Object.defineProperty(e.prototype,"placement",{set:function(e){this._placement=e,this.setProps({placement:e})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"variation",{set:function(e){this._variation=e,this.setProps(this.resolveTheme())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{set:function(e){this._disabled=e,this.markDisabled(this._disabled)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sticky",{set:function(e){this.instance&&(e?(this.setProps({trigger:"manual",hideOnClick:!1}),this.show()):(this.hide(),this.setProps({trigger:this.helipopperTrigger})))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"helipopper",{set:function(e){var o,r,p,c=this;o=e instanceof t.TemplateRef?this.resolveTemplate(e):this.mergedConfig.beforeRender(e),this.instance?(this.instance.setContent(o),this.checkOverflow()):i.forkJoin([(r=this.host.nativeElement,void 0===p&&(p={root:null,threshold:.3}),new i.Observable((function(e){l||(e.next(),e.complete());var t=new IntersectionObserver((function(t){s(t,1)[0].isIntersecting&&(e.next(),e.complete())}),p);return t.observe(r),function(){return t.disconnect()}}))),u(this.zone)]).pipe(n.takeUntil(this._destroy)).subscribe((function(){return c.create(o)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_tooltipTarget",{get:function(){return h(this.triggerTarget)||this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_tooltipHost",{get:function(){return h(this.helipopperHost)||this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isTooltip",{get:function(){return"tooltip"===this._variation},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isPopper",{get:function(){return"popper"===this._variation},enumerable:!0,configurable:!0}),e.prototype.setProps=function(e){this.instance&&this.instance.setProps(e)},e.prototype.hide=function(){this.instance.hide()},e.prototype.show=function(){this.instance.show()},e.prototype.ngOnDestroy=function(){this.tplPortal&&this.destroyTemplate(),this.instance&&this.instance.destroy(),this.instance=null,this._destroy.next()},e.prototype.create=function(e){var t=this;this.zone.runOutsideAngular((function(){return t.createInstance(e)}))},e.prototype.createInstance=function(e){var t=this;this.showOnlyOnTextOverflow&&a(this._tooltipHost).pipe(n.takeUntil(this._destroy)).subscribe((function(){t.markDisabled(!1===t.isElementOverflow())})),this.helipopperTrigger=this.resolveTrigger(),this.instance=o(this._tooltipHost,r(r({content:e,appendTo:this.getParent(),arrow:!this.isTooltip,allowHTML:!0,zIndex:1e6,trigger:this.helipopperTrigger,placement:this._placement,triggerTarget:this._tooltipTarget,onCreate:function(e){t.helipopperClass&&f(e.popper,t.helipopperClass)},onShow:function(e){t.isPopper&&t.addCloseButton(e)},onHidden:function(e){t.isPopper&&t.removeCloseButton(e)}},this.resolveTheme()),this.helipopperOptions)),this.markDisabled(this._disabled)},e.prototype.resolveTrigger=function(){return this.helipopperTrigger||(this.isTooltip?"mouseenter":"click")},e.prototype.resolveTemplate=function(e){return this.tplPortal&&this.destroyTemplate(),this.tplPortal=new d(e),this.appRef.attachView(this.tplPortal.viewRef),this.tplPortal.elementRef},e.prototype.isElementOverflow=function(){var e=this._tooltipTarget,t=e.parentElement,o=e.offsetWidth>t.offsetWidth,i=e.offsetWidth<e.scrollWidth;return o||i},e.prototype.getParent=function(){var e,t,o;return"string"==typeof this.helipopperAppendTo?(t=this.host.nativeElement,o=this.helipopperAppendTo,window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t,o=(this.document||this.ownerDocument).querySelectorAll(e),i=this;do{for(t=o.length;--t>=0&&o.item(t)!==i;);}while(t<0&&(i=i.parentElement));return i}),e=t.closest(o)):e=this.helipopperAppendTo,e||document.body},e.prototype.markDisabled=function(e){void 0===e&&(e=!0),this.instance&&(e?this.instance.disable():this.instance.enable())},e.prototype.resolveTheme=function(){return{offset:this.helipopperOffset||[0,this.isTooltip?5:10],theme:this.isTooltip?null:"light",arrow:!1===this.isTooltip,animation:this.isTooltip?"scale":null,interactive:!this.isTooltip}},e.prototype.addCloseButton=function(e){var t,o=this,n=e.popper,r=this.mergedConfig.closeIcon,p=(t="div",document.createElement(t));f(p,"tippy-close"),p.innerHTML=r;var s=i.fromEvent(p,"click").subscribe((function(){return o.hide()}));n.appendChild(p),e.closeButtonElement=p,e.closeButtonSubscription=s},e.prototype.removeCloseButton=function(e){e.popper.removeChild(e.closeButtonElement),e.closeButtonSubscription.unsubscribe(),e.closeButtonElement=null,e.closeButtonSubscription=null},e.prototype.checkOverflow=function(){var e=this;this.showOnlyOnTextOverflow&&u(this.zone).subscribe((function(){return e.markDisabled(!1===e.isElementOverflow())}))},e.prototype.destroyTemplate=function(){this.appRef.detachView(this.tplPortal.viewRef),this.tplPortal.destroy()},e.prototype.createConfig=function(e){return r(r({},{closeIcon:'\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fit="" preserveAspectRatio="xMidYMid meet" focusable="false">\n<path d="M12.793 12l4.039-4.025c0.219-0.219 0.224-0.578 0.012-0.802-0.213-0.225-0.563-0.231-0.782-0.011l-4.062 4.049-4.062-4.049c-0.219-0.22-0.569-0.213-0.782 0.011s-0.208 0.583 0.012 0.802l4.039 4.025-4.039 4.025c-0.22 0.219-0.224 0.578-0.012 0.802 0.108 0.115 0.252 0.172 0.397 0.172 0.138 0 0.278-0.053 0.385-0.161l4.062-4.049 4.062 4.049c0.107 0.108 0.245 0.161 0.385 0.161 0.144 0 0.287-0.058 0.397-0.172 0.212-0.225 0.207-0.583-0.012-0.802l-4.039-4.025z"></path>\n</svg>\n ',beforeRender:function(e){return e}}),e)},e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ApplicationRef},{type:t.NgZone},{type:void 0,decorators:[{type:t.Inject,args:[y]}]}]},p([t.Input()],e.prototype,"helipopperOptions",void 0),p([t.Input("helipopperTextOverflow")],e.prototype,"showOnlyOnTextOverflow",void 0),p([t.Input()],e.prototype,"triggerTarget",void 0),p([t.Input()],e.prototype,"helipopperHost",void 0),p([t.Input()],e.prototype,"helipopperAppendTo",void 0),p([t.Input()],e.prototype,"helipopperTrigger",void 0),p([t.Input()],e.prototype,"helipopperClass",void 0),p([t.Input()],e.prototype,"helipopperOffset",void 0),p([t.Input("helipopperPlacement")],e.prototype,"placement",null),p([t.Input("helipopperVariation")],e.prototype,"variation",null),p([t.Input("helipopperDisabled")],e.prototype,"disabled",null),p([t.Input("helipopperSticky")],e.prototype,"sticky",null),p([t.Input()],e.prototype,"helipopper",null),e=p([t.Directive({selector:"[helipopper]",exportAs:"helipopper"}),(c=3,v=t.Inject(y),function(e,t){v(e,t,c)})],e)}(),g=function(){function e(){}var o;return o=e,e.forRoot=function(e){return void 0===e&&(e={}),{ngModule:o,providers:[{provide:y,useValue:e}]}},e=o=p([t.NgModule({declarations:[v],exports:[v]})],e)}();e.HelipopperDirective=v,e.HelipopperModule=g,e.ɵb=y,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("tippy.js"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@ngneat/helipopper",["exports","@angular/core","tippy.js","rxjs","rxjs/operators"],t):t(((e=e||self).ngneat=e.ngneat||{},e.ngneat.helipopper={}),e.ng.core,e.tippy,e.rxjs,e.rxjs.operators)}(this,(function(e,t,o,n,i){"use strict";o=o&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o;var r=function(){return(r=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function p(e,t,o,n){var i,r=arguments.length,p=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(p=(r<3?i(p):r>3?i(t,o,p):i(t,o))||p);return r>3&&p&&Object.defineProperty(t,o,p),p}function s(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,r=o.call(e),p=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)p.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return p}var l="IntersectionObserver"in window;var c="ResizeObserver"in window;function h(e,t){return c?function(e,t){void 0===t&&(t={box:"border-box"});return new n.Observable((function(o){var n=new ResizeObserver((function(e){var t=s(e,1)[0];t.borderBoxSize?o.next({width:t.borderBoxSize.inlineSize,height:t.borderBoxSize.blockSize}):o.next({width:t.target.offsetWidth,height:t.target.offsetHeight})}));return n.observe(e,t),function(){return n.disconnect()}}))}(e,t).pipe(i.auditTime(150)):function(e){return n.fromEvent(window,"resize").pipe(i.auditTime(150),i.map((function(){return{width:e.offsetWidth,height:e.offsetHeight}})),i.distinctUntilChanged((function(e,t){return e.width===t.width&&e.height===t.height})))}(e)}function a(e){return e instanceof t.ElementRef?e.nativeElement:e}function u(e){return e.onStable.pipe(i.take(1))}function f(e,t){Array.isArray(t)?t.forEach((function(t){return e.classList.add(t)})):e.classList.add(t)}var d=function(){function e(e){this.viewRef=e.createEmbeddedView({}),this.viewRef.detectChanges()}return Object.defineProperty(e.prototype,"elementRef",{get:function(){return this.viewRef.rootNodes[0]},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.viewRef.destroy()},e}(),y=new t.InjectionToken("HELIPOPPER_CONFIG"),v=function(){function e(e,t,o,i,r,p){this.host=e,this.appRef=t,this.zone=o,this.resolver=i,this.hostInjector=r,this.config=p,this.helipopperOptions={},this.showOnlyOnTextOverflow=!1,this.helipopperAppendTo=document.body,this.helipopperClose=new n.Subject,this._destroy=new n.Subject,this._placement="top",this._disabled=!1,this._variation="tooltip",this.mergedConfig=this.createConfig(p)}var c,v;return Object.defineProperty(e.prototype,"placement",{set:function(e){this._placement=e,this.setProps({placement:e})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"variation",{set:function(e){this._variation=e,this.setProps(this.resolveTheme())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{set:function(e){this._disabled=e,this.markDisabled(this._disabled)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sticky",{set:function(e){this.instance&&(e?(this.setProps({trigger:"manual",hideOnClick:!1}),this.show()):(this.hide(),this.setProps({trigger:this.helipopperTrigger})))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"helipopper",{set:function(e){var t,o,r=this;this._content=e,this.instance?this.checkOverflow():n.forkJoin([(t=this.host.nativeElement,void 0===o&&(o={root:null,threshold:.3}),new n.Observable((function(e){l||(e.next(),e.complete());var n=new IntersectionObserver((function(t){s(t,1)[0].isIntersecting&&(e.next(),e.complete())}),o);return n.observe(t),function(){return n.disconnect()}}))),u(this.zone)]).pipe(i.takeUntil(this._destroy)).subscribe((function(){return r.create()}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_tooltipTarget",{get:function(){return a(this.triggerTarget)||this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_tooltipHost",{get:function(){return a(this.helipopperHost)||this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isTooltip",{get:function(){return"tooltip"===this._variation},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isPopper",{get:function(){return"popper"===this._variation},enumerable:!0,configurable:!0}),e.prototype.setProps=function(e){this.instance&&this.instance.setProps(e)},e.prototype.hide=function(){this.instance.hide()},e.prototype.show=function(){this.instance.show()},e.prototype.ngOnDestroy=function(){this.destroyView(),this.instance&&this.instance.destroy(),this.instance=null,this._destroy.next()},e.prototype.destroyView=function(){this.tplPortal&&this.destroyTemplate(),this.innerComponentRef&&this.destroyComponent()},e.prototype.create=function(){var e=this;this.zone.runOutsideAngular((function(){return e.createInstance()}))},e.prototype.createInstance=function(){var e=this;this.showOnlyOnTextOverflow&&h(this._tooltipHost).pipe(i.takeUntil(this._destroy)).subscribe((function(){e.markDisabled(!1===e.isElementOverflow())})),this.helipopperTrigger=this.resolveTrigger(),this.instance=o(this._tooltipHost,r(r({content:void 0,appendTo:this.getParent(),arrow:!this.isTooltip,allowHTML:!0,zIndex:1e6,trigger:this.helipopperTrigger,placement:this._placement,triggerTarget:this._tooltipTarget,onCreate:function(t){e.helipopperClass&&f(t.popper,e.helipopperClass)},onShow:function(t){e.zone.run((function(){return e.instance.setContent(e.resolveContent())})),e.isPopper&&e.addCloseButton(t)},onHidden:function(t){e.isPopper&&e.removeCloseButton(t),e.destroyView(),e.helipopperClose.next()}},this.resolveTheme()),this.helipopperOptions)),this.markDisabled(this._disabled)},e.prototype.resolveTrigger=function(){return this.helipopperTrigger||(this.isTooltip?"mouseenter":"click")},e.prototype.resolveTemplate=function(e){return this.tplPortal&&this.destroyTemplate(),this.tplPortal=new d(e),this.appRef.attachView(this.tplPortal.viewRef),this.tplPortal.elementRef},e.prototype.isElementOverflow=function(){var e=this._tooltipTarget,t=e.parentElement,o=e.offsetWidth>t.offsetWidth,n=e.offsetWidth<e.scrollWidth;return o||n},e.prototype.getParent=function(){var e,t,o;return"string"==typeof this.helipopperAppendTo?(t=this.host.nativeElement,o=this.helipopperAppendTo,window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t,o=(this.document||this.ownerDocument).querySelectorAll(e),n=this;do{for(t=o.length;--t>=0&&o.item(t)!==n;);}while(t<0&&(n=n.parentElement));return n}),e=t.closest(o)):e=this.helipopperAppendTo,e||document.body},e.prototype.markDisabled=function(e){void 0===e&&(e=!0),this.instance&&(e?this.instance.disable():this.instance.enable())},e.prototype.resolveTheme=function(){return{offset:this.helipopperOffset||[0,this.isTooltip?5:10],theme:this.isTooltip?null:"light",arrow:!1===this.isTooltip,animation:this.isTooltip?"scale":null,interactive:!this.isTooltip}},e.prototype.addCloseButton=function(e){var t,o=this,i=e.popper,r=this.mergedConfig.closeIcon,p=(t="div",document.createElement(t));f(p,"tippy-close"),p.innerHTML=r;var s=n.fromEvent(p,"click").subscribe((function(){return o.hide()}));i.appendChild(p),e.closeButtonElement=p,e.closeButtonSubscription=s},e.prototype.removeCloseButton=function(e){e.popper.removeChild(e.closeButtonElement),e.closeButtonSubscription.unsubscribe(),e.closeButtonElement=null,e.closeButtonSubscription=null},e.prototype.checkOverflow=function(){var e=this;this.showOnlyOnTextOverflow&&u(this.zone).subscribe((function(){return e.markDisabled(!1===e.isElementOverflow())}))},e.prototype.destroyTemplate=function(){this.appRef.detachView(this.tplPortal.viewRef),this.tplPortal.destroy(),this.tplPortal=null},e.prototype.createConfig=function(e){return r(r({},{closeIcon:'\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fit="" preserveAspectRatio="xMidYMid meet" focusable="false">\n<path d="M12.793 12l4.039-4.025c0.219-0.219 0.224-0.578 0.012-0.802-0.213-0.225-0.563-0.231-0.782-0.011l-4.062 4.049-4.062-4.049c-0.219-0.22-0.569-0.213-0.782 0.011s-0.208 0.583 0.012 0.802l4.039 4.025-4.039 4.025c-0.22 0.219-0.224 0.578-0.012 0.802 0.108 0.115 0.252 0.172 0.397 0.172 0.138 0 0.278-0.053 0.385-0.161l4.062-4.049 4.062 4.049c0.107 0.108 0.245 0.161 0.385 0.161 0.144 0 0.287-0.058 0.397-0.172 0.212-0.225 0.207-0.583-0.012-0.802l-4.039-4.025z"></path>\n</svg>\n ',beforeRender:function(e){return e}}),e)},e.prototype.resolveComponent=function(e){var t=this.resolver.resolveComponentFactory(e),o=this.injector||this.hostInjector;return this.innerComponentRef=t.create(o),this.appRef.attachView(this.innerComponentRef.hostView),this.innerComponentRef.hostView.detectChanges(),this.innerComponentRef.location.nativeElement},e.prototype.destroyComponent=function(){this.innerComponentRef.destroy(),this.appRef.attachView(this.innerComponentRef.hostView),this.innerComponentRef=null},e.prototype.resolveContent=function(){var e=this._content;return e instanceof t.TemplateRef?this.resolveTemplate(e):"string"==typeof e?this.mergedConfig.beforeRender(e):this.resolveComponent(e)},e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ApplicationRef},{type:t.NgZone},{type:t.ComponentFactoryResolver},{type:t.Injector},{type:void 0,decorators:[{type:t.Inject,args:[y]}]}]},p([t.Input()],e.prototype,"helipopperOptions",void 0),p([t.Input("helipopperTextOverflow")],e.prototype,"showOnlyOnTextOverflow",void 0),p([t.Input()],e.prototype,"triggerTarget",void 0),p([t.Input()],e.prototype,"helipopperHost",void 0),p([t.Input()],e.prototype,"helipopperAppendTo",void 0),p([t.Input()],e.prototype,"helipopperTrigger",void 0),p([t.Input()],e.prototype,"helipopperClass",void 0),p([t.Input()],e.prototype,"helipopperOffset",void 0),p([t.Input("helipopperInjector")],e.prototype,"injector",void 0),p([t.Input("helipopperPlacement")],e.prototype,"placement",null),p([t.Input("helipopperVariation")],e.prototype,"variation",null),p([t.Input("helipopperDisabled")],e.prototype,"disabled",null),p([t.Input("helipopperSticky")],e.prototype,"sticky",null),p([t.Input()],e.prototype,"helipopper",null),p([t.Output()],e.prototype,"helipopperClose",void 0),e=p([t.Directive({selector:"[helipopper]",exportAs:"helipopper"}),(c=5,v=t.Inject(y),function(e,t){v(e,t,c)})],e)}(),m=function(){function e(){}var o;return o=e,e.forRoot=function(e){return void 0===e&&(e={}),{ngModule:o,providers:[{provide:y,useValue:e}]}},e=o=p([t.NgModule({declarations:[v],exports:[v]})],e)}();e.HelipopperDirective=v,e.HelipopperModule=m,e.ɵb=y,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=ngneat-helipopper.umd.min.js.map
import { __decorate, __param } from "tslib";
import { ApplicationRef, Directive, ElementRef, Inject, Input, NgZone, OnDestroy, TemplateRef } from '@angular/core';
import { ApplicationRef, ComponentFactoryResolver, ComponentRef, Directive, ElementRef, Inject, Injector, Input, NgZone, OnDestroy, Output, TemplateRef, Type } from '@angular/core';
import tippy from 'tippy.js';

@@ -8,7 +8,14 @@ import { forkJoin, fromEvent, Subject } from 'rxjs';

import { HELIPOPPER_CONFIG } from './helipopper.types';
const icon = `
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fit="" preserveAspectRatio="xMidYMid meet" focusable="false">
<path d="M12.793 12l4.039-4.025c0.219-0.219 0.224-0.578 0.012-0.802-0.213-0.225-0.563-0.231-0.782-0.011l-4.062 4.049-4.062-4.049c-0.219-0.22-0.569-0.213-0.782 0.011s-0.208 0.583 0.012 0.802l4.039 4.025-4.039 4.025c-0.22 0.219-0.224 0.578-0.012 0.802 0.108 0.115 0.252 0.172 0.397 0.172 0.138 0 0.278-0.053 0.385-0.161l4.062-4.049 4.062 4.049c0.107 0.108 0.245 0.161 0.385 0.161 0.144 0 0.287-0.058 0.397-0.172 0.212-0.225 0.207-0.583-0.012-0.802l-4.039-4.025z"></path>
</svg>
`;
let HelipopperDirective = class HelipopperDirective {
constructor(host, appRef, zone, config) {
constructor(host, appRef, zone, resolver, hostInjector, config) {
this.host = host;
this.appRef = appRef;
this.zone = zone;
this.resolver = resolver;
this.hostInjector = hostInjector;
this.config = config;

@@ -18,2 +25,3 @@ this.helipopperOptions = {};

this.helipopperAppendTo = document.body;
this.helipopperClose = new Subject();
this._destroy = new Subject();

@@ -51,11 +59,4 @@ this._placement = 'top';

set helipopper(content) {
let _content;
if (content instanceof TemplateRef) {
_content = this.resolveTemplate(content);
}
else {
_content = this.mergedConfig.beforeRender(content);
}
this._content = content;
if (this.instance) {
this.instance.setContent(_content);
this.checkOverflow();

@@ -66,3 +67,3 @@ }

.pipe(takeUntil(this._destroy))
.subscribe(() => this.create(_content));
.subscribe(() => this.create());
}

@@ -92,3 +93,3 @@ }

ngOnDestroy() {
this.tplPortal && this.destroyTemplate();
this.destroyView();
this.instance && this.instance.destroy();

@@ -98,6 +99,10 @@ this.instance = null;

}
create(content) {
this.zone.runOutsideAngular(() => this.createInstance(content));
destroyView() {
this.tplPortal && this.destroyTemplate();
this.innerComponentRef && this.destroyComponent();
}
createInstance(content) {
create() {
this.zone.runOutsideAngular(() => this.createInstance());
}
createInstance() {
if (this.showOnlyOnTextOverflow) {

@@ -111,3 +116,3 @@ dimensionsChanges(this._tooltipHost)

this.helipopperTrigger = this.resolveTrigger();
this.instance = tippy(this._tooltipHost, Object.assign(Object.assign({ content, appendTo: this.getParent(), arrow: !this.isTooltip, allowHTML: true, zIndex: 1000000, trigger: this.helipopperTrigger, placement: this._placement, triggerTarget: this._tooltipTarget,
this.instance = tippy(this._tooltipHost, Object.assign(Object.assign({ content: undefined, appendTo: this.getParent(), arrow: !this.isTooltip, allowHTML: true, zIndex: 1000000, trigger: this.helipopperTrigger, placement: this._placement, triggerTarget: this._tooltipTarget,
// TODO: Merge the following methods with the passed config

@@ -117,5 +122,8 @@ onCreate: instance => {

}, onShow: instance => {
this.zone.run(() => this.instance.setContent(this.resolveContent()));
this.isPopper && this.addCloseButton(instance);
}, onHidden: instance => {
this.isPopper && this.removeCloseButton(instance);
this.destroyView();
this.helipopperClose.next();
} }, this.resolveTheme()), this.helipopperOptions));

@@ -172,6 +180,6 @@ this.markDisabled(this._disabled);

closeButtonElement.innerHTML = closeIcon;
const closeButtonSubcription = fromEvent(closeButtonElement, 'click').subscribe(() => this.hide());
const closeButtonSubscription = fromEvent(closeButtonElement, 'click').subscribe(() => this.hide());
popper.appendChild(closeButtonElement);
instance.closeButtonElement = closeButtonElement;
instance.closeButtonSubscription = closeButtonSubcription;
instance.closeButtonSubscription = closeButtonSubscription;
}

@@ -192,10 +200,7 @@ removeCloseButton(instance) {

this.tplPortal.destroy();
this.tplPortal = null;
}
createConfig(config) {
const defaults = {
closeIcon: `
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fit="" preserveAspectRatio="xMidYMid meet" focusable="false">
<path d="M12.793 12l4.039-4.025c0.219-0.219 0.224-0.578 0.012-0.802-0.213-0.225-0.563-0.231-0.782-0.011l-4.062 4.049-4.062-4.049c-0.219-0.22-0.569-0.213-0.782 0.011s-0.208 0.583 0.012 0.802l4.039 4.025-4.039 4.025c-0.22 0.219-0.224 0.578-0.012 0.802 0.108 0.115 0.252 0.172 0.397 0.172 0.138 0 0.278-0.053 0.385-0.161l4.062-4.049 4.062 4.049c0.107 0.108 0.245 0.161 0.385 0.161 0.144 0 0.287-0.058 0.397-0.172 0.212-0.225 0.207-0.583-0.012-0.802l-4.039-4.025z"></path>
</svg>
`,
closeIcon: icon,
beforeRender(content) {

@@ -207,2 +212,29 @@ return content;

}
resolveComponent(content) {
const factory = this.resolver.resolveComponentFactory(content);
const injector = this.injector || this.hostInjector;
this.innerComponentRef = factory.create(injector);
this.appRef.attachView(this.innerComponentRef.hostView);
this.innerComponentRef.hostView.detectChanges();
return this.innerComponentRef.location.nativeElement;
}
destroyComponent() {
this.innerComponentRef.destroy();
this.appRef.attachView(this.innerComponentRef.hostView);
this.innerComponentRef = null;
}
resolveContent() {
const content = this._content;
let finalContent;
if (content instanceof TemplateRef) {
finalContent = this.resolveTemplate(content);
}
else if (typeof content === 'string') {
finalContent = this.mergedConfig.beforeRender(content);
}
else {
finalContent = this.resolveComponent(content);
}
return finalContent;
}
};

@@ -213,2 +245,4 @@ HelipopperDirective.ctorParameters = () => [

{ type: NgZone },
{ type: ComponentFactoryResolver },
{ type: Injector },
{ type: undefined, decorators: [{ type: Inject, args: [HELIPOPPER_CONFIG,] }] }

@@ -241,2 +275,5 @@ ];

__decorate([
Input('helipopperInjector')
], HelipopperDirective.prototype, "injector", void 0);
__decorate([
Input('helipopperPlacement')

@@ -256,7 +293,10 @@ ], HelipopperDirective.prototype, "placement", null);

], HelipopperDirective.prototype, "helipopper", null);
__decorate([
Output()
], HelipopperDirective.prototype, "helipopperClose", void 0);
HelipopperDirective = __decorate([
Directive({ selector: `[helipopper]`, exportAs: 'helipopper' }),
__param(3, Inject(HELIPOPPER_CONFIG))
__param(5, Inject(HELIPOPPER_CONFIG))
], HelipopperDirective);
export { HelipopperDirective };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVsaXBvcHBlci5kaXJlY3R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RSZWYuZGVzdHJveSgpO1xuICAgIHRoaXMuYXBwUmVmLmF0dGFjaFZpZXcodGhpcy5pbm5lckNvbXBvbmVudFJlZi5ob3N0Vmlldyk7XG4gICAgdGhpcy5pbm5lckNvbXBvbmVudFJlZiA9IG51bGw7XG4gIH1cblxuICBwcml2YXRlIHJlc29sdmVDb250ZW50KCkge1xuICAgIGNvbnN0IGNvbnRlbnQgPSB0aGlzLl9jb250ZW50O1xuICAgIGxldCBmaW5hbENvbnRlbnQ7XG5cbiAgICBpZiAoY29udGVudCBpbnN0YW5jZW9mIFRlbXBsYXRlUmVmKSB7XG4gICAgICBmaW5hbENvbnRlbnQgPSB0aGlzLnJlc29sdmVUZW1wbGF0ZShjb250ZW50KTtcbiAgICB9IGVsc2UgaWYgKHR5cGVvZiBjb250ZW50ID09PSAnc3RyaW5nJykge1xuICAgICAgZmluYWxDb250ZW50ID0gdGhpcy5tZXJnZWRDb25maWcuYmVmb3JlUmVuZGVyKGNvbnRlbnQpO1xuICAgIH0gZWxzZSB7XG4gICAgICBmaW5hbENvbnRlbnQgPSB0aGlzLnJlc29sdmVDb21wb25lbnQoY29udGVudCk7XG4gICAgfVxuXG4gICAgcmV0dXJuIGZpbmFsQ29udGVudDtcbiAgfVxufVxuIl19
import { __assign, __decorate, __param } from "tslib";
import { ApplicationRef, Directive, ElementRef, Inject, Input, NgZone, OnDestroy, TemplateRef } from '@angular/core';
import { ApplicationRef, ComponentFactoryResolver, ComponentRef, Directive, ElementRef, Inject, Injector, Input, NgZone, OnDestroy, Output, TemplateRef, Type } from '@angular/core';
import tippy from 'tippy.js';

@@ -8,7 +8,10 @@ import { forkJoin, fromEvent, Subject } from 'rxjs';

import { HELIPOPPER_CONFIG } from './helipopper.types';
var icon = "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" fit=\"\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\">\n<path d=\"M12.793 12l4.039-4.025c0.219-0.219 0.224-0.578 0.012-0.802-0.213-0.225-0.563-0.231-0.782-0.011l-4.062 4.049-4.062-4.049c-0.219-0.22-0.569-0.213-0.782 0.011s-0.208 0.583 0.012 0.802l4.039 4.025-4.039 4.025c-0.22 0.219-0.224 0.578-0.012 0.802 0.108 0.115 0.252 0.172 0.397 0.172 0.138 0 0.278-0.053 0.385-0.161l4.062-4.049 4.062 4.049c0.107 0.108 0.245 0.161 0.385 0.161 0.144 0 0.287-0.058 0.397-0.172 0.212-0.225 0.207-0.583-0.012-0.802l-4.039-4.025z\"></path>\n</svg>\n ";
var HelipopperDirective = /** @class */ (function () {
function HelipopperDirective(host, appRef, zone, config) {
function HelipopperDirective(host, appRef, zone, resolver, hostInjector, config) {
this.host = host;
this.appRef = appRef;
this.zone = zone;
this.resolver = resolver;
this.hostInjector = hostInjector;
this.config = config;

@@ -18,2 +21,3 @@ this.helipopperOptions = {};

this.helipopperAppendTo = document.body;
this.helipopperClose = new Subject();
this._destroy = new Subject();

@@ -69,11 +73,4 @@ this._placement = 'top';

var _this = this;
var _content;
if (content instanceof TemplateRef) {
_content = this.resolveTemplate(content);
}
else {
_content = this.mergedConfig.beforeRender(content);
}
this._content = content;
if (this.instance) {
this.instance.setContent(_content);
this.checkOverflow();

@@ -84,3 +81,3 @@ }

.pipe(takeUntil(this._destroy))
.subscribe(function () { return _this.create(_content); });
.subscribe(function () { return _this.create(); });
}

@@ -129,3 +126,3 @@ },

HelipopperDirective.prototype.ngOnDestroy = function () {
this.tplPortal && this.destroyTemplate();
this.destroyView();
this.instance && this.instance.destroy();

@@ -135,7 +132,11 @@ this.instance = null;

};
HelipopperDirective.prototype.create = function (content) {
HelipopperDirective.prototype.destroyView = function () {
this.tplPortal && this.destroyTemplate();
this.innerComponentRef && this.destroyComponent();
};
HelipopperDirective.prototype.create = function () {
var _this = this;
this.zone.runOutsideAngular(function () { return _this.createInstance(content); });
this.zone.runOutsideAngular(function () { return _this.createInstance(); });
};
HelipopperDirective.prototype.createInstance = function (content) {
HelipopperDirective.prototype.createInstance = function () {
var _this = this;

@@ -150,3 +151,3 @@ if (this.showOnlyOnTextOverflow) {

this.helipopperTrigger = this.resolveTrigger();
this.instance = tippy(this._tooltipHost, __assign(__assign({ content: content, appendTo: this.getParent(), arrow: !this.isTooltip, allowHTML: true, zIndex: 1000000, trigger: this.helipopperTrigger, placement: this._placement, triggerTarget: this._tooltipTarget,
this.instance = tippy(this._tooltipHost, __assign(__assign({ content: undefined, appendTo: this.getParent(), arrow: !this.isTooltip, allowHTML: true, zIndex: 1000000, trigger: this.helipopperTrigger, placement: this._placement, triggerTarget: this._tooltipTarget,
// TODO: Merge the following methods with the passed config

@@ -156,5 +157,8 @@ onCreate: function (instance) {

}, onShow: function (instance) {
_this.zone.run(function () { return _this.instance.setContent(_this.resolveContent()); });
_this.isPopper && _this.addCloseButton(instance);
}, onHidden: function (instance) {
_this.isPopper && _this.removeCloseButton(instance);
_this.destroyView();
_this.helipopperClose.next();
} }, this.resolveTheme()), this.helipopperOptions));

@@ -213,6 +217,6 @@ this.markDisabled(this._disabled);

closeButtonElement.innerHTML = closeIcon;
var closeButtonSubcription = fromEvent(closeButtonElement, 'click').subscribe(function () { return _this.hide(); });
var closeButtonSubscription = fromEvent(closeButtonElement, 'click').subscribe(function () { return _this.hide(); });
popper.appendChild(closeButtonElement);
instance.closeButtonElement = closeButtonElement;
instance.closeButtonSubscription = closeButtonSubcription;
instance.closeButtonSubscription = closeButtonSubscription;
};

@@ -234,6 +238,7 @@ HelipopperDirective.prototype.removeCloseButton = function (instance) {

this.tplPortal.destroy();
this.tplPortal = null;
};
HelipopperDirective.prototype.createConfig = function (config) {
var defaults = {
closeIcon: "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" fit=\"\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\">\n<path d=\"M12.793 12l4.039-4.025c0.219-0.219 0.224-0.578 0.012-0.802-0.213-0.225-0.563-0.231-0.782-0.011l-4.062 4.049-4.062-4.049c-0.219-0.22-0.569-0.213-0.782 0.011s-0.208 0.583 0.012 0.802l4.039 4.025-4.039 4.025c-0.22 0.219-0.224 0.578-0.012 0.802 0.108 0.115 0.252 0.172 0.397 0.172 0.138 0 0.278-0.053 0.385-0.161l4.062-4.049 4.062 4.049c0.107 0.108 0.245 0.161 0.385 0.161 0.144 0 0.287-0.058 0.397-0.172 0.212-0.225 0.207-0.583-0.012-0.802l-4.039-4.025z\"></path>\n</svg>\n ",
closeIcon: icon,
beforeRender: function (content) {

@@ -245,2 +250,29 @@ return content;

};
HelipopperDirective.prototype.resolveComponent = function (content) {
var factory = this.resolver.resolveComponentFactory(content);
var injector = this.injector || this.hostInjector;
this.innerComponentRef = factory.create(injector);
this.appRef.attachView(this.innerComponentRef.hostView);
this.innerComponentRef.hostView.detectChanges();
return this.innerComponentRef.location.nativeElement;
};
HelipopperDirective.prototype.destroyComponent = function () {
this.innerComponentRef.destroy();
this.appRef.attachView(this.innerComponentRef.hostView);
this.innerComponentRef = null;
};
HelipopperDirective.prototype.resolveContent = function () {
var content = this._content;
var finalContent;
if (content instanceof TemplateRef) {
finalContent = this.resolveTemplate(content);
}
else if (typeof content === 'string') {
finalContent = this.mergedConfig.beforeRender(content);
}
else {
finalContent = this.resolveComponent(content);
}
return finalContent;
};
HelipopperDirective.ctorParameters = function () { return [

@@ -250,2 +282,4 @@ { type: ElementRef },

{ type: NgZone },
{ type: ComponentFactoryResolver },
{ type: Injector },
{ type: undefined, decorators: [{ type: Inject, args: [HELIPOPPER_CONFIG,] }] }

@@ -278,2 +312,5 @@ ]; };

__decorate([
Input('helipopperInjector')
], HelipopperDirective.prototype, "injector", void 0);
__decorate([
Input('helipopperPlacement')

@@ -293,5 +330,8 @@ ], HelipopperDirective.prototype, "placement", null);

], HelipopperDirective.prototype, "helipopper", null);
__decorate([
Output()
], HelipopperDirective.prototype, "helipopperClose", void 0);
HelipopperDirective = __decorate([
Directive({ selector: "[helipopper]", exportAs: 'helipopper' }),
__param(3, Inject(HELIPOPPER_CONFIG))
__param(5, Inject(HELIPOPPER_CONFIG))
], HelipopperDirective);

@@ -301,2 +341,2 @@ return HelipopperDirective;

export { HelipopperDirective };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVsaXBvcHBlci5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L2hlbGlwb3BwZXIvIiwic291cmNlcyI6WyJsaWIvaGVsaXBvcHBlci5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxTQUFTLEVBQUUsV0FBVyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3JILE9BQU8sS0FBMEIsTUFBTSxVQUFVLENBQUM7QUFDbEQsT0FBTyxFQUFFLFFBQVEsRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBRXBELE9BQU8sRUFDTCxRQUFRLEVBQ1IsT0FBTyxFQUNQLGFBQWEsRUFDYixhQUFhLEVBQ2IsaUJBQWlCLEVBQ2pCLE1BQU0sRUFDTixRQUFRLEVBQ1IsY0FBYyxFQUNkLFVBQVUsRUFDWCxNQUFNLFNBQVMsQ0FBQztBQUNqQixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDM0MsT0FBTyxFQUFFLGlCQUFpQixFQUFrRCxNQUFNLG9CQUFvQixDQUFDO0FBR3ZHO0lBcUZFLDZCQUNVLElBQWdCLEVBQ2hCLE1BQXNCLEVBQ3RCLElBQVksRUFDZSxNQUF3QjtRQUhuRCxTQUFJLEdBQUosSUFBSSxDQUFZO1FBQ2hCLFdBQ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udFJlZi5kZXN0cm95KCk7XG4gICAgdGhpcy5hcHBSZWYuYXR0YWNoVmlldyh0aGlzLmlubmVyQ29tcG9uZW50UmVmLmhvc3RWaWV3KTtcbiAgICB0aGlzLmlubmVyQ29tcG9uZW50UmVmID0gbnVsbDtcbiAgfVxuXG4gIHByaXZhdGUgcmVzb2x2ZUNvbnRlbnQoKSB7XG4gICAgY29uc3QgY29udGVudCA9IHRoaXMuX2NvbnRlbnQ7XG4gICAgbGV0IGZpbmFsQ29udGVudDtcblxuICAgIGlmIChjb250ZW50IGluc3RhbmNlb2YgVGVtcGxhdGVSZWYpIHtcbiAgICAgIGZpbmFsQ29udGVudCA9IHRoaXMucmVzb2x2ZVRlbXBsYXRlKGNvbnRlbnQpO1xuICAgIH0gZWxzZSBpZiAodHlwZW9mIGNvbnRlbnQgPT09ICdzdHJpbmcnKSB7XG4gICAgICBmaW5hbENvbnRlbnQgPSB0aGlzLm1lcmdlZENvbmZpZy5iZWZvcmVSZW5kZXIoY29udGVudCk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGZpbmFsQ29udGVudCA9IHRoaXMucmVzb2x2ZUNvbXBvbmVudChjb250ZW50KTtcbiAgICB9XG5cbiAgICByZXR1cm4gZmluYWxDb250ZW50O1xuICB9XG59XG4iXX0=
import { __decorate, __param } from 'tslib';
import { ElementRef, InjectionToken, TemplateRef, ApplicationRef, NgZone, Inject, Input, Directive, NgModule } from '@angular/core';
import { ElementRef, InjectionToken, TemplateRef, ApplicationRef, NgZone, ComponentFactoryResolver, Injector, Inject, Input, Output, Directive, NgModule } from '@angular/core';
import tippy from 'tippy.js';

@@ -112,7 +112,14 @@ import { Observable, fromEvent, Subject, forkJoin } from 'rxjs';

const icon = `
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fit="" preserveAspectRatio="xMidYMid meet" focusable="false">
<path d="M12.793 12l4.039-4.025c0.219-0.219 0.224-0.578 0.012-0.802-0.213-0.225-0.563-0.231-0.782-0.011l-4.062 4.049-4.062-4.049c-0.219-0.22-0.569-0.213-0.782 0.011s-0.208 0.583 0.012 0.802l4.039 4.025-4.039 4.025c-0.22 0.219-0.224 0.578-0.012 0.802 0.108 0.115 0.252 0.172 0.397 0.172 0.138 0 0.278-0.053 0.385-0.161l4.062-4.049 4.062 4.049c0.107 0.108 0.245 0.161 0.385 0.161 0.144 0 0.287-0.058 0.397-0.172 0.212-0.225 0.207-0.583-0.012-0.802l-4.039-4.025z"></path>
</svg>
`;
let HelipopperDirective = class HelipopperDirective {
constructor(host, appRef, zone, config) {
constructor(host, appRef, zone, resolver, hostInjector, config) {
this.host = host;
this.appRef = appRef;
this.zone = zone;
this.resolver = resolver;
this.hostInjector = hostInjector;
this.config = config;

@@ -122,2 +129,3 @@ this.helipopperOptions = {};

this.helipopperAppendTo = document.body;
this.helipopperClose = new Subject();
this._destroy = new Subject();

@@ -155,11 +163,4 @@ this._placement = 'top';

set helipopper(content) {
let _content;
if (content instanceof TemplateRef) {
_content = this.resolveTemplate(content);
}
else {
_content = this.mergedConfig.beforeRender(content);
}
this._content = content;
if (this.instance) {
this.instance.setContent(_content);
this.checkOverflow();

@@ -170,3 +171,3 @@ }

.pipe(takeUntil(this._destroy))
.subscribe(() => this.create(_content));
.subscribe(() => this.create());
}

@@ -196,3 +197,3 @@ }

ngOnDestroy() {
this.tplPortal && this.destroyTemplate();
this.destroyView();
this.instance && this.instance.destroy();

@@ -202,6 +203,10 @@ this.instance = null;

}
create(content) {
this.zone.runOutsideAngular(() => this.createInstance(content));
destroyView() {
this.tplPortal && this.destroyTemplate();
this.innerComponentRef && this.destroyComponent();
}
createInstance(content) {
create() {
this.zone.runOutsideAngular(() => this.createInstance());
}
createInstance() {
if (this.showOnlyOnTextOverflow) {

@@ -215,3 +220,3 @@ dimensionsChanges(this._tooltipHost)

this.helipopperTrigger = this.resolveTrigger();
this.instance = tippy(this._tooltipHost, Object.assign(Object.assign({ content, appendTo: this.getParent(), arrow: !this.isTooltip, allowHTML: true, zIndex: 1000000, trigger: this.helipopperTrigger, placement: this._placement, triggerTarget: this._tooltipTarget,
this.instance = tippy(this._tooltipHost, Object.assign(Object.assign({ content: undefined, appendTo: this.getParent(), arrow: !this.isTooltip, allowHTML: true, zIndex: 1000000, trigger: this.helipopperTrigger, placement: this._placement, triggerTarget: this._tooltipTarget,
// TODO: Merge the following methods with the passed config

@@ -221,5 +226,8 @@ onCreate: instance => {

}, onShow: instance => {
this.zone.run(() => this.instance.setContent(this.resolveContent()));
this.isPopper && this.addCloseButton(instance);
}, onHidden: instance => {
this.isPopper && this.removeCloseButton(instance);
this.destroyView();
this.helipopperClose.next();
} }, this.resolveTheme()), this.helipopperOptions));

@@ -276,6 +284,6 @@ this.markDisabled(this._disabled);

closeButtonElement.innerHTML = closeIcon;
const closeButtonSubcription = fromEvent(closeButtonElement, 'click').subscribe(() => this.hide());
const closeButtonSubscription = fromEvent(closeButtonElement, 'click').subscribe(() => this.hide());
popper.appendChild(closeButtonElement);
instance.closeButtonElement = closeButtonElement;
instance.closeButtonSubscription = closeButtonSubcription;
instance.closeButtonSubscription = closeButtonSubscription;
}

@@ -296,10 +304,7 @@ removeCloseButton(instance) {

this.tplPortal.destroy();
this.tplPortal = null;
}
createConfig(config) {
const defaults = {
closeIcon: `
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fit="" preserveAspectRatio="xMidYMid meet" focusable="false">
<path d="M12.793 12l4.039-4.025c0.219-0.219 0.224-0.578 0.012-0.802-0.213-0.225-0.563-0.231-0.782-0.011l-4.062 4.049-4.062-4.049c-0.219-0.22-0.569-0.213-0.782 0.011s-0.208 0.583 0.012 0.802l4.039 4.025-4.039 4.025c-0.22 0.219-0.224 0.578-0.012 0.802 0.108 0.115 0.252 0.172 0.397 0.172 0.138 0 0.278-0.053 0.385-0.161l4.062-4.049 4.062 4.049c0.107 0.108 0.245 0.161 0.385 0.161 0.144 0 0.287-0.058 0.397-0.172 0.212-0.225 0.207-0.583-0.012-0.802l-4.039-4.025z"></path>
</svg>
`,
closeIcon: icon,
beforeRender(content) {

@@ -311,2 +316,29 @@ return content;

}
resolveComponent(content) {
const factory = this.resolver.resolveComponentFactory(content);
const injector = this.injector || this.hostInjector;
this.innerComponentRef = factory.create(injector);
this.appRef.attachView(this.innerComponentRef.hostView);
this.innerComponentRef.hostView.detectChanges();
return this.innerComponentRef.location.nativeElement;
}
destroyComponent() {
this.innerComponentRef.destroy();
this.appRef.attachView(this.innerComponentRef.hostView);
this.innerComponentRef = null;
}
resolveContent() {
const content = this._content;
let finalContent;
if (content instanceof TemplateRef) {
finalContent = this.resolveTemplate(content);
}
else if (typeof content === 'string') {
finalContent = this.mergedConfig.beforeRender(content);
}
else {
finalContent = this.resolveComponent(content);
}
return finalContent;
}
};

@@ -317,2 +349,4 @@ HelipopperDirective.ctorParameters = () => [

{ type: NgZone },
{ type: ComponentFactoryResolver },
{ type: Injector },
{ type: undefined, decorators: [{ type: Inject, args: [HELIPOPPER_CONFIG,] }] }

@@ -345,2 +379,5 @@ ];

__decorate([
Input('helipopperInjector')
], HelipopperDirective.prototype, "injector", void 0);
__decorate([
Input('helipopperPlacement')

@@ -360,5 +397,8 @@ ], HelipopperDirective.prototype, "placement", null);

], HelipopperDirective.prototype, "helipopper", null);
__decorate([
Output()
], HelipopperDirective.prototype, "helipopperClose", void 0);
HelipopperDirective = __decorate([
Directive({ selector: `[helipopper]`, exportAs: 'helipopper' }),
__param(3, Inject(HELIPOPPER_CONFIG))
__param(5, Inject(HELIPOPPER_CONFIG))
], HelipopperDirective);

@@ -365,0 +405,0 @@

import { __read, __assign, __decorate, __param } from 'tslib';
import { ElementRef, InjectionToken, TemplateRef, ApplicationRef, NgZone, Inject, Input, Directive, NgModule } from '@angular/core';
import { ElementRef, InjectionToken, TemplateRef, ApplicationRef, NgZone, ComponentFactoryResolver, Injector, Inject, Input, Output, Directive, NgModule } from '@angular/core';
import tippy from 'tippy.js';

@@ -121,7 +121,10 @@ import { Observable, fromEvent, Subject, forkJoin } from 'rxjs';

var icon = "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" fit=\"\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\">\n<path d=\"M12.793 12l4.039-4.025c0.219-0.219 0.224-0.578 0.012-0.802-0.213-0.225-0.563-0.231-0.782-0.011l-4.062 4.049-4.062-4.049c-0.219-0.22-0.569-0.213-0.782 0.011s-0.208 0.583 0.012 0.802l4.039 4.025-4.039 4.025c-0.22 0.219-0.224 0.578-0.012 0.802 0.108 0.115 0.252 0.172 0.397 0.172 0.138 0 0.278-0.053 0.385-0.161l4.062-4.049 4.062 4.049c0.107 0.108 0.245 0.161 0.385 0.161 0.144 0 0.287-0.058 0.397-0.172 0.212-0.225 0.207-0.583-0.012-0.802l-4.039-4.025z\"></path>\n</svg>\n ";
var HelipopperDirective = /** @class */ (function () {
function HelipopperDirective(host, appRef, zone, config) {
function HelipopperDirective(host, appRef, zone, resolver, hostInjector, config) {
this.host = host;
this.appRef = appRef;
this.zone = zone;
this.resolver = resolver;
this.hostInjector = hostInjector;
this.config = config;

@@ -131,2 +134,3 @@ this.helipopperOptions = {};

this.helipopperAppendTo = document.body;
this.helipopperClose = new Subject();
this._destroy = new Subject();

@@ -182,11 +186,4 @@ this._placement = 'top';

var _this = this;
var _content;
if (content instanceof TemplateRef) {
_content = this.resolveTemplate(content);
}
else {
_content = this.mergedConfig.beforeRender(content);
}
this._content = content;
if (this.instance) {
this.instance.setContent(_content);
this.checkOverflow();

@@ -197,3 +194,3 @@ }

.pipe(takeUntil(this._destroy))
.subscribe(function () { return _this.create(_content); });
.subscribe(function () { return _this.create(); });
}

@@ -242,3 +239,3 @@ },

HelipopperDirective.prototype.ngOnDestroy = function () {
this.tplPortal && this.destroyTemplate();
this.destroyView();
this.instance && this.instance.destroy();

@@ -248,7 +245,11 @@ this.instance = null;

};
HelipopperDirective.prototype.create = function (content) {
HelipopperDirective.prototype.destroyView = function () {
this.tplPortal && this.destroyTemplate();
this.innerComponentRef && this.destroyComponent();
};
HelipopperDirective.prototype.create = function () {
var _this = this;
this.zone.runOutsideAngular(function () { return _this.createInstance(content); });
this.zone.runOutsideAngular(function () { return _this.createInstance(); });
};
HelipopperDirective.prototype.createInstance = function (content) {
HelipopperDirective.prototype.createInstance = function () {
var _this = this;

@@ -263,3 +264,3 @@ if (this.showOnlyOnTextOverflow) {

this.helipopperTrigger = this.resolveTrigger();
this.instance = tippy(this._tooltipHost, __assign(__assign({ content: content, appendTo: this.getParent(), arrow: !this.isTooltip, allowHTML: true, zIndex: 1000000, trigger: this.helipopperTrigger, placement: this._placement, triggerTarget: this._tooltipTarget,
this.instance = tippy(this._tooltipHost, __assign(__assign({ content: undefined, appendTo: this.getParent(), arrow: !this.isTooltip, allowHTML: true, zIndex: 1000000, trigger: this.helipopperTrigger, placement: this._placement, triggerTarget: this._tooltipTarget,
// TODO: Merge the following methods with the passed config

@@ -269,5 +270,8 @@ onCreate: function (instance) {

}, onShow: function (instance) {
_this.zone.run(function () { return _this.instance.setContent(_this.resolveContent()); });
_this.isPopper && _this.addCloseButton(instance);
}, onHidden: function (instance) {
_this.isPopper && _this.removeCloseButton(instance);
_this.destroyView();
_this.helipopperClose.next();
} }, this.resolveTheme()), this.helipopperOptions));

@@ -326,6 +330,6 @@ this.markDisabled(this._disabled);

closeButtonElement.innerHTML = closeIcon;
var closeButtonSubcription = fromEvent(closeButtonElement, 'click').subscribe(function () { return _this.hide(); });
var closeButtonSubscription = fromEvent(closeButtonElement, 'click').subscribe(function () { return _this.hide(); });
popper.appendChild(closeButtonElement);
instance.closeButtonElement = closeButtonElement;
instance.closeButtonSubscription = closeButtonSubcription;
instance.closeButtonSubscription = closeButtonSubscription;
};

@@ -347,6 +351,7 @@ HelipopperDirective.prototype.removeCloseButton = function (instance) {

this.tplPortal.destroy();
this.tplPortal = null;
};
HelipopperDirective.prototype.createConfig = function (config) {
var defaults = {
closeIcon: "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" fit=\"\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\">\n<path d=\"M12.793 12l4.039-4.025c0.219-0.219 0.224-0.578 0.012-0.802-0.213-0.225-0.563-0.231-0.782-0.011l-4.062 4.049-4.062-4.049c-0.219-0.22-0.569-0.213-0.782 0.011s-0.208 0.583 0.012 0.802l4.039 4.025-4.039 4.025c-0.22 0.219-0.224 0.578-0.012 0.802 0.108 0.115 0.252 0.172 0.397 0.172 0.138 0 0.278-0.053 0.385-0.161l4.062-4.049 4.062 4.049c0.107 0.108 0.245 0.161 0.385 0.161 0.144 0 0.287-0.058 0.397-0.172 0.212-0.225 0.207-0.583-0.012-0.802l-4.039-4.025z\"></path>\n</svg>\n ",
closeIcon: icon,
beforeRender: function (content) {

@@ -358,2 +363,29 @@ return content;

};
HelipopperDirective.prototype.resolveComponent = function (content) {
var factory = this.resolver.resolveComponentFactory(content);
var injector = this.injector || this.hostInjector;
this.innerComponentRef = factory.create(injector);
this.appRef.attachView(this.innerComponentRef.hostView);
this.innerComponentRef.hostView.detectChanges();
return this.innerComponentRef.location.nativeElement;
};
HelipopperDirective.prototype.destroyComponent = function () {
this.innerComponentRef.destroy();
this.appRef.attachView(this.innerComponentRef.hostView);
this.innerComponentRef = null;
};
HelipopperDirective.prototype.resolveContent = function () {
var content = this._content;
var finalContent;
if (content instanceof TemplateRef) {
finalContent = this.resolveTemplate(content);
}
else if (typeof content === 'string') {
finalContent = this.mergedConfig.beforeRender(content);
}
else {
finalContent = this.resolveComponent(content);
}
return finalContent;
};
HelipopperDirective.ctorParameters = function () { return [

@@ -363,2 +395,4 @@ { type: ElementRef },

{ type: NgZone },
{ type: ComponentFactoryResolver },
{ type: Injector },
{ type: undefined, decorators: [{ type: Inject, args: [HELIPOPPER_CONFIG,] }] }

@@ -391,2 +425,5 @@ ]; };

__decorate([
Input('helipopperInjector')
], HelipopperDirective.prototype, "injector", void 0);
__decorate([
Input('helipopperPlacement')

@@ -406,5 +443,8 @@ ], HelipopperDirective.prototype, "placement", null);

], HelipopperDirective.prototype, "helipopper", null);
__decorate([
Output()
], HelipopperDirective.prototype, "helipopperClose", void 0);
HelipopperDirective = __decorate([
Directive({ selector: "[helipopper]", exportAs: 'helipopper' }),
__param(3, Inject(HELIPOPPER_CONFIG))
__param(5, Inject(HELIPOPPER_CONFIG))
], HelipopperDirective);

@@ -411,0 +451,0 @@ return HelipopperDirective;

@@ -1,5 +0,7 @@

import { ApplicationRef, ElementRef, NgZone, OnDestroy, TemplateRef } from '@angular/core';
import { ApplicationRef, ComponentFactoryResolver, ElementRef, Injector, NgZone, OnDestroy, TemplateRef, Type } from '@angular/core';
import { Props } from 'tippy.js';
import { Subject } from 'rxjs';
import { Options as PopperOptions } from '@popperjs/core';
import { HelipopperConfig, Variation } from './helipopper.types';
declare type Content = string | TemplateRef<any> | Type<any>;
export declare class HelipopperDirective implements OnDestroy {

@@ -9,2 +11,4 @@ private host;

private zone;
private resolver;
private hostInjector;
private config;

@@ -19,2 +23,3 @@ helipopperOptions: Partial<Props>;

helipopperOffset: [number, number] | undefined;
injector: Injector | undefined;
set placement(placement: PopperOptions['placement']);

@@ -24,3 +29,5 @@ set variation(variation: Variation);

set sticky(isSticky: boolean);
set helipopper(content: string | TemplateRef<any>);
set helipopper(content: Content);
helipopperClose: Subject<unknown>;
private _content;
private _destroy;

@@ -33,3 +40,4 @@ private _placement;

private mergedConfig;
constructor(host: ElementRef, appRef: ApplicationRef, zone: NgZone, config: HelipopperConfig);
private innerComponentRef;
constructor(host: ElementRef, appRef: ApplicationRef, zone: NgZone, resolver: ComponentFactoryResolver, hostInjector: Injector, config: HelipopperConfig);
private get _tooltipTarget();

@@ -43,2 +51,3 @@ private get _tooltipHost();

ngOnDestroy(): void;
private destroyView;
private create;

@@ -57,2 +66,6 @@ private createInstance;

private createConfig;
private resolveComponent;
private destroyComponent;
private resolveContent;
}
export {};

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

{"__symbolic":"module","version":4,"metadata":{"HelipopperModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"HelipopperDirective"}],"exports":[{"__symbolic":"reference","name":"HelipopperDirective"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"defaults":[{}],"value":{"ngModule":{"__symbolic":"reference","name":"HelipopperModule"},"providers":[{"provide":{"__symbolic":"reference","name":"ɵb"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}},"HelipopperDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":18,"character":1},"arguments":[{"selector":"[helipopper]","exportAs":"helipopper"}]}],"members":{"helipopperOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"showOnlyOnTextOverflow":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":3},"arguments":["helipopperTextOverflow"]}]}],"triggerTarget":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"helipopperHost":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"helipopperAppendTo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"helipopperTrigger":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"helipopperClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"helipopperOffset":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":42,"character":3}}]}],"placement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3},"arguments":["helipopperPlacement"]}]}],"variation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":3},"arguments":["helipopperVariation"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":57,"character":3},"arguments":["helipopperDisabled"]}]}],"sticky":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":63,"character":3},"arguments":["helipopperSticky"]}]}],"helipopper":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":78,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":108,"character":5},"arguments":[{"__symbolic":"reference","name":"ɵb"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":105,"character":18},{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef","line":106,"character":20},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":107,"character":18},{"__symbolic":"reference","name":"ɵa"}]}],"setProps":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"show":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"create":[{"__symbolic":"method"}],"createInstance":[{"__symbolic":"method"}],"resolveTrigger":[{"__symbolic":"method"}],"resolveTemplate":[{"__symbolic":"method"}],"isElementOverflow":[{"__symbolic":"method"}],"getParent":[{"__symbolic":"method"}],"markDisabled":[{"__symbolic":"method"}],"resolveTheme":[{"__symbolic":"method"}],"addCloseButton":[{"__symbolic":"method"}],"removeCloseButton":[{"__symbolic":"method"}],"checkOverflow":[{"__symbolic":"method"}],"destroyTemplate":[{"__symbolic":"method"}],"createConfig":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"interface"},"ɵb":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":13,"character":37},"arguments":["HELIPOPPER_CONFIG"]}},"origins":{"HelipopperModule":"./lib/helipopper.module","HelipopperDirective":"./lib/helipopper.directive","ɵa":"./lib/helipopper.types","ɵb":"./lib/helipopper.types"},"importAs":"@ngneat/helipopper"}
{"__symbolic":"module","version":4,"metadata":{"HelipopperModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"HelipopperDirective"}],"exports":[{"__symbolic":"reference","name":"HelipopperDirective"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"defaults":[{}],"value":{"ngModule":{"__symbolic":"reference","name":"HelipopperModule"},"providers":[{"provide":{"__symbolic":"reference","name":"ɵb"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}},"HelipopperDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":40,"character":1},"arguments":[{"selector":"[helipopper]","exportAs":"helipopper"}]}],"members":{"helipopperOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":42,"character":3}}]}],"showOnlyOnTextOverflow":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3},"arguments":["helipopperTextOverflow"]}]}],"triggerTarget":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":49,"character":3}}]}],"helipopperHost":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":52,"character":3}}]}],"helipopperAppendTo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":55,"character":3}}]}],"helipopperTrigger":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":58,"character":3}}]}],"helipopperClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":61,"character":3}}]}],"helipopperOffset":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":64,"character":3}}]}],"injector":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":67,"character":3},"arguments":["helipopperInjector"]}]}],"placement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":70,"character":3},"arguments":["helipopperPlacement"]}]}],"variation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":76,"character":3},"arguments":["helipopperVariation"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":82,"character":3},"arguments":["helipopperDisabled"]}]}],"sticky":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":88,"character":3},"arguments":["helipopperSticky"]}]}],"helipopper":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":103,"character":3}}]}],"helipopperClose":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":115,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":133,"character":5},"arguments":[{"__symbolic":"reference","name":"ɵb"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":128,"character":18},{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef","line":129,"character":20},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":130,"character":18},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":131,"character":22},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":132,"character":26},{"__symbolic":"reference","name":"ɵa"}]}],"setProps":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"show":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"destroyView":[{"__symbolic":"method"}],"create":[{"__symbolic":"method"}],"createInstance":[{"__symbolic":"method"}],"resolveTrigger":[{"__symbolic":"method"}],"resolveTemplate":[{"__symbolic":"method"}],"isElementOverflow":[{"__symbolic":"method"}],"getParent":[{"__symbolic":"method"}],"markDisabled":[{"__symbolic":"method"}],"resolveTheme":[{"__symbolic":"method"}],"addCloseButton":[{"__symbolic":"method"}],"removeCloseButton":[{"__symbolic":"method"}],"checkOverflow":[{"__symbolic":"method"}],"destroyTemplate":[{"__symbolic":"method"}],"createConfig":[{"__symbolic":"method"}],"resolveComponent":[{"__symbolic":"method"}],"destroyComponent":[{"__symbolic":"method"}],"resolveContent":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"interface"},"ɵb":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":13,"character":37},"arguments":["HELIPOPPER_CONFIG"]}},"origins":{"HelipopperModule":"./lib/helipopper.module","HelipopperDirective":"./lib/helipopper.directive","ɵa":"./lib/helipopper.types","ɵb":"./lib/helipopper.types"},"importAs":"@ngneat/helipopper"}
{
"name": "@ngneat/helipopper",
"version": "1.0.0",
"version": "1.1.0",
"description": "A Powerful Tooltip and Popover for Angular Applications",
"schematics": "./schematics/collection.json",
"dependencies": {

@@ -6,0 +7,0 @@ "tslib": "^1.10.0",

@@ -26,3 +26,3 @@ <p align="center">

✅ Tooltip & Popover Variations <br>
✅ TemplateRef Support<br>
✅ TemplateRef/Component Support<br>
✅ Lazy Registration<br>

@@ -34,4 +34,5 @@ ✅ Manual Trigger Support<br>

## Installation
```
npm install @ngneat/helipopper
ng add @ngneat/helipopper
```

@@ -73,2 +74,10 @@

#### Component:
```html
<button [helipopper]="component" (helipopperClose)="onClose()">
Click Me
</button>
```
#### Text Overflow:

@@ -78,7 +87,4 @@

<ul style="max-width: 100px;">
<li class="ellipsis"
[helipopper]="text"
helipopperPlacement="right"
[helipopperTextOverflow]="true">
{{ text }}
<li class="ellipsis" [helipopper]="text" helipopperPlacement="right" [helipopperTextOverflow]="true">
{{ text }}
</li>

@@ -91,5 +97,3 @@ </ul>

```html
<span helipopper="Helpful Message"
helipopperTrigger="manual"
#tooltip="helipopper">Click Open to see me</span>
<span helipopper="Helpful Message" helipopperTrigger="manual" #tooltip="helipopper">Click Open to see me</span>

@@ -100,5 +104,6 @@ <button (click)="tooltip.show()">Open</button>

You can see more examples in our [playground](https://github.com/ngneat/helipopper/blob/master/src/app/app.component.html).
You can see more examples in our [playground](https://github.com/ngneat/helipopper/blob/master/src/app/app.component.html), or live [here](https://ngneat.github.io/helipopper/).
## Styling
Add the following style to your main `scss` file:

@@ -123,2 +128,3 @@

cursor: pointer;
z-index: 1;
}

@@ -158,3 +164,3 @@

| @Input | Type | Description | Default |
|------------------------|---------------------------|--------------------------------------------------------------|------------------------------------------------------------------------|
| ---------------------- | ------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------- |
| helipopperVariation | `tooltip` \| `popper` | The tooltip type | `tooltip` |

@@ -171,3 +177,3 @@ | helipopper | `string` \| `TemplateRef` | The tooltip content | `none` |

| helipopperSticky | `Boolean` | Whether the tooltip should be sticky (i.e. always displayed) | `false` |
| helipopperTarget | `ElementRef` \| `Element` | The element(s) that the trigger event listeners are added to | `Host` | | Ex: `{ width: '100%', height: '70px' }` |
| helipopperTarget | `ElementRef` \| `Element` | The element(s) that the trigger event listeners are added to | `Host` | | Ex: `{ width: '100%', height: '70px' }` |

@@ -177,2 +183,3 @@ ## Config

- `beforeRender` - Hook that'll be called before rendering the tooltip content: ( applies only for string )
```ts

@@ -182,7 +189,9 @@ import { HelipopperModule } from '@ngneat/helipopper';

@NgModule({
imports: [HelipopperModule.forRoot({
beforeRender(content) {
return sanitize(content);
}
})]
imports: [
HelipopperModule.forRoot({
beforeRender(content) {
return sanitize(content);
}
})
]
})

@@ -204,2 +213,3 @@ export class AppModule {}

<td align="center"><a href="https://www.netbasal.com/"><img src="https://avatars1.githubusercontent.com/u/6745730?v=4" width="100px;" alt=""/><br /><sub><b>Netanel Basal</b></sub></a><br /><a href="https://github.com/@ngneat/helipopper/commits?author=NetanelBasal" title="Code">💻</a> <a href="https://github.com/@ngneat/helipopper/commits?author=NetanelBasal" title="Documentation">📖</a> <a href="#ideas-NetanelBasal" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/itayod"><img src="https://avatars2.githubusercontent.com/u/6719615?v=4" width="100px;" alt=""/><br /><sub><b>Itay Oded</b></sub></a><br /><a href="https://github.com/@ngneat/helipopper/commits?author=itayod" title="Code">💻</a></td>
</tr>

@@ -206,0 +216,0 @@ </table>

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