@memberjunction/ng-dashboards 2.42.1 → 2.44.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.
Files changed (2) hide show
  1. package/README.md +264 -0
  2. package/package.json +6 -6
package/README.md ADDED
@@ -0,0 +1,264 @@
1
+ # @memberjunction/ng-dashboards
2
+
3
+ Angular dashboard components for MemberJunction Explorer, providing comprehensive administrative interfaces for AI operations, entity management, and actions management.
4
+
5
+ ## Purpose and Overview
6
+
7
+ The `@memberjunction/ng-dashboards` package provides a collection of sophisticated Angular dashboard components designed for the MemberJunction Explorer application. These dashboards offer administrative and monitoring capabilities for various aspects of the MemberJunction platform, including:
8
+
9
+ - **AI Dashboard**: Manage AI models, prompts, agents, and monitor AI system execution
10
+ - **Entity Admin Dashboard**: Visualize and manage database entities with ERD diagrams, filtering, and detailed entity information
11
+ - **Actions Management Dashboard**: Configure, monitor, and manage system actions, executions, and scheduled tasks
12
+
13
+ All dashboards extend the `BaseDashboard` class, providing consistent state management, lifecycle hooks, and communication patterns.
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install @memberjunction/ng-dashboards
19
+ ```
20
+
21
+ ## Dependencies
22
+
23
+ ### Peer Dependencies
24
+ - `@angular/common`: 18.0.2
25
+ - `@angular/core`: 18.0.2
26
+ - `@angular/forms`: 18.0.2
27
+
28
+ ### Core Dependencies
29
+ - `@memberjunction/core`: Core MemberJunction utilities and types
30
+ - `@memberjunction/core-entities`: Entity definitions and extended types
31
+ - `@memberjunction/templates-base-types`: Template system base types
32
+ - `@memberjunction/ng-container-directives`: Container directive utilities
33
+ - `@memberjunction/ng-notifications`: Notification system components
34
+ - `@progress/kendo-angular-*`: Kendo UI components for Angular
35
+ - `codemirror`: Code editor integration
36
+ - `d3`: Data visualization library
37
+ - `rxjs`: Reactive extensions for Angular
38
+
39
+ ## Usage
40
+
41
+ ### 1. Import the Module
42
+
43
+ ```typescript
44
+ import { DashboardsModule } from '@memberjunction/ng-dashboards';
45
+
46
+ @NgModule({
47
+ imports: [
48
+ // ... other imports
49
+ DashboardsModule
50
+ ]
51
+ })
52
+ export class YourModule { }
53
+ ```
54
+
55
+ ### 2. Using the AI Dashboard
56
+
57
+ ```typescript
58
+ import { Component } from '@angular/core';
59
+ import { DashboardConfig } from '@memberjunction/ng-dashboards';
60
+
61
+ @Component({
62
+ template: `
63
+ <mj-ai-dashboard
64
+ [Config]="dashboardConfig"
65
+ (LoadingComplete)="onLoadingComplete()"
66
+ (Error)="onError($event)"
67
+ (UserStateChanged)="onStateChanged($event)"
68
+ (OpenEntityRecord)="onOpenRecord($event)">
69
+ </mj-ai-dashboard>
70
+ `
71
+ })
72
+ export class AIManagementComponent {
73
+ dashboardConfig: DashboardConfig = {
74
+ dashboard: dashboardEntity, // DashboardEntityExtended instance
75
+ userState: savedUserState // Optional: Previously saved state
76
+ };
77
+
78
+ onLoadingComplete() {
79
+ console.log('AI Dashboard loaded');
80
+ }
81
+
82
+ onError(error: Error) {
83
+ console.error('Dashboard error:', error);
84
+ }
85
+
86
+ onStateChanged(state: any) {
87
+ // Save user state for persistence
88
+ localStorage.setItem('ai-dashboard-state', JSON.stringify(state));
89
+ }
90
+
91
+ onOpenRecord(event: {EntityName: string, RecordPKey: CompositeKey}) {
92
+ // Handle opening entity records
93
+ }
94
+ }
95
+ ```
96
+
97
+ ### 3. Using the Entity Admin Dashboard
98
+
99
+ ```typescript
100
+ @Component({
101
+ template: `
102
+ <mj-entity-admin-dashboard
103
+ [Config]="dashboardConfig"
104
+ (LoadingComplete)="onLoadingComplete()"
105
+ (UserStateChanged)="onStateChanged($event)">
106
+ </mj-entity-admin-dashboard>
107
+ `
108
+ })
109
+ export class EntityAdminComponent {
110
+ dashboardConfig: DashboardConfig = {
111
+ dashboard: dashboardEntity
112
+ };
113
+ }
114
+ ```
115
+
116
+ ### 4. Using the Actions Management Dashboard
117
+
118
+ ```typescript
119
+ @Component({
120
+ template: `
121
+ <mj-actions-management-dashboard
122
+ [Config]="dashboardConfig"
123
+ (LoadingComplete)="onLoadingComplete()"
124
+ (UserStateChanged)="onStateChanged($event)">
125
+ </mj-actions-management-dashboard>
126
+ `
127
+ })
128
+ export class ActionsManagementComponent {
129
+ dashboardConfig: DashboardConfig = {
130
+ dashboard: dashboardEntity
131
+ };
132
+ }
133
+ ```
134
+
135
+ ## API Documentation
136
+
137
+ ### BaseDashboard Class
138
+
139
+ All dashboards extend the `BaseDashboard` abstract class, which provides:
140
+
141
+ #### Inputs
142
+ - `Config: DashboardConfig` - Dashboard configuration including entity and optional user state
143
+
144
+ #### Outputs
145
+ - `LoadingComplete: EventEmitter<void>` - Emitted when dashboard has finished loading
146
+ - `Error: EventEmitter<Error>` - Emitted when an error occurs
147
+ - `UserStateChanged: EventEmitter<any>` - Emitted when dashboard state changes (for persistence)
148
+ - `Interaction: EventEmitter<any>` - General interaction events
149
+ - `OpenEntityRecord: EventEmitter<{EntityName: string, RecordPKey: CompositeKey}>` - Request to open an entity record
150
+
151
+ #### Methods
152
+ - `Refresh(): void` - Reload dashboard data
153
+ - `SetVisible(visible: boolean): void` - Notify dashboard of visibility changes
154
+
155
+ ### AI Dashboard Components
156
+
157
+ The AI Dashboard includes the following sub-components:
158
+
159
+ - **ModelManagementComponent**: Manage AI models and configurations
160
+ - **PromptManagementComponent**: Create and manage AI prompts
161
+ - **AgentConfigurationComponent**: Configure AI agents
162
+ - **ExecutionMonitoringComponent**: Monitor AI system execution
163
+ - **SystemConfigurationComponent**: Configure system-wide AI settings
164
+
165
+ ### Entity Admin Dashboard Components
166
+
167
+ - **ERDCompositeComponent**: Main ERD visualization and management
168
+ - **EntityFilterPanelComponent**: Filter entities by various criteria
169
+ - **EntityDetailsComponent**: Detailed entity information display
170
+ - **ERDDiagramComponent**: Interactive entity relationship diagram
171
+
172
+ ### Actions Management Dashboard Components
173
+
174
+ - **ActionsOverviewComponent**: Overview of all system actions
175
+ - **ExecutionMonitoringComponent**: Monitor action executions
176
+ - **ScheduledActionsComponent**: Manage scheduled actions
177
+ - **CodeManagementComponent**: Manage action code
178
+ - **EntityIntegrationComponent**: Configure entity integrations
179
+ - **SecurityPermissionsComponent**: Manage action permissions
180
+
181
+ ## Configuration Options
182
+
183
+ ### DashboardConfig Interface
184
+
185
+ ```typescript
186
+ interface DashboardConfig {
187
+ dashboard: DashboardEntityExtended; // Dashboard entity from MemberJunction
188
+ userState?: any; // Optional saved user state
189
+ }
190
+ ```
191
+
192
+ ### State Management
193
+
194
+ Each dashboard maintains its own state structure that can be persisted:
195
+
196
+ #### AI Dashboard State
197
+ ```typescript
198
+ interface AIDashboardState {
199
+ activeTab: string;
200
+ modelManagementState: any;
201
+ promptManagementState: any;
202
+ agentConfigurationState: any;
203
+ executionMonitoringState: any;
204
+ systemConfigurationState: any;
205
+ }
206
+ ```
207
+
208
+ #### Entity Admin Dashboard State
209
+ ```typescript
210
+ interface DashboardState {
211
+ filterPanelVisible: boolean;
212
+ filterPanelWidth: number;
213
+ filters: any;
214
+ selectedEntityId: string | null;
215
+ zoomLevel: number;
216
+ panPosition: { x: number; y: number };
217
+ fieldsSectionExpanded: boolean;
218
+ relationshipsSectionExpanded: boolean;
219
+ }
220
+ ```
221
+
222
+ ## Integration with MemberJunction
223
+
224
+ The dashboards are designed to work seamlessly with other MemberJunction packages:
225
+
226
+ 1. **Entity System**: Uses `@memberjunction/core-entities` for entity definitions
227
+ 2. **Metadata System**: Leverages MemberJunction metadata for dynamic UI generation
228
+ 3. **Template System**: Integrates with `@memberjunction/templates-base-types`
229
+ 4. **Global Registry**: Uses `@RegisterClass` decorator for component registration
230
+
231
+ ## Build and Development
232
+
233
+ ### Building the Package
234
+
235
+ ```bash
236
+ # From the package directory
237
+ npm run build
238
+
239
+ # From the repository root
240
+ turbo build --filter="@memberjunction/ng-dashboards"
241
+ ```
242
+
243
+ ### Development Mode
244
+
245
+ The package includes TypeScript configuration for Angular compilation:
246
+ - Uses Angular compiler (`ngc`) for building
247
+ - Outputs to `./dist` directory
248
+ - Generates type definitions
249
+
250
+ ## Special Considerations
251
+
252
+ 1. **Tree Shaking**: The package includes special tree-shaking prevention calls in `public-api.ts` to ensure all dashboard components are included in builds
253
+
254
+ 2. **Icon Libraries**: Uses Font Awesome icons throughout the UI. Ensure Font Awesome is properly configured in your application
255
+
256
+ 3. **State Persistence**: Dashboard state changes are emitted via `UserStateChanged` events - implement persistence in the parent component
257
+
258
+ 4. **Navigation**: AI and Actions dashboards use bottom navigation patterns with icon-based navigation
259
+
260
+ 5. **Responsive Design**: Dashboards are designed to work across different screen sizes with collapsible panels and responsive layouts
261
+
262
+ ## License
263
+
264
+ ISC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-dashboards",
3
- "version": "2.42.1",
3
+ "version": "2.44.0",
4
4
  "description": "MemberJunction Dashboards",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -25,11 +25,11 @@
25
25
  "@angular/forms": "18.0.2"
26
26
  },
27
27
  "dependencies": {
28
- "@memberjunction/core": "2.42.1",
29
- "@memberjunction/core-entities": "2.42.1",
30
- "@memberjunction/templates-base-types": "2.42.1",
31
- "@memberjunction/ng-container-directives": "2.42.1",
32
- "@memberjunction/ng-notifications": "2.42.1",
28
+ "@memberjunction/core": "2.44.0",
29
+ "@memberjunction/core-entities": "2.44.0",
30
+ "@memberjunction/templates-base-types": "2.44.0",
31
+ "@memberjunction/ng-container-directives": "2.44.0",
32
+ "@memberjunction/ng-notifications": "2.44.0",
33
33
  "@progress/kendo-angular-dropdowns": "16.2.0",
34
34
  "@progress/kendo-angular-navigation": "16.2.0",
35
35
  "@progress/kendo-angular-inputs": "16.2.0",