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

react-ecosistema-unp

v1.9.1

Published

<span align="center"> <a href="https://www.npmjs.com/package/react-ecosistema-unp"><img title="npm version" src="https://badgen.net/npm/v/react-ecosistema-unp?label=latest"></a> <!-- <a href="https://www.npmjs.com/package/react-ecosistema-unp"><img title=

Readme

Librería React para el Ecosistema de Información de la UNP

La Librería del Ecosistema de Información es una colección de componentes reutilizables y modulares para crear y gestionar el entorno digital de la Unidad Nacional de Protección. Esta librería proporciona componentes para facilitar la integración de diversas funcionalidades dentro de las aplicaciones del ecosistema.

Instalación

npm install react-ecosistema-unp@latest

Nota: El Module Resolution del proyecto debe ser bundler para su correcto funcionamiento

"moduleResolution": "bundler"

Documentación

En desarrollo

Usabilidad: Selección de Filas en la Tabla

La función de selección de filas permite al usuario seleccionar una o varias filas en la tabla y agrupar visualmente aquellas que comparten el mismo valor de tipoMesa, posicionándolas inmediatamente debajo de la fila seleccionada.

¿Cuándo se activa esta función?

La agrupación automática de filas por tipoMesa solo se activa cuando se cumplen ambas condiciones:

  • Se pasa la prop enableRowSelection al componente de tabla.
  • Se define la prop onSelectionChange, que recibe el array de identificadores seleccionados.

Props requeridas

| Prop | Tipo | Descripción | |---------------------|--------------|-----------------------------------------------------------------------------| | enableRowSelection| boolean | Habilita la selección de filas. | | onSelectionChange | (ids: string[]) => void | Callback que recibe los ids de las filas seleccionadas. |

Comportamiento

  1. Al seleccionar una fila, todas las filas con el mismo valor en la columna tipoMesa se agrupan y se posicionan inmediatamente debajo de la fila seleccionada.
  2. Si se seleccionan varias filas de diferentes tipoMesa, cada grupo se posiciona debajo de la primera fila seleccionada de su tipo.
  3. La selección se realiza por el identificador único de la fila (numeroRegistro), lo que garantiza que la selección se mantenga aunque el orden de las filas cambie.
  4. No se generan duplicados: cada fila aparece solo una vez en la tabla.
  5. El reordenamiento solo ocurre cuando ambas props están presentes; de lo contrario, la tabla mantiene su orden original.

Ejemplo de uso

import { TablaRegistros } from '.../lib/tables';

const columns = [
	// ...definición de columnas...
];

const [selectedIds, setSelectedIds] = useState<string[]>([]);

<TablaRegistros
	columns={columns}
	data={data}
	enableRowSelection
	onSelectionChange={setSelectedIds}
	// ...otros props...
/>;

Notas adicionales

  • El identificador único de cada fila debe estar en la propiedad numeroRegistro.
  • El comportamiento de agrupación es transparente para el usuario y no requiere configuración adicional.
  • Si se desea desactivar la agrupación, basta con omitir alguna de las props requeridas.