@memberjunction/ng-explorer-core 3.3.0 → 3.4.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 +335 -0
- package/dist/lib/shell/shell.component.d.ts +47 -2
- package/dist/lib/shell/shell.component.d.ts.map +1 -1
- package/dist/lib/shell/shell.component.js +239 -64
- package/dist/lib/shell/shell.component.js.map +1 -1
- package/dist/lib/single-search-result/single-search-result.component.d.ts +2 -5
- package/dist/lib/single-search-result/single-search-result.component.d.ts.map +1 -1
- package/dist/lib/single-search-result/single-search-result.component.js +8 -24
- package/dist/lib/single-search-result/single-search-result.component.js.map +1 -1
- package/dist/lib/user-menu/base-user-menu.d.ts +141 -0
- package/dist/lib/user-menu/base-user-menu.d.ts.map +1 -0
- package/dist/lib/user-menu/base-user-menu.js +384 -0
- package/dist/lib/user-menu/base-user-menu.js.map +1 -0
- package/dist/lib/user-menu/index.d.ts +3 -0
- package/dist/lib/user-menu/index.d.ts.map +1 -0
- package/dist/lib/user-menu/index.js +3 -0
- package/dist/lib/user-menu/index.js.map +1 -0
- package/dist/lib/user-menu/user-menu.types.d.ts +121 -0
- package/dist/lib/user-menu/user-menu.types.d.ts.map +1 -0
- package/dist/lib/user-menu/user-menu.types.js +13 -0
- package/dist/lib/user-menu/user-menu.types.js.map +1 -0
- package/dist/module.d.ts +22 -24
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +0 -8
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +1 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +2 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +35 -37
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
8
|
+
/**
|
|
9
|
+
* Base class for user menu implementations with built-in default behavior.
|
|
10
|
+
*
|
|
11
|
+
* This class provides the standard MemberJunction user menu. To customize:
|
|
12
|
+
* 1. Create a subclass
|
|
13
|
+
* 2. Register with @RegisterClass(BaseUserMenu)
|
|
14
|
+
* 3. Override methods as needed
|
|
15
|
+
*
|
|
16
|
+
* Subclasses automatically get higher priority via compiler order since they
|
|
17
|
+
* import this class, causing their @RegisterClass to execute after this one.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* // In your custom app
|
|
22
|
+
* import { BaseUserMenu } from '@memberjunction/ng-explorer-core';
|
|
23
|
+
*
|
|
24
|
+
* @RegisterClass(BaseUserMenu)
|
|
25
|
+
* export class MyAppUserMenu extends BaseUserMenu {
|
|
26
|
+
* public override GetMenuItems(): UserMenuItem[] {
|
|
27
|
+
* const items = super.GetMenuItems();
|
|
28
|
+
* // Add, remove, or modify items
|
|
29
|
+
* items.push({ id: 'custom', label: 'My Custom Action', ... });
|
|
30
|
+
* return items;
|
|
31
|
+
* }
|
|
32
|
+
*
|
|
33
|
+
* protected override async Handle_custom(): Promise<UserMenuActionResult> {
|
|
34
|
+
* // Handle the custom action
|
|
35
|
+
* return { success: true, closeMenu: true };
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
let BaseUserMenu = class BaseUserMenu {
|
|
41
|
+
_context = null;
|
|
42
|
+
_options;
|
|
43
|
+
constructor() {
|
|
44
|
+
this._options = this.GetDefaultOptions();
|
|
45
|
+
}
|
|
46
|
+
// ========================================
|
|
47
|
+
// INITIALIZATION
|
|
48
|
+
// ========================================
|
|
49
|
+
/**
|
|
50
|
+
* Initialize the menu with context. Called by shell component.
|
|
51
|
+
*/
|
|
52
|
+
async Initialize(context) {
|
|
53
|
+
this._context = context;
|
|
54
|
+
await this.OnInitialize(context);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Override to perform custom initialization
|
|
58
|
+
*/
|
|
59
|
+
async OnInitialize(context) {
|
|
60
|
+
// Override in subclass for custom initialization
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Cleanup when menu is destroyed
|
|
64
|
+
*/
|
|
65
|
+
Destroy() {
|
|
66
|
+
this._context = null;
|
|
67
|
+
}
|
|
68
|
+
// ========================================
|
|
69
|
+
// OPTIONS
|
|
70
|
+
// ========================================
|
|
71
|
+
/**
|
|
72
|
+
* Get default menu configuration options
|
|
73
|
+
*/
|
|
74
|
+
GetDefaultOptions() {
|
|
75
|
+
return {
|
|
76
|
+
showUserName: true,
|
|
77
|
+
showUserEmail: true,
|
|
78
|
+
menuPosition: 'below-left',
|
|
79
|
+
animationStyle: 'fade'
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get current menu options
|
|
84
|
+
*/
|
|
85
|
+
GetOptions() {
|
|
86
|
+
return { ...this._options };
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Update menu options
|
|
90
|
+
*/
|
|
91
|
+
SetOptions(options) {
|
|
92
|
+
this._options = { ...this._options, ...options };
|
|
93
|
+
}
|
|
94
|
+
// ========================================
|
|
95
|
+
// MENU ITEMS - Override to customize
|
|
96
|
+
// ========================================
|
|
97
|
+
/**
|
|
98
|
+
* Get all menu items. Override to customize the menu structure.
|
|
99
|
+
*
|
|
100
|
+
* Items are grouped by the `group` property with dividers between groups.
|
|
101
|
+
* Groups are rendered in this order: primary, developer, system, danger.
|
|
102
|
+
*
|
|
103
|
+
* Developer-only items are automatically hidden unless the user has
|
|
104
|
+
* Developer role AND developer mode is enabled.
|
|
105
|
+
*/
|
|
106
|
+
GetMenuItems() {
|
|
107
|
+
const devModeEnabled = this._context?.developerModeEnabled ?? false;
|
|
108
|
+
return [
|
|
109
|
+
// === PRIMARY GROUP ===
|
|
110
|
+
{
|
|
111
|
+
id: 'profile',
|
|
112
|
+
label: 'My Profile',
|
|
113
|
+
icon: 'fa-solid fa-user-circle',
|
|
114
|
+
group: 'primary',
|
|
115
|
+
order: 10,
|
|
116
|
+
developerOnly: false,
|
|
117
|
+
visible: true,
|
|
118
|
+
enabled: true,
|
|
119
|
+
tooltip: 'View and edit your profile'
|
|
120
|
+
},
|
|
121
|
+
// === DEVELOPER GROUP (Only visible to developers) ===
|
|
122
|
+
{
|
|
123
|
+
id: 'toggle-dev-mode',
|
|
124
|
+
label: devModeEnabled ? 'Developer Mode (On)' : 'Developer Mode (Off)',
|
|
125
|
+
icon: devModeEnabled ? 'fa-solid fa-toggle-on' : 'fa-solid fa-toggle-off',
|
|
126
|
+
color: devModeEnabled ? '#4CAF50' : undefined,
|
|
127
|
+
group: 'developer',
|
|
128
|
+
order: 10,
|
|
129
|
+
developerOnly: true,
|
|
130
|
+
visible: true,
|
|
131
|
+
enabled: true,
|
|
132
|
+
tooltip: 'Toggle developer tools visibility'
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: 'log-layout',
|
|
136
|
+
label: 'Log Layout (Debug)',
|
|
137
|
+
icon: 'fa-solid fa-terminal',
|
|
138
|
+
group: 'developer',
|
|
139
|
+
order: 20,
|
|
140
|
+
developerOnly: true,
|
|
141
|
+
visible: devModeEnabled,
|
|
142
|
+
enabled: true,
|
|
143
|
+
tooltip: 'Output current layout configuration to console'
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 'inspect-state',
|
|
147
|
+
label: 'Inspect App State',
|
|
148
|
+
icon: 'fa-solid fa-magnifying-glass-chart',
|
|
149
|
+
group: 'developer',
|
|
150
|
+
order: 30,
|
|
151
|
+
developerOnly: true,
|
|
152
|
+
visible: devModeEnabled,
|
|
153
|
+
enabled: true,
|
|
154
|
+
tooltip: 'View current application state in console'
|
|
155
|
+
},
|
|
156
|
+
// === SYSTEM GROUP ===
|
|
157
|
+
{
|
|
158
|
+
id: 'reset-layout',
|
|
159
|
+
label: 'Reset Layout',
|
|
160
|
+
icon: 'fa-solid fa-rotate-left',
|
|
161
|
+
group: 'system',
|
|
162
|
+
order: 10,
|
|
163
|
+
developerOnly: false,
|
|
164
|
+
visible: true,
|
|
165
|
+
enabled: true,
|
|
166
|
+
tooltip: 'Reset workspace to default layout'
|
|
167
|
+
},
|
|
168
|
+
// === DANGER GROUP ===
|
|
169
|
+
{
|
|
170
|
+
id: 'logout',
|
|
171
|
+
label: 'Sign Out',
|
|
172
|
+
icon: 'fa-solid fa-sign-out-alt',
|
|
173
|
+
color: '#c62828',
|
|
174
|
+
cssClass: 'danger',
|
|
175
|
+
group: 'danger',
|
|
176
|
+
order: 100,
|
|
177
|
+
developerOnly: false,
|
|
178
|
+
visible: true,
|
|
179
|
+
enabled: true
|
|
180
|
+
}
|
|
181
|
+
];
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Get the complete menu element list including dividers between groups.
|
|
185
|
+
* This is called by the template to render the menu.
|
|
186
|
+
*/
|
|
187
|
+
GetMenuElements() {
|
|
188
|
+
const items = this.GetMenuItems();
|
|
189
|
+
const visibleItems = items.filter(item => this.IsItemVisible(item));
|
|
190
|
+
// Group items
|
|
191
|
+
const groups = this.GroupItems(visibleItems);
|
|
192
|
+
const elements = [];
|
|
193
|
+
// Define group order
|
|
194
|
+
const groupOrder = ['primary', 'developer', 'system', 'danger'];
|
|
195
|
+
const sortedGroupKeys = Object.keys(groups).sort((a, b) => {
|
|
196
|
+
const aIndex = groupOrder.indexOf(a);
|
|
197
|
+
const bIndex = groupOrder.indexOf(b);
|
|
198
|
+
return (aIndex === -1 ? 999 : aIndex) - (bIndex === -1 ? 999 : bIndex);
|
|
199
|
+
});
|
|
200
|
+
// Build element list with dividers
|
|
201
|
+
sortedGroupKeys.forEach((group, index) => {
|
|
202
|
+
if (index > 0) {
|
|
203
|
+
elements.push({ type: 'divider', group });
|
|
204
|
+
}
|
|
205
|
+
// Sort items within group by order
|
|
206
|
+
const groupItems = groups[group].sort((a, b) => a.order - b.order);
|
|
207
|
+
elements.push(...groupItems);
|
|
208
|
+
});
|
|
209
|
+
return elements;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Check if a menu item should be visible based on current context
|
|
213
|
+
*/
|
|
214
|
+
IsItemVisible(item) {
|
|
215
|
+
// Check developer-only visibility
|
|
216
|
+
if (item.developerOnly && !this._context?.isDeveloper) {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
// Check item's own visible flag
|
|
220
|
+
return item.visible;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Group items by their group property
|
|
224
|
+
*/
|
|
225
|
+
GroupItems(items) {
|
|
226
|
+
return items.reduce((groups, item) => {
|
|
227
|
+
const group = item.group || 'primary';
|
|
228
|
+
if (!groups[group]) {
|
|
229
|
+
groups[group] = [];
|
|
230
|
+
}
|
|
231
|
+
groups[group].push(item);
|
|
232
|
+
return groups;
|
|
233
|
+
}, {});
|
|
234
|
+
}
|
|
235
|
+
// ========================================
|
|
236
|
+
// CLICK HANDLING
|
|
237
|
+
// ========================================
|
|
238
|
+
/**
|
|
239
|
+
* Handle menu item click. Dispatches to specific Handle_<id> methods.
|
|
240
|
+
*/
|
|
241
|
+
async HandleItemClick(itemId) {
|
|
242
|
+
const items = this.GetMenuItems();
|
|
243
|
+
const item = items.find(i => i.id === itemId);
|
|
244
|
+
if (!item || !item.enabled) {
|
|
245
|
+
return { success: false, closeMenu: false, message: 'Item not found or disabled' };
|
|
246
|
+
}
|
|
247
|
+
// Convert item id to handler method name (e.g., 'toggle-dev-mode' -> 'Handle_toggle_dev_mode')
|
|
248
|
+
const handlerName = `Handle_${itemId.replace(/-/g, '_')}`;
|
|
249
|
+
if (typeof this[handlerName] === 'function') {
|
|
250
|
+
return await this[handlerName].call(this);
|
|
251
|
+
}
|
|
252
|
+
// Fall back to generic handler
|
|
253
|
+
return await this.OnItemClick(item);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Generic click handler for items without specific handlers.
|
|
257
|
+
* Override for custom default behavior.
|
|
258
|
+
*/
|
|
259
|
+
async OnItemClick(item) {
|
|
260
|
+
console.warn(`No handler defined for menu item: ${item.id}`);
|
|
261
|
+
return { success: false, closeMenu: true };
|
|
262
|
+
}
|
|
263
|
+
// ========================================
|
|
264
|
+
// DEFAULT HANDLERS - Override to customize
|
|
265
|
+
// ========================================
|
|
266
|
+
/**
|
|
267
|
+
* Handle "My Profile" click - Opens user profile/settings
|
|
268
|
+
*/
|
|
269
|
+
async Handle_profile() {
|
|
270
|
+
if (this._context?.openSettings) {
|
|
271
|
+
this._context.openSettings();
|
|
272
|
+
}
|
|
273
|
+
return { success: true, closeMenu: true };
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Handle "Toggle Developer Mode" click
|
|
277
|
+
*/
|
|
278
|
+
async Handle_toggle_dev_mode() {
|
|
279
|
+
// This will be handled by the shell component which has access to DeveloperModeService
|
|
280
|
+
// The result signals that the menu should refresh to show the updated state
|
|
281
|
+
return {
|
|
282
|
+
success: true,
|
|
283
|
+
closeMenu: false, // Keep menu open to see updated state
|
|
284
|
+
message: 'toggle-dev-mode' // Special signal for shell to handle
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Handle "Log Layout" click - Debug utility
|
|
289
|
+
*/
|
|
290
|
+
async Handle_log_layout() {
|
|
291
|
+
if (!this._context?.workspaceManager) {
|
|
292
|
+
return { success: false, closeMenu: true, message: 'Workspace manager not available' };
|
|
293
|
+
}
|
|
294
|
+
const config = this._context.workspaceManager.GetConfiguration();
|
|
295
|
+
console.log('📋 Workspace Configuration:', JSON.stringify(config, null, 2));
|
|
296
|
+
console.log('📋 Workspace Configuration (object):', config);
|
|
297
|
+
return { success: true, closeMenu: true };
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Handle "Inspect App State" click - Debug utility
|
|
301
|
+
*/
|
|
302
|
+
async Handle_inspect_state() {
|
|
303
|
+
console.group('🔍 Application State Inspection');
|
|
304
|
+
console.log('User:', this._context?.userEntity);
|
|
305
|
+
console.log('Current App:', this._context?.currentApplication);
|
|
306
|
+
console.log('Developer Mode:', this._context?.developerModeEnabled);
|
|
307
|
+
console.log('Is Developer:', this._context?.isDeveloper);
|
|
308
|
+
console.log('Workspace Config:', this._context?.workspaceManager?.GetConfiguration());
|
|
309
|
+
console.groupEnd();
|
|
310
|
+
return { success: true, closeMenu: true };
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Handle "Reset Layout" click
|
|
314
|
+
*/
|
|
315
|
+
async Handle_reset_layout() {
|
|
316
|
+
// Signal to shell to handle reset layout
|
|
317
|
+
return {
|
|
318
|
+
success: true,
|
|
319
|
+
closeMenu: true,
|
|
320
|
+
message: 'reset-layout' // Special signal for shell to handle
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Handle "Sign Out" click
|
|
325
|
+
*/
|
|
326
|
+
async Handle_logout() {
|
|
327
|
+
if (!this._context?.authService) {
|
|
328
|
+
return { success: false, closeMenu: true, message: 'Auth service not available' };
|
|
329
|
+
}
|
|
330
|
+
// Clear auth data
|
|
331
|
+
localStorage.removeItem('auth');
|
|
332
|
+
localStorage.removeItem('claims');
|
|
333
|
+
// Call logout
|
|
334
|
+
await this._context.authService.logout();
|
|
335
|
+
return { success: true, closeMenu: true };
|
|
336
|
+
}
|
|
337
|
+
// ========================================
|
|
338
|
+
// UTILITY METHODS
|
|
339
|
+
// ========================================
|
|
340
|
+
/**
|
|
341
|
+
* Get user display information for menu header
|
|
342
|
+
*/
|
|
343
|
+
GetUserDisplayInfo() {
|
|
344
|
+
const user = this._context?.userEntity;
|
|
345
|
+
const name = user?.Name || this._context?.user?.Name || 'User';
|
|
346
|
+
const email = user?.Email || '';
|
|
347
|
+
const avatarUrl = user?.UserImageURL || null;
|
|
348
|
+
// Generate initials from name
|
|
349
|
+
const nameParts = name.split(' ').filter(Boolean);
|
|
350
|
+
const initials = nameParts.length >= 2
|
|
351
|
+
? `${nameParts[0][0]}${nameParts[nameParts.length - 1][0]}`.toUpperCase()
|
|
352
|
+
: name.substring(0, 2).toUpperCase();
|
|
353
|
+
return { name, email, avatarUrl, initials };
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Generate a unique tab ID
|
|
357
|
+
*/
|
|
358
|
+
GenerateTabId() {
|
|
359
|
+
return `tab-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Get the current context (for subclasses)
|
|
363
|
+
*/
|
|
364
|
+
get Context() {
|
|
365
|
+
return this._context;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Update context (called by shell when developer mode changes)
|
|
369
|
+
*/
|
|
370
|
+
UpdateContext(updates) {
|
|
371
|
+
if (this._context) {
|
|
372
|
+
this._context = { ...this._context, ...updates };
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
BaseUserMenu = __decorate([
|
|
377
|
+
RegisterClass(BaseUserMenu)
|
|
378
|
+
], BaseUserMenu);
|
|
379
|
+
export { BaseUserMenu };
|
|
380
|
+
// Tree-shaking prevention
|
|
381
|
+
export function LoadBaseUserMenu() {
|
|
382
|
+
// This function ensures the decorator executes
|
|
383
|
+
}
|
|
384
|
+
//# sourceMappingURL=base-user-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-user-menu.js","sourceRoot":"","sources":["../../../src/lib/user-menu/base-user-menu.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/user-menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/user-menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { UserInfo } from '@memberjunction/core';
|
|
3
|
+
import { UserEntity } from '@memberjunction/core-entities';
|
|
4
|
+
/**
|
|
5
|
+
* Defines a single menu item in the user context menu
|
|
6
|
+
*/
|
|
7
|
+
export interface UserMenuItem {
|
|
8
|
+
/** Unique identifier for the menu item */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Display text for the menu item */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Font Awesome icon class (e.g., 'fa-solid fa-gear') */
|
|
13
|
+
icon: string;
|
|
14
|
+
/** Optional icon/text color (CSS color value) */
|
|
15
|
+
color?: string;
|
|
16
|
+
/** Optional CSS class for custom styling */
|
|
17
|
+
cssClass?: string;
|
|
18
|
+
/** Group ID for organizing items (items with same group have dividers between groups) */
|
|
19
|
+
group: 'primary' | 'developer' | 'system' | 'danger' | string;
|
|
20
|
+
/** Sort order within group (lower = higher in menu) */
|
|
21
|
+
order: number;
|
|
22
|
+
/** Whether item requires Developer role to be visible */
|
|
23
|
+
developerOnly: boolean;
|
|
24
|
+
/** Whether the item is currently visible (dynamic control) */
|
|
25
|
+
visible: boolean;
|
|
26
|
+
/** Whether the item is currently enabled/clickable */
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
/** Optional tooltip text */
|
|
29
|
+
tooltip?: string;
|
|
30
|
+
/** Optional keyboard shortcut hint */
|
|
31
|
+
shortcut?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Defines a separator/divider in the menu
|
|
35
|
+
*/
|
|
36
|
+
export interface UserMenuDivider {
|
|
37
|
+
type: 'divider';
|
|
38
|
+
group: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Union type for all menu element types
|
|
42
|
+
*/
|
|
43
|
+
export type UserMenuElement = UserMenuItem | UserMenuDivider;
|
|
44
|
+
/**
|
|
45
|
+
* Type guard to check if element is a divider
|
|
46
|
+
*/
|
|
47
|
+
export declare function isUserMenuDivider(element: UserMenuElement): element is UserMenuDivider;
|
|
48
|
+
/**
|
|
49
|
+
* Type guard to check if element is a menu item
|
|
50
|
+
*/
|
|
51
|
+
export declare function isUserMenuItem(element: UserMenuElement): element is UserMenuItem;
|
|
52
|
+
/**
|
|
53
|
+
* Minimal application info needed by user menu
|
|
54
|
+
*/
|
|
55
|
+
export interface ApplicationInfoRef {
|
|
56
|
+
ID: string;
|
|
57
|
+
Name: string;
|
|
58
|
+
[key: string]: unknown;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Interface for workspace manager operations needed by user menu
|
|
62
|
+
*/
|
|
63
|
+
export interface WorkspaceManagerRef {
|
|
64
|
+
GetConfiguration: () => unknown;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Interface for auth service operations needed by user menu
|
|
68
|
+
*/
|
|
69
|
+
export interface AuthServiceRef {
|
|
70
|
+
logout: () => void | Promise<void>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Context passed to menu handlers
|
|
74
|
+
*/
|
|
75
|
+
export interface UserMenuContext {
|
|
76
|
+
/** Current authenticated user info */
|
|
77
|
+
user: UserInfo;
|
|
78
|
+
/** Full user entity with all fields */
|
|
79
|
+
userEntity: UserEntity;
|
|
80
|
+
/** Reference to shell component for advanced operations */
|
|
81
|
+
shell: Record<string, unknown>;
|
|
82
|
+
/** View container for opening dialogs/modals */
|
|
83
|
+
viewContainerRef: ViewContainerRef;
|
|
84
|
+
/** Whether user has Developer role */
|
|
85
|
+
isDeveloper: boolean;
|
|
86
|
+
/** Whether developer mode is currently enabled (can be toggled) */
|
|
87
|
+
developerModeEnabled: boolean;
|
|
88
|
+
/** Current application context */
|
|
89
|
+
currentApplication: ApplicationInfoRef | null;
|
|
90
|
+
/** Workspace manager for layout operations */
|
|
91
|
+
workspaceManager: WorkspaceManagerRef;
|
|
92
|
+
/** Auth service for logout operations */
|
|
93
|
+
authService: AuthServiceRef;
|
|
94
|
+
/** Function to open settings dialog */
|
|
95
|
+
openSettings: () => void;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Result of a menu item click handler
|
|
99
|
+
*/
|
|
100
|
+
export interface UserMenuActionResult {
|
|
101
|
+
/** Whether the action succeeded */
|
|
102
|
+
success: boolean;
|
|
103
|
+
/** Whether to close the menu after action */
|
|
104
|
+
closeMenu: boolean;
|
|
105
|
+
/** Optional message to display (toast notification) */
|
|
106
|
+
message?: string;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Options for menu configuration
|
|
110
|
+
*/
|
|
111
|
+
export interface UserMenuOptions {
|
|
112
|
+
/** Whether to show the user name in menu header */
|
|
113
|
+
showUserName: boolean;
|
|
114
|
+
/** Whether to show the user email in menu header */
|
|
115
|
+
showUserEmail: boolean;
|
|
116
|
+
/** Menu position relative to avatar */
|
|
117
|
+
menuPosition: 'below-left' | 'below-right';
|
|
118
|
+
/** Animation style for menu opening */
|
|
119
|
+
animationStyle: 'fade' | 'slide' | 'none';
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=user-menu.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-menu.types.d.ts","sourceRoot":"","sources":["../../../src/lib/user-menu/user-menu.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,QAAQ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13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type guard to check if element is a divider
|
|
3
|
+
*/
|
|
4
|
+
export function isUserMenuDivider(element) {
|
|
5
|
+
return 'type' in element && element.type === 'divider';
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Type guard to check if element is a menu item
|
|
9
|
+
*/
|
|
10
|
+
export function isUserMenuItem(element) {
|
|
11
|
+
return !('type' in element);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=user-menu.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-menu.types.js","sourceRoot":"","sources":["../../../src/lib/user-menu/user-menu.types.ts"],"names":[],"mappings":"AA0DA;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAwB;IACtD,OAAO,MAAM,IAAI,OAAO,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC;AAC3D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OAAwB;IACnD,OAAO,CAAC,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC;AAChC,CAAC"}
|
package/dist/module.d.ts
CHANGED
|
@@ -41,32 +41,30 @@ import * as i39 from "@memberjunction/ng-container-directives";
|
|
|
41
41
|
import * as i40 from "@memberjunction/ng-base-forms";
|
|
42
42
|
import * as i41 from "@progress/kendo-angular-listview";
|
|
43
43
|
import * as i42 from "@progress/kendo-angular-treeview";
|
|
44
|
-
import * as i43 from "@memberjunction/ng-
|
|
45
|
-
import * as i44 from "@
|
|
46
|
-
import * as i45 from "@
|
|
47
|
-
import * as i46 from "@memberjunction/ng-
|
|
48
|
-
import * as i47 from "@memberjunction/ng-
|
|
49
|
-
import * as i48 from "@memberjunction/ng-
|
|
50
|
-
import * as i49 from "@memberjunction/ng-
|
|
51
|
-
import * as i50 from "@memberjunction/ng-
|
|
52
|
-
import * as i51 from "@memberjunction/ng-
|
|
53
|
-
import * as i52 from "@memberjunction/ng-
|
|
54
|
-
import * as i53 from "@memberjunction/ng-
|
|
55
|
-
import * as i54 from "@memberjunction/ng-
|
|
56
|
-
import * as i55 from "@memberjunction/ng-
|
|
57
|
-
import * as i56 from "@
|
|
58
|
-
import * as i57 from "@
|
|
59
|
-
import * as i58 from "@
|
|
60
|
-
import * as i59 from "@
|
|
61
|
-
import * as i60 from "@
|
|
62
|
-
import * as i61 from "@memberjunction/ng-
|
|
63
|
-
import * as i62 from "@memberjunction/ng-
|
|
64
|
-
import * as i63 from "@memberjunction/ng-
|
|
65
|
-
import * as i64 from "@memberjunction/ng-entity-viewer";
|
|
66
|
-
import * as i65 from "@memberjunction/ng-list-detail-grid";
|
|
44
|
+
import * as i43 from "@memberjunction/ng-query-grid";
|
|
45
|
+
import * as i44 from "@progress/kendo-angular-dropdowns";
|
|
46
|
+
import * as i45 from "@memberjunction/ng-shared";
|
|
47
|
+
import * as i46 from "@memberjunction/ng-conversations";
|
|
48
|
+
import * as i47 from "@memberjunction/ng-dashboards";
|
|
49
|
+
import * as i48 from "@memberjunction/ng-dashboard-viewer";
|
|
50
|
+
import * as i49 from "@memberjunction/ng-explorer-settings";
|
|
51
|
+
import * as i50 from "@memberjunction/ng-file-storage";
|
|
52
|
+
import * as i51 from "@memberjunction/ng-tabstrip";
|
|
53
|
+
import * as i52 from "@memberjunction/ng-entity-form-dialog";
|
|
54
|
+
import * as i53 from "@memberjunction/ng-record-selector";
|
|
55
|
+
import * as i54 from "@memberjunction/ng-resource-permissions";
|
|
56
|
+
import * as i55 from "@memberjunction/ng-generic-dialog";
|
|
57
|
+
import * as i56 from "@progress/kendo-angular-progressbar";
|
|
58
|
+
import * as i57 from "@progress/kendo-angular-dateinputs";
|
|
59
|
+
import * as i58 from "@angular/cdk/drag-drop";
|
|
60
|
+
import * as i59 from "@memberjunction/ng-ai-test-harness";
|
|
61
|
+
import * as i60 from "@memberjunction/ng-artifacts";
|
|
62
|
+
import * as i61 from "@memberjunction/ng-shared-generic";
|
|
63
|
+
import * as i62 from "@memberjunction/ng-entity-viewer";
|
|
64
|
+
import * as i63 from "@memberjunction/ng-list-detail-grid";
|
|
67
65
|
export declare class ExplorerCoreModule {
|
|
68
66
|
static ɵfac: i0.ɵɵFactoryDeclaration<ExplorerCoreModule, never>;
|
|
69
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ExplorerCoreModule, [typeof i1.FormToolbarComponent, typeof i2.ResourceContainerComponent, typeof i3.DashboardResource, typeof i4.EntityRecordResource, typeof i5.SearchResultsResource, typeof i6.UserViewResource, typeof i7.SingleRecordComponent, typeof i8.SingleSearchResultComponent, typeof i9.SingleQueryComponent, typeof i10.UserProfileComponent, typeof i11.SingleDashboardComponent, typeof i12.AddItemComponent, typeof i13.DeleteItemComponent, typeof i14.EditDashboardComponent, typeof i15.UserNotificationsComponent, typeof i16.QueryResource, typeof i17.SingleListDetailComponent, typeof i18.ListDetailResource, typeof i19.ChatConversationsResource, typeof i20.ChatCollectionsResource, typeof i21.ChatTasksResource, typeof i22.ArtifactResource, typeof i23.NotificationsResource, typeof i24.DashboardPreferencesDialogComponent], [typeof i25.AppRoutingModule, typeof i26.CommonModule, typeof i27.FormsModule, typeof i27.ReactiveFormsModule, typeof i28.RouterModule, typeof i29.GridModule, typeof i30.DialogsModule, typeof i31.ExcelExportModule, typeof i32.CompareRecordsModule, typeof i33.IndicatorsModule, typeof i34.ButtonsModule, typeof i35.TabStripModule, typeof i29.ExcelModule, typeof i29.PDFModule, typeof i36.InputsModule, typeof i37.LabelModule, typeof i38.RecordChangesModule, typeof i39.ContainerDirectivesModule, typeof i40.BaseFormsModule, typeof i41.ListViewModule, typeof i42.TreeViewModule, typeof i43.
|
|
67
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ExplorerCoreModule, [typeof i1.FormToolbarComponent, typeof i2.ResourceContainerComponent, typeof i3.DashboardResource, typeof i4.EntityRecordResource, typeof i5.SearchResultsResource, typeof i6.UserViewResource, typeof i7.SingleRecordComponent, typeof i8.SingleSearchResultComponent, typeof i9.SingleQueryComponent, typeof i10.UserProfileComponent, typeof i11.SingleDashboardComponent, typeof i12.AddItemComponent, typeof i13.DeleteItemComponent, typeof i14.EditDashboardComponent, typeof i15.UserNotificationsComponent, typeof i16.QueryResource, typeof i17.SingleListDetailComponent, typeof i18.ListDetailResource, typeof i19.ChatConversationsResource, typeof i20.ChatCollectionsResource, typeof i21.ChatTasksResource, typeof i22.ArtifactResource, typeof i23.NotificationsResource, typeof i24.DashboardPreferencesDialogComponent], [typeof i25.AppRoutingModule, typeof i26.CommonModule, typeof i27.FormsModule, typeof i27.ReactiveFormsModule, typeof i28.RouterModule, typeof i29.GridModule, typeof i30.DialogsModule, typeof i31.ExcelExportModule, typeof i32.CompareRecordsModule, typeof i33.IndicatorsModule, typeof i34.ButtonsModule, typeof i35.TabStripModule, typeof i29.ExcelModule, typeof i29.PDFModule, typeof i36.InputsModule, typeof i37.LabelModule, typeof i38.RecordChangesModule, typeof i39.ContainerDirectivesModule, typeof i40.BaseFormsModule, typeof i41.ListViewModule, typeof i42.TreeViewModule, typeof i43.QueryGridModule, typeof i35.LayoutModule, typeof i44.DropDownsModule, typeof i45.MemberJunctionSharedModule, typeof i46.ConversationsModule, typeof i47.DashboardsModule, typeof i48.DashboardViewerModule, typeof i49.ExplorerSettingsModule, typeof i50.FileStorageModule, typeof i51.MJTabStripModule, typeof i52.EntityFormDialogModule, typeof i53.RecordSelectorModule, typeof i54.ResourcePermissionsModule, typeof i55.GenericDialogModule, typeof i56.ProgressBarModule, typeof i57.DateInputsModule, typeof i58.DragDropModule, typeof i35.CardModule, typeof i35.AvatarModule, typeof i59.AITestHarnessModule, typeof i60.ArtifactsModule, typeof i61.SharedGenericModule, typeof i62.EntityViewerModule, typeof i63.ListDetailGridModule], [typeof i1.FormToolbarComponent, typeof i2.ResourceContainerComponent, typeof i3.DashboardResource, typeof i4.EntityRecordResource, typeof i5.SearchResultsResource, typeof i6.UserViewResource, typeof i7.SingleRecordComponent, typeof i8.SingleSearchResultComponent, typeof i10.UserProfileComponent, typeof i11.SingleDashboardComponent, typeof i12.AddItemComponent, typeof i13.DeleteItemComponent, typeof i14.EditDashboardComponent, typeof i15.UserNotificationsComponent, typeof i18.ListDetailResource, typeof i24.DashboardPreferencesDialogComponent]>;
|
|
70
68
|
static ɵinj: i0.ɵɵInjectorDeclaration<ExplorerCoreModule>;
|
|
71
69
|
}
|
|
72
70
|
//# sourceMappingURL=module.d.ts.map
|
package/dist/module.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2EA,qBAkGa,kBAAkB;yCAAlB,kBAAkB;0CAAlB,kBAAkB;0CAAlB,kBAAkB;CAAG"}
|