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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pfba_spartaxx/documents-ui

v1.0.15

Published

A lightweight, premium React library for managing Spartaxx documents with clean architecture, scoped CSS, and environment-aware API configuration.

Readme

Spartaxx Documents UI Package

A lightweight, premium React library for managing Spartaxx documents with clean architecture, scoped CSS, and environment-aware API configuration.


🚀 Installation

Install the package via npm:

npm install @pfba_spartaxx/documents-ui

Peer Dependencies: Ensure you have the following installed in your host project:

  • react & react-dom (>= 17.0.0)
  • axios
  • react-bootstrap
  • react-icons

🛠️ Usage

1. Global Configuration

Wrap your application (or the specific layout) with the DocumentProvider. This sets up the environment and user context globally.

import { DocumentProvider } from '@pfba_spartaxx/documents-ui';
import '@pfba_spartaxx/documents-ui/style.css'; // Import the scoped styles

const config = {
  mode: 'uat', // 'uat' | 'prod'
  user: {
    userId: 1234,
    clientId: 5678,
    clientNumber: 'C1001',
    userName: 'John Doe'
  },
  // Optional: Override specific API URLs if needed
  overrides: {
    spartaxxApi: 'https://custom-api.com'
  }
};

function App() {
  return (
    <DocumentProvider config={config}>
      <YourDashboard />
    </DocumentProvider>
  );
}

2. Rendering Documents

Use the PackageDocumentsContainer to handle data readiness checks automatically. It will show a loading spinner until both clientData and user context are ready.

import { PackageDocumentsContainer } from '@pfba_spartaxx/documents-ui';

const DocumentsView = ({ rowData }) => {
  return (
    <div className="my-container">
      <PackageDocumentsContainer 
        clientData={rowData} 
        initialTab="Required" 
      />
    </div>
  );
};

🔍 API Configuration

The package automatically routes requests based on the mode provided in the config:

| Environment | Spartaxx API | Customer API | PaperWise API | | :--- | :--- | :--- | :--- | | UAT | spartaxxv2uatapi.poconnor.com | uat-pfbaapi.spartaxx.com | uat-pwapi.spartaxx.com | | PROD | hubapi.spartaxx.com | pfbaapi.spartaxx.com | pwapi.spartaxx.com |


🛠️ Local Development & Testing

To test changes locally without publishing to npm:

  1. In this package directory:

    npm run build
    npm link
  2. In your host application:

    npm link @pfba_spartaxx/documents-ui
  3. To update after changes: Simply run npm run build in the library; the host app will reflect changes via the link.


📑 Features & Architecture

  • Clean logic: No legacy cookie or sessionStorage hacks.
  • CSS Isolation: All classes prefixed with spx- to avoid layout breaks in the host app.
  • Detailed Logging: Every API call, payload, and response is logged with [SPX-DOCS-UI] prefix for easy debugging in the console.
  • Responsive Design: Mobile-friendly tab system and sticky action footers.