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

busyness

v6.3.4

Published

This is a loaders library for Angular 6+, it's based con loaders.css, so, you'll dispose of many beautiful loaders out of the box; however, busyness give the chance to make your very own custom component to be shown when the web app it's "busy".

Downloads

36

Readme

Busyness

This is a loaders library for Angular 6+, it's based con loaders.css, so, you'll dispose of many beautiful loaders out of the box; however, busyness give the chance to make your very own custom component to be shown when the web app it's "busy".

See Busyness In Action!

Why Busyness?

Busyness is a fully automated solution, you don't have to manage any services or directives to block the screen, just leave to busyness the work!

What's the magic?

Behind the scenes busyness is using HttpInterceptors, it captures the http-requests and manage them to block the screen during the call is being resolved; no matter how many requests you are making, busyness will block the screen until every request has been resolved, without glitching, of course :wink:

Getting Started

First you should to install busyness and loaders.css libraries with npm/yarn, that's your choice:

npm install --save busyness loaders.css

Once it's installed, it's time to implement busyness' module on your app.module.ts using the forRoot:

import { NgModule } from '@angular/core';
import { BusynessModule, LoaderType } from 'busyness';

@NgModule({
	imports: [
		...
		BusynessModule.forRoot({
			loaderType: LoaderType.BALL_SCALE_MULTIPLE
		}),
		...
	]
})
export class AppModule {
}

The option loaderType lets you choose a loader from loaders.css, each one of the loaders has a name, just look for the best suited for you and the put it on loaderType.

After the module implementation you have to use the busyness` component in the app.component.html, putting it on the top of the file:

<bs-busyness></bs-busyness>

<!--> All your code after that <!-->

Finally, you ought to make some additions on your styles.scss (if you aren't using sass in your project, you could import it in the angular.json file).

As the first step, we need to import the loaders.css style sheet in the top of the file:

@import "~loaders.css/loaders.min.css";

Next, just style the appearance of the busyness component:

// BUSYNESS
.loader  {
	position:  fixed;
	width:  100%;
	height:  100%;
	top:  0;
	background-color:  rgba(255,  255,  255,  .8);
	z-index:  999999;

	.loader-inner  {
		margin-top:  50vh;
		margin-left:  calc(50vw  -  50px);

		div {
			background-color:  #337ab7;
		}
	}

	.ball-scale-multiple  {
		div {
			width:  100px;
			height:  100px;
		}
	}
}

The last styles were made to show busyness component on the top of the entire web-app and styling the ball-scale-multiple loader specifically; if you have chosen other loader, you should style it properly as you like.