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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@esri/radar

v0.3.3

Published

ArcGIS Hub components for local exploration

Downloads

554

Readme

Hub Components

Web components for embedding Hub into websites and custom applications.

Types of Components

  • Containers - full-featured composition of multiple blocks + elements, optionally managing state
  • Blocks - 'Smart' components (optionally) managing data; composed of elements, and maybe other blocks
  • Presentation - Functional presentation components that only contain other elements

Containers are complex, manage state and are used for prototypes and optionally as larger reusable components. For example, Content Picker or Discussion

Blocks are the most common component that can be used stand-alone within a card or website by providing configuration to either fetch new data or display data that is provided. Examples include Event List or Data Statistic

Presentation provide consistent presentation but do not interact with outside systems.

There are many components which may work as both a Block or Presentation, for example Data Statistic. This example component could be configured with static strings + values; or it could be configured with a data reference + statistical operations. At first this component can be a single block with minimal logic that's delegated to an external library (e.g. Hub.js). Only when the Block becomes sufficiently complex, or there are variations (or desired re-used in the presentation) then this Block could be decomposed into external Presentation components.

Using these components

Script tag

Add <script src='https://unpkg.com/@esri/[email protected]/dist/radar.js'></script> in the head of your index.html

  • Then you can use the element anywhere in your template, JSX, html etc

React App

To use Hub components in a React application, see Stencil.js docs on React

Ember App

To use Hub components in an Ember application, use ember-cli-stencil

  • Run ember install ember-cli-stencil ember-auto-import
  • Run npm install @esri/radar --save

In a stencil-starter app

  • Run npm install hub-radar --save
  • Add an import to the npm packages import hub-radar;
  • Then you can use the element anywhere in your template, JSX, html etc

Development

npm install
npm start

Add new components

To build a new component:

npx stencil g

Please preface all component files with hub- and component modules with Hub for example hub-map.tsx annd HubMap

See Stencil Cheatsheet for great tips developing with Stencil.

Storybook

To view the components in an explorable player:

npm run storybook

Deploy

To build the component for production, run:

npm run build

To publish storybook to GitHub pages

npm run deploy-storybook

Test

To run the unit tests for the components, run:

npm test

Need help? Check out our docs here.

Built With Stencil# covid-report