@memberjunction/ng-explorer-core 6.1.0-edge.1 → 6.1.0-edge.3
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/LICENSE +180 -4
- package/README.md +1 -1
- package/dist/app-routing.module.d.ts.map +1 -1
- package/dist/app-routing.module.js +23 -7
- package/dist/app-routing.module.js.map +1 -1
- package/dist/generated/lazy-feature-config.d.ts +1 -1
- package/dist/generated/lazy-feature-config.d.ts.map +1 -1
- package/dist/generated/lazy-feature-config.js +10 -1
- package/dist/generated/lazy-feature-config.js.map +1 -1
- package/dist/lib/resource-wrappers/record-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/record-resource.component.js +4 -1
- package/dist/lib/resource-wrappers/record-resource.component.js.map +1 -1
- package/dist/lib/shell/shell.component.d.ts +7 -0
- package/dist/lib/shell/shell.component.d.ts.map +1 -1
- package/dist/lib/shell/shell.component.js +60 -42
- package/dist/lib/shell/shell.component.js.map +1 -1
- package/package.json +53 -53
package/LICENSE
CHANGED
|
@@ -1,7 +1,183 @@
|
|
|
1
|
-
|
|
1
|
+
Business Source License 1.1
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
License text copyright (c) 2024 MariaDB plc, All Rights Reserved.
|
|
4
|
+
"Business Source License" is a trademark of MariaDB plc.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
-----------------------------------------------------------------------------
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Parameters
|
|
9
|
+
|
|
10
|
+
Licensor: Blue Cypress, Inc.
|
|
11
|
+
|
|
12
|
+
Licensed Work: MemberJunction.
|
|
13
|
+
The Licensed Work is (c) 2023-2026 Blue Cypress, Inc.
|
|
14
|
+
|
|
15
|
+
Additional Use Grant: Subject to the terms of this License, Licensor grants
|
|
16
|
+
you the following additional rights to make Production
|
|
17
|
+
Use of the Licensed Work.
|
|
18
|
+
|
|
19
|
+
1. Internal Use
|
|
20
|
+
|
|
21
|
+
You may make production use of the Licensed Work for
|
|
22
|
+
your own internal business or organizational operations.
|
|
23
|
+
|
|
24
|
+
2. Nonprofit Use
|
|
25
|
+
|
|
26
|
+
If you are a Nonprofit, you may make production use of
|
|
27
|
+
the Licensed Work for the operations and activities of
|
|
28
|
+
your Organizational Family.
|
|
29
|
+
|
|
30
|
+
3. MemberJunction Certified Program Use
|
|
31
|
+
|
|
32
|
+
If you are authorized by Licensor under the
|
|
33
|
+
MemberJunction Certified Program to provide professional
|
|
34
|
+
services using the Licensed Work, you may make
|
|
35
|
+
production use of the Licensed Work in providing such
|
|
36
|
+
professional services to a client, provided that:
|
|
37
|
+
|
|
38
|
+
(a) the Licensed Work is deployed in, and the applicable
|
|
39
|
+
production use occurs within, an environment owned,
|
|
40
|
+
leased, licensed, subscribed to, or otherwise controlled
|
|
41
|
+
by that client; and
|
|
42
|
+
|
|
43
|
+
(b) the production use is for that client's own internal
|
|
44
|
+
business or organizational operations or is otherwise
|
|
45
|
+
independently permitted to that client under this
|
|
46
|
+
Additional Use Grant.
|
|
47
|
+
|
|
48
|
+
4. Definitions Applicable to the Additional Use Grant
|
|
49
|
+
|
|
50
|
+
"Affiliate" means, with respect to a specified Person,
|
|
51
|
+
any other Person that directly or indirectly Controls,
|
|
52
|
+
is Controlled by, or is under common Control with such
|
|
53
|
+
specified Person.
|
|
54
|
+
|
|
55
|
+
"Control" (including the terms "Controls," "Controlled
|
|
56
|
+
by," and "under common Control with") means the direct
|
|
57
|
+
or indirect possession of the power to direct or cause
|
|
58
|
+
the direction of the management and policies of a
|
|
59
|
+
Person, whether through ownership of voting interests,
|
|
60
|
+
by contract, or otherwise.
|
|
61
|
+
|
|
62
|
+
"Organizational Family" means, with respect to a Person,
|
|
63
|
+
(a) such Person and its Affiliates, and (b) any
|
|
64
|
+
nonprofit organization, governmental entity, chapter,
|
|
65
|
+
division, local affiliate, regional affiliate, state
|
|
66
|
+
affiliate, national affiliate, or other entity that is
|
|
67
|
+
formally affiliated with such Person through governing
|
|
68
|
+
documents, a charter, bylaws, a membership agreement, or
|
|
69
|
+
another written organizational instrument, and is
|
|
70
|
+
recognized under such documents as part of the same
|
|
71
|
+
organizational structure.
|
|
72
|
+
|
|
73
|
+
"Nonprofit" means a Person recognized by the Internal
|
|
74
|
+
Revenue Service as exempt from federal income taxation
|
|
75
|
+
under Section 501(c)(3), 501(c)(4), 501(c)(5), or
|
|
76
|
+
501(c)(6) of the Internal Revenue Code, or a foreign
|
|
77
|
+
organization recognized under substantially equivalent
|
|
78
|
+
laws.
|
|
79
|
+
|
|
80
|
+
A Person claiming eligibility as a Nonprofit shall, upon
|
|
81
|
+
Licensor's reasonable request, provide documentation
|
|
82
|
+
reasonably sufficient to demonstrate that it qualifies
|
|
83
|
+
as a Nonprofit. If such Person materially misrepresents,
|
|
84
|
+
or is unable to demonstrate, its qualification as a
|
|
85
|
+
Nonprofit, the rights granted to such Person under
|
|
86
|
+
Section 2 of this Additional Use Grant shall terminate.
|
|
87
|
+
|
|
88
|
+
"MemberJunction Certified Program" means Licensor's
|
|
89
|
+
then-current program for certifying and authorizing a
|
|
90
|
+
Person to provide professional services using the
|
|
91
|
+
Licensed Work.
|
|
92
|
+
|
|
93
|
+
"Person" means any individual, corporation, limited
|
|
94
|
+
liability company, partnership, association, nonprofit
|
|
95
|
+
organization, governmental entity, or other legal or
|
|
96
|
+
organizational entity.
|
|
97
|
+
|
|
98
|
+
Change Date: Four (4) years from the date the Licensed Work is first
|
|
99
|
+
made available.
|
|
100
|
+
|
|
101
|
+
Change License: MIT License.
|
|
102
|
+
|
|
103
|
+
For information about alternative licensing arrangements for the Licensed
|
|
104
|
+
Work, please contact Blue Cypress, Inc.
|
|
105
|
+
|
|
106
|
+
-----------------------------------------------------------------------------
|
|
107
|
+
|
|
108
|
+
Terms
|
|
109
|
+
|
|
110
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
111
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
112
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
113
|
+
production use.
|
|
114
|
+
|
|
115
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
116
|
+
available distribution of a specific version of the Licensed Work under this
|
|
117
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
118
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
119
|
+
above terminate.
|
|
120
|
+
|
|
121
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
122
|
+
currently in effect as described in this License, you must purchase a
|
|
123
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
124
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
125
|
+
|
|
126
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
127
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
128
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
129
|
+
for each version of the Licensed Work released by Licensor.
|
|
130
|
+
|
|
131
|
+
You must conspicuously display this License on each original or modified copy
|
|
132
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
133
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
134
|
+
License apply to your use of that work.
|
|
135
|
+
|
|
136
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
137
|
+
terminate your rights under this License for the current and all other
|
|
138
|
+
versions of the Licensed Work.
|
|
139
|
+
|
|
140
|
+
This License does not grant you any right in any trademark or logo of
|
|
141
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
142
|
+
Licensor as expressly required by this License).
|
|
143
|
+
|
|
144
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
145
|
+
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
146
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
147
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
148
|
+
TITLE.
|
|
149
|
+
|
|
150
|
+
MariaDB hereby grants you permission to use this License's text to license
|
|
151
|
+
your works, and to refer to it using the trademark "Business Source License",
|
|
152
|
+
as long as you comply with the Covenants of Licensor below.
|
|
153
|
+
|
|
154
|
+
-----------------------------------------------------------------------------
|
|
155
|
+
|
|
156
|
+
Covenants of Licensor
|
|
157
|
+
|
|
158
|
+
In consideration of the right to use this License's text and the "Business
|
|
159
|
+
Source License" name and trademark, Licensor covenants to MariaDB, and to all
|
|
160
|
+
other recipients of the licensed work to be provided by Licensor:
|
|
161
|
+
|
|
162
|
+
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
163
|
+
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
164
|
+
where "compatible" means that software provided under the Change License
|
|
165
|
+
can be included in a program with software provided under GPL Version 2.0
|
|
166
|
+
or a later version. Licensor may specify additional Change Licenses without
|
|
167
|
+
limitation.
|
|
168
|
+
|
|
169
|
+
2. To either: (a) specify an additional grant of rights to use that does not
|
|
170
|
+
impose any additional restriction on the right granted in this License, as
|
|
171
|
+
the Additional Use Grant; or (b) insert the text "None".
|
|
172
|
+
|
|
173
|
+
3. To specify a Change Date.
|
|
174
|
+
|
|
175
|
+
4. Not to modify this License in any other way.
|
|
176
|
+
|
|
177
|
+
-----------------------------------------------------------------------------
|
|
178
|
+
|
|
179
|
+
Notice
|
|
180
|
+
|
|
181
|
+
The Business Source License (this document, or the "License") is not an Open
|
|
182
|
+
Source license. However, the Licensed Work will eventually be made available
|
|
183
|
+
under an Open Source License, as stated in this License.
|
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-routing.module.d.ts","sourceRoot":"","sources":["../src/app-routing.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAwB,MAAM,eAAe,CAAC;AACnE,OAAO,EAAwB,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAOrH,OAAO,EAAsC,i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,aAAa,CAA6B;IAClD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAO;IACvC,OAAO,CAAC,eAAe,CAA8B;IAErD;;;;OAIG;IACH,OAAO,CAAC,SAAS,CAAkC;IAEnD,IAAW,QAAQ,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,EAElD;IAED,IAAW,QAAQ,IAAI,iBAAiB,CAEvC;gBAGS,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,kBAAkB,EAC9B,UAAU,EAAE,UAAU;IAMhC;;;OAGG;YACW,YAAY;IAapB,OAAO,CAAC,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;yCA/C5E,gBAAgB;6CAAhB,gBAAgB;CA4gB5B;AA8FD,UAAU,sBAAuB,SAAQ,mBAAmB;IAC1D,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;CACjC;AAED,qBAIa,gBAAgB;yCAAhB,gBAAgB;0CAAhB,gBAAgB;0CAAhB,gBAAgB;CAK5B"}
|
|
@@ -2,7 +2,7 @@ import { Injectable, NgModule } from '@angular/core';
|
|
|
2
2
|
import { RouterModule } from '@angular/router';
|
|
3
3
|
import { SingleRecordComponent, AuthGuardService as AuthGuard, AppLockGuardService as AppLockGuard } from './public-api';
|
|
4
4
|
import { OAuthCallbackComponent } from './lib/oauth/oauth-callback.component';
|
|
5
|
-
import { LogError, Metadata, StartupManager } from '@memberjunction/core';
|
|
5
|
+
import { LogError, Metadata, StartupManager, IsNewEntityRecordUrlId, NEW_RECORD_VALUES_QUERY_PARAM } from '@memberjunction/core';
|
|
6
6
|
import { SYSTEM_APP_ID, RECORDS_RESOURCE_TYPE } from '@memberjunction/ng-shared';
|
|
7
7
|
import { MJGlobal, MJEventType } from '@memberjunction/global';
|
|
8
8
|
import { firstValueFrom, filter, take } from 'rxjs';
|
|
@@ -98,6 +98,14 @@ export class CustomReuseStrategy {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
+
function readNewRecordValuesQuery(queryParams) {
|
|
102
|
+
const raw = queryParams[NEW_RECORD_VALUES_QUERY_PARAM] ?? queryParams['newRecordValues'];
|
|
103
|
+
if (raw == null)
|
|
104
|
+
return undefined;
|
|
105
|
+
const value = Array.isArray(raw) ? raw[0] : raw;
|
|
106
|
+
const trimmed = value?.trim();
|
|
107
|
+
return trimmed && trimmed.length > 0 ? trimmed : undefined;
|
|
108
|
+
}
|
|
101
109
|
export class ResourceResolver {
|
|
102
110
|
sharedService;
|
|
103
111
|
router;
|
|
@@ -203,6 +211,8 @@ export class ResourceResolver {
|
|
|
203
211
|
// /app/:appName/record/:entityName/:recordId
|
|
204
212
|
const entityName = decodeURIComponent(param1);
|
|
205
213
|
const recordId = param2;
|
|
214
|
+
const isNew = IsNewEntityRecordUrlId(recordId);
|
|
215
|
+
const newRecordValues = readNewRecordValuesQuery(route.queryParams);
|
|
206
216
|
const entityInfo = md.EntityByName(entityName);
|
|
207
217
|
if (!entityInfo) {
|
|
208
218
|
LogError(`Entity ${entityName} not found in metadata`);
|
|
@@ -210,15 +220,17 @@ export class ResourceResolver {
|
|
|
210
220
|
}
|
|
211
221
|
this.tabService.OpenTab({
|
|
212
222
|
ApplicationId: app.ID,
|
|
213
|
-
Title: `${entityName} - ${recordId}`,
|
|
223
|
+
Title: isNew ? `New ${entityName}` : `${entityName} - ${recordId}`,
|
|
214
224
|
Configuration: {
|
|
215
225
|
resourceType: RECORDS_RESOURCE_TYPE,
|
|
216
226
|
Entity: entityName,
|
|
217
|
-
recordId: recordId,
|
|
227
|
+
recordId: isNew ? '' : recordId,
|
|
228
|
+
isNew: isNew || undefined,
|
|
229
|
+
NewRecordValues: newRecordValues,
|
|
218
230
|
appName: appName,
|
|
219
231
|
appId: app.ID
|
|
220
232
|
},
|
|
221
|
-
ResourceRecordId: recordId,
|
|
233
|
+
ResourceRecordId: isNew ? '' : recordId,
|
|
222
234
|
IsPinned: false
|
|
223
235
|
});
|
|
224
236
|
return;
|
|
@@ -415,6 +427,8 @@ export class ResourceResolver {
|
|
|
415
427
|
// /resource/record/:entityName/:recordId
|
|
416
428
|
const entityName = decodeURIComponent(route.params['entityName']);
|
|
417
429
|
const recordId = route.params['recordId'];
|
|
430
|
+
const isNew = IsNewEntityRecordUrlId(recordId);
|
|
431
|
+
const newRecordValues = readNewRecordValuesQuery(route.queryParams);
|
|
418
432
|
const entityInfo = md.EntityByName(entityName);
|
|
419
433
|
if (!entityInfo) {
|
|
420
434
|
LogError(`Entity ${entityName} not found in metadata`);
|
|
@@ -423,13 +437,15 @@ export class ResourceResolver {
|
|
|
423
437
|
// Queue tab request via TabService
|
|
424
438
|
this.tabService.OpenTab({
|
|
425
439
|
ApplicationId: SYSTEM_APP_ID,
|
|
426
|
-
Title: `${entityName} - ${recordId}`,
|
|
440
|
+
Title: isNew ? `New ${entityName}` : `${entityName} - ${recordId}`,
|
|
427
441
|
Configuration: {
|
|
428
442
|
resourceType: RECORDS_RESOURCE_TYPE,
|
|
429
443
|
Entity: entityName,
|
|
430
|
-
recordId: recordId
|
|
444
|
+
recordId: isNew ? '' : recordId,
|
|
445
|
+
isNew: isNew || undefined,
|
|
446
|
+
NewRecordValues: newRecordValues
|
|
431
447
|
},
|
|
432
|
-
ResourceRecordId: recordId,
|
|
448
|
+
ResourceRecordId: isNew ? '' : recordId,
|
|
433
449
|
IsPinned: false
|
|
434
450
|
});
|
|
435
451
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-routing.module.js","sourceRoot":"","sources":["../src/app-routing.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAU,YAAY,EAAgE,MAAM,iBAAiB,CAAC;AACrH,OAAO,EACL,qBAAqB,EACrB,gBAAgB,IAAI,SAAS,EAC7B,mBAAmB,IAAI,YAAY,EACpC,MAAM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AgB,EAAE;QACnC,WAAW,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;QACtC,SAAS,EAAE,qBAAqB;KACjC;IACD;QACE,IAAI,EAAE,+BAA+B;QACrC,OAAO,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;QACnC,WAAW,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;QACtC,SAAS,EAAE,qBAAqB;KACjC;IACD;QACE,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;QACnC,WAAW,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;QACtC,SAAS,EAAE,qBAAqB;KACjC;IACD;QACE,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;QACnC,WAAW,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;QACtC,SAAS,EAAE,qBAAqB;KACjC;CACF,CAAC;AAUF,MAAM,OAAO,gBAAgB;0GAAhB,gBAAgB;4DAAhB,gBAAgB;gEAHjB,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,mBAAmB,EAAE,QAAQ,EAAE,CAAC,EAC/D,YAAY;;iFAEX,gBAAgB;cAJ5B,QAAQ;eAAC;gBACR,OAAO,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,mBAAmB,EAAE,QAAQ,EAAE,CAAC,CAAC;gBAC1E,OAAO,EAAE,CAAC,YAAY,CAAC;aACxB;;wFACY,gBAAgB,0CAFjB,YAAY","sourcesContent":["import { ComponentRef, Injectable, NgModule } from '@angular/core';\nimport { Routes, RouterModule, Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';\nimport {\n SingleRecordComponent,\n AuthGuardService as AuthGuard,\n AppLockGuardService as AppLockGuard\n} from './public-api';\nimport { OAuthCallbackComponent } from './lib/oauth/oauth-callback.component';\nimport { LogError, Metadata, StartupManager, IMetadataProvider } from '@memberjunction/core';\nimport { SharedService, SYSTEM_APP_ID, RECORDS_RESOURCE_TYPE } from '@memberjunction/ng-shared';\nimport { DetachedRouteHandle, RouteReuseStrategy } from '@angular/router';\nimport { ApplicationManager, TabService } from '@memberjunction/ng-base-application';\nimport { MJGlobal, MJEventType } from '@memberjunction/global';\nimport { firstValueFrom, filter, take } from 'rxjs';\n\nexport class CustomReuseStrategy implements RouteReuseStrategy {\n storedRoutes: { [key: string]: DetachedRouteHandleExt | null } = {};\n\n // Determines if a route should be detached and stored\n shouldDetach(route: ActivatedRouteSnapshot): boolean {\n // removed reference to the skip stuff from here - we don't use the skip stuff anymore, using generic conversations/chat now\n return false;\n }\n\n // Stores the detached route\n store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandleExt | null): void {\n if(!handle){\n return;\n }\n\n if (route.routeConfig && route.routeConfig.path) {\n this.storedRoutes[route.routeConfig.path] = handle;\n this.callHook(handle, 'ngOnDetach');\n }\n }\n\n // Determines if a stored route should be reattached\n shouldAttach(route: ActivatedRouteSnapshot): boolean {\n // Reattach if we have a stored route for the incoming route\n if (route.routeConfig?.path) {\n return !!route.routeConfig && !!this.storedRoutes[route.routeConfig.path];\n }\n\n else return false;\n }\n\n // Retrieves the stored route; null means no stored route for this path\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\n if (!route.routeConfig || (route.routeConfig.path && !this.storedRoutes[route.routeConfig.path])) {\n return null;\n } \n else if (route.routeConfig.path) {\n const path = this.storedRoutes[route.routeConfig.path];\n if(path){\n this.callHook(path, 'ngOnAttach');\n return path;\n }\n }\n\n return null;\n }\n\n // Determines if the route should be reused.\n // Query params are intentionally excluded — the shell handles query param\n // sub-navigation via NotifyQueryParamsChanged. Including them here would\n // cause the ResourceResolver to re-run on back/forward query param changes,\n // racing with the shell's syncWorkspaceWithUrl.\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n return future.routeConfig === curr.routeConfig &&\n this.objectContentsEqual(future.params, curr.params);\n }\n\n objectContentsEqual(obj1: any, obj2: any): boolean {\n if (obj1 === obj2) {\n return true; // exact same object\n }\n\n if (obj1 === null && obj2 !== null) {\n return false; // not the same object\n }\n\n if (obj1 === undefined && obj2 !== undefined) {\n return false; // not the same object\n }\n\n if (typeof obj1 === 'object' || typeof obj2 === 'object') {\n if (Object.keys(obj1).length !== Object.keys(obj2).length) {\n return false; // different number of keys\n }\n \n for (const key in obj1) {\n // check to see the type of the key, if it is an object, then we call this function recursively \n // otherwise we do simple comparison\n if (typeof obj1[key] === 'object' && typeof obj2[key] === 'object') {\n if (!this.objectContentsEqual(obj1[key], obj2[key])) {\n return false; // any individual key not matching means the objects are different\n }\n }\n else if (obj1[key] !== obj2[key]) {\n return false; // any individual key not matching means the objects are different\n }\n } \n }\n\n return true;\n }\n\n private callHook(detachedTree: DetachedRouteHandleExt, hookName: 'ngOnDetach' | 'ngOnAttach'): void {\n if(!detachedTree || !hookName){\n return;\n }\n\n const componentRef = detachedTree.componentRef;\n if (componentRef && componentRef.instance && typeof componentRef.instance[hookName] === 'function') {\n componentRef.instance[hookName]();\n }\n }\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ResourceResolver implements Resolve<void> {\n private processedUrls = new Map<string, number>();\n private readonly URL_DEBOUNCE_MS = 100; // Allow same URL after 100ms\n private loggedInPromise: Promise<void> | null = null;\n\n /**\n * Optional explicit metadata provider. The shell calls\n * `setProvider(this.ProviderToUse)` after acquiring this resolver from DI.\n * Falls back to `Metadata.Provider` for single-provider apps.\n */\n private _provider: IMetadataProvider | null = null;\n\n public set Provider(value: IMetadataProvider | null) {\n this._provider = value;\n }\n\n public get Provider(): IMetadataProvider {\n return this._provider ?? Metadata.Provider;\n }\n\n constructor(\n private sharedService: SharedService,\n private router: Router,\n private appManager: ApplicationManager,\n private tabService: TabService\n ) {\n // Create a promise that resolves when the user is logged in and metadata is loaded\n this.loggedInPromise = this.waitForLogin();\n }\n\n /**\n * Wait for the LoggedIn event which indicates metadata is loaded.\n * Uses replay (true) to catch the event even if it already fired.\n */\n private async waitForLogin(): Promise<void> {\n await firstValueFrom(\n MJGlobal.Instance.GetEventListener(true).pipe(\n filter(event => event.event === MJEventType.LoggedIn),\n take(1)\n )\n );\n\n await StartupManager.Instance.Startup();\n\n await this.appManager.WhenReady();\n }\n\n async resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<void> {\n // Wait for login/metadata to be ready before processing\n if (this.loggedInPromise) {\n await this.loggedInPromise;\n }\n\n // Prevent duplicate processing of the same URL within a short time window\n // This allows legitimate re-navigation to the same URL (like app switching)\n // while preventing rapid duplicate calls\n const now = Date.now();\n const lastProcessed = this.processedUrls.get(state.url);\n\n if (lastProcessed && (now - lastProcessed) < this.URL_DEBOUNCE_MS) {\n return;\n }\n\n this.processedUrls.set(state.url, now);\n\n // Check if this resolve should be suppressed (URL sync from tab click, not real navigation)\n if (this.tabService.ShouldSuppressResolve()) {\n this.tabService.ClearSuppressFlag();\n return;\n }\n\n const md = this.Provider;\n const applications = md.Applications;\n\n // Known resource types for app-scoped resource URLs\n const KNOWN_RESOURCE_TYPES = ['dashboard', 'record', 'view', 'query', 'report', 'artifact', 'search'];\n\n // Handle app-scoped resource navigation: /app/:appName/:resourceType/:param1/:param2?\n // This pattern supports resources opened within an app context (e.g., /app/home/dashboard/abc123)\n // Only handle if the second path segment is a known resource type\n if (route.params['appName'] !== undefined &&\n route.params['resourceType'] !== undefined &&\n KNOWN_RESOURCE_TYPES.includes(route.params['resourceType'].toLowerCase())) {\n const appName = decodeURIComponent(route.params['appName']);\n const resourceType = route.params['resourceType'].toLowerCase();\n const param1 = route.params['param1'];\n const param2 = route.params['param2'];\n\n // Check app access\n const accessResult = this.appManager.CheckAppAccess(appName);\n if (accessResult.status !== 'accessible') {\n return;\n }\n\n // Get the app for its ID\n const app = this.appManager.GetAppByPath(appName) || this.appManager.GetAppByName(appName);\n if (!app) {\n LogError(`Application ${appName} not found in metadata`);\n return;\n }\n\n // Handle based on resource type\n switch (resourceType) {\n case 'dashboard': {\n // /app/:appName/dashboard/:dashboardId\n const dashboardId = param1;\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: `Dashboard - ${dashboardId}`,\n Configuration: {\n resourceType: 'Dashboards',\n dashboardId,\n recordId: dashboardId,\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: dashboardId,\n IsPinned: false\n });\n return;\n }\n\n case 'record': {\n // /app/:appName/record/:entityName/:recordId\n const entityName = decodeURIComponent(param1);\n const recordId = param2;\n\n const entityInfo = md.EntityByName(entityName);\n if (!entityInfo) {\n LogError(`Entity ${entityName} not found in metadata`);\n return;\n }\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: `${entityName} - ${recordId}`,\n Configuration: {\n resourceType: RECORDS_RESOURCE_TYPE,\n Entity: entityName,\n recordId: recordId,\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: recordId,\n IsPinned: false\n });\n return;\n }\n\n case 'view': {\n // /app/:appName/view/:viewId OR /app/:appName/view/dynamic/:entityName\n if (param1 === 'dynamic' && param2) {\n // Dynamic view: /app/:appName/view/dynamic/:entityName\n const entityName = decodeURIComponent(param2);\n const extraFilter = route.queryParams['ExtraFilter'] || route.queryParams['extraFilter'];\n const filterSuffix = extraFilter ? ' (Filtered)' : '';\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: `${entityName}${filterSuffix}`,\n Configuration: {\n resourceType: 'MJ: User Views',\n Entity: entityName,\n ExtraFilter: extraFilter,\n isDynamic: true,\n recordId: 'dynamic',\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: 'dynamic',\n IsPinned: false\n });\n } else {\n // Saved view: /app/:appName/view/:viewId\n const viewId = param1;\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: `View - ${viewId}`,\n Configuration: {\n resourceType: 'MJ: User Views',\n viewId,\n recordId: viewId,\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: viewId,\n IsPinned: false\n });\n }\n return;\n }\n\n case 'query': {\n // /app/:appName/query/:queryId\n const queryId = param1;\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: `Query - ${queryId}`,\n Configuration: {\n resourceType: 'Queries',\n queryId,\n recordId: queryId,\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: queryId,\n IsPinned: false\n });\n return;\n }\n\n case 'artifact': {\n // /app/:appName/artifact/:artifactId\n const artifactId = param1;\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: `Artifact - ${artifactId}`,\n Configuration: {\n resourceType: 'Artifacts',\n artifactId,\n recordId: artifactId,\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: artifactId,\n IsPinned: false\n });\n return;\n }\n\n case 'search': {\n // /app/:appName/search/:searchInput\n const searchInput = decodeURIComponent(param1);\n const entityName = route.queryParams['Entity'] || '';\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: `Search: ${searchInput}`,\n Configuration: {\n resourceType: 'Search Results',\n Entity: entityName,\n SearchInput: searchInput,\n recordId: searchInput,\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: searchInput,\n IsPinned: false\n });\n return;\n }\n\n default:\n LogError(`Unknown resource type in app-scoped URL: ${resourceType}`);\n return;\n }\n }\n\n // Handle app-level navigation: /app/:appName (no nav item - app default)\n if (route.params['appName'] !== undefined && route.params['navItemName'] === undefined) {\n const appName = decodeURIComponent(route.params['appName']);\n\n // IMPORTANT: Check if user has access to this app BEFORE proceeding\n // Use the ApplicationManager's access check which respects UserApplication records\n const accessResult = this.appManager.CheckAppAccess(appName);\n\n if (accessResult.status !== 'accessible') {\n // User doesn't have access - let the shell component handle the error dialog\n // Don't create any tabs here\n return;\n }\n\n // Let the app create its default tab (will load default dashboard if no nav items)\n // The shell component will handle this after setting the active app\n // We don't need to do anything here - just return to allow the app to activate\n return;\n }\n\n // Handle app navigation: /app/:appName/:navItemName\n if (route.params['appName'] !== undefined && route.params['navItemName'] !== undefined) {\n const appName = decodeURIComponent(route.params['appName']);\n const navItemName = decodeURIComponent(route.params['navItemName']);\n\n // IMPORTANT: Check if user has access to this app BEFORE proceeding\n // Use the ApplicationManager's access check which respects UserApplication records\n const accessResult = this.appManager.CheckAppAccess(appName);\n\n if (accessResult.status !== 'accessible') {\n // User doesn't have access - let the shell component handle the error dialog\n // Don't create any tabs here\n return;\n }\n\n // Find the app in metadata for nav item details\n const app = applications.find(a =>\n a.Path.trim().toLowerCase() === appName.trim().toLowerCase() ||\n a.Name.trim().toLowerCase() === appName.trim().toLowerCase()\n );\n\n if (!app) {\n LogError(`Application ${appName} not found in metadata`);\n return;\n }\n\n // Get nav items from the app's DefaultNavItems JSON\n let navItems: any[] = [];\n if (app.DefaultNavItems) {\n try {\n navItems = JSON.parse(app.DefaultNavItems);\n } catch (e) {\n LogError(`Failed to parse DefaultNavItems for app ${appName}`);\n console.error(e);\n return;\n }\n }\n\n // Find the nav item by label (case-insensitive)\n const navItem = navItems.find(item =>\n item.Label?.trim().toLowerCase() === navItemName.trim().toLowerCase()\n );\n\n if (!navItem) {\n LogError(`Nav item ${navItemName} not found in app ${appName}`);\n return;\n }\n\n // Get the resource type from the nav item\n if (!navItem.ResourceType) {\n LogError(`Nav item ${navItemName} has no ResourceType defined`);\n return;\n }\n\n // NOTE: Don't set active app here - the shell component handles that\n // based on the URL to avoid navigation loops\n\n // Queue tab request via TabService\n // Build configuration - include DriverClass for Custom resource types\n const config: any = {\n route: navItem.Route,\n resourceType: navItem.ResourceType,\n recordId: navItem.RecordID,\n appName: appName,\n appId: app.ID,\n navItemName: navItem.Label,\n ...(navItem.Configuration || {}),\n queryParams: route.queryParams\n };\n\n // For Custom resource types, include the DriverClass\n if (navItem.ResourceType === 'Custom' && navItem.DriverClass) {\n config.driverClass = navItem.DriverClass;\n }\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: navItem.Label,\n Configuration: config,\n IsPinned: false\n });\n\n return;\n }\n\n // Determine resource type and record ID based on the route path\n if (route.params['recordId'] !== undefined && route.params['entityName'] !== undefined) {\n // /resource/record/:entityName/:recordId\n const entityName = decodeURIComponent(route.params['entityName']);\n const recordId = route.params['recordId'];\n\n const entityInfo = md.EntityByName(entityName);\n if (!entityInfo) {\n LogError(`Entity ${entityName} not found in metadata`);\n return;\n }\n\n // Queue tab request via TabService\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: `${entityName} - ${recordId}`,\n Configuration: {\n resourceType: RECORDS_RESOURCE_TYPE,\n Entity: entityName,\n recordId: recordId\n },\n ResourceRecordId: recordId,\n IsPinned: false\n });\n return;\n }\n\n if (route.params['viewId'] !== undefined) {\n // /resource/view/:viewId (saved views)\n const viewId = route.params['viewId'];\n\n // Queue tab request via TabService\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: `View - ${viewId}`,\n Configuration: {\n resourceType: 'MJ: User Views',\n viewId,\n recordId: viewId\n },\n ResourceRecordId: viewId,\n IsPinned: false\n });\n return;\n }\n\n if (route.url.length >= 3 && route.url[1].path === 'view' && route.url[2].path === 'dynamic') {\n // /resource/view/dynamic/:entityName\n const entityName = decodeURIComponent(route.params['entityName']);\n const extraFilter = route.queryParams['ExtraFilter'] || route.queryParams['extraFilter'];\n\n const filterSuffix = extraFilter ? ' (Filtered)' : '';\n\n // Queue tab request via TabService\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: `${entityName}${filterSuffix}`,\n Configuration: {\n resourceType: 'MJ: User Views',\n Entity: entityName,\n ExtraFilter: extraFilter,\n isDynamic: true,\n recordId: 'dynamic'\n },\n ResourceRecordId: 'dynamic',\n IsPinned: false\n });\n return;\n }\n\n if (route.params['dashboardId'] !== undefined) {\n // /resource/dashboard/:dashboardId\n const dashboardId = route.params['dashboardId'];\n\n // Queue tab request via TabService\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: `Dashboard - ${dashboardId}`,\n Configuration: {\n resourceType: 'Dashboards',\n dashboardId,\n recordId: dashboardId\n },\n ResourceRecordId: dashboardId,\n IsPinned: false\n });\n return;\n }\n\n if (route.params['artifactId'] !== undefined) {\n // /resource/artifact/:artifactId\n const artifactId = route.params['artifactId'];\n\n // Queue tab request via TabService\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: `Artifact - ${artifactId}`,\n Configuration: {\n resourceType: 'Artifacts',\n artifactId,\n recordId: artifactId\n },\n ResourceRecordId: artifactId,\n IsPinned: false\n });\n return;\n }\n\n if (route.params['queryId'] !== undefined) {\n // /resource/query/:queryId\n const queryId = route.params['queryId'];\n\n // Queue tab request via TabService\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: `Query - ${queryId}`,\n Configuration: {\n resourceType: 'Queries',\n queryId,\n recordId: queryId\n },\n ResourceRecordId: queryId,\n IsPinned: false\n });\n return;\n }\n\n if (route.params['searchInput'] !== undefined) {\n const searchInput = decodeURIComponent(route.params['searchInput']);\n\n // Unified search route: always use SearchResultsResource\n // Pass Query for the ng-search service, and legacy SearchInput for backward compat\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: `Search: ${searchInput}`,\n Configuration: {\n resourceType: 'Custom',\n driverClass: 'SearchResultsResource',\n Query: searchInput,\n SearchInput: searchInput,\n recordId: `search-${searchInput}`\n },\n ResourceRecordId: `search-${searchInput}`,\n IsPinned: false\n });\n return;\n }\n\n LogError(`Unable to parse resource route parameters from URL: ${state.url}`);\n }\n}\n\nconst routes: Routes = [\n // OAuth callback route - must be FIRST as it handles redirects from OAuth providers\n // This route does NOT require AuthGuard because it's the callback from external OAuth\n // The component itself handles authentication when calling the exchange endpoint\n // NOTE: We use component directly instead of loadChildren because lazy loading\n // doesn't work correctly when the route is defined in a library (explorer-core)\n // rather than the main application.\n {\n path: 'oauth/callback',\n component: OAuthCallbackComponent\n },\n\n // App-scoped resource routes (new pattern)\n // These must come BEFORE app/:appName/:navItemName to be matched first\n {\n path: 'app/:appName/view/dynamic/:param2',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n data: { resourceType: 'view' }\n },\n {\n path: 'app/:appName/record/:param1/:param2',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n data: { resourceType: 'record' }\n },\n {\n path: 'app/:appName/:resourceType/:param1',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n // App navigation routes\n {\n path: 'app/:appName/:navItemName',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'app/:appName',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n // Legacy resource routes (kept for backward compatibility, will redirect in future)\n {\n path: 'resource/record/:entityName/:recordId',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'resource/view/dynamic/:entityName',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'resource/view/:viewId',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'resource/dashboard/:dashboardId',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'resource/artifact/:artifactId',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'resource/query/:queryId',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'resource/search/:searchInput',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n }\n];\n\ninterface DetachedRouteHandleExt extends DetachedRouteHandle {\n componentRef: ComponentRef<any>;\n}\n\n@NgModule({\n imports: [RouterModule.forRoot(routes, { onSameUrlNavigation: 'reload' })],\n exports: [RouterModule],\n})\nexport class AppRoutingModule {\n // NOTE - in MJ Explorer 3.0 and beyond we do NOT use Explorer Navigation Items anymore and\n // this allows us to remove the dyanmic route stuff entirely here. The NEW paradigm is \n // everything beyond resource navigation is an app and apps have the ability to define \n // nav items which is a superset of functionality compared to the old Explorer Nav Items.\n}"]}
|
|
1
|
+
{"version":3,"file":"app-routing.module.js","sourceRoot":"","sources":["../src/app-routing.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAU,YAAY,EAAgE,MAAM,iBAAiB,CAAC;AACrH,OAAO,EACL,qBAAqB,EACrB,gBAAgB,IAAI,SAAS,EAC7B,mBAAmB,IAAI,YAAY,EACpC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAqB,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACpJ,OAAO,EAAiB,aAAa,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGhG,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;;;;;AAEpD,MAAM,OAAO,mBAAmB;IAC9B,YAAY,GAAqD,EAAE,CAAC;IAEpE,sDAAsD;IACtD,YAAY,CAAC,KAA6B;QACxC,4HAA4H;QAC5H,OAAO,KAAK,CAAC;IACf,CAAC;IAED,4BAA4B;IAC5B,KAAK,CAAC,KAA6B,EAAE,MAAqC;QACxE,IAAG,CAAC,MAAM,EAAC,CAAC;YACV,OAAO;QACT,CAAC;QAED,IAAI,KA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,MAAM,EAAE,EAAE,mBAAmB,EAAE,QAAQ,EAAE,CAAC,EAC/D,YAAY;;iFAEX,gBAAgB;cAJ5B,QAAQ;eAAC;gBACR,OAAO,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,mBAAmB,EAAE,QAAQ,EAAE,CAAC,CAAC;gBAC1E,OAAO,EAAE,CAAC,YAAY,CAAC;aACxB;;wFACY,gBAAgB,0CAFjB,YAAY","sourcesContent":["import { ComponentRef, Injectable, NgModule } from '@angular/core';\nimport { Routes, RouterModule, Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';\nimport {\n SingleRecordComponent,\n AuthGuardService as AuthGuard,\n AppLockGuardService as AppLockGuard\n} from './public-api';\nimport { OAuthCallbackComponent } from './lib/oauth/oauth-callback.component';\nimport { LogError, Metadata, StartupManager, IMetadataProvider, IsNewEntityRecordUrlId, NEW_RECORD_VALUES_QUERY_PARAM } from '@memberjunction/core';\nimport { SharedService, SYSTEM_APP_ID, RECORDS_RESOURCE_TYPE } from '@memberjunction/ng-shared';\nimport { DetachedRouteHandle, RouteReuseStrategy } from '@angular/router';\nimport { ApplicationManager, TabService } from '@memberjunction/ng-base-application';\nimport { MJGlobal, MJEventType } from '@memberjunction/global';\nimport { firstValueFrom, filter, take } from 'rxjs';\n\nexport class CustomReuseStrategy implements RouteReuseStrategy {\n storedRoutes: { [key: string]: DetachedRouteHandleExt | null } = {};\n\n // Determines if a route should be detached and stored\n shouldDetach(route: ActivatedRouteSnapshot): boolean {\n // removed reference to the skip stuff from here - we don't use the skip stuff anymore, using generic conversations/chat now\n return false;\n }\n\n // Stores the detached route\n store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandleExt | null): void {\n if(!handle){\n return;\n }\n\n if (route.routeConfig && route.routeConfig.path) {\n this.storedRoutes[route.routeConfig.path] = handle;\n this.callHook(handle, 'ngOnDetach');\n }\n }\n\n // Determines if a stored route should be reattached\n shouldAttach(route: ActivatedRouteSnapshot): boolean {\n // Reattach if we have a stored route for the incoming route\n if (route.routeConfig?.path) {\n return !!route.routeConfig && !!this.storedRoutes[route.routeConfig.path];\n }\n\n else return false;\n }\n\n // Retrieves the stored route; null means no stored route for this path\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\n if (!route.routeConfig || (route.routeConfig.path && !this.storedRoutes[route.routeConfig.path])) {\n return null;\n } \n else if (route.routeConfig.path) {\n const path = this.storedRoutes[route.routeConfig.path];\n if(path){\n this.callHook(path, 'ngOnAttach');\n return path;\n }\n }\n\n return null;\n }\n\n // Determines if the route should be reused.\n // Query params are intentionally excluded — the shell handles query param\n // sub-navigation via NotifyQueryParamsChanged. Including them here would\n // cause the ResourceResolver to re-run on back/forward query param changes,\n // racing with the shell's syncWorkspaceWithUrl.\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n return future.routeConfig === curr.routeConfig &&\n this.objectContentsEqual(future.params, curr.params);\n }\n\n objectContentsEqual(obj1: any, obj2: any): boolean {\n if (obj1 === obj2) {\n return true; // exact same object\n }\n\n if (obj1 === null && obj2 !== null) {\n return false; // not the same object\n }\n\n if (obj1 === undefined && obj2 !== undefined) {\n return false; // not the same object\n }\n\n if (typeof obj1 === 'object' || typeof obj2 === 'object') {\n if (Object.keys(obj1).length !== Object.keys(obj2).length) {\n return false; // different number of keys\n }\n \n for (const key in obj1) {\n // check to see the type of the key, if it is an object, then we call this function recursively \n // otherwise we do simple comparison\n if (typeof obj1[key] === 'object' && typeof obj2[key] === 'object') {\n if (!this.objectContentsEqual(obj1[key], obj2[key])) {\n return false; // any individual key not matching means the objects are different\n }\n }\n else if (obj1[key] !== obj2[key]) {\n return false; // any individual key not matching means the objects are different\n }\n } \n }\n\n return true;\n }\n\n private callHook(detachedTree: DetachedRouteHandleExt, hookName: 'ngOnDetach' | 'ngOnAttach'): void {\n if(!detachedTree || !hookName){\n return;\n }\n\n const componentRef = detachedTree.componentRef;\n if (componentRef && componentRef.instance && typeof componentRef.instance[hookName] === 'function') {\n componentRef.instance[hookName]();\n }\n }\n}\n\nfunction readNewRecordValuesQuery(queryParams: { [key: string]: string | string[] | undefined | null }): string | undefined {\n const raw = queryParams[NEW_RECORD_VALUES_QUERY_PARAM] ?? queryParams['newRecordValues'];\n if (raw == null) return undefined;\n const value = Array.isArray(raw) ? raw[0] : raw;\n const trimmed = value?.trim();\n return trimmed && trimmed.length > 0 ? trimmed : undefined;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ResourceResolver implements Resolve<void> {\n private processedUrls = new Map<string, number>();\n private readonly URL_DEBOUNCE_MS = 100; // Allow same URL after 100ms\n private loggedInPromise: Promise<void> | null = null;\n\n /**\n * Optional explicit metadata provider. The shell calls\n * `setProvider(this.ProviderToUse)` after acquiring this resolver from DI.\n * Falls back to `Metadata.Provider` for single-provider apps.\n */\n private _provider: IMetadataProvider | null = null;\n\n public set Provider(value: IMetadataProvider | null) {\n this._provider = value;\n }\n\n public get Provider(): IMetadataProvider {\n return this._provider ?? Metadata.Provider;\n }\n\n constructor(\n private sharedService: SharedService,\n private router: Router,\n private appManager: ApplicationManager,\n private tabService: TabService\n ) {\n // Create a promise that resolves when the user is logged in and metadata is loaded\n this.loggedInPromise = this.waitForLogin();\n }\n\n /**\n * Wait for the LoggedIn event which indicates metadata is loaded.\n * Uses replay (true) to catch the event even if it already fired.\n */\n private async waitForLogin(): Promise<void> {\n await firstValueFrom(\n MJGlobal.Instance.GetEventListener(true).pipe(\n filter(event => event.event === MJEventType.LoggedIn),\n take(1)\n )\n );\n\n await StartupManager.Instance.Startup();\n\n await this.appManager.WhenReady();\n }\n\n async resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<void> {\n // Wait for login/metadata to be ready before processing\n if (this.loggedInPromise) {\n await this.loggedInPromise;\n }\n\n // Prevent duplicate processing of the same URL within a short time window\n // This allows legitimate re-navigation to the same URL (like app switching)\n // while preventing rapid duplicate calls\n const now = Date.now();\n const lastProcessed = this.processedUrls.get(state.url);\n\n if (lastProcessed && (now - lastProcessed) < this.URL_DEBOUNCE_MS) {\n return;\n }\n\n this.processedUrls.set(state.url, now);\n\n // Check if this resolve should be suppressed (URL sync from tab click, not real navigation)\n if (this.tabService.ShouldSuppressResolve()) {\n this.tabService.ClearSuppressFlag();\n return;\n }\n\n const md = this.Provider;\n const applications = md.Applications;\n\n // Known resource types for app-scoped resource URLs\n const KNOWN_RESOURCE_TYPES = ['dashboard', 'record', 'view', 'query', 'report', 'artifact', 'search'];\n\n // Handle app-scoped resource navigation: /app/:appName/:resourceType/:param1/:param2?\n // This pattern supports resources opened within an app context (e.g., /app/home/dashboard/abc123)\n // Only handle if the second path segment is a known resource type\n if (route.params['appName'] !== undefined &&\n route.params['resourceType'] !== undefined &&\n KNOWN_RESOURCE_TYPES.includes(route.params['resourceType'].toLowerCase())) {\n const appName = decodeURIComponent(route.params['appName']);\n const resourceType = route.params['resourceType'].toLowerCase();\n const param1 = route.params['param1'];\n const param2 = route.params['param2'];\n\n // Check app access\n const accessResult = this.appManager.CheckAppAccess(appName);\n if (accessResult.status !== 'accessible') {\n return;\n }\n\n // Get the app for its ID\n const app = this.appManager.GetAppByPath(appName) || this.appManager.GetAppByName(appName);\n if (!app) {\n LogError(`Application ${appName} not found in metadata`);\n return;\n }\n\n // Handle based on resource type\n switch (resourceType) {\n case 'dashboard': {\n // /app/:appName/dashboard/:dashboardId\n const dashboardId = param1;\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: `Dashboard - ${dashboardId}`,\n Configuration: {\n resourceType: 'Dashboards',\n dashboardId,\n recordId: dashboardId,\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: dashboardId,\n IsPinned: false\n });\n return;\n }\n\n case 'record': {\n // /app/:appName/record/:entityName/:recordId\n const entityName = decodeURIComponent(param1);\n const recordId = param2;\n const isNew = IsNewEntityRecordUrlId(recordId);\n const newRecordValues = readNewRecordValuesQuery(route.queryParams);\n\n const entityInfo = md.EntityByName(entityName);\n if (!entityInfo) {\n LogError(`Entity ${entityName} not found in metadata`);\n return;\n }\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: isNew ? `New ${entityName}` : `${entityName} - ${recordId}`,\n Configuration: {\n resourceType: RECORDS_RESOURCE_TYPE,\n Entity: entityName,\n recordId: isNew ? '' : recordId,\n isNew: isNew || undefined,\n NewRecordValues: newRecordValues,\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: isNew ? '' : recordId,\n IsPinned: false\n });\n return;\n }\n\n case 'view': {\n // /app/:appName/view/:viewId OR /app/:appName/view/dynamic/:entityName\n if (param1 === 'dynamic' && param2) {\n // Dynamic view: /app/:appName/view/dynamic/:entityName\n const entityName = decodeURIComponent(param2);\n const extraFilter = route.queryParams['ExtraFilter'] || route.queryParams['extraFilter'];\n const filterSuffix = extraFilter ? ' (Filtered)' : '';\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: `${entityName}${filterSuffix}`,\n Configuration: {\n resourceType: 'MJ: User Views',\n Entity: entityName,\n ExtraFilter: extraFilter,\n isDynamic: true,\n recordId: 'dynamic',\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: 'dynamic',\n IsPinned: false\n });\n } else {\n // Saved view: /app/:appName/view/:viewId\n const viewId = param1;\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: `View - ${viewId}`,\n Configuration: {\n resourceType: 'MJ: User Views',\n viewId,\n recordId: viewId,\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: viewId,\n IsPinned: false\n });\n }\n return;\n }\n\n case 'query': {\n // /app/:appName/query/:queryId\n const queryId = param1;\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: `Query - ${queryId}`,\n Configuration: {\n resourceType: 'Queries',\n queryId,\n recordId: queryId,\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: queryId,\n IsPinned: false\n });\n return;\n }\n\n case 'artifact': {\n // /app/:appName/artifact/:artifactId\n const artifactId = param1;\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: `Artifact - ${artifactId}`,\n Configuration: {\n resourceType: 'Artifacts',\n artifactId,\n recordId: artifactId,\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: artifactId,\n IsPinned: false\n });\n return;\n }\n\n case 'search': {\n // /app/:appName/search/:searchInput\n const searchInput = decodeURIComponent(param1);\n const entityName = route.queryParams['Entity'] || '';\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: `Search: ${searchInput}`,\n Configuration: {\n resourceType: 'Search Results',\n Entity: entityName,\n SearchInput: searchInput,\n recordId: searchInput,\n appName: appName,\n appId: app.ID\n },\n ResourceRecordId: searchInput,\n IsPinned: false\n });\n return;\n }\n\n default:\n LogError(`Unknown resource type in app-scoped URL: ${resourceType}`);\n return;\n }\n }\n\n // Handle app-level navigation: /app/:appName (no nav item - app default)\n if (route.params['appName'] !== undefined && route.params['navItemName'] === undefined) {\n const appName = decodeURIComponent(route.params['appName']);\n\n // IMPORTANT: Check if user has access to this app BEFORE proceeding\n // Use the ApplicationManager's access check which respects UserApplication records\n const accessResult = this.appManager.CheckAppAccess(appName);\n\n if (accessResult.status !== 'accessible') {\n // User doesn't have access - let the shell component handle the error dialog\n // Don't create any tabs here\n return;\n }\n\n // Let the app create its default tab (will load default dashboard if no nav items)\n // The shell component will handle this after setting the active app\n // We don't need to do anything here - just return to allow the app to activate\n return;\n }\n\n // Handle app navigation: /app/:appName/:navItemName\n if (route.params['appName'] !== undefined && route.params['navItemName'] !== undefined) {\n const appName = decodeURIComponent(route.params['appName']);\n const navItemName = decodeURIComponent(route.params['navItemName']);\n\n // IMPORTANT: Check if user has access to this app BEFORE proceeding\n // Use the ApplicationManager's access check which respects UserApplication records\n const accessResult = this.appManager.CheckAppAccess(appName);\n\n if (accessResult.status !== 'accessible') {\n // User doesn't have access - let the shell component handle the error dialog\n // Don't create any tabs here\n return;\n }\n\n // Find the app in metadata for nav item details\n const app = applications.find(a =>\n a.Path.trim().toLowerCase() === appName.trim().toLowerCase() ||\n a.Name.trim().toLowerCase() === appName.trim().toLowerCase()\n );\n\n if (!app) {\n LogError(`Application ${appName} not found in metadata`);\n return;\n }\n\n // Get nav items from the app's DefaultNavItems JSON\n let navItems: any[] = [];\n if (app.DefaultNavItems) {\n try {\n navItems = JSON.parse(app.DefaultNavItems);\n } catch (e) {\n LogError(`Failed to parse DefaultNavItems for app ${appName}`);\n console.error(e);\n return;\n }\n }\n\n // Find the nav item by label (case-insensitive)\n const navItem = navItems.find(item =>\n item.Label?.trim().toLowerCase() === navItemName.trim().toLowerCase()\n );\n\n if (!navItem) {\n LogError(`Nav item ${navItemName} not found in app ${appName}`);\n return;\n }\n\n // Get the resource type from the nav item\n if (!navItem.ResourceType) {\n LogError(`Nav item ${navItemName} has no ResourceType defined`);\n return;\n }\n\n // NOTE: Don't set active app here - the shell component handles that\n // based on the URL to avoid navigation loops\n\n // Queue tab request via TabService\n // Build configuration - include DriverClass for Custom resource types\n const config: any = {\n route: navItem.Route,\n resourceType: navItem.ResourceType,\n recordId: navItem.RecordID,\n appName: appName,\n appId: app.ID,\n navItemName: navItem.Label,\n ...(navItem.Configuration || {}),\n queryParams: route.queryParams\n };\n\n // For Custom resource types, include the DriverClass\n if (navItem.ResourceType === 'Custom' && navItem.DriverClass) {\n config.driverClass = navItem.DriverClass;\n }\n\n this.tabService.OpenTab({\n ApplicationId: app.ID,\n Title: navItem.Label,\n Configuration: config,\n IsPinned: false\n });\n\n return;\n }\n\n // Determine resource type and record ID based on the route path\n if (route.params['recordId'] !== undefined && route.params['entityName'] !== undefined) {\n // /resource/record/:entityName/:recordId\n const entityName = decodeURIComponent(route.params['entityName']);\n const recordId = route.params['recordId'];\n const isNew = IsNewEntityRecordUrlId(recordId);\n const newRecordValues = readNewRecordValuesQuery(route.queryParams);\n\n const entityInfo = md.EntityByName(entityName);\n if (!entityInfo) {\n LogError(`Entity ${entityName} not found in metadata`);\n return;\n }\n\n // Queue tab request via TabService\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: isNew ? `New ${entityName}` : `${entityName} - ${recordId}`,\n Configuration: {\n resourceType: RECORDS_RESOURCE_TYPE,\n Entity: entityName,\n recordId: isNew ? '' : recordId,\n isNew: isNew || undefined,\n NewRecordValues: newRecordValues\n },\n ResourceRecordId: isNew ? '' : recordId,\n IsPinned: false\n });\n return;\n }\n\n if (route.params['viewId'] !== undefined) {\n // /resource/view/:viewId (saved views)\n const viewId = route.params['viewId'];\n\n // Queue tab request via TabService\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: `View - ${viewId}`,\n Configuration: {\n resourceType: 'MJ: User Views',\n viewId,\n recordId: viewId\n },\n ResourceRecordId: viewId,\n IsPinned: false\n });\n return;\n }\n\n if (route.url.length >= 3 && route.url[1].path === 'view' && route.url[2].path === 'dynamic') {\n // /resource/view/dynamic/:entityName\n const entityName = decodeURIComponent(route.params['entityName']);\n const extraFilter = route.queryParams['ExtraFilter'] || route.queryParams['extraFilter'];\n\n const filterSuffix = extraFilter ? ' (Filtered)' : '';\n\n // Queue tab request via TabService\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: `${entityName}${filterSuffix}`,\n Configuration: {\n resourceType: 'MJ: User Views',\n Entity: entityName,\n ExtraFilter: extraFilter,\n isDynamic: true,\n recordId: 'dynamic'\n },\n ResourceRecordId: 'dynamic',\n IsPinned: false\n });\n return;\n }\n\n if (route.params['dashboardId'] !== undefined) {\n // /resource/dashboard/:dashboardId\n const dashboardId = route.params['dashboardId'];\n\n // Queue tab request via TabService\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: `Dashboard - ${dashboardId}`,\n Configuration: {\n resourceType: 'Dashboards',\n dashboardId,\n recordId: dashboardId\n },\n ResourceRecordId: dashboardId,\n IsPinned: false\n });\n return;\n }\n\n if (route.params['artifactId'] !== undefined) {\n // /resource/artifact/:artifactId\n const artifactId = route.params['artifactId'];\n\n // Queue tab request via TabService\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: `Artifact - ${artifactId}`,\n Configuration: {\n resourceType: 'Artifacts',\n artifactId,\n recordId: artifactId\n },\n ResourceRecordId: artifactId,\n IsPinned: false\n });\n return;\n }\n\n if (route.params['queryId'] !== undefined) {\n // /resource/query/:queryId\n const queryId = route.params['queryId'];\n\n // Queue tab request via TabService\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: `Query - ${queryId}`,\n Configuration: {\n resourceType: 'Queries',\n queryId,\n recordId: queryId\n },\n ResourceRecordId: queryId,\n IsPinned: false\n });\n return;\n }\n\n if (route.params['searchInput'] !== undefined) {\n const searchInput = decodeURIComponent(route.params['searchInput']);\n\n // Unified search route: always use SearchResultsResource\n // Pass Query for the ng-search service, and legacy SearchInput for backward compat\n this.tabService.OpenTab({\n ApplicationId: SYSTEM_APP_ID,\n Title: `Search: ${searchInput}`,\n Configuration: {\n resourceType: 'Custom',\n driverClass: 'SearchResultsResource',\n Query: searchInput,\n SearchInput: searchInput,\n recordId: `search-${searchInput}`\n },\n ResourceRecordId: `search-${searchInput}`,\n IsPinned: false\n });\n return;\n }\n\n LogError(`Unable to parse resource route parameters from URL: ${state.url}`);\n }\n}\n\nconst routes: Routes = [\n // OAuth callback route - must be FIRST as it handles redirects from OAuth providers\n // This route does NOT require AuthGuard because it's the callback from external OAuth\n // The component itself handles authentication when calling the exchange endpoint\n // NOTE: We use component directly instead of loadChildren because lazy loading\n // doesn't work correctly when the route is defined in a library (explorer-core)\n // rather than the main application.\n {\n path: 'oauth/callback',\n component: OAuthCallbackComponent\n },\n\n // App-scoped resource routes (new pattern)\n // These must come BEFORE app/:appName/:navItemName to be matched first\n {\n path: 'app/:appName/view/dynamic/:param2',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n data: { resourceType: 'view' }\n },\n {\n path: 'app/:appName/record/:param1/:param2',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n data: { resourceType: 'record' }\n },\n {\n path: 'app/:appName/:resourceType/:param1',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n // App navigation routes\n {\n path: 'app/:appName/:navItemName',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'app/:appName',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n // Legacy resource routes (kept for backward compatibility, will redirect in future)\n {\n path: 'resource/record/:entityName/:recordId',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'resource/view/dynamic/:entityName',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'resource/view/:viewId',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'resource/dashboard/:dashboardId',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'resource/artifact/:artifactId',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'resource/query/:queryId',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n },\n {\n path: 'resource/search/:searchInput',\n resolve: { data: ResourceResolver },\n canActivate: [AuthGuard, AppLockGuard],\n component: SingleRecordComponent,\n }\n];\n\ninterface DetachedRouteHandleExt extends DetachedRouteHandle {\n componentRef: ComponentRef<any>;\n}\n\n@NgModule({\n imports: [RouterModule.forRoot(routes, { onSameUrlNavigation: 'reload' })],\n exports: [RouterModule],\n})\nexport class AppRoutingModule {\n // NOTE - in MJ Explorer 3.0 and beyond we do NOT use Explorer Navigation Items anymore and\n // this allows us to remove the dyanmic route stuff entirely here. The NEW paradigm is \n // everything beyond resource navigation is an app and apps have the ability to define \n // nav items which is a superset of functionality compared to the old Explorer Nav Items.\n}"]}
|
|
@@ -24,5 +24,5 @@ export declare const LAZY_FEATURE_CONFIG: Record<string, {
|
|
|
24
24
|
chunkId: string;
|
|
25
25
|
load: () => Promise<void>;
|
|
26
26
|
}>;
|
|
27
|
-
export declare const LAZY_FEATURE_CONFIG_COUNT =
|
|
27
|
+
export declare const LAZY_FEATURE_CONFIG_COUNT = 118;
|
|
28
28
|
//# sourceMappingURL=lazy-feature-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-feature-config.d.ts","sourceRoot":"","sources":["../../src/generated/lazy-feature-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"lazy-feature-config.d.ts","sourceRoot":"","sources":["../../src/generated/lazy-feature-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAoHH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CA6J9F,CAAC;AAEF,eAAO,MAAM,yBAAyB,MAAM,CAAC"}
|
|
@@ -91,6 +91,11 @@ const loadNgDashboardsTestingDashboardsModule = {
|
|
|
91
91
|
chunkId: '@memberjunction/ng-dashboards/testing-dashboards.module',
|
|
92
92
|
load: () => import('@memberjunction/ng-dashboards/testing-dashboards.module').then(() => { })
|
|
93
93
|
};
|
|
94
|
+
// --- @memberjunction/ng-dashboards → ./workflows-dashboards.module (3 entries) ---
|
|
95
|
+
const loadNgDashboardsWorkflowsDashboardsModule = {
|
|
96
|
+
chunkId: '@memberjunction/ng-dashboards/workflows-dashboards.module',
|
|
97
|
+
load: () => import('@memberjunction/ng-dashboards/workflows-dashboards.module').then(() => { })
|
|
98
|
+
};
|
|
94
99
|
// --- @memberjunction/ng-explorer-settings → ./settings.module (6 entries) ---
|
|
95
100
|
const loadNgExplorerSettingsSettingsModule = {
|
|
96
101
|
chunkId: '@memberjunction/ng-explorer-settings/settings.module',
|
|
@@ -233,6 +238,10 @@ export const LAZY_FEATURE_CONFIG = {
|
|
|
233
238
|
'BaseResourceComponent::TestingExplorerResource': loadNgDashboardsTestingDashboardsModule,
|
|
234
239
|
'BaseResourceComponent::TestingReviewResource': loadNgDashboardsTestingDashboardsModule,
|
|
235
240
|
'BaseResourceComponent::TestingRunsResource': loadNgDashboardsTestingDashboardsModule,
|
|
241
|
+
// @memberjunction/ng-dashboards → ./workflows-dashboards.module
|
|
242
|
+
'BaseDashboard::WorkflowsDashboard': loadNgDashboardsWorkflowsDashboardsModule,
|
|
243
|
+
'BaseResourceComponent::WorkflowRunsResource': loadNgDashboardsWorkflowsDashboardsModule,
|
|
244
|
+
'BaseResourceComponent::WorkflowsResource': loadNgDashboardsWorkflowsDashboardsModule,
|
|
236
245
|
// @memberjunction/ng-explorer-settings → ./settings.module
|
|
237
246
|
'BaseDashboard::ApplicationManagement': loadNgExplorerSettingsSettingsModule,
|
|
238
247
|
'BaseDashboard::EntityPermissions': loadNgExplorerSettingsSettingsModule,
|
|
@@ -245,5 +254,5 @@ export const LAZY_FEATURE_CONFIG = {
|
|
|
245
254
|
// @memberjunction/ng-react → .
|
|
246
255
|
'RuntimeUtilities::RuntimeUtilities': loadNgReact,
|
|
247
256
|
};
|
|
248
|
-
export const LAZY_FEATURE_CONFIG_COUNT =
|
|
257
|
+
export const LAZY_FEATURE_CONFIG_COUNT = 118;
|
|
249
258
|
//# sourceMappingURL=lazy-feature-config.js.map
|