npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gist-angular-popovers

v1.0.14

Published

Angular 4+ Popovers

Downloads

3

Readme

EI-Popover

Overview

The Gist-popover is a structural angular 2 directive that turns an HTML element into a popover. Structural directives have the limitation of being allowed only one input that is a string. Due to this, all inputs will be specified in the following way *gistPopover="'inputstring'". Not the single quotes wrapping inputstring, they are required. Optionally, you can data bind the input string via *gistPopover="myVar". Where myVar is defined in the views component. All Inputs are optional, and if omitted will be set to their defaults. If an invalid input string is given, an error will be thrown.

Inputs

Target - Where to anchor the mouse

  • Ele -- default value
    • Popover will be anchored to side of element
  • Mouse
    • Popover will follow the mouse when the mouse is over the trigger element
  • X,Y - page coordinates
    • Popover will display at the X,Y coordinates given.
    • X and Y are relative from the top left visible corner
    • Useful if you need to click on the popover. Or don't have an element to anchor to ( map / canvas elements )

Position - what side of the target to show on

  • bottom -- default value
    • Popover will display below the target
  • top
    • Popover will display above the target
  • left
    • Popover will display to the left of the target
  • right
    • Popover will display to thr right of the target

isInteractive - Will the popover receive pointer events

  • false -- default
    • Mouse events will pass through the popover
  • true
    • Popover will capture mouse events

isVisible - control the popover display programically

  • undefined
    • Popover will display the mouse enters the trigger element, and hide when the mouse leaves it. If the popover is interactive, it will not hide while the mouse is over it
  • true
    • Popover will be visible
  • false
    • Popover will be hidden

Example Usage

<div *gistPopover="'target:ele; position:bottom; isVisible:true'">
    I will always display below my parent element
</div>
<div *gistPopover="isVisible:false'">
    I will never display
</div>
<div *gistPopover="componentBoundString">
    My inputs will be what ever the views component has set componentBoundString to
</div>
<div *gistPopover="'target:ele; position:left;'">
    I will display to the left of my parent element when you mouse over it
</div>
<div *gistPopover="'target:mouse; position:top;'">
    I will display above the mouse when you mouse over my parent element
</div>

Notes

  • Popovers are rendered as children of the gist-Popover-target instead of where you placed them ( look there in the dom inspector ). This takes care overflow issues. Nothing else about them is different though.
  • The popover will auto adjust its position to ensure that it does not go off of the page
  • The popover has hits height and width hard set when it toggles to being display. This ensures that it will not grow and shrink as it makes sure its on the page. This has the the side affect of meaning that 2 identical popovers can be different sizes. you can prevent this from applying your own styles to you popover

Demo Application

To see a working demo application run npm run start