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

rhapi-ui-react

v0.2.10

Published

>

Readme

rhapi-ui-react

NPM JavaScript Style Guide

Les composants de cette bibliothèque sont documentés ici.

Installation pour développement et tests sur les exemples

git clone https://github.com/rhapi-project/rhapi-ui-react.git

Pour tester les exemples :

cd rhapi-ui-react
npm install
npm start

Les composants sont distribués dans le répertoire rhapi-ui-react/dist et leur code source se trouve dans le répertoire rhapi-ui-react/src/Components.

Vous pouvez consulter le README-DEV.md une compréhension beaucoup plus approfondie sur la structure du projet.

Utilisation dans un projet React

Les librairies semantic-ui-react et le client RHAPI sont requis pour ce projet.

A titre d'exemple, nous allons partir sur un projet React créé en utilisant l'outil create-react-app. Voir ici le guide de création d'une application React.

npx create-react-app monapplication
cd monapplication
npm install --save semantic-ui-react
npm install --save semantic-ui-css
npm install --save rhapi-client
npm install --save rhapi-ui-react

Dans le fichier src/App.js de notre projet monapplication nous allons utiliser les composants rhapi-ui-react.

import React from 'react';
import { Client } from "rhapi-client";
import { CCAM } from "rhapi-ui-react"; // Importation du groupe de composants CCAM
import "semantic-ui-css/semantic.css";

// Instanciation du client RHAPI sans authentification
const client = new Client("https://demo.rhapi.net/demo01");

class App extends React.Component {
  render() {
    return (
      <React.Fragment>
        {/* Utilisation du composant Search appartenant au groupe CCAM */}
        <CCAM.Search
          client={client}
          onLoadActes={results => console.log(results)}
        />
      </React.Fragment>
    );
  }
}

export default App;

Cet exemple montre une utilisation simple du composant CCAM.Search pour la recherche d'un acte en CCAM.

Ci-dessous un exemple de recherche d'actes en CCAM et affichage du résultat à l'aide du composant CCAM.Table :

import React from "react";
import { Client } from "rhapi-client";
import { CCAM } from "rhapi-ui-react";
import { Divider } from "semantic-ui-react";

// Instanciation du client RHAPI sans authentification
const client = new Client("https://demo.rhapi.net/demo01");

class App extends React.Component {
  state = {
    actes: [],
    informations: {}
  };

  onClearSearch = () => {
    this.setState({ actes: [], informations: {} });
  };

  onLoadActes = obj => {
    this.setState({ actes: obj.results, informations: obj.informations });
  };

  onPageSelect = result => {
    this.setState({
      actes: result.actes,
      informations: result.informations
    });
  };

  render() {
    return (
      <React.Fragment>
        <CCAM.Search
          client={client}
          onClear={this.onClearSearch}
          onLoadActes={this.onLoadActes}
        />
        <Divider hidden={true} />
        <CCAM.Table
          client={client}
          actes={this.state.actes}
          informations={this.state.informations}
          onPageSelect={result => this.onPageSelect(result)}
          showPagination={true}
        />
      </React.Fragment>
    );
  }
}

export default App;

Voir plus d'exemples d'utilisation rhapi-ui-react/exemples.

License

Licence MIT ©