@memberjunction/ng-action-gallery 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -97
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,21 +1,35 @@
|
|
|
1
1
|
# @memberjunction/ng-action-gallery
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A filterable gallery component for browsing and selecting MemberJunction actions, with grid and list views, category navigation, search, and dialog integration.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
The Action Gallery provides
|
|
7
|
+
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.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```mermaid
|
|
10
|
+
graph TD
|
|
11
|
+
A[ActionGalleryModule] --> B[ActionGalleryComponent]
|
|
12
|
+
A --> C[ActionGalleryDialogService]
|
|
13
|
+
|
|
14
|
+
B --> D[Category Tree Panel]
|
|
15
|
+
B --> E[Grid / List View]
|
|
16
|
+
B --> F[Search & Filter]
|
|
17
|
+
|
|
18
|
+
C --> G[Single Selection Dialog]
|
|
19
|
+
C --> H[Multi-Selection Dialog]
|
|
20
|
+
C --> I[Browse-Only Dialog]
|
|
10
21
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
E --> J["Action Cards
|
|
23
|
+
(expandable details)"]
|
|
24
|
+
J --> K[Parameters Display]
|
|
25
|
+
J --> L[Result Codes Display]
|
|
26
|
+
J --> M[Quick Test Button]
|
|
27
|
+
|
|
28
|
+
style A fill:#2d6a9f,stroke:#1a4971,color:#fff
|
|
29
|
+
style B fill:#7c5295,stroke:#563a6b,color:#fff
|
|
30
|
+
style C fill:#2d8659,stroke:#1a5c3a,color:#fff
|
|
31
|
+
style E fill:#b8762f,stroke:#8a5722,color:#fff
|
|
32
|
+
```
|
|
19
33
|
|
|
20
34
|
## Installation
|
|
21
35
|
|
|
@@ -31,20 +45,15 @@ npm install @memberjunction/ng-action-gallery
|
|
|
31
45
|
import { ActionGalleryModule } from '@memberjunction/ng-action-gallery';
|
|
32
46
|
|
|
33
47
|
@NgModule({
|
|
34
|
-
imports: [
|
|
35
|
-
ActionGalleryModule,
|
|
36
|
-
// ... other imports
|
|
37
|
-
]
|
|
48
|
+
imports: [ActionGalleryModule]
|
|
38
49
|
})
|
|
39
50
|
export class YourModule { }
|
|
40
51
|
```
|
|
41
52
|
|
|
42
|
-
###
|
|
43
|
-
|
|
44
|
-
#### Standalone Gallery
|
|
53
|
+
### Standalone Gallery
|
|
45
54
|
|
|
46
55
|
```html
|
|
47
|
-
<mj-action-gallery
|
|
56
|
+
<mj-action-gallery
|
|
48
57
|
[config]="galleryConfig"
|
|
49
58
|
[preSelectedActions]="selectedIds"
|
|
50
59
|
(actionSelected)="onActionSelected($event)"
|
|
@@ -64,19 +73,9 @@ galleryConfig: ActionGalleryConfig = {
|
|
|
64
73
|
enableQuickTest: true,
|
|
65
74
|
theme: 'light'
|
|
66
75
|
};
|
|
67
|
-
|
|
68
|
-
selectedIds = ['action-id-1', 'action-id-2'];
|
|
69
|
-
|
|
70
|
-
onActionSelected(action: ActionEntity) {
|
|
71
|
-
console.log('Selected action:', action);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
onActionsSelected(actions: ActionEntity[]) {
|
|
75
|
-
console.log('Selected actions:', actions);
|
|
76
|
-
}
|
|
77
76
|
```
|
|
78
77
|
|
|
79
|
-
|
|
78
|
+
### Dialog Mode
|
|
80
79
|
|
|
81
80
|
```typescript
|
|
82
81
|
import { ActionGalleryDialogService } from '@memberjunction/ng-action-gallery';
|
|
@@ -101,7 +100,6 @@ selectMultipleActions() {
|
|
|
101
100
|
this.actionGallery.openForMultiSelection({
|
|
102
101
|
title: 'Select Actions',
|
|
103
102
|
preSelectedActions: ['id1', 'id2'],
|
|
104
|
-
showCategories: true,
|
|
105
103
|
submitButtonText: 'Add Selected Actions'
|
|
106
104
|
}).subscribe(actions => {
|
|
107
105
|
console.log('Selected actions:', actions);
|
|
@@ -123,14 +121,14 @@ browseActions() {
|
|
|
123
121
|
|
|
124
122
|
| Property | Type | Default | Description |
|
|
125
123
|
|----------|------|---------|-------------|
|
|
126
|
-
| selectionMode | `boolean` | `false` | Enable selection mode |
|
|
127
|
-
| multiSelect | `boolean` | `false` | Allow multiple selections |
|
|
128
|
-
| showCategories | `boolean` | `true` | Show category sidebar |
|
|
129
|
-
| showSearch | `boolean` | `true` | Show search bar |
|
|
130
|
-
| defaultView | `'grid' \| 'list'` | `'grid'` | Default view mode |
|
|
131
|
-
| gridColumns | `number` | `3` | Number of grid columns |
|
|
132
|
-
| enableQuickTest | `boolean` | `true` | Show test buttons |
|
|
133
|
-
| theme | `'light' \| 'dark'` | `'light'` | Visual theme |
|
|
124
|
+
| `selectionMode` | `boolean` | `false` | Enable selection mode |
|
|
125
|
+
| `multiSelect` | `boolean` | `false` | Allow multiple selections |
|
|
126
|
+
| `showCategories` | `boolean` | `true` | Show category sidebar |
|
|
127
|
+
| `showSearch` | `boolean` | `true` | Show search bar |
|
|
128
|
+
| `defaultView` | `'grid' \| 'list'` | `'grid'` | Default view mode |
|
|
129
|
+
| `gridColumns` | `number` | `3` | Number of grid columns |
|
|
130
|
+
| `enableQuickTest` | `boolean` | `true` | Show test buttons |
|
|
131
|
+
| `theme` | `'light' \| 'dark'` | `'light'` | Visual theme |
|
|
134
132
|
|
|
135
133
|
### ActionGalleryDialogConfig
|
|
136
134
|
|
|
@@ -138,70 +136,43 @@ Extends `ActionGalleryConfig` with:
|
|
|
138
136
|
|
|
139
137
|
| Property | Type | Default | Description |
|
|
140
138
|
|----------|------|---------|-------------|
|
|
141
|
-
| title | `string` | `'Select Actions'` | Dialog title |
|
|
142
|
-
| width | `number` | `1200` | Dialog width |
|
|
143
|
-
| height | `number` | `800` | Dialog height |
|
|
144
|
-
| submitButtonText | `string` | `'Select'` | Submit button text |
|
|
145
|
-
| cancelButtonText | `string` | `'Cancel'` | Cancel button text |
|
|
146
|
-
| preSelectedActions | `string[]` | `[]` | Pre-selected action IDs |
|
|
139
|
+
| `title` | `string` | `'Select Actions'` | Dialog title |
|
|
140
|
+
| `width` | `number` | `1200` | Dialog width |
|
|
141
|
+
| `height` | `number` | `800` | Dialog height |
|
|
142
|
+
| `submitButtonText` | `string` | `'Select'` | Submit button text |
|
|
143
|
+
| `cancelButtonText` | `string` | `'Cancel'` | Cancel button text |
|
|
144
|
+
| `preSelectedActions` | `string[]` | `[]` | Pre-selected action IDs |
|
|
147
145
|
|
|
148
|
-
## Features
|
|
146
|
+
## Features
|
|
149
147
|
|
|
150
148
|
### Category Navigation
|
|
151
149
|
|
|
152
|
-
|
|
153
|
-
- Shows action counts per category
|
|
154
|
-
- Supports nested categories
|
|
150
|
+
- Hierarchical category tree with action counts per category
|
|
155
151
|
- Collapsible/expandable nodes
|
|
156
152
|
- "All Actions" and "Uncategorized" special categories
|
|
157
153
|
|
|
158
154
|
### Action Cards
|
|
159
155
|
|
|
160
|
-
Each action
|
|
161
|
-
- Action name and icon
|
|
162
|
-
-
|
|
163
|
-
- Description
|
|
156
|
+
Each action displays as an expandable card showing:
|
|
157
|
+
- Action name and icon with category badge
|
|
158
|
+
- Description text
|
|
164
159
|
- Quick test button (if enabled)
|
|
165
|
-
- Expanded details
|
|
166
|
-
- Parameters with types and required status
|
|
167
|
-
- Result codes with descriptions
|
|
160
|
+
- Expanded details with parameters (types and required status) and result codes
|
|
168
161
|
|
|
169
162
|
### Search and Filtering
|
|
170
163
|
|
|
171
|
-
Real-time search across
|
|
172
|
-
- Action names
|
|
173
|
-
- Descriptions
|
|
174
|
-
- Categories
|
|
164
|
+
Real-time search across action names, descriptions, and categories.
|
|
175
165
|
|
|
176
166
|
### View Modes
|
|
177
167
|
|
|
178
|
-
**Grid View**: Visual cards in a responsive grid layout
|
|
179
|
-
**List View**: Compact table format for scanning many actions
|
|
180
|
-
|
|
181
|
-
## Styling
|
|
182
|
-
|
|
183
|
-
The component uses CSS custom properties for theming:
|
|
184
|
-
|
|
185
|
-
```scss
|
|
186
|
-
:root {
|
|
187
|
-
--gallery-primary: #007bff;
|
|
188
|
-
--gallery-hover: #0056b3;
|
|
189
|
-
--gallery-selected: #e3f2fd;
|
|
190
|
-
--gallery-background: #ffffff;
|
|
191
|
-
--gallery-text: #212529;
|
|
192
|
-
--gallery-border: #dee2e6;
|
|
193
|
-
}
|
|
194
|
-
```
|
|
168
|
+
- **Grid View**: Visual cards in a responsive grid layout
|
|
169
|
+
- **List View**: Compact table format for scanning many actions
|
|
195
170
|
|
|
196
171
|
## Integration with AI Test Harness
|
|
197
172
|
|
|
198
|
-
The Action Gallery integrates seamlessly with the AI Test Harness:
|
|
199
|
-
|
|
200
173
|
```typescript
|
|
201
|
-
// In gallery configuration
|
|
202
174
|
enableQuickTest: true
|
|
203
175
|
|
|
204
|
-
// Handle test requests
|
|
205
176
|
onTestRequested(action: ActionEntity) {
|
|
206
177
|
this.testHarness.openForAction(action.ID).subscribe(result => {
|
|
207
178
|
console.log('Test result:', result);
|
|
@@ -209,29 +180,44 @@ onTestRequested(action: ActionEntity) {
|
|
|
209
180
|
}
|
|
210
181
|
```
|
|
211
182
|
|
|
212
|
-
##
|
|
183
|
+
## CSS Customization
|
|
213
184
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
-
|
|
217
|
-
-
|
|
185
|
+
```scss
|
|
186
|
+
:root {
|
|
187
|
+
--gallery-primary: #007bff;
|
|
188
|
+
--gallery-hover: #0056b3;
|
|
189
|
+
--gallery-selected: #e3f2fd;
|
|
190
|
+
--gallery-background: #ffffff;
|
|
191
|
+
--gallery-text: #212529;
|
|
192
|
+
--gallery-border: #dee2e6;
|
|
193
|
+
}
|
|
194
|
+
```
|
|
218
195
|
|
|
219
196
|
## Dependencies
|
|
220
197
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
-
|
|
198
|
+
| Package | Description |
|
|
199
|
+
|---------|-------------|
|
|
200
|
+
| `@memberjunction/core` | Core framework |
|
|
201
|
+
| `@memberjunction/core-entities` | Entity type definitions |
|
|
202
|
+
| `@memberjunction/ng-ai-test-harness` | AI test harness integration |
|
|
203
|
+
| `@memberjunction/ng-container-directives` | Layout directives |
|
|
204
|
+
| `@memberjunction/ng-shared-generic` | Shared generic components |
|
|
205
|
+
| `@progress/kendo-angular-*` | Kendo UI components |
|
|
226
206
|
|
|
227
|
-
|
|
207
|
+
### Peer Dependencies
|
|
228
208
|
|
|
229
|
-
|
|
209
|
+
- `@angular/common` ^21.x
|
|
210
|
+
- `@angular/core` ^21.x
|
|
211
|
+
- `@angular/forms` ^21.x
|
|
212
|
+
- `@angular/animations` ^21.x
|
|
230
213
|
|
|
231
|
-
##
|
|
214
|
+
## Build
|
|
232
215
|
|
|
233
|
-
|
|
216
|
+
```bash
|
|
217
|
+
cd packages/Angular/Generic/action-gallery
|
|
218
|
+
npm run build
|
|
219
|
+
```
|
|
234
220
|
|
|
235
|
-
##
|
|
221
|
+
## License
|
|
236
222
|
|
|
237
|
-
|
|
223
|
+
ISC
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-action-gallery",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "MemberJunction Action Gallery - A beautiful, filterable gallery component for browsing and selecting actions",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"@angular/animations": "21.1.3"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@memberjunction/core": "4.
|
|
35
|
-
"@memberjunction/core-entities": "4.
|
|
36
|
-
"@memberjunction/ng-ai-test-harness": "4.
|
|
37
|
-
"@memberjunction/ng-container-directives": "4.
|
|
38
|
-
"@memberjunction/ng-shared-generic": "4.
|
|
34
|
+
"@memberjunction/core": "4.1.0",
|
|
35
|
+
"@memberjunction/core-entities": "4.1.0",
|
|
36
|
+
"@memberjunction/ng-ai-test-harness": "4.1.0",
|
|
37
|
+
"@memberjunction/ng-container-directives": "4.1.0",
|
|
38
|
+
"@memberjunction/ng-shared-generic": "4.1.0",
|
|
39
39
|
"@progress/kendo-angular-buttons": "22.0.1",
|
|
40
40
|
"@progress/kendo-angular-dialog": "22.0.1",
|
|
41
41
|
"@progress/kendo-angular-dropdowns": "22.0.1",
|