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

ngx-primeng-toolkit

v1.15.0

Published

A comprehensive TypeScript utility library for Angular component state management, PrimeNG table state management, ng-select helpers, data storage, and memoized HTTP caching. Compatible with Angular 19+ and PrimeNG 19+ (optimized for Angular 20+ and Prime

Downloads

4,664

Readme

NGX PrimeNG Toolkit

A comprehensive TypeScript utility library for Angular component state management, including PrimeNG table helpers, ng-select integration, data storage, and HTTP caching utilities with NgRx Signals. Compatible with Angular 19+ and PrimeNG 19+ (optimized for Angular 20+ and PrimeNG 20+).

✨ Features

  • 🏗️ Table State Management - PrimeNG table helpers with lazy loading, filtering, and sorting
  • 🎛️ NgSelect Integration - Complete ng-select lifecycle with search & pagination
  • 💾 Data Storage - Memoized HTTP caching and component data management
  • 🎛️ Component State - Reactive state management for UI components
  • 🛠️ Utility Functions - Helper functions and TypeScript utility types
  • 📦 Tree-shakeable - Import only what you need
  • 🔒 Type Safe - Full TypeScript support with strict type checking

🚀 Quick Start

Installation

npm install ngx-primeng-toolkit

Peer Dependencies

# Core dependencies (Angular 19+ supported, 20+ recommended)
npm install @angular/common@^19.0.0 @angular/core@^19.0.0 @ngrx/signals@^19.0.0 rxjs@^7.0.0

# UI library dependencies (choose what you need)
npm install primeng@^19.0.0        # For PrimeNG table helpers
npm install @ng-select/ng-select@^15.0.0  # For ng-select helpers

# Optional (for response validation)
npm install zod@^3.0.0

Basic Usage

import { Component, inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { PrimeNgDynamicTableStateHelper } from 'ngx-primeng-toolkit';

interface User {
  id: number;
  name: string;
  email: string;
}

@Component({
  selector: 'app-user-table',
  template: `
    <p-table 
      [value]="tableState.data()"
      [lazy]="true"
      [loading]="tableState.isLoading()"
      [totalRecords]="tableState.totalRecords()"
      [paginator]="true"
      [rows]="10"
      (onLazyLoad)="tableState.onLazyLoad($event)">
      
      <ng-template pTemplate="header">
        <tr>
          <th pSortableColumn="name">Name</th>
          <th pSortableColumn="email">Email</th>
        </tr>
      </ng-template>
      
      <ng-template pTemplate="body" let-user>
        <tr>
          <td>{{ user.name }}</td>
          <td>{{ user.email }}</td>
        </tr>
      </ng-template>
    </p-table>
  `
})
export class UserTableComponent {
  private httpClient = inject(HttpClient);
  
  readonly tableState = PrimeNgDynamicTableStateHelper.create<User>({
    url: '/api/users/query',
    httpClient: this.httpClient
  });
}

📚 Documentation

Core Features

Examples

🔗 Key Concepts

API Response Format

interface ApiResponse<T> {
  data: T[];           // Array of table row data
  last_row: number;    // Total number of records
}

Filter Types Mapping

The library maps PrimeNG filter types to backend operations:

  • containslike
  • equals=
  • startsWithstarts
  • greaterThan>
  • And many more...

TypeScript Support

Full generic typing for type-safe development:

const tableState = PrimeNgDynamicTableStateHelper.create<User>({
  url: '/api/users',
  httpClient: this.httpClient
});
// tableState.data() is typed as Signal<User[]>

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests to our GitHub repository.

Support

For issues and questions, please use the GitHub issues page.