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

@senior-erp-service-tower/hst-loader

v1.0.1

Published

> **Fork:** Código fonte extraído de `@senior-hcm-service-tower/hst-loader` e mantido independentemente para o contexto ERP.

Readme

Fork: Código fonte extraído de @senior-hcm-service-tower/hst-loader e mantido independentemente para o contexto ERP.

ERP Service Tower Senior - Loader

Componente desenvolvido para uso em telas customizadas e BPMs pelo time de serviços customizados ERP da Senior Sistemas.

Requisitos

  • Angular: 18.0.1
  • primeng: 17.18.9

Instalação

npm install @senior-erp-service-tower/hst-loader

Visão Geral

O componente hst-loader disponibiliza um indicador de carregamento com dois modos visuais: spinner (circular) e dots (pontos pulsantes). O loader aplica um efeito de opacidade sobre o conteúdo filho, bloqueando interações do usuário enquanto o carregamento está ativo.


Parâmetros de Entrada (@Input)

| Input | Tipo | Valor Padrão | Descrição | | --- | --- | --- | --- | | loading | boolean | false | Define a visibilidade do loader. Quando true, exibe o indicador e aplica opacidade no conteúdo | | type | 'spinner' | 'dots' | 'spinner' | Tipo visual do loader | | size | 'small' | 'medium' | 'large' | 'medium' | Tamanho do spinner (apenas para type 'spinner') | | message | string | '' | Mensagem exibida abaixo do indicador de carregamento |

Tamanhos do Spinner

| Size | Largura | Altura | | --- | --- | --- | | 'small' | 20px | 20px | | 'medium' | 40px | 40px | | 'large' | 60px | 60px |


Content Projection

O componente utiliza ng-content para envolver o conteúdo que será bloqueado durante o carregamento. O conteúdo recebe opacidade de 0.4 e pointer-events: none enquanto loading = true.


Exemplos de Uso

1. Spinner padrão (medium)

<hst-loader [loading]="carregando">
  <div class="grid">
    <div class="col-12">
      <p>Conteúdo que será bloqueado durante o carregamento</p>
    </div>
  </div>
</hst-loader>

2. Spinner pequeno com mensagem

<hst-loader [loading]="true" size="small" message="Carregando dados...">
  <p-table [value]="dados" [columns]="colunas">
    <!-- conteúdo da tabela -->
  </p-table>
</hst-loader>

3. Spinner grande

<hst-loader [loading]="salvando" size="large" message="Salvando informações...">
  <form [formGroup]="formulario">
    <!-- campos do formulário -->
  </form>
</hst-loader>

4. Loader tipo dots (pontos pulsantes)

<hst-loader [loading]="processando" type="dots" message="Processando solicitação...">
  <div class="conteudo">
    <p>Aguarde o processamento</p>
  </div>
</hst-loader>

5. Loader com mensagem multilinha

<hst-loader
  [loading]="gerando"
  size="large"
  message="Gerando relatório...&#10;Isso pode levar alguns segundos.">
  <div class="relatorio-container">
    <!-- conteúdo -->
  </div>
</hst-loader>

6. Exemplo completo em TypeScript

import { Component } from '@angular/core';
import { LoaderComponent } from '@senior-erp-service-tower/hst-loader';

@Component({
  selector: 'app-minha-tela',
  standalone: true,
  imports: [LoaderComponent],
  template: `
    <hst-loader [loading]="carregando" message="Buscando colaboradores...">
      <div class="grid">
        @for (colab of colaboradores; track colab) {
          <div class="col-12">
            <p>{{ colab.nome }} - {{ colab.matricula }}</p>
          </div>
        }
      </div>
    </hst-loader>
  `
})
export class MinhaTelaComponent {
  carregando = false;
  colaboradores: any[] = [];

  async buscarColaboradores(): Promise<void> {
    this.carregando = true;
    try {
      this.colaboradores = await this.service.buscar();
    } finally {
      this.carregando = false;
    }
  }
}

Comportamento Visual

  • Spinner: Exibe um spinner circular centralizado sobre o conteúdo com animação de rotação
  • Dots: Exibe três pontos pulsantes centralizados sobre o conteúdo
  • Ambos os tipos aplicam opacity: 0.4 e pointer-events: none no conteúdo envolvido
  • A mensagem é exibida abaixo do indicador, centralizada, em cor cinza
  • Suporta quebra de linha na mensagem