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-join-grid

v5.3.1

Published

MemberJunction: Grid component that is able to display/edit the relationship between two entities. For example being able to edit Users + Roles in a single grid.

Readme

@memberjunction/ng-join-grid

A checkbox-based grid component for managing many-to-many entity relationships in MemberJunction applications. Supports both junction entity record creation/deletion and direct field editing modes.

Installation

npm install @memberjunction/ng-join-grid

Overview

The Join Grid displays rows from one entity against columns from another, with checkboxes at each intersection. Checking a box creates a record in the junction entity; unchecking deletes it. An alternative Fields mode allows editing field values directly in related records. All changes are batched in transaction groups for atomic saves.

flowchart LR
    subgraph Rows["Row Entity"]
        R1["User A"]
        R2["User B"]
        R3["User C"]
    end
    subgraph Grid["Join Grid"]
        G["Checkbox Matrix"]
    end
    subgraph Cols["Column Entity"]
        C1["Role 1"]
        C2["Role 2"]
    end
    subgraph Junction["Junction Entity"]
        J["UserRoles records"]
    end

    R1 --> G
    R2 --> G
    R3 --> G
    C1 --> G
    C2 --> G
    G -->|create/delete| J

    style Rows fill:#2d6a9f,stroke:#1a4971,color:#fff
    style Grid fill:#7c5295,stroke:#563a6b,color:#fff
    style Cols fill:#2d8659,stroke:#1a5c3a,color:#fff
    style Junction fill:#b8762f,stroke:#8a5722,color:#fff

Usage

Module Import

import { JoinGridModule } from '@memberjunction/ng-join-grid';

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

Entity Mode (Many-to-Many)

<mj-join-grid
  [RowsEntityName]="'Users'"
  [RowsEntityDisplayField]="'UserName'"
  [ColumnsEntityName]="'Roles'"
  [ColumnsEntityDisplayField]="'RoleName'"
  [JoinEntityName]="'UserRoles'"
  [JoinEntityRowForeignKey]="'UserID'"
  [JoinEntityColumnForeignKey]="'RoleID'"
  [CheckBoxValueMode]="'RecordExists'"
  [ShowSaveButton]="true"
  [ShowCancelButton]="true">
</mj-join-grid>

Fields Mode (Direct Editing)

<mj-join-grid
  [RowsEntityName]="'Users'"
  [RowsEntityDisplayField]="'UserName'"
  [ColumnsMode]="'Fields'"
  [JoinEntityName]="'UserPreferences'"
  [JoinEntityRowForeignKey]="'UserID'"
  [JoinEntityDisplayColumns]="['PreferenceType', 'PreferenceValue']"
  [ShowSaveButton]="true">
</mj-join-grid>

Operation Modes

| Mode | CheckBoxValueMode | Behavior | |------|---------------------|----------| | Entity + RecordExists | 'RecordExists' | Checkbox creates/deletes junction records | | Entity + ColumnValue | 'ColumnValue' | Checkbox toggles a boolean field on existing records | | Fields | N/A | Displays and edits field values in the join entity |

Key Inputs

Row Configuration

| Input | Type | Default | Description | |-------|------|---------|-------------| | RowsEntityName | string | -- | Entity for rows (required) | | RowsEntityDisplayField | string | -- | Field to display in first column (required) | | RowsEntityDataSource | 'FullEntity' \| 'ViewName' \| 'Array' | 'FullEntity' | Data source type | | RowsExtraFilter | string | -- | SQL filter for rows | | RowsOrderBy | string | -- | SQL order by for rows |

Column Configuration

| Input | Type | Default | Description | |-------|------|---------|-------------| | ColumnsMode | 'Entity' \| 'Fields' | 'Entity' | Column generation mode | | ColumnsEntityName | string | -- | Entity for columns (Entity mode) | | ColumnsEntityDisplayField | string | -- | Field for column headers |

Join Entity Configuration

| Input | Type | Default | Description | |-------|------|---------|-------------| | JoinEntityName | string | -- | Junction entity name (required) | | JoinEntityRowForeignKey | string | -- | FK linking to row entity (required) | | JoinEntityColumnForeignKey | string | -- | FK linking to column entity (required) | | CheckBoxValueMode | 'RecordExists' \| 'ColumnValue' | 'RecordExists' | How checkbox state is determined | | EditMode | 'None' \| 'Save' \| 'Queue' | 'None' | Editing mode for form integration |

Public Methods

| Method | Returns | Description | |--------|---------|-------------| | Refresh() | Promise<void> | Reload all grid data | | Save() | Promise<boolean> | Save all pending changes | | CancelEdit() | void | Cancel pending changes |

Exported Classes

  • JoinGridCell -- Represents a single cell in the grid
  • JoinGridRow -- Represents a row with column data

Dependencies