New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wolf_and_associates/popover

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wolf_and_associates/popover

A reusable menu, iframe, and content outlet for use with Wolf & Associates projects.

  • 0.0.9
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

WolfLTC Popover

A reusable menu, iframe, and content outlet for use with Wolf & Associates projects.

Requirements

This library must use the same Angular Compiler version as the project you are adding it to.

Usage

Import the PopoverModule in your project's app.module.ts:

import { PopoverModule } from '@wolf_and_associates/popover';

@NgModule({
  // ...
  imports: [
    // ...
    PopoverModule
  ]
})

Interfaces

PopoverMenuItemAction

PropertyTypeDescription
type'new_tab' or 'iframe' or 'menu' or 'route' or 'content_outlet'What kind of action does this take?
urlstringUsed to execute the action

PopoverMenuItem

PropertyTypeDescription
placeholder?stringThe placeholder displayed to the user in the admin portal
prefix?stringUsed in the admin portal for the 'type' dropdown text
our_tools?PopoverMenuItem[]If this is an Our Tools item, this property will be an array of PopoverMenuItems
data?PopoverMenuItem[]If this is an Menu item, this property will be an array of PopoverMenuItems
actionPopoverMenuItemActionWhat kind of action will this item take?
titlestringThe title displayed to the user
route_prefix?string[]If the action type is a 'menu' or 'route' then this is added before the route executes
omit_base_action_urlbooleanIf the action type is a 'menu' the base article url will be omitted when fetching items using the MenuOutletComponent

Components

Menu Outlet

A full-screen vertical menu. Utilizes an API call to the PopoverMenuItem.action.url to retrieve items.

Inputs
InputTypeDescription
domainstringOverwride the protocol and domain. Currently using window.location.protocol and window.location.hostname
Events
EventParametersDescription
onOpenEventEmitter<ComponentRef>When the popover opens
onClosedEventEmitter<ComponentRef>When the popover closes
onContentOutletClickEventEmitterThe user clicked a content_outlet PopoverMenuItem
onIframeOutletClickEventEmitterThe user clicked an iframe PopoverMenuItem
Properties
PropertyTypeDescription
popovers{ subscriptions: Subscription[]; component: ComponentRef }[]All open popovers
Methods
MethodParametersDescription
createMenuitem: PopoverMenuItemCreate and display a Menu. Will fetch the menu items if not already present
closeClose the most recently opened Popover
Usage
<popover-menu-outlet [items]="[]"></popover-menu-outlet>

Content Outlet

A full-screen content outlet. Accepts any html or Component.

Inputs
InputTypeDefaultDescription
show_close_buttonbooleantrueShould the close button be visible
navbar_spacingnumber0The space from the top of the viewport the component is rendered
shadowstringnoneSet the box shadow of the component
slidestring'slide-left'Change the default slide direction to one of the following: 'slide-up', 'slide-left', 'slide-down', 'slide-right'
Events
EventParametersDescription
onOpenedEventEmitterWhen the popover opens
onClosedEventEmitterWhen the popover closes
Properties
PropertyTypeDescription
visiblebooleanIs the popover visible
Methods
MethodParametersDescription
toggleToggle the visibility of the popover
openOpen the popover
closeClose the popover
Usage
<popover-content-outlet>
  <h2>This is an H2 heading in a popover</h2>
</popover-content-outlet>

iFrame

A full-screen iframe embed.

Inputs
InputTypeDefaultDescription
show_close_buttonbooleantrueShould the close button be visible
navbar_spacingnumber0The space from the top of the viewport the component is rendered
shadowstringnoneSet the box shadow of the component
slidestring'slide-left'Change the default slide direction to one of the following: 'slide-up', 'slide-left', 'slide-down', 'slide-right'
iframe_urlstringundefinedThe iFrame URL
Events
EventParametersDescription
onOpenEventEmitterWhen the popover opens
onClosedEventEmitterWhen the popover closes
Properties
PropertyTypeDescription
visiblebooleanIs the popover visible
Methods
MethodParametersDescription
toggleToggle the visibility of the popover
openOpen the popover
closeClose the popover
Usage
<popover-iframe [iframe_url]="some_url">
  <h1>Here's a heading above the <code>iframe</code>!</h1>
</popover-iframe>

Development

Build the project and then add it to the destination project node_modules folder using the example below:

ng build --project=popover --watch

In another terminal window:

cd destination-project/
npm i ../wolfltc-ngx/dist/popover

FAQs

Package last updated on 03 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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