You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ngx-tooltip-directives

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-tooltip-directives - npm Package Compare versions

Comparing version

to
19.1.0

4

lib/base-tooltip.directive.d.ts

@@ -13,3 +13,4 @@ import { ApplicationRef, ElementRef, EventEmitter, Injector, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';

private injector;
tooltipContent: string | SafeHtml | TemplateRef<any>;
private _tooltipContent;
private _tooltipContext;
get contentType(): ContentType | undefined;

@@ -69,2 +70,3 @@ private mergedOptions;

setTooltipContent(tooltipContent: string | SafeHtml | TemplateRef<any>, contentType: ContentType): void;
setTooltipContext(tooltipContext: any | undefined): void;
show(isInvokedFromOutside?: boolean): void;

@@ -71,0 +73,0 @@ hide(isInvokedFromOutside?: boolean): void;

@@ -6,4 +6,5 @@ import { TemplateRef } from "@angular/core";

set tooltipTemplate(value: TemplateRef<any>);
set tooltipContext(value: any);
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipTemplateDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipTemplateDirective, "[tooltipTemplate]", ["tooltipTemplate"], { "tooltipTemplate": { "alias": "tooltipTemplate"; "required": false; }; }, {}, never, never, true, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipTemplateDirective, "[tooltipTemplate]", ["tooltipTemplate"], { "tooltipTemplate": { "alias": "tooltipTemplate"; "required": false; }; "tooltipContext": { "alias": "tooltipContext"; "required": false; }; }, {}, never, never, true, never>;
}

@@ -37,2 +37,3 @@ import { ElementRef, OnDestroy, OnInit, Renderer2, TemplateRef } from '@angular/core';

tooltipTemplate: TemplateRef<any>;
tooltipContext: any | undefined;
prioritizedPlacements: Placement[];

@@ -39,0 +40,0 @@ currentContentType: ContentType;

@@ -8,2 +8,3 @@ import { TemplateRef } from '@angular/core';

tooltipTemplate?: TemplateRef<any>;
tooltipContext?: any;
hostElement: any;

@@ -10,0 +11,0 @@ hostElementPosition: {

{
"name": "ngx-tooltip-directives",
"version": "19.0.1",
"version": "19.1.0",
"description": "Tooltips for Angular",

@@ -5,0 +5,0 @@ "homepage": "https://mkeller1992.github.io/ngx-tooltip-directives",

@@ -37,3 +37,2 @@ # ngx-tooltip-directives

styleUrls: ['./app.component.scss'],
standalone: true,
imports: [TooltipStrDirective, TooltipHtmlDirective, TooltipTemplateDirective]

@@ -94,2 +93,22 @@ })

```
Use template with `tooltipContext`:
```ts
context = { estimate: 10 };
```
```html
<ng-template #myTemplate let-numberOfLessons="estimate">
<div style="color: blue; font-weight: bold;">
{{ numberOfLessons }} lessons
</div>
</ng-template>
<div [tooltipTemplate]="myTemplate"
[tooltipContext]="context">
Show Tooltip Template with Context
</div>
```
---

@@ -214,3 +233,3 @@

|------------------|---------------------------------------------------------------------------------------------|
| {type: "show", position: { top: number; left: number; } | DOMRect} | This event is fired prior to the tooltip's appearance. |
| {type: "show", position: { top: number; left: number; } | DOMRect } | This event is fired prior to the tooltip's appearance. |
| {type: "shown", position: { top: number; left: number; } | DOMRect} | This event is fired following the tooltip's appearance animation. |

@@ -217,0 +236,0 @@ | {type: "hide", position: { top: number; left: number; } | DOMRect} | This event is fired prior to the tooltip being hidden. |

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet