Socket
Socket
Sign inDemoInstall

ng2-tooltip-directive-major-angular-updates

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.10.3 to 2.11.0

ng2-tooltip-directive-major-angular-updates-2.11.0.tgz

2

lib/tooltip.component.d.ts

@@ -20,2 +20,4 @@ import { ElementRef, EventEmitter, Renderer2 } from '@angular/core';

transitionEnd(event: any): void;
onMouseEnter(): void;
onMouseLeave(): void;
set show(value: boolean);

@@ -22,0 +24,0 @@ get show(): boolean;

2

lib/tooltip.directive.d.ts

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

import { ElementRef, ComponentFactoryResolver, ApplicationRef, Injector, EventEmitter, SimpleChanges, TemplateRef } from '@angular/core';
import { ApplicationRef, ComponentFactoryResolver, ElementRef, EventEmitter, Injector, SimpleChanges, TemplateRef } from '@angular/core';
import { TooltipOptions } from './options.interface';

@@ -3,0 +3,0 @@ import * as i0 from "@angular/core";

{
"name": "ng2-tooltip-directive-major-angular-updates",
"version": "2.10.3",
"version": "2.11.0",
"description": "Tooltip for Angular",
"repository": {
"type": "git",
"url": "git+https://github.com/drozhzhin-n-e/ng2-tooltip-directive.git"
"url": "git+https://github.com/IslombekMe/ng2-tooltip-directive.git"
},
"author": {
"name": "Nikita Drozhzhin",
"email": "drozhzhin.n.e@gmail.com"
"name": "Islombek Khasanov",
"email": "islombekhasanove@gmail.com"
},

@@ -21,10 +21,9 @@ "keywords": [

],
"homepage": "http://ivylab.space/tooltip",
"license": "MIT",
"bugs": {
"url": "https://github.com/drozhzhin-n-e/ng2-tooltip-directive/issues"
"url": "https://github.com/IslombekMe/ng2-tooltip-directive/issues"
},
"peerDependencies": {
"@angular/common": "^15.0.4",
"@angular/core": "^15.0.4"
"@angular/common": ">=15.0.4",
"@angular/core": ">=15.0.4"
},

@@ -31,0 +30,0 @@ "dependencies": {

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

**Note: I am not the author of this project, see their [official repository].(https://github.com/drozhzhin-n-e/ng2-tooltip-directive). The author doesn't seem to maintain its project anymore, so I'm just fixing stuff to update to new angular versions.**
# Tooltip for Angular

@@ -7,6 +9,5 @@

🔬️ Help make Tooltips better by [answering a few questions](https://docs.google.com/forms/d/e/1FAIpQLSfuDYQLyGWLApEtnQH5wD2_HNjEM7lV_XJAhrQZEPm14mBZ-A/viewform).
# Supported Angular versions
## Demo
http://ivylab.space/tooltip
This version of the library support Angular version 15 and up.

@@ -17,16 +18,17 @@ ## Installation

npm i ng2-tooltip-directive
Import `Ng2Module`:
npm i ng2-tooltip-directive-major-angular-updates
Import `NgModule`:
```ts
import { TooltipModule } from 'ng2-tooltip-directive';
import { TooltipModule } from 'ng2-tooltip-directive-major-angular-updates';
@NgModule({
imports: [ TooltipModule ]
})
})
```
## Usage
Options can be set in the directive tag, so they have the highest priority.

@@ -43,7 +45,8 @@

```
```ts
myOptions = {
'placement': 'left',
'showDelay': 500
}
placement: "left",
showDelay: 500,
};
```

@@ -54,5 +57,3 @@

```html
<span tooltip="<p>Hello i'm a <strong>bold</strong> text!</p>">
Tooltip with HTML content
</span>
<span tooltip="<p>Hello i'm a <strong>bold</strong> text!</p>"> Tooltip with HTML content </span>
```

@@ -65,5 +66,3 @@

<span [tooltip]="HtmlContent" contentType="template">
Tooltip with template content
</span>
<span [tooltip]="HtmlContent" contentType="template"> Tooltip with template content </span>
```

@@ -74,17 +73,19 @@

Create a file with your settings, for example:
```ts
import { TooltipOptions } from 'ng2-tooltip-directive';
import { TooltipOptions } from "ng2-tooltip-directive-major-angular-updates";
export const MyDefaultTooltipOptions: TooltipOptions = {
'show-delay': 500
}
"show-delay": 500,
};
```
And pass your parameters when importing the module:
```ts
import { TooltipModule, TooltipOptions } from 'ng2-tooltip-directive';
import { TooltipModule, TooltipOptions } from 'ng2-tooltip-directive-major-angular-updates';
import { MyDefaultTooltipOptions } from './my-default-options';
@NgModule({
imports: [
imports: [
TooltipModule.forRoot(MyDefaultTooltipOptions as TooltipOptions)

@@ -97,24 +98,24 @@ ]

| name | type | default | description |
|------------------|-------------------------------------|---------|---------------------------------------------|
| placement | "top", "bottom", "left", "right" | "top" | The position of the tooltip. |
| autoPlacement | boolean | true | Place the tooltip so that it does not go beyond the borders of the browser window. |
| showDelay | number | 0 | The delay in ms before showing the tooltip. |
| hideDelay | number | 300 | The delay in ms before removing the tooltip. |
| hideDelayTouchscreen | number | 0 | Delay in milliseconds before hiding the tooltip (for mobile devices). |
| display | boolean | true | Tooltip availability for display. |
| displayTouchscreen | boolean | true | Display the tooltip on mobile devices. |
| zIndex | number | 0 | Z-index of the tooltip. |
| trigger | "hover", "click" | "hover" | Specifies how the tooltip is triggered. Control the closing time with "hide-delay". |
| tooltipClass | string | | Classes to be passed to the tooltip. |
| animationDuration | number | 300 | The duration controls how long the animation takes to run from start to finish. |
| theme | "dark", "light" | "dark" | Theme of tooltip background and text. |
| shadow | boolean | true | Shadow of the tooltip. |
| offset | number | 8 | Offset the tooltip relative to the item. |
| width | number | undefined | Width of the tooltip. |
| maxWidth | number | 200 | Maximum width of the tooltip. |
| contentType | "string", "html', "template" | "string" | The content type passed to the tooltip. |
| hideDelayAfterClick | number | 2000 | Tooltip hiding delay for "click" trigger. |
| pointerEvents | "auto", "none" | "none" | Defines whether or not an element reacts to pointer events. |
| position | {top: number, left: number} | undefined | The tooltip coordinates relative to the browser window. |
| name | type | default | description |
| -------------------- | -------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| placement | "top", "bottom", "left", "right" | "top" | The position of the tooltip. |
| autoPlacement | boolean | true | Place the tooltip so that it does not go beyond the borders of the browser window. |
| showDelay | number | 0 | The delay in ms before showing the tooltip. |
| hideDelay | number | 300 | The delay in ms before removing the tooltip. |
| hideDelayTouchscreen | number | 0 | Delay in milliseconds before hiding the tooltip (for mobile devices). |
| display | boolean | true | Tooltip availability for display. |
| displayTouchscreen | boolean | true | Display the tooltip on mobile devices. |
| zIndex | number | 0 | Z-index of the tooltip. |
| trigger | "hover", "click" | "hover" | Specifies how the tooltip is triggered. Control the closing time with "hide-delay". |
| tooltipClass | string | | Classes to be passed to the tooltip. |
| animationDuration | number | 300 | The duration controls how long the animation takes to run from start to finish. |
| theme | "dark", "light" | "dark" | Theme of tooltip background and text. |
| shadow | boolean | true | Shadow of the tooltip. |
| offset | number | 8 | Offset the tooltip relative to the item. |
| width | number | undefined | Width of the tooltip. |
| maxWidth | number | 200 | Maximum width of the tooltip. |
| contentType | "string", "html', "template" | "string" | The content type passed to the tooltip. |
| hideDelayAfterClick | number | 2000 | Tooltip hiding delay for "click" trigger. |
| pointerEvents | "auto", "none" | "none" | Defines whether or not an element reacts to pointer events. If 'auto', then it will also delay hiding if the tooltip content is being hovered upon or focused. |
| position | {top: number, left: number} | undefined | The tooltip coordinates relative to the browser window. |

@@ -125,8 +126,8 @@ ## Events

| Event | Description |
|------------------|---------------------------------------------------------------------------------------------|
| {type: "show", position: DOMRect} | The event is called before the tooltip appears. |
| {type: "shown", position: DOMRect} | The event is called after the animation of the appearance of the tooltip. |
| {type: "hide", position: DOMRect} | The event is called before the tooltip is hidden. |
| {type: "hidden", position: DOMRect} | The event is called after the animation of the tooltip is hidden. |
| Event | Description |
| ----------------------------------- | ------------------------------------------------------------------------- |
| {type: "show", position: DOMRect} | The event is called before the tooltip appears. |
| {type: "shown", position: DOMRect} | The event is called after the animation of the appearance of the tooltip. |
| {type: "hide", position: DOMRect} | The event is called before the tooltip is hidden. |
| {type: "hidden", position: DOMRect} | The event is called after the animation of the tooltip is hidden. |

@@ -137,15 +138,9 @@ ## Methods

| Method | Description |
|------------------|---------------------------------------------------------------------------------------------|
| show() | Shows the tooltip |
| hide() | Hides the tooltip |
| Method | Description |
| ------ | ----------------- |
| show() | Shows the tooltip |
| hide() | Hides the tooltip |
## Author services
## Contribution
Are you interested in this library but lacks features? [Write to the author](https://github.com/drozhzhin-n-e), he can do it for you.
## Sponsors
We use Browserstack for cross-browser testing.
[![Browserstack](http://ivylab.space/assets/img/browserstack-logo.png)](http://browserstack.com/)
Do you want to contribute? What are you waiting for? Create a PR and [tag me](https://github.com/islombekme), and we can work together.

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc