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

calibration-template-kit

v1.0.2

Published

Reusable calibration template designer, data entry grid, formula engine, and complete calibration workflow components for React applications.

Readme

calibration-template-kit

A framework-friendly, fully customizable, and modular React package for instrument calibration workflows. Includes Template Designer, Interactive Data Entry Grid powered by HyperFormula, Live Certificate Preview, Approval Workflows, and Audit History tracking.


Key Features

  • Calibration Template Designer: Create, customize, and duplicate reusable calibration templates with custom tolerance rules, environmental defaults, and custom columns.
  • Interactive Data Entry Grid: High-density virtualized data grid (@tanstack/react-virtual) supporting Excel-like formula evaluations (=A - B, =AVERAGE(B, C)), column reordering, custom status rules, and decimal precision control.
  • Formula Engine: Standalone calculation engine powered by HyperFormula for real-time error evaluation, percentage error, bias, standard deviation, and custom expressions.
  • Live Certificate Preview: Real-time NABL/ISO-17025 compliant HTML certificate preview with ULR number gate.
  • Complete Workflow Components:
    • CalibrationWizard: Multi-step calibration entry wizard.
    • CalibrationList: Calibration records, stats, and draft management.
    • CalibrationApproval: Multi-tier manager approval & rejection rework workflow.
    • CalibrationHistoryView: Historical calibration records & audit trail log viewer.
    • TemplateList: Reusable template catalog with search and quick actions.
    • CalibrationProgressChart: ApexCharts-powered weekly/daily progress tracking.
  • Framework & Dependency Agnostic: Decoupled from project-specific auth, HTTP client, router, or UI libraries through a single CalibrationProvider context.

Installation

npm install calibration-template-kit

Peer Dependencies

Ensure your project has the required peer dependencies installed:

npm install react react-dom lucide-react @tanstack/react-virtual hyperformula date-fns class-variance-authority clsx tailwind-merge

(Optional) For charts and printing support:

npm install react-apexcharts apexcharts react-to-print

Quick Start & Setup

Wrap your application (or calibration section) with the <CalibrationProvider>:

import React from "react";
import { CalibrationProvider, TemplateList, TemplateDesigner } from "calibration-template-kit";
import axios from "axios";

// 1. Create an API adapter matching your project's HTTP client
const apiClient = {
  get: (url: string, config?: any) => axios.get(url, config),
  post: (url: string, data?: any, config?: any) => axios.post(url, data, config),
  put: (url: string, data?: any, config?: any) => axios.put(url, data, config),
  delete: (url: string, config?: any) => axios.delete(url, config),
};

// 2. Configure user and navigation callbacks
const config = {
  user: {
    id: "usr_123",
    name: "John Doe",
    email: "[email protected]",
    companyId: "comp_456",
    role: "Quality Manager",
  },
  apiClient,
  toast: {
    success: (msg) => console.log("[SUCCESS]", msg),
    error: (msg) => console.error("[ERROR]", msg),
  },
  onNavigate: (path) => {
    window.location.href = path; // or navigate(path) from react-router-dom
  },
};

export default function App() {
  return (
    <CalibrationProvider config={config}>
      <TemplateList />
    </CalibrationProvider>
  );
}

Public Components Reference

1. TemplateList

Catalog of reusable calibration templates categorized by instrument type.

import { TemplateList } from "calibration-template-kit";

<TemplateList
  onNewTemplate={() => navigate("/templates/new")}
  onEditTemplate={(template) => navigate(`/templates/edit/${template.id}`)}
/>

2. TemplateDesigner

Full-featured template builder for designing custom point layouts, formula columns, and acceptance criteria.

import { TemplateDesigner } from "calibration-template-kit";

<TemplateDesigner
  templateId="tpl_789" // omit for new template
  onSaveSuccess={(template) => console.log("Saved", template)}
  onBack={() => navigate("/templates")}
/>

3. CalibrationWizard

5-Step calibration wizard for performing instrument calibrations, applying templates, generating ULR numbers, and producing certificates.

import { CalibrationWizard } from "calibration-template-kit";

<CalibrationWizard
  instrumentId="inst_001"
  onComplete={(record) => console.log("Completed calibration", record)}
  onCancel={() => navigate("/calibrations")}
/>

4. CalibrationDataGrid

Interactive data entry grid component usable standalone in custom forms.

import { CalibrationDataGrid, CALIBRATION_TYPES } from "calibration-template-kit";

<CalibrationDataGrid
  typeConfig={CALIBRATION_TYPES[0]} // Pressure gauge
  points={points}
  onPointsChange={setPoints}
  unit="Bar"
  onUnitChange={setUnit}
  tolerance={0.01}
  onToleranceChange={setTolerance}
/>

5. CalibrationList

List of past calibrations, statistics KPIs, and saved drafts.

import { CalibrationList } from "calibration-template-kit";

<CalibrationList
  onNewCalibration={() => navigate("/calibration/new")}
  onEditCalibration={(id) => navigate(`/calibration/edit/${id}`)}
  onViewHistory={(instId) => navigate(`/history/${instId}`)}
/>

6. CalibrationApproval

Quality Manager review screen for approving or returning calibrations for rework.

import { CalibrationApproval } from "calibration-template-kit";

<CalibrationApproval
  onEditCalibration={(id) => navigate(`/calibration/edit/${id}`)}
/>

7. CalibrationHistoryView

Historical calibration records, certificate previewer, and audit log history.

import { CalibrationHistoryView } from "calibration-template-kit";

<CalibrationHistoryView
  instrumentId="inst_001"
  onBack={() => navigate(-1)}
/>

Configuration API (CalibrationConfig)

| Property | Type | Description | |---|---|---| | user | CalibrationUser | Logged-in user information (id, name, companyId, role) | | apiClient | ApiAdapter | Axios / Fetch wrapper implementing .get(), .post(), .put(), .delete() | | toast | ToastAdapter | (Optional) Custom notification adapter (.success(), .error()) | | apiBasePaths | object | (Optional) Override API paths (calibrations, templates, settings, users, instruments) | | onNavigate | (path: string) => void | (Optional) Navigation router callback | | dateFormat | string | (Optional) Date display format (default: "dd-MMM-yyyy") |


License

MIT © GaugeMaster