Skip to content

@memberjunction/ng-action-gallery

A filterable gallery component for browsing and selecting MemberJunction actions, with grid and list views, category navigation, search, and dialog integration.

The Action Gallery provides a rich interface for discovering, browsing, and selecting actions. It features both grid and list view modes, hierarchical category navigation with counts, real-time search filtering, and single or multi-selection support. The gallery integrates with the AI Test Harness for quick action testing.

graph TD
    A[ActionGalleryModule] --> B[ActionGalleryComponent]
    A --> C[ActionGalleryDialogService]

    B --> D[Category Tree Panel]
    B --> E[Grid / List View]
    B --> F[Search & Filter]

    C --> G[Single Selection Dialog]
    C --> H[Multi-Selection Dialog]
    C --> I[Browse-Only Dialog]

    E --> J["Action Cards
    (expandable details)"]
    J --> K[Parameters Display]
    J --> L[Result Codes Display]
    J --> M[Quick Test Button]

    style A fill:#2d6a9f,stroke:#1a4971,color:#fff
    style B fill:#7c5295,stroke:#563a6b,color:#fff
    style C fill:#2d8659,stroke:#1a5c3a,color:#fff
    style E fill:#b8762f,stroke:#8a5722,color:#fff
Terminal window
npm install @memberjunction/ng-action-gallery
import { ActionGalleryModule } from '@memberjunction/ng-action-gallery';
@NgModule({
imports: [ActionGalleryModule]
})
export class YourModule { }
<mj-action-gallery
[config]="galleryConfig"
[preSelectedActions]="selectedIds"
(actionSelected)="onActionSelected($event)"
(actionsSelected)="onActionsSelected($event)"
(actionTestRequested)="onTestRequested($event)">
</mj-action-gallery>
galleryConfig: ActionGalleryConfig = {
selectionMode: true,
multiSelect: true,
showCategories: true,
showSearch: true,
defaultView: 'grid',
gridColumns: 3,
enableQuickTest: true,
theme: 'light'
};
import { ActionGalleryDialogService } from '@memberjunction/ng-action-gallery';
constructor(private actionGallery: ActionGalleryDialogService) {}
// Single selection
selectSingleAction() {
this.actionGallery.openForSingleSelection({
title: 'Select an Action',
showCategories: true,
enableQuickTest: true
}).subscribe(action => {
if (action) {
console.log('Selected:', action);
}
});
}
// Multi-selection
selectMultipleActions() {
this.actionGallery.openForMultiSelection({
title: 'Select Actions',
preSelectedActions: ['id1', 'id2'],
submitButtonText: 'Add Selected Actions'
}).subscribe(actions => {
console.log('Selected actions:', actions);
});
}
// Browse only (no selection)
browseActions() {
this.actionGallery.openForBrowsing({
title: 'Action Browser',
enableQuickTest: true
});
}
PropertyTypeDefaultDescription
selectionModebooleanfalseEnable selection mode
multiSelectbooleanfalseAllow multiple selections
showCategoriesbooleantrueShow category sidebar
showSearchbooleantrueShow search bar
defaultView'grid' | 'list''grid'Default view mode
gridColumnsnumber3Number of grid columns
enableQuickTestbooleantrueShow test buttons
theme'light' | 'dark''light'Visual theme

Extends ActionGalleryConfig with:

PropertyTypeDefaultDescription
titlestring'Select Actions'Dialog title
widthnumber1200Dialog width
heightnumber800Dialog height
submitButtonTextstring'Select'Submit button text
cancelButtonTextstring'Cancel'Cancel button text
preSelectedActionsstring[][]Pre-selected action IDs
  • Hierarchical category tree with action counts per category
  • Collapsible/expandable nodes
  • “All Actions” and “Uncategorized” special categories

Each action displays as an expandable card showing:

  • Action name and icon with category badge
  • Description text
  • Quick test button (if enabled)
  • Expanded details with parameters (types and required status) and result codes

Real-time search across action names, descriptions, and categories.

  • Grid View: Visual cards in a responsive grid layout
  • List View: Compact table format for scanning many actions
enableQuickTest: true
onTestRequested(action: ActionEntity) {
this.testHarness.openForAction(action.ID).subscribe(result => {
console.log('Test result:', result);
});
}
:root {
--gallery-primary: #007bff;
--gallery-hover: #0056b3;
--gallery-selected: #e3f2fd;
--gallery-background: #ffffff;
--gallery-text: #212529;
--gallery-border: #dee2e6;
}
PackageDescription
@memberjunction/coreCore framework
@memberjunction/core-entitiesEntity type definitions
@memberjunction/ng-ai-test-harnessAI test harness integration
@memberjunction/ng-container-directivesLayout directives
@memberjunction/ng-shared-genericShared generic components
@progress/kendo-angular-*Kendo UI components
  • @angular/common ^21.x
  • @angular/core ^21.x
  • @angular/forms ^21.x
  • @angular/animations ^21.x
Terminal window
cd packages/Angular/Generic/action-gallery
npm run build

ISC