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

ims-shared-client

v6.5.1

Published

This is a package of shared react client components and utilities for build packages that work with IMS.

Downloads

179

Readme

IMS Shared Client

This is a package of shared react client components and utilities for build packages that work with IMS.

Installation

$ npm install --save ims-shared-client

Application Bootstrapping

Version 3.5 introduces a bootstrapper to simplify wiring up the react application and to make that process more consistent. For details on using the application bootstrapper see the IMS Application Bootstrapper documentation.

Version 3.0 Breaking change

Version 3.0 introduces a PackageInformation object that must be created at the app launch. You must call PackageInformation.configure with your package information.

import { PackageInformation } from 'ims-shared-client'
const packageInfo = require('../../shared/ims')
PackageInformation.configure(packageInfo)

If you do not, BaseComponent, ScopedComponent, request, and SecureLink will not work correctly.

To do:

  • ~~Refactor FeedbackButton to use PackageInformation~~ Completed in 3.0.12
  • ~~Refactor ReleaseNotesButton to use PackageInformation~~ Compelted in 3.0.12

Version 2.0 Breaking change

Version 2.0 introduces a new version of the request library that is connected with the redux store. Components from the shared library such as UserAutosuggest and AreaPicker require the request library be prepared to be used.

Example: app/store/createStore.js

/// Other imports here
import { prepareRequest } from 'ims-shared-client/request'

/// Later in file...
  // ======================================================
  // Store Instantiation and HMR Setup
  // ======================================================
  const store = createStore(
    makeRootReducer(),
    fromJS(initialState),
    compose(
      applyMiddleware(...middleware),
      ...enhancers
    )
  )

  prepareRequest(store, 'global.tokens')

Using request in modules

import request from 'ims-shared-client/request'


function* mySaga (action) {
  yield call(request, '/api/endpoint', requestOptions)
}

Sample Usage

import React from 'react'
import { LoadingIndicator } from 'ims-shared-client'

class MyComponent extends React.Component {
  render () {
    return (
      <LoadingIndicator />
    )
  }
}

Styles

This package requires that Twitter Bootstrap (e.g. bootstrap.min.css ) be included in your page to render properly.

React Components

  • ActionLink - renders a link button for invoking an action
  • AreaPicker - select an area from the IMS Hub areas tree
  • BaseComponent - provides a checkPermission method
  • DeleteLink - renders a link button that displays a delete confirmation dialog when clicked
  • DisplayName - Given a user either renders the displayName or firstName + lastName
  • EquipmentAutosuggest - renders an auto complete input for selecting equipment from the IMS hub
  • ErrorAlert - renders a Bootstrap error alert box when provided a message
  • FileUploader - renders a wrapper that can receive file drops and upload them
  • FormGroup - renders a from group with support for showing validation errors
  • LoadingIndicator - spinning circular loading indicator
  • RequiredIndicator - renders an asterisk for showing when an input is required
  • ScopedBaseComponent - a base component that has its own scope
  • ScopedComponent - Can inject its own reducer
  • SingleUserSelector - renders a component that toggles the UserAutosuggest for selecting a single user
  • SortableListHeader - renders a clickable header for a list to change sort order
  • UserAutosuggest - renders an auto complete input for selecting user accounts from the IMS hub
  • Utilities ..* IconHelper - getIconForMimeType(mimeType) - returns font-awesome icon for a given mime type