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

sharecare-onboarding-sdk

v0.1.0

Published

API to embed the onboarding portal

Downloads

1

Readme

Embedded Onboarding Module SDK

The name of the npm module to be imported is sharecare-onboarding-sdk. Install this module in your project using npm, like this:

npm install sharecare-onboarding-sdk --save

This is a commonJS type of module that exports the following:

embed function

function embed(options, element, onEvent)

Call this function to embed the module into a specified DOM element. This will add an iframe tag to the DOM node as the only child of the passed element. The embed module will be configured by Sharecare to validate the domain of the website with a provider specified url.

Note: If the element passed to this method is ever removed from the DOM, adding it back will reload the embedded module. If this happens the subsequent behavior of this API is undefined.

Params

  • options - parameters to configure the behavior of the embedded module. It has these fields:
    • className - string that if given will be passed as the className of the iframe element.
    • clientId - this is the subdomain of the client portal. For example, if the portal is would be accessed at ‘genera.sharecare.com’ the clientId is ‘genera’.
    • locale - this is the locale to use for translating strings. If not specified or not supported, it will default to "en-US-u-ms-ussystem"
    • autoResize – if true, the iframe will automatically resize when the iframe content changes in size.
  • element - A DOM element that will contain the embedded module.
  • onEvent – this is a function that is called when an important event happens in the registration flow.
    • loaded – this event is fired when the iframe has been loaded and ready to use.
    • completed – this event is fired when the user has finished the registration process.
    • resize – this event is fired when the iframe content changes in size.

Example

    connect(params) {
        var options = {
            className: 'demo-embed',
            clientId: 'genera',
            params: params,
            autoResize: true,
        }

        embed(options, this.embedRef.current, this.callback.bind(this));
    }

Embed React Component (still in development)

This module exports a React component that can be directly included in a React application.

<Embed/>

Use this component to embed the module into into your document. This will add an iframe tag to the DOM node as the only child of the passed element. The embed module will be configured by Sharecare to validate the domain of the website with a provider specified url.

This component has the following properties:

Properties

  • clientId - this is the subdomain of the client portal. For example, if the portal would be accessed at ‘genera.sharecare.com’ the clientId is ‘genera’. This property is mandatory.
  • locale - this is the locale to use for translating strings. If not specified or not supported, it will default to "en-US-u-ms-ussystem".
  • autoResize - if true, the iframe will automatically resize when the iframe content changes in size.
  • onEvent - this is a function that is called when an important event happens in the registration flow. These events are defined:
    • loaded – this event is fired when the iframe has been loaded and ready to use.
    • completed – this event is fired when the user has finished the registration process.
    • resize – this event is fired when the iframe content changes in size.