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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@grafosoft/grafosoft-report-table

v0.1.3

Published

Componente avanzado para visualización de reportes de información

Readme

📦 @grafosoft/grafosoft-report-table

Librería de componentes avanzados para visualización y análisis de datos.
Incluye tablas interactivas, pivotes virtualizados y un controlador de vistas dinámico con soporte para futuras gráficas.

Instalación

npm i @grafosoft/grafosoft-report-table

Configuración

// tailwind.config.ts
import type { Config } from 'tailwindcss'

const config: Config = {
  content: [
    './node_modules/@grafosoft/grafosoft-report-table/dist/**/*.{js,ts,jsx,tsx}',
  ],
}

export default config

🚀 Componentes principales

🧱 TableReport

Componente de tabla avanzada con soporte para:

  • 🔍 Búsqueda y ordenamiento
  • 📊 Agrupación dinámica de datos
  • ➕ Operaciones matemáticas automáticas
  • 📤 Exportación (CSV, Excel, etc.)
  • ⚙️ Configuración mediante ReportTableConfig

📋 Props principales

| Prop | Tipo | Default | Descripción | | -------------------- | ---------------------------- | ------------------- | -------------------------------- | | columns | Column[] | requerido | Define las columnas de la tabla | | data | CellData[][] | requerido | Datos en formato matriz | | showMathOperations | boolean | true | Habilita operaciones matemáticas | | defaultPageSize | number | 10 | Filas por página | | paginationOptions | number[] | [10, 25, 50, 100] | Opciones de paginación | | config | Partial<ReportTableConfig> | {} | Configuración adicional |

💡 Ejemplo básico

import { TableReport } from '@grafosoft/grafosoft-report-table'

const columns = [
  { id: 'name', label: 'Nombre', type: 'string' },
  { id: 'age', label: 'Edad', type: 'number' },
  { id: 'city', label: 'Ciudad', type: 'string' },
]

const data = [
  ['Juan Pérez', 28, 'Madrid'],
  ['María García', 34, 'Barcelona'],
  ['Carlos López', 25, 'Valencia'],
]

export function App() {
  return <TableReport columns={columns} data={data} />
}

TablePivot

Componente optimizado para grandes volúmenes de datos, con soporte de virtualización (usando @tanstack/react-virtual).

💡 Ejemplo básico

import { TablePivot } from '@grafosoft/grafosoft-report-table'

export function App() {
  return <TablePivot columns={columns} data={data} />
}

ChartReport

Componente optimizado para la generación de gráficas dinamicas listas para exportar.

💡 Ejemplo básico

import { ChartReport } from '@grafosoft/grafosoft-report-table'

export function App() {
  return <ChartReport columns={columns} data={data} />
}

DataViewController

Componente contenedor que permite controlar múltiples vistas (tablas, pivotes, gráficos, etc.) de forma declarativa y manteniendo el estado interno de cada vista.

API — DataViewController

| Prop | Tipo | Default | Descripción | | ------------- | ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | defaultView | string | Primer hijo | Define el nombre (name) de la vista que estará activa al inicializar el componente. | | children | ReactElement<DataViewProps>[] | — | Lista de vistas declaradas mediante DataViewController.View. Cada vista representa un contenido distinto (tabla, pivote, gráfico, etc.). | | className | string | — | Permite agregar clases adicionales al contenedor principal para personalización de estilos. |

️ API — DataViewController.View

| Prop | Tipo | Default | Descripción | | ---------- | ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------ | | name | string | requerido | Identificador único de la vista. Se usa para alternar entre vistas. | | title | string | name | Texto o tooltip que aparece sobre el botón de la barra de control. | | icon | ReactNode | name | Ícono mostrado en el botón de cambio de vista. Puede ser cualquier elemento JSX (por ejemplo, un ícono de react-icons). | | children | ReactNode | — | Contenido renderizado dentro de la vista. Puede ser un componente como TableReport, TablePivot o un gráfico personalizado. |

import { DataViewController } from '@grafosoft/grafosoft-report-table'
import { TableReport, TablePivot } from '@grafosoft/grafosoft-report-table'

export function App() {
  return (
    <DataViewController defaultView="table">
      <DataViewController.View name="table" title="Tabla clásica">
        <TableReport columns={columns} data={data} />
      </DataViewController.View>

      <DataViewController.View name="pivot" title="Tabla pivote">
        <TablePivot columns={columns} data={data} />
      </DataViewController.View>

      <DataViewController.View name="chart" title="Gráfico">
        <ChartReport columns={columns} data={data} />
      </DataViewController.View>
    </DataViewController>
  )
}