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

@netrist-smartbridge/smartbridge

v0.0.9

Published

## Installation

Readme

Smartbridge Angular SDK

Installation

  • Install Package: npm install @netrist-smartbridge/smartbridge

  • Import modules in app.module.ts (You will also need to import HttpClientModule and NgbModule as dependencies):

// ...
import { CacLoginButtonModule } from '@netrist-smartbridge/smartbridge';
import { CacButtonModule } from '@netrist-smartbridge/smartbridge';
import { HttpClientModule } from '@angular/common/http';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
@NgModule({
  // ...
  imports: [
    // ...
    CacLoginButtonModule,
    CacButtonModule,
    HttpClientModule,
    NgbModule
  ], 
  // ...
})

Buttons

This sdk contains two button components for integrating with the Smartbridge platform

  • CAC Login Button
    • <cac-login-button></cac-login-button>
    • For integration with Smartbridge's CAC login flow.
  • CAC Button
    • <cac-button></cac-button>
    • For integration with Smartbridge's associate CAC and register CAC flows.

CAC Login Button

This button allows for a streamlined login process with CAC using Smartbridge.

Usage

Inputs:

  • cacLoginUrl (Required): URL for the Smartbridge CAC Login endpoint

    cacLoginUrl='example.netristsmartbridge.com/cac-login'

  • callbackUrl (Required): URL where the results will be POSTed.

    callbackUrl='netrist.com'

  • clientId (Required): The Client ID specifically being used for Authorization header on the callback

    clientId='clientId-1234'

  • style: any styling need for the login button in JSON format.

    style={
            'padding': '10px',
            'margin': '5px'
           }
  • text: text displayed on the button. Defaults to 'Login with CAC' if none is entered.

    text='CAC Login'

Outputs:

  • response: JSON containing whether the authentication was successful, and a JWT from the transaction.
    • emitted as a javaScript '$event' upon clicking the button.
    • example:
      • successful cac login (success = true)
      {
        'success' : 'true',
        'jwt' : 'xyz...'
      }
      • unsuccessful cac login (success = false)
      {
        'success' : 'false',
        'jwt' : 'xyz...',
        'error' : 'description of error'
      }
      • A failed request will bring up an error modal.

Example:

<cac-login-button
[style]="{'padding': '10px', 'background-color': 'blue', 'color': 'white'}"
[cacLoginUrl]="'https://example.com/cac-login'"
[callbackUrl]="'https://example.com/login'"
[clientId]="'angularClientId'"
[text]="'CAC Login'"
(response)="onLoginResponse($event)"
>
</cac-login-button> 
  • Note: "onLoginResponse($event)" is simply an example function that takes the response JSON as an argument. Such a function would be implemented by the SDK user.

CAC Button

This button allows for a streamlined cac association or registration process with CAC using Smartbridge.

Usage

Inputs:

  • cacUrl (Required): URL for the Smartbridge CAC endpoint

    cacUrl='example.netristsmartbridge.com/cac'

  • callbackUrl (Required): URL where the results will be POSTed.

    callbackUrl='netrist.com'

  • clientId (Required): The Client ID specifically being used for Authorization header on the callback

    clientId='clientId-1234'

  • style: any styling need for the CAC button in JSON format.

    style={
            'padding': '10px',
            'margin': '5px'
           }
  • text: text displayed on the button. Defaults to 'Associate a CAC' if none is entered.

    text='Register a CAC'

Outputs:

  • response: JSON containing whether the authentication was successful, and a JWT from the transaction.
    • emitted as a javaScript '$event' upon clicking the button.
    • example:
      • successful CAC association (success = true):
      {
        'success' : 'true',
        'jwt' : 'xyz...'
      }
      • unsuccessful CAC association (success = false):
      {
        'success' : 'false',
        'jwt' : 'xyz...',
        'error' : 'description of error'
      }
      • A failed request will bring up an error modal.

Example:

    <cac-button
    [style]="{'padding': '10px', 'background-color': 'green', 'color': 'white'}"
    [callbackUrl]="'https://example.com/associateCac'"
    [cacUrl]="'https://example.com/cac'"
    [clientId]="'angularClientId'"
    [text]="'Register a CAC'"
    (response)="onCACResponse($event)"
    >
    </cac-button>
  • Note: "onCACResponse($event)" is simply an example function that takes the response JSON as an argument. Such a function would be implemented by the SDK user.