@memberjunction/ng-base-application 0.0.1 → 2.122.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/dist/lib/application-manager.d.ts +118 -0
- package/dist/lib/application-manager.js +312 -0
- package/dist/lib/application-manager.js.map +1 -0
- package/dist/lib/base-application.d.ts +98 -0
- package/dist/lib/base-application.js +234 -0
- package/dist/lib/base-application.js.map +1 -0
- package/dist/lib/golden-layout-manager.d.ts +190 -0
- package/dist/lib/golden-layout-manager.js +505 -0
- package/dist/lib/golden-layout-manager.js.map +1 -0
- package/dist/lib/interfaces/nav-item.interface.d.ts +29 -0
- package/dist/lib/interfaces/nav-item.interface.js +2 -0
- package/dist/lib/interfaces/nav-item.interface.js.map +1 -0
- package/dist/lib/interfaces/tab-request.interface.d.ts +21 -0
- package/dist/lib/interfaces/tab-request.interface.js +2 -0
- package/dist/lib/interfaces/tab-request.interface.js.map +1 -0
- package/dist/lib/interfaces/workspace-configuration.interface.d.ts +98 -0
- package/dist/lib/interfaces/workspace-configuration.interface.js +23 -0
- package/dist/lib/interfaces/workspace-configuration.interface.js.map +1 -0
- package/dist/lib/tab.service.d.ts +55 -0
- package/dist/lib/tab.service.js +132 -0
- package/dist/lib/tab.service.js.map +1 -0
- package/dist/lib/workspace-state-manager.d.ts +118 -0
- package/dist/lib/workspace-state-manager.js +535 -0
- package/dist/lib/workspace-state-manager.js.map +1 -0
- package/dist/public-api.d.ts +14 -0
- package/dist/public-api.js +17 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +41 -6
- package/README.md +0 -45
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { BaseApplication } from './base-application';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Represents a user's application configuration including visibility and order
|
|
6
|
+
*/
|
|
7
|
+
export interface UserAppConfig {
|
|
8
|
+
app: BaseApplication;
|
|
9
|
+
userAppId: string;
|
|
10
|
+
sequence: number;
|
|
11
|
+
isActive: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Manages application instances and active application state.
|
|
15
|
+
*
|
|
16
|
+
* Loads applications filtered by the user's UserApplication records.
|
|
17
|
+
* If user has no UserApplication records, auto-creates them from DefaultForNewUser apps.
|
|
18
|
+
* Orders applications by UserApplication.Sequence.
|
|
19
|
+
*/
|
|
20
|
+
export declare class ApplicationManager {
|
|
21
|
+
private applications$;
|
|
22
|
+
private allApplications$;
|
|
23
|
+
private userAppConfigs$;
|
|
24
|
+
private activeApp$;
|
|
25
|
+
private loading$;
|
|
26
|
+
private initialized;
|
|
27
|
+
/**
|
|
28
|
+
* Observable of user's active applications (filtered and ordered by UserApplication)
|
|
29
|
+
*/
|
|
30
|
+
get Applications(): Observable<BaseApplication[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Observable of ALL applications in the system (unfiltered)
|
|
33
|
+
*/
|
|
34
|
+
get AllApplications(): Observable<BaseApplication[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Observable of user's application configurations (includes sequence, isActive)
|
|
37
|
+
*/
|
|
38
|
+
get UserAppConfigs(): Observable<UserAppConfig[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Observable of the currently active application
|
|
41
|
+
*/
|
|
42
|
+
get ActiveApp(): Observable<BaseApplication | null>;
|
|
43
|
+
/**
|
|
44
|
+
* Observable of loading state
|
|
45
|
+
*/
|
|
46
|
+
get Loading(): Observable<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* Get user's active applications synchronously (filtered and ordered)
|
|
49
|
+
*/
|
|
50
|
+
GetAllApps(): BaseApplication[];
|
|
51
|
+
/**
|
|
52
|
+
* Get ALL applications synchronously (unfiltered)
|
|
53
|
+
*/
|
|
54
|
+
GetAllSystemApps(): BaseApplication[];
|
|
55
|
+
/**
|
|
56
|
+
* Get user's application configurations synchronously
|
|
57
|
+
*/
|
|
58
|
+
GetUserAppConfigs(): UserAppConfig[];
|
|
59
|
+
/**
|
|
60
|
+
* Get active application synchronously
|
|
61
|
+
*/
|
|
62
|
+
GetActiveApp(): BaseApplication | null;
|
|
63
|
+
/**
|
|
64
|
+
* Initialize the application manager by subscribing to the LoggedIn event.
|
|
65
|
+
* Applications are loaded when the event fires, ensuring metadata is ready.
|
|
66
|
+
*/
|
|
67
|
+
Initialize(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Reload the user's application configuration.
|
|
70
|
+
* Call this after changes to UserApplication records to refresh the app list.
|
|
71
|
+
*/
|
|
72
|
+
ReloadUserApplications(): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Load applications from metadata, filtered and ordered by user's UserApplication records.
|
|
75
|
+
* If user has no UserApplication records, auto-creates them from DefaultForNewUser apps.
|
|
76
|
+
*/
|
|
77
|
+
private loadApplications;
|
|
78
|
+
/**
|
|
79
|
+
* Load user's UserApplication records and update the filtered/ordered app list.
|
|
80
|
+
* This can be called to refresh after configuration changes.
|
|
81
|
+
*/
|
|
82
|
+
private loadUserApplicationConfig;
|
|
83
|
+
/**
|
|
84
|
+
* Creates UserApplication records for apps with DefaultForNewUser=true and Status='Active'.
|
|
85
|
+
* Called when a user has no existing UserApplication records (self-healing).
|
|
86
|
+
* Orders apps by their DefaultSequence field.
|
|
87
|
+
*/
|
|
88
|
+
private createDefaultUserApplications;
|
|
89
|
+
/**
|
|
90
|
+
* Set the active application by ID
|
|
91
|
+
*/
|
|
92
|
+
SetActiveApp(appId: string): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Get application by ID
|
|
95
|
+
*/
|
|
96
|
+
GetAppById(appId: string): BaseApplication | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Get application by name
|
|
99
|
+
*/
|
|
100
|
+
GetAppByName(name: string): BaseApplication | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* Get application by URL path slug.
|
|
103
|
+
* Matches case-insensitively against the app's Path property.
|
|
104
|
+
* Falls back to Name match if Path is not found (for backwards compatibility).
|
|
105
|
+
*/
|
|
106
|
+
GetAppByPath(path: string): BaseApplication | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Get applications that should appear in the Nav Bar (NavigationStyle = 'Nav Bar' or 'Both')
|
|
109
|
+
* filtered by TopNavLocation.
|
|
110
|
+
*/
|
|
111
|
+
GetNavBarApps(location: 'Left of App Switcher' | 'Left of User Menu'): BaseApplication[];
|
|
112
|
+
/**
|
|
113
|
+
* Get applications that should appear in the App Switcher (NavigationStyle = 'App Switcher' or 'Both')
|
|
114
|
+
*/
|
|
115
|
+
GetAppSwitcherApps(): BaseApplication[];
|
|
116
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationManager, never>;
|
|
117
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationManager>;
|
|
118
|
+
}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject } from 'rxjs';
|
|
3
|
+
import { MJGlobal, MJEventType } from '@memberjunction/global';
|
|
4
|
+
import { Metadata, RunView, LogError, LogStatus } from '@memberjunction/core';
|
|
5
|
+
import { BaseApplication } from './base-application';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Manages application instances and active application state.
|
|
9
|
+
*
|
|
10
|
+
* Loads applications filtered by the user's UserApplication records.
|
|
11
|
+
* If user has no UserApplication records, auto-creates them from DefaultForNewUser apps.
|
|
12
|
+
* Orders applications by UserApplication.Sequence.
|
|
13
|
+
*/
|
|
14
|
+
export class ApplicationManager {
|
|
15
|
+
applications$ = new BehaviorSubject([]);
|
|
16
|
+
allApplications$ = new BehaviorSubject([]);
|
|
17
|
+
userAppConfigs$ = new BehaviorSubject([]);
|
|
18
|
+
activeApp$ = new BehaviorSubject(null);
|
|
19
|
+
loading$ = new BehaviorSubject(false);
|
|
20
|
+
initialized = false;
|
|
21
|
+
/**
|
|
22
|
+
* Observable of user's active applications (filtered and ordered by UserApplication)
|
|
23
|
+
*/
|
|
24
|
+
get Applications() {
|
|
25
|
+
return this.applications$.asObservable();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Observable of ALL applications in the system (unfiltered)
|
|
29
|
+
*/
|
|
30
|
+
get AllApplications() {
|
|
31
|
+
return this.allApplications$.asObservable();
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Observable of user's application configurations (includes sequence, isActive)
|
|
35
|
+
*/
|
|
36
|
+
get UserAppConfigs() {
|
|
37
|
+
return this.userAppConfigs$.asObservable();
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Observable of the currently active application
|
|
41
|
+
*/
|
|
42
|
+
get ActiveApp() {
|
|
43
|
+
return this.activeApp$.asObservable();
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Observable of loading state
|
|
47
|
+
*/
|
|
48
|
+
get Loading() {
|
|
49
|
+
return this.loading$.asObservable();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Get user's active applications synchronously (filtered and ordered)
|
|
53
|
+
*/
|
|
54
|
+
GetAllApps() {
|
|
55
|
+
return this.applications$.value;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Get ALL applications synchronously (unfiltered)
|
|
59
|
+
*/
|
|
60
|
+
GetAllSystemApps() {
|
|
61
|
+
return this.allApplications$.value;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Get user's application configurations synchronously
|
|
65
|
+
*/
|
|
66
|
+
GetUserAppConfigs() {
|
|
67
|
+
return this.userAppConfigs$.value;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Get active application synchronously
|
|
71
|
+
*/
|
|
72
|
+
GetActiveApp() {
|
|
73
|
+
return this.activeApp$.value;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Initialize the application manager by subscribing to the LoggedIn event.
|
|
77
|
+
* Applications are loaded when the event fires, ensuring metadata is ready.
|
|
78
|
+
*/
|
|
79
|
+
Initialize() {
|
|
80
|
+
if (this.initialized) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
// Subscribe with replay (true) to catch the event even if it already fired
|
|
84
|
+
MJGlobal.Instance.GetEventListener(true).subscribe(event => {
|
|
85
|
+
if (event.event === MJEventType.LoggedIn) {
|
|
86
|
+
this.loadApplications();
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Reload the user's application configuration.
|
|
92
|
+
* Call this after changes to UserApplication records to refresh the app list.
|
|
93
|
+
*/
|
|
94
|
+
async ReloadUserApplications() {
|
|
95
|
+
this.loading$.next(true);
|
|
96
|
+
try {
|
|
97
|
+
await this.loadUserApplicationConfig();
|
|
98
|
+
}
|
|
99
|
+
finally {
|
|
100
|
+
this.loading$.next(false);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Load applications from metadata, filtered and ordered by user's UserApplication records.
|
|
105
|
+
* If user has no UserApplication records, auto-creates them from DefaultForNewUser apps.
|
|
106
|
+
*/
|
|
107
|
+
async loadApplications() {
|
|
108
|
+
if (this.initialized) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
this.loading$.next(true);
|
|
112
|
+
try {
|
|
113
|
+
const md = new Metadata();
|
|
114
|
+
const appInfoList = md.Applications;
|
|
115
|
+
// First, create BaseApplication instances for ALL apps
|
|
116
|
+
const allApps = [];
|
|
117
|
+
for (const appInfo of appInfoList) {
|
|
118
|
+
// Only create instances for Active applications
|
|
119
|
+
if (appInfo.Status !== 'Active') {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
const app = MJGlobal.Instance.ClassFactory.CreateInstance(BaseApplication, appInfo.ClassName, {
|
|
123
|
+
ID: appInfo.ID,
|
|
124
|
+
Name: appInfo.Name,
|
|
125
|
+
Description: appInfo.Description || '',
|
|
126
|
+
Icon: appInfo.Icon || '',
|
|
127
|
+
Color: appInfo.Color,
|
|
128
|
+
DefaultNavItems: appInfo.DefaultNavItems,
|
|
129
|
+
ClassName: appInfo.ClassName,
|
|
130
|
+
DefaultSequence: appInfo.DefaultSequence,
|
|
131
|
+
Status: appInfo.Status,
|
|
132
|
+
NavigationStyle: appInfo.NavigationStyle,
|
|
133
|
+
TopNavLocation: appInfo.TopNavLocation,
|
|
134
|
+
HideNavBarIconWhenActive: appInfo.HideNavBarIconWhenActive,
|
|
135
|
+
Path: appInfo.Path || '',
|
|
136
|
+
AutoUpdatePath: appInfo.AutoUpdatePath
|
|
137
|
+
});
|
|
138
|
+
if (app) {
|
|
139
|
+
allApps.push(app);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
this.allApplications$.next(allApps);
|
|
143
|
+
// Load and apply user's app configuration
|
|
144
|
+
await this.loadUserApplicationConfig();
|
|
145
|
+
this.initialized = true;
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
LogError('Failed to load applications:', undefined, error instanceof Error ? error.message : String(error));
|
|
149
|
+
throw error;
|
|
150
|
+
}
|
|
151
|
+
finally {
|
|
152
|
+
this.loading$.next(false);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Load user's UserApplication records and update the filtered/ordered app list.
|
|
157
|
+
* This can be called to refresh after configuration changes.
|
|
158
|
+
*/
|
|
159
|
+
async loadUserApplicationConfig() {
|
|
160
|
+
const md = new Metadata();
|
|
161
|
+
const appInfoList = md.Applications;
|
|
162
|
+
const allApps = this.allApplications$.value;
|
|
163
|
+
// Build a map for quick lookup
|
|
164
|
+
const appMap = new Map();
|
|
165
|
+
for (const app of allApps) {
|
|
166
|
+
appMap.set(app.ID, app);
|
|
167
|
+
}
|
|
168
|
+
// Load user's UserApplication records
|
|
169
|
+
const rv = new RunView();
|
|
170
|
+
const userAppsResult = await rv.RunView({
|
|
171
|
+
EntityName: 'User Applications',
|
|
172
|
+
ExtraFilter: `UserID = '${md.CurrentUser.ID}'`,
|
|
173
|
+
OrderBy: 'Sequence, Application',
|
|
174
|
+
ResultType: 'entity_object'
|
|
175
|
+
});
|
|
176
|
+
let userApps = [];
|
|
177
|
+
if (userAppsResult.Success) {
|
|
178
|
+
userApps = userAppsResult.Results;
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
LogError('Failed to load UserApplication records:', undefined, userAppsResult.ErrorMessage);
|
|
182
|
+
}
|
|
183
|
+
// Self-healing: If user has no UserApplication records, create from DefaultForNewUser apps
|
|
184
|
+
if (userApps.length === 0) {
|
|
185
|
+
LogStatus(`User ${md.CurrentUser.Name} has no UserApplication records, creating from DefaultForNewUser apps`);
|
|
186
|
+
userApps = await this.createDefaultUserApplications(md, appInfoList);
|
|
187
|
+
}
|
|
188
|
+
// Build user's filtered and ordered app list
|
|
189
|
+
const userAppConfigs = [];
|
|
190
|
+
const activeApps = [];
|
|
191
|
+
for (const userApp of userApps) {
|
|
192
|
+
const app = appMap.get(userApp.ApplicationID);
|
|
193
|
+
if (app && userApp.IsActive) {
|
|
194
|
+
userAppConfigs.push({
|
|
195
|
+
app,
|
|
196
|
+
userAppId: userApp.ID,
|
|
197
|
+
sequence: userApp.Sequence,
|
|
198
|
+
isActive: userApp.IsActive
|
|
199
|
+
});
|
|
200
|
+
activeApps.push(app);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
this.userAppConfigs$.next(userAppConfigs);
|
|
204
|
+
this.applications$.next(activeApps);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Creates UserApplication records for apps with DefaultForNewUser=true and Status='Active'.
|
|
208
|
+
* Called when a user has no existing UserApplication records (self-healing).
|
|
209
|
+
* Orders apps by their DefaultSequence field.
|
|
210
|
+
*/
|
|
211
|
+
async createDefaultUserApplications(md, appInfoList) {
|
|
212
|
+
// Filter to Active apps with DefaultForNewUser=true, sorted by DefaultSequence
|
|
213
|
+
const defaultApps = appInfoList
|
|
214
|
+
.filter(a => a.DefaultForNewUser && a.Status === 'Active')
|
|
215
|
+
.sort((a, b) => (a.DefaultSequence ?? 100) - (b.DefaultSequence ?? 100));
|
|
216
|
+
const createdUserApps = [];
|
|
217
|
+
LogStatus(`Found ${defaultApps.length} Active applications with DefaultForNewUser=true`);
|
|
218
|
+
for (const [index, appInfo] of defaultApps.entries()) {
|
|
219
|
+
try {
|
|
220
|
+
const userApp = await md.GetEntityObject('User Applications');
|
|
221
|
+
userApp.NewRecord();
|
|
222
|
+
userApp.UserID = md.CurrentUser.ID;
|
|
223
|
+
userApp.ApplicationID = appInfo.ID;
|
|
224
|
+
// Use the index based on sorted DefaultSequence order
|
|
225
|
+
userApp.Sequence = index;
|
|
226
|
+
userApp.IsActive = true;
|
|
227
|
+
const saved = await userApp.Save();
|
|
228
|
+
if (saved) {
|
|
229
|
+
LogStatus(`Created UserApplication for ${appInfo.Name} with sequence ${index} (DefaultSequence: ${appInfo.DefaultSequence})`);
|
|
230
|
+
createdUserApps.push(userApp);
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
LogError(`Failed to create UserApplication for ${appInfo.Name}:`, undefined, userApp.LatestResult);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
catch (error) {
|
|
237
|
+
LogError(`Error creating UserApplication for ${appInfo.Name}:`, undefined, error instanceof Error ? error.message : String(error));
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return createdUserApps;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Set the active application by ID
|
|
244
|
+
*/
|
|
245
|
+
async SetActiveApp(appId) {
|
|
246
|
+
const currentApp = this.activeApp$.value;
|
|
247
|
+
const newApp = this.applications$.value.find(a => a.ID === appId);
|
|
248
|
+
if (!newApp) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
if (currentApp?.ID === appId) {
|
|
252
|
+
return; // Already active
|
|
253
|
+
}
|
|
254
|
+
// Deactivate current app
|
|
255
|
+
if (currentApp) {
|
|
256
|
+
await currentApp.OnDeactivate();
|
|
257
|
+
}
|
|
258
|
+
// Activate new app
|
|
259
|
+
await newApp.OnActivate();
|
|
260
|
+
this.activeApp$.next(newApp);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Get application by ID
|
|
264
|
+
*/
|
|
265
|
+
GetAppById(appId) {
|
|
266
|
+
return this.applications$.value.find(a => a.ID === appId);
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Get application by name
|
|
270
|
+
*/
|
|
271
|
+
GetAppByName(name) {
|
|
272
|
+
return this.applications$.value.find(a => a.Name === name);
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Get application by URL path slug.
|
|
276
|
+
* Matches case-insensitively against the app's Path property.
|
|
277
|
+
* Falls back to Name match if Path is not found (for backwards compatibility).
|
|
278
|
+
*/
|
|
279
|
+
GetAppByPath(path) {
|
|
280
|
+
const normalizedPath = path.trim().toLowerCase();
|
|
281
|
+
// First try exact path match
|
|
282
|
+
const pathMatch = this.applications$.value.find(a => a.Path?.toLowerCase() === normalizedPath);
|
|
283
|
+
if (pathMatch) {
|
|
284
|
+
return pathMatch;
|
|
285
|
+
}
|
|
286
|
+
// Fallback: try matching by name (for backwards compatibility with old URLs)
|
|
287
|
+
return this.applications$.value.find(a => a.Name.trim().toLowerCase() === normalizedPath);
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Get applications that should appear in the Nav Bar (NavigationStyle = 'Nav Bar' or 'Both')
|
|
291
|
+
* filtered by TopNavLocation.
|
|
292
|
+
*/
|
|
293
|
+
GetNavBarApps(location) {
|
|
294
|
+
return this.applications$.value.filter(app => (app.NavigationStyle === 'Nav Bar' || app.NavigationStyle === 'Both') &&
|
|
295
|
+
app.TopNavLocation === location);
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Get applications that should appear in the App Switcher (NavigationStyle = 'App Switcher' or 'Both')
|
|
299
|
+
*/
|
|
300
|
+
GetAppSwitcherApps() {
|
|
301
|
+
return this.applications$.value.filter(app => app.NavigationStyle === 'App Switcher' || app.NavigationStyle === 'Both');
|
|
302
|
+
}
|
|
303
|
+
static ɵfac = function ApplicationManager_Factory(t) { return new (t || ApplicationManager)(); };
|
|
304
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ApplicationManager, factory: ApplicationManager.ɵfac, providedIn: 'root' });
|
|
305
|
+
}
|
|
306
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ApplicationManager, [{
|
|
307
|
+
type: Injectable,
|
|
308
|
+
args: [{
|
|
309
|
+
providedIn: 'root'
|
|
310
|
+
}]
|
|
311
|
+
}], null, null); })();
|
|
312
|
+
//# sourceMappingURL=application-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-manager.js","sourceRoot":"","sources":["../../src/lib/application-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAc,MAAM,MAAM,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAmB,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE/F,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;;AAYrD;;;;;;GAMG;AAIH,MAAM,OAAO,kBAAkB;IACrB,aAAa,GAAG,IAAI,eAAe,CAAoB,EAAE,CAAC,CAAC;IAC3D,gBAAgB,GAAG,IAAI,eAAe,CAAoB,EAAE,CAAC,CAAC;IAC9D,eAAe,GAAG,IAAI,eAAe,CAAkB,EAAE,CAAC,CAAC;IAC3D,UAAU,GAAG,IAAI,eAAe,CAAyB,IAAI,CAAC,CAAC;IAC/D,QAAQ,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;IAC/C,WAAW,GAAG,KAAK,CA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B;gEAAlB,kBAAkB,WAAlB,kBAAkB,mBAFjB,MAAM;;iFAEP,kBAAkB;cAH9B,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { NavItem } from './interfaces/nav-item.interface';
|
|
2
|
+
import { TabRequest } from './interfaces/tab-request.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Base class for application definitions in MemberJunction Explorer.
|
|
5
|
+
*
|
|
6
|
+
* Applications can extend this class to provide dynamic behavior
|
|
7
|
+
* for navigation items, colors, default tabs, and lifecycle hooks.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { RegisterClass } from '@memberjunction/global';
|
|
12
|
+
*
|
|
13
|
+
* @RegisterClass(BaseApplication, 'CRMApplication')
|
|
14
|
+
* export class CRMApplication extends BaseApplication {
|
|
15
|
+
* override GetNavItems(): NavItem[] {
|
|
16
|
+
* const items = super.GetNavItems();
|
|
17
|
+
* // Add dynamic items based on permissions
|
|
18
|
+
* return items;
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class BaseApplication {
|
|
24
|
+
/** Application ID from database */
|
|
25
|
+
ID: string;
|
|
26
|
+
/** Application name */
|
|
27
|
+
Name: string;
|
|
28
|
+
/** Application description */
|
|
29
|
+
Description: string;
|
|
30
|
+
/** Font Awesome icon class */
|
|
31
|
+
Icon: string;
|
|
32
|
+
/** Hex color code for theming */
|
|
33
|
+
Color: string;
|
|
34
|
+
/** JSON string of default navigation items */
|
|
35
|
+
DefaultNavItems: string;
|
|
36
|
+
/** TypeScript class name for ClassFactory */
|
|
37
|
+
ClassName: string;
|
|
38
|
+
/** Default sequence position when adding to new user's User Applications */
|
|
39
|
+
DefaultSequence: number;
|
|
40
|
+
/** Application lifecycle status - only Active apps are shown to users */
|
|
41
|
+
Status: 'Pending' | 'Active' | 'Disabled' | 'Deprecated';
|
|
42
|
+
/** How the application appears in navigation */
|
|
43
|
+
NavigationStyle: 'App Switcher' | 'Nav Bar' | 'Both';
|
|
44
|
+
/** Position of permanent nav icon when NavigationStyle is Nav Bar or Both */
|
|
45
|
+
TopNavLocation: 'Left of App Switcher' | 'Left of User Menu' | null;
|
|
46
|
+
/** When true, hide the Nav Bar icon when this application is active */
|
|
47
|
+
HideNavBarIconWhenActive: boolean;
|
|
48
|
+
/** URL-friendly slug for the application (e.g., "data-explorer" for "Data Explorer") */
|
|
49
|
+
Path: string;
|
|
50
|
+
/** When true, Path is automatically generated from Name on save */
|
|
51
|
+
AutoUpdatePath: boolean;
|
|
52
|
+
constructor(data?: Partial<BaseApplication>);
|
|
53
|
+
private _defaultNavItems;
|
|
54
|
+
/**
|
|
55
|
+
* Returns navigation items for this application.
|
|
56
|
+
* Override in subclass for dynamic behavior based on permissions, context, etc.
|
|
57
|
+
*/
|
|
58
|
+
GetNavItems(): NavItem[];
|
|
59
|
+
/**
|
|
60
|
+
* Returns the application color for theming.
|
|
61
|
+
* Override in subclass for dynamic color based on context.
|
|
62
|
+
*/
|
|
63
|
+
GetColor(): string;
|
|
64
|
+
/**
|
|
65
|
+
* Creates the default tab request when user switches to this app.
|
|
66
|
+
* If app has navigation items, uses the first nav item.
|
|
67
|
+
* If app has no nav items, loads the first available dashboard preference for this app.
|
|
68
|
+
* Override in subclass for custom default tab logic.
|
|
69
|
+
*/
|
|
70
|
+
CreateDefaultTab(): Promise<TabRequest | null>;
|
|
71
|
+
/**
|
|
72
|
+
* Loads the default dashboard for this app from DashboardUserPreference.
|
|
73
|
+
* Uses a simple cascading pattern:
|
|
74
|
+
* For the app scope: return user preferences if they exist, otherwise system defaults
|
|
75
|
+
* Returns null if no dashboards are available.
|
|
76
|
+
*/
|
|
77
|
+
private loadDefaultDashboard;
|
|
78
|
+
/**
|
|
79
|
+
* Creates a Data Explorer tab filtered to entities within this application.
|
|
80
|
+
* Used as a fallback when no dashboard or nav items are configured.
|
|
81
|
+
*/
|
|
82
|
+
private createDataExplorerTab;
|
|
83
|
+
/**
|
|
84
|
+
* Called when this application becomes the active app.
|
|
85
|
+
* Override in subclass for custom initialization logic.
|
|
86
|
+
*/
|
|
87
|
+
OnActivate(): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Called when user navigates away from this application.
|
|
90
|
+
* Override in subclass for cleanup logic.
|
|
91
|
+
*/
|
|
92
|
+
OnDeactivate(): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Called to check if user has permission for a specific action.
|
|
95
|
+
* Override in subclass for permission checks.
|
|
96
|
+
*/
|
|
97
|
+
HasPermission(action: string): boolean;
|
|
98
|
+
}
|