Socket
Socket
Sign inDemoInstall

@cloudfactorydk/ng2-tooltip-directive

Package Overview
Dependencies
5
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 14.0.0 to 15.0.0

2

lib/tooltip.component.d.ts

@@ -41,3 +41,3 @@ import { ElementRef, EventEmitter, Renderer2 } from '@angular/core';

static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "tooltip", never, { "data": "data"; "show": "show"; }, {}, never, never, false>;
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "tooltip", never, { "data": "data"; "show": "show"; }, {}, never, never, false, never>;
}

@@ -111,3 +111,3 @@ import { ElementRef, ComponentFactoryResolver, ApplicationRef, Injector, EventEmitter, SimpleChanges } from '@angular/core';

static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective, [{ optional: true; }, null, null, null, null]>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[tooltip]", ["tooltip"], { "options": "options"; "tooltipValue": "tooltip"; "placement": "placement"; "autoPlacement": "autoPlacement"; "contentTypeBackwardCompatibility": "content-type"; "contentType": "contentType"; "hideDelayMobile": "hide-delay-mobile"; "hideDelayTouchscreen": "hideDelayTouchscreen"; "zIndexBackwardCompatibility": "z-index"; "zIndex": "zIndex"; "animationDurationBackwardCompatibility": "animation-duration"; "animationDuration": "animationDuration"; "trigger": "trigger"; "tooltipClassBackwardCompatibility": "tooltip-class"; "tooltipClass": "tooltipClass"; "display": "display"; "displayMobile": "display-mobile"; "displayTouchscreen": "displayTouchscreen"; "shadow": "shadow"; "theme": "theme"; "offset": "offset"; "width": "width"; "maxWidthBackwardCompatibility": "max-width"; "maxWidth": "maxWidth"; "id": "id"; "showDelayBackwardCompatibility": "show-delay"; "showDelay": "showDelay"; "hideDelayBackwardCompatibility": "hide-delay"; "hideDelay": "hideDelay"; "hideDelayAfterClick": "hideDelayAfterClick"; "pointerEvents": "pointerEvents"; "position": "position"; }, { "events": "events"; }, never, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[tooltip]", ["tooltip"], { "options": "options"; "tooltipValue": "tooltip"; "placement": "placement"; "autoPlacement": "autoPlacement"; "contentTypeBackwardCompatibility": "content-type"; "contentType": "contentType"; "hideDelayMobile": "hide-delay-mobile"; "hideDelayTouchscreen": "hideDelayTouchscreen"; "zIndexBackwardCompatibility": "z-index"; "zIndex": "zIndex"; "animationDurationBackwardCompatibility": "animation-duration"; "animationDuration": "animationDuration"; "trigger": "trigger"; "tooltipClassBackwardCompatibility": "tooltip-class"; "tooltipClass": "tooltipClass"; "display": "display"; "displayMobile": "display-mobile"; "displayTouchscreen": "displayTouchscreen"; "shadow": "shadow"; "theme": "theme"; "offset": "offset"; "width": "width"; "maxWidthBackwardCompatibility": "max-width"; "maxWidth": "maxWidth"; "id": "id"; "showDelayBackwardCompatibility": "show-delay"; "showDelay": "showDelay"; "hideDelayBackwardCompatibility": "hide-delay"; "hideDelay": "hideDelay"; "hideDelayAfterClick": "hideDelayAfterClick"; "pointerEvents": "pointerEvents"; "position": "position"; }, { "events": "events"; }, never, never, false, never>;
}
{
"name": "@cloudfactorydk/ng2-tooltip-directive",
"version": "14.0.0",
"version": "15.0.0",
"description": "Tooltip for Angular",

@@ -30,4 +30,4 @@ "repository": {

"peerDependencies": {
"@angular/common": "^14.0.3",
"@angular/core": "^14.0.3"
"@angular/common": "^15.1.2",
"@angular/core": "^15.1.2"
},

@@ -34,0 +34,0 @@ "dependencies": {

# Tooltip for Angular
### forked from drozhzhin-n-e/ng2-tooltip-directive

@@ -11,17 +10,16 @@

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

@@ -38,8 +36,7 @@

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

@@ -68,19 +65,17 @@

Create a file with your settings, for example:
```ts
import { TooltipOptions } from "ng2-tooltip-directive";
import { TooltipOptions } from '@cloudfactorydk/ng2-tooltip-directive';
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 '@cloudfactorydk/ng2-tooltip-directive';
import { MyDefaultTooltipOptions } from './my-default-options';
@NgModule({
imports: [
imports: [
TooltipModule.forRoot(MyDefaultTooltipOptions as TooltipOptions)

@@ -93,24 +88,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. |
| position | {top: number, left: number} | undefined | The tooltip coordinates relative to the browser window. |

@@ -121,8 +116,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. |

@@ -133,5 +128,5 @@ ## Methods

| Method | Description |
| ------ | ----------------- |
| show() | Shows the tooltip |
| hide() | Hides the tooltip |
| Method | Description |
|------------------|---------------------------------------------------------------------------------------------|
| show() | Shows the tooltip |
| hide() | Hides the tooltip |

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