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

@memberjunction/ng-query-viewer

v5.15.0

Published

MemberJunction: Angular components for viewing and executing stored queries with parameter input, interactive results grid, and entity linking

Readme

@memberjunction/ng-query-viewer

Angular components for viewing and executing stored queries with parameter input, interactive AG Grid results, and entity linking. The recommended replacement for the deprecated @memberjunction/ng-query-grid.

Installation

npm install @memberjunction/ng-query-viewer

Overview

The Query Viewer provides a complete query execution experience: a parameter input form, an AG Grid results display, entity linking for clickable record IDs, and automatic state persistence to User Settings. It replaces the older Kendo-based Query Grid with a more feature-rich implementation.

flowchart TD
    subgraph Viewer["QueryViewerComponent"]
        A["QueryId Input"] --> B["Load Query Metadata"]
        B --> C["QueryParameterFormComponent"]
        C -->|Run| D["RunQuery API"]
        D --> E["QueryDataGridComponent"]
    end
    subgraph Features["Key Features"]
        F["State Persistence (User Settings)"]
        G["Parameter Persistence"]
        H["Entity Linking"]
        I["Export (Excel/CSV)"]
    end
    subgraph Grid["QueryDataGridComponent"]
        J["AG Grid"]
        K["Column Config"]
        L["Row Detail Panel"]
        M["Query Info Panel"]
    end

    E --> J
    E --> F
    C --> G
    J --> H

    style Viewer fill:#2d6a9f,stroke:#1a4971,color:#fff
    style Features fill:#7c5295,stroke:#563a6b,color:#fff
    style Grid fill:#2d8659,stroke:#1a5c3a,color:#fff

Usage

Module Import

import { QueryViewerModule } from '@memberjunction/ng-query-viewer';

@NgModule({
  imports: [QueryViewerModule]
})
export class YourModule {}

Basic Usage

<mj-query-viewer
  [QueryId]="selectedQueryId"
  [AutoRun]="true"
  (EntityLinkClick)="openRecord($event)">
</mj-query-viewer>

Full Configuration

<mj-query-viewer
  [QueryId]="queryId"
  [AutoRun]="false"
  [SelectionMode]="'multiple'"
  [ShowInfoPanel]="true"
  [ShowRowDetail]="true"
  [PersistState]="true"
  [PersistParams]="true"
  (EntityLinkClick)="navigateToEntity($event)"
  (SelectionChanged)="onSelectionChanged($event)"
  (RowClick)="onRowClick($event)"
  (GridStateChanged)="onStateChanged($event)">
</mj-query-viewer>

Components

| Component | Selector | Purpose | |-----------|----------|---------| | QueryViewerComponent | mj-query-viewer | Top-level composite; orchestrates params, execution, and grid | | QueryDataGridComponent | mj-query-data-grid | AG Grid wrapper with entity linking and export | | QueryParameterFormComponent | mj-query-parameter-form | Renders input fields for query parameters | | QueryRowDetailComponent | mj-query-row-detail | Expandable row detail display | | QueryInfoPanelComponent | mj-query-info-panel | Query metadata and execution info panel |

QueryViewerComponent API

Inputs

| Property | Type | Default | Description | |----------|------|---------|-------------| | QueryId | string \| null | null | ID of the query to execute | | AutoRun | boolean | false | Auto-run when all required params have saved values | | SelectionMode | QueryGridSelectionMode | 'none' | Row selection mode: 'none', 'single', 'multiple' | | ShowInfoPanel | boolean | false | Show query metadata panel | | ShowRowDetail | boolean | false | Enable expandable row detail | | PersistState | boolean | true | Save grid state (sort, columns) to User Settings | | PersistParams | boolean | true | Save parameter values to User Settings |

Outputs

| Event | Type | Description | |-------|------|-------------| | EntityLinkClick | EventEmitter<QueryEntityLinkClickEvent> | Clickable entity reference in a cell | | SelectionChanged | EventEmitter<QuerySelectionChangedEvent> | Row selection changed | | RowClick | EventEmitter<QueryRowClickEvent> | Row was clicked | | GridStateChanged | EventEmitter<QueryGridStateChangedEvent> | Grid state changed (sort, filter, columns) |

Exported Types

  • QueryGridSelectionMode -- 'none' | 'single' | 'multiple'
  • QueryGridColumnConfig -- Column definition with entity link info
  • QueryGridSortState -- Current sort column and direction
  • QueryGridState -- Full persisted grid state
  • QueryParameterValues -- Map of parameter names to values
  • QueryGridVisualConfig -- Visual configuration options
  • QueryExportOptions -- Export format and configuration
  • QueryRowClickEvent -- Row click event data
  • QueryEntityLinkClickEvent -- Entity link click with entity name and record ID

Utility Functions

  • buildColumnsFromQueryFields(fields) -- Generates column config from query field metadata
  • buildColumnsFromData(data) -- Generates column config by inspecting result data

Dependencies

Related Packages