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

@think-it-labs/edc-connector-ui

v0.2.5

Published

UI components for EDC-enabled dashboards

Readme

Abstract

The EDC Connector is a framework for a sovereign, inter-organizational data exchange. It provides low-level primitives to allow network participants to expose and consume offers. The Connector does so by providing an extensive HTTP API documented via OpenAPI specification.

This project is built on the foundations of @think-it-labs/edc-connector-client, targeting UI web engineers by offering a suite of headless UI components for React. These components are designed to be easily combined, facilitating the creation of visually appealing EDC-enabled dashboards.

Compatibility matrix

| UI | EDC | | ----- | ----- | | 0.1.0 | 0.6.x |

Usage

Install via npm or yarn

npm install @think-it-labs/edc-connector-ui
yarn add @think-it-labs/edc-connector-ui

Once installed, you import components and start building your dashboard.

import { AssetsList } from "@think-it-labs/edc-connector-ui/assets-list";

export function AssetsTable({ onClick }) {
  return (
    <AssetsList managementUrl="https://edc.think-it.io/management">
      <table>
        <thead>
          <tr>
            <th>#</th>
            <th>Name</th>
            <th>Content type</th>
            <th>Data address</th>
          </tr>
        </thead>

        <tbody>
          <AssetsList.Items>
            {({ item, index }) => (
              <AssetsList.Asset item={item}>
                <tr>
                  <td>
                    <button type="button" onClick={onClick}>
                      {index + 1}
                    </button>
                  </td>

                  <td>
                    <AssetsList.Asset.Name />
                  </td>

                  <td>
                    <AssetsList.Asset.ContentType />
                  </td>

                  <td>
                    <p>
                      <AssetsList.Asset.DataAddress.Name />
                    </p>
                    <p>
                      <AssetsList.Asset.DataAddress.Type />
                    </p>
                    <p>
                      <small>
                        <AssetsList.Asset.DataAddress.BaseUrl />
                      </small>
                    </p>
                  </td>
                </tr>
              </AssetsList.Asset>
            )}
          </AssetsList.Items>
        </tbody>
      </table>
    </AssetsList>
  );
}

The above snippet, uses the AssetList component to automatically fetch and render assets present in a given EDC Connector, but it is possible to list and visualise all EDC resources.

The library provides two types of primitives: resource components and low-level building blocks.

Resource components

Resource components are likely the ones you'll use the most and are the following ones:

| Component | Description | | -------------------------- | ------------------------------------------------------------------------------------------------ | | Connector | Fetches a target Connector data and status information. | | AssetForm | Render a form with the purpose of creating new assets. | | AssetView | Fetches a single asset for a target Connector. | | AssetsList | Fetches a list of assets for a target Connector, filtering via QuerySpec. | | ContractAgreementView | Fetches a single contract agreement for a target Connector. | | ContractAgreementsList | Fetches a list of contract agreements for a target Connector, filtering via QuerySpec. | | ContractDefinitionForm | Render a form with the purpose of creating new contract definition. | | ContractDefinitionView | Fetches a single contract definition for a target Connector. | | ContractDefinitionsList | Fetches a list of contract definitions for a target Connector, filtering via QuerySpec. | | ContractNegotiationView | Fetches a single contract negotiation for a target Connector. | | ContractNegotiationsList | Fetches a list of contract negotiations for a target Connector, filtering via QuerySpec. | | ContractOffersList | Fetches a list of offers for target consumer and provider Connectors, filtering via QuerySpec. | | PolicyDefinitionForm | Render a form with the purpose of creating new contract definition. | | PolicyDefinitionView | Fetches a single policy definition for a target Connector. | | PolicyDefinitionsList | Fetches a list of policy definitions for a target Connector, filtering via QuerySpec. | | TransferProcessView | Fetches a single transfer process for a target Connector. | | TransferProcessesList | Fetches a list of transfer processes for a target Connector, filtering via QuerySpec. |

Low-level building blocks

Low-level building blocks, instead are the core essence of the above components. Those won't likely be used in the day to day, unless you are trying extend Connector's functionalities (e.g., building a UI for an extension's).

| Component | Description | | ---------------- | ---------------------------------------------------------------------------------------- | | JsonLdContextProvider | Allow to specify additional JSON-LD contexts to more easily access JSON-LD fields. | | Form | Provide primitives to build headless forms components. | | List | Provide primitives to build headless list. | | Local | Provide primitives to build headless visualisation components, without fetching ability. | | View | Provide primitives to build headless visualisation components, with fetching ability. | | JsonLdValue | Provide primitives to access JSON-LD fields. | | Timestamp | Provide primitives to visualise i18n-aware timestamps and dates. |

Examples

Next.js

The examples/nextjs folder implements a quick example of implementing these React headless components using the Next.js framework.

To run the example you should:

cd examples/nextjs

docker compose up -d

yarn

yarn seed

yarn dev

Development

Please, adhere to the CONTRIBUTING guidelines when suggesting changes in this repository.

License

Copyright 2024 Think.iT GmbH.

Licensed under the Apache License, Version 2.0. Files in the project may not be copied, modified, or distributed except according to those terms.