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

@servicemind.tis/angular-smart-item-picker-dialog-table

v1.0.3

Published

Angular Material dialog for picking records from a paginated table — config-driven columns, per-column header filters, server-side sorting, and single or multi select.

Downloads

31

Readme

angular-smart-item-picker-dialog-table

An Angular Material dialog for picking records from a paginated table by Thai Informatics System. Use it instead of a dropdown whenever the user needs to see several attributes of each option before choosing — code, description, category, rate, and so on.

npm version npm downloads License: MIT


Features

  • Config-driven dynamic columns with custom cell templates
  • Per-column header filters (text or select)
  • Server-side sorting and pagination
  • Single-select (radio) or multi-select (checkbox)
  • Exclude already-picked rows by id
  • Overridable labels for i18n

Installation

npm install @servicemind.tis/angular-smart-item-picker-dialog-table

Peer dependencies

npm install @angular/material @angular/cdk @angular/forms

The picker calls your API with HttpClient, so the host application must provide it (provideHttpClient() or HttpClientModule).


Usage

import {
  AngularSmartItemPickerDialogTableModule,
  AngularSmartItemPickerDialogTableService,
  AngularSmartItemPickerColumn,
} from '@servicemind.tis/angular-smart-item-picker-dialog-table';

@NgModule({ imports: [AngularSmartItemPickerDialogTableModule] })
export class MyFeatureModule {}
constructor(private picker: AngularSmartItemPickerDialogTableService) {}

openPicker() {
  const columns: AngularSmartItemPickerColumn[] = [
    { name: 'code', label: 'Code', valueKey: 'chargeCode', sortKey: 'chargeCode', filterType: 'text' },
    { name: 'description', label: 'Description', valueKey: 'description', filterType: 'text' },
  ];

  this.picker
    .open<Charge>({ title: 'Select charges', columns, loadDataApiUrl: '/api/charges/list' })
    .subscribe(rows => {
      if (rows) { /* user confirmed */ }
      // rows === null when the user cancels
    });
}

Expected API contract

The picker issues POST {loadDataApiUrl}?current_page=n&per_page=m with body { filter, sortFilter } and expects:

{ "data": [], "total": 0 }

records / totalCount are also accepted as aliases.


Configuration

See AngularSmartItemPickerConfig for the full contract. Key options:

| Option | Description | |---|---| | title | Dialog title | | columns | Column definitions (see below) | | loadDataApiUrl | Paginated POST endpoint | | staticFilter | Always merged into the request filter | | multiSelect | Checkboxes (default) vs radio single-select | | idKey | Row identity property, default id | | excludeIds | Rows to hide | | pageSize / pageSizeOptions | Pagination | | defaultSortBy / defaultSortOrder | Initial sort | | labels | Translated label overrides |

Column options: name, label, valueKey, template, sortKey, filterType, filterKey, options, width, align.


Styling

The component is self-contained — all table chrome, buttons, and layout utilities ship with the library and are scoped by Angular's emulated encapsulation, so nothing leaks into your application and you don't need Tailwind or any CSS framework.

Three CSS custom properties are exposed for theming. Override them on any ancestor element:

| Property | Default | Used for | |---|---|---| | --angular-picker-primary | #3f51b5 | Confirm button fill, filter focus ring | | --angular-picker-danger | #f44336 | Cancel button text and hover ripple | | --angular-picker-light | #f8f9fa | Table header and paginator background |

:root {
  --angular-picker-primary: #0f766e;
  --angular-picker-danger: #b91c1c;
}

The table also honours Angular Material's own table theme tokens (--mat-table-row-item-outline-color, --mat-table-row-item-container-height, and so on), so it follows your Material theme by default.

One external requirement: the sort arrows and action icons use the Material Icons ligature font. Angular Material applications normally already load it; if yours doesn't, add it to your index.html.


Notifications

Errors surface through AngularSmartItemPickerNotifierService, a thin MatSnackBar wrapper. Override it to route messages through your own notification stack:

{ provide: AngularSmartItemPickerNotifierService, useClass: MyNotifier }

License

MIT © Thai Informatics System Co., Ltd.