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 🙏

© 2026 – Pkg Stats / Ryan Hefner

pm-modal

v1.0.1

Published

This project extends the angular material modal to add some features:

Readme

PmModalProject

This project extends the angular material modal to add some features:

  • You can choose a modal size.
  • Has a circular list.
  • You can add modals to the list and choose what modal you want to see.
  • You can remove any modal from the list.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Modal sizes

You can use 4 different sizes. Modal sizes are defined as an enum, PmModalSize:

  • PmModalSize.Auto: Automatic material resize.
  • PmModalSize.Small: 35vw x 35vh modal.
  • PmModalSize.Medium: 65vw x 65vh modal.
  • PmModalSize.Fullscreen: 98vw x 98vh modal.

Use it on your app

Import the PmModalModule in the module where you are going to use it:

import { BrowserModule} from ‘@angular/platform-browser’;
import { NgModule } from ‘@angular/core’;
import { AppComponent } from ‘./app.component’;
import { TestModalComponent } from ‘./modal-test/modal-test.component’;
import { PmModalModule } from ‘pm-modal’;

@NgModule({
  declarations: [
    AppComponent,
    TestModalComponent
  ],
  entryComponents: [
    TestModalComponent
  ],
  imports: [
    BrowserModule,
    PmModalModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Open a new modal

You have to import the PmModalService to create new modals. This method needs a ComponentFactory, PmModalSize and an optional payload:

import { PmModalSize } from ‘pm-modal’;
import { Component, ComponentFactory, ComponentFactoryResolver } from ‘@angular/core’;
import { TestModalComponent } from ‘./modal-test/modal-test.component’;
import { PmModalService } from ’pm-modal’;

@Component({
  selector: ‘app-root’,
  templateUrl: ‘./app.component.html’,
  styleUrls: [‘./app.component.scss’]
})
export class AppComponent {

  constructor(
    private modalService: PmModalService,
    private factoryResolver: ComponentFactoryResolver
  ) {}

  open() {
    const factory: ComponentFactory< any> = this.factoryResolver.resolveComponentFactory(TestModalComponent);
    this.modalService.create({factory, size: PmModalSize.Auto, payload: ‘test payload 1’});
    this.modalService.create({factory, size: PmModalSize.Small, payload: ‘test payload 2’});
    this.modalService.create({factory, size: PmModalSize.Medium, payload: ‘test payload 3’});
    this.modalService.create({factory, size: PmModalSize.Fullscreen, payload: ‘test payload 4’});
  }
}

PmModalService: all you need

The PmModalService has all the methods you can use:

  • Create: adds a new modal.
  • DismissCurrent: dismisses current modal.
  • DismissAll: clears the modal list.
  • GetCurrentPayload: returns the payload of the current modal. You can use it in the inserted component.
  • Next: shows next modal.
  • Previous: shows previous modal.
  • Dispose: returns the modals collection.