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

sf-stimulsoft

v0.3.2

Published

Visor, impresión y carga completa de reportes Stimulsoft (plantilla .mrt + datos JSON) para las apps Angular de TFNBX.

Readme

sf-stimulsoft

Visor e impresión de reportes Stimulsoft (plantilla .mrt + datos JSON) para las apps Angular de TFNBX.

Uso

// app.config.ts — la licencia la pone la app, nunca la librería (el paquete es público)
providers: [provideStimulsoft({ licenseKey: environment.stimulsoftKey })]
<!-- Visor con barra de herramientas (imprimir, exportar) -->
<sf-sti-viewer [template]="mrt" [data]="data" (failed)="onError($event)"></sf-sti-viewer>
// Imprimir sin visor (recibos, comprobantes)
await inject(StiPrintService).print(mrt, data);
  • data tiene la forma { data: [...] }: la clave data es el DataSource que declara la plantilla.
  • stimulsoft-dashboards-js es peerDependency y se carga con import() dinámico: solo la descarga la pantalla que muestra o imprime un reporte. Es el motor y visor de stimulsoft-reports-js más el módulo de dashboards, así que carga reportes y también plantillas con páginas StiDashboard. Desde la 0.2.0 reemplaza a stimulsoft-reports-js: al actualizar, la app instala stimulsoft-dashboards-js.

Reporte completo por id

sf-sti-report hace todo el cargue: consulta el reporte, abre el formulario de parámetros si el reporte tiene validaciones, carga plantilla y datos con esos parámetros y los muestra en el visor. La app decide qué endpoints usa implementando StiReportGatewayService.

// app.config.ts
providers: [
  MessageService, // los errores salen por el MessageService de PrimeNG; la app debe tener un <p-toast>
  provideStimulsoft({ licenseKey: environment.stimulsoftKey }),
  { provide: STI_REPORT_SERVICE, useExisting: MiStiReportGateway }
]
<sf-sti-report [idKatios]="idKatios" [reportId]="idReport" [user]="user"
               [filterParams]="params" (failed)="onError($event)"></sf-sti-report>

| Input | Qué es | | --- | --- | | idKatios | Cliente. | | reportId | Id del reporte. Al cambiarlo se recarga. | | reportType | TipoReporte del registro (p. ej. BI). Vacío: el gateway usa su valor por defecto. | | user | { tdoc, ndoc, idHub?, ubicacion? }. La librería no lee la sesión. | | filterParams | Valores para las validaciones por nombre, sin distinguir mayúsculas. | | clasificacionPerfil | { PXTA } para los combos COMBOPERFIL (en WE8 está en localStorage, CLASIXPERF<idKatios>). |

La librería no pinta loading. La app se suscribe a SfStimulsoftService.isLoading$ y muestra el suyo, igual que con SfPbiService de sf-pbi:

inject(SfStimulsoftService).isLoading$
  .pipe(takeUntilDestroyed())
  .subscribe(loading => (this.isLoading = loading));
<app-loading *ngIf="isLoading"></app-loading>
<sf-sti-report ...></sf-sti-report>

El gateway entrega los datos ya normalizados. Ver sti-report.port.ts:

  • getReport(ref) devuelve el registro con xmlAtributo, el XML de validaciones. Puede llevar más campos que el mismo gateway use después.
  • loadReport(ref, registro, { params, format }) devuelve { template, data }. params trae el valor de cada validación por su ID, con las fechas en YYYY-MM-DD.
  • getParametros devuelve las opciones { Nivel, Descripcion } de un combo.
  • getControlBusqueda(idKatios, idControl, valor) (opcional) devuelve las opciones { Descripcion, Valor } de una consulta de CONTROLBUSQUEDA. Si la app no lo implementa, los campos BUSQUEDA son texto libre.

Tipos de campo (CAMPO de cada <VALIDACION>)

| CAMPO | Se pinta como | Qué recibe el procedimiento | | --- | --- | --- | | TEXT | Texto | Lo escrito | | DATE | Selector de fecha | YYYY-MM-DD | | NUMERIC | Número | El número | | COMBO | Lista de TBLParametros del GRUPO | La Descripcion elegida | | BUSQUEDA | Lista con filtro de la consulta CONTROLBUSQUEDA con ID = CONTROL | El Valor (código) elegido; vacío si se limpia | | COMBOPERFIL | Lista de la clasificación por perfil | Lista 'a','b' de ubicaciones |

<VALIDACION NOMBRE="Linea" ID="LINEA" CAMPO="BUSQUEDA" CONTROL="2044"/>

Un gateway puede ejecutar el procedimiento desde el navegador, como reports-embedded con buildStiAttributes, o pedirle todo a una fachada que lo ejecute del lado del servidor, como TFB.

Peer dependencies: primeng, @angular/forms, fast-xml-parser y moment, además de Stimulsoft.

Publicar

ng build sf-stimulsoft
cd dist/sf-stimulsoft && npm publish