@platform-mesh/portal-ui-lib 0.0.0 → 0.17.4

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.
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ //# sourceMappingURL=platform-mesh-portal-ui-lib-models.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-mesh-portal-ui-lib-models.mjs","sources":["../../projects/lib/models/platform-mesh-portal-ui-lib-models.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;AAEG"}
@@ -0,0 +1,475 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, DestroyRef, Injectable } from '@angular/core';
3
+ import { I18nService, AuthService, LuigiCoreService, ConfigService, EnvConfigService } from '@openmfp/portal-ui-lib';
4
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
+ import { ResourceService, GatewayService } from '@platform-mesh/portal-ui-lib/services';
6
+ import { generateGraphQLFields, replaceDotsAndHyphensWithUnderscores } from '@platform-mesh/portal-ui-lib/utils';
7
+ import '@ui5/webcomponents/dist/ComboBox.js';
8
+ import { of, firstValueFrom } from 'rxjs';
9
+ import { shareReplay } from 'rxjs/operators';
10
+ import '@ui5/webcomponents/dist/Breadcrumbs.js';
11
+ import '@ui5/webcomponents/dist/BreadcrumbsItem.js';
12
+
13
+ const kcpRootOrgsPath = 'root:orgs';
14
+
15
+ class CustomGlobalNodesServiceImpl {
16
+ constructor() {
17
+ this.i18nService = inject(I18nService);
18
+ }
19
+ async getCustomGlobalNodes() {
20
+ return [
21
+ {
22
+ label: 'PROFILE_ORGANIZATION_MANAGEMENT',
23
+ pathSegment: 'organization-management',
24
+ hideFromNav: true,
25
+ hideSideNav: true,
26
+ order: '1001',
27
+ viewUrl: '/assets/platform-mesh-portal-ui-wc.js#organization-management',
28
+ webcomponent: {
29
+ selfRegistered: true,
30
+ },
31
+ context: {
32
+ translationTable: this.i18nService.translationTable,
33
+ kcpPath: kcpRootOrgsPath,
34
+ },
35
+ },
36
+ {
37
+ pathSegment: 'users',
38
+ showBreadcrumbs: false,
39
+ hideSideNav: true,
40
+ hideFromNav: true,
41
+ entityType: 'global',
42
+ children: [
43
+ {
44
+ context: {
45
+ profileUserId: ':profileUserId',
46
+ },
47
+ defineEntity: {
48
+ id: 'user',
49
+ contextKey: 'profileUserId',
50
+ },
51
+ pathSegment: ':profileUserId',
52
+ hideSideNav: true,
53
+ hideFromNav: true,
54
+ children: [
55
+ {
56
+ pathSegment: 'overview',
57
+ hideSideNav: true,
58
+ hideFromNav: true,
59
+ defineEntity: {
60
+ id: 'overview',
61
+ },
62
+ compound: {
63
+ children: [],
64
+ },
65
+ },
66
+ ],
67
+ },
68
+ ],
69
+ },
70
+ ];
71
+ }
72
+ }
73
+
74
+ const defaultColumns = [
75
+ {
76
+ label: 'Name',
77
+ property: 'metadata.name',
78
+ },
79
+ ];
80
+ class NamespaceSelectionRendererService {
81
+ constructor() {
82
+ this.resourceService = inject(ResourceService);
83
+ this.authService = inject(AuthService);
84
+ this.luigiCoreService = inject(LuigiCoreService);
85
+ this.destroyRef = inject(DestroyRef);
86
+ }
87
+ create(portalConfig) {
88
+ return (containerElement, nodeItems, _clickHandler) => {
89
+ containerElement.style.paddingBottom = '0.5rem';
90
+ const lastNode = nodeItems.at(-1)?.node;
91
+ if (!this.isNamespacedNode(lastNode)) {
92
+ return containerElement;
93
+ }
94
+ const ui5combobox = this.createCombobox(containerElement);
95
+ const namespaceName = this.getNamespaceNodeName(lastNode);
96
+ this.addComboboxItems(portalConfig, ui5combobox, namespaceName);
97
+ ui5combobox.addEventListener('change', (event) => {
98
+ const value = event?.target?.value ?? '';
99
+ const selected = (value || '').trim();
100
+ this.replacePathSegment(namespaceName, selected);
101
+ });
102
+ return ui5combobox;
103
+ };
104
+ }
105
+ isNamespacedNode(node) {
106
+ return node?.context?.resourceDefinition?.scope === 'Namespaced';
107
+ }
108
+ getNamespaceNodeName(node) {
109
+ const namespacedNodeName = node?.navigationContext || '';
110
+ const segments = window.location.pathname.split('/').filter(Boolean);
111
+ const index = segments.indexOf(namespacedNodeName);
112
+ return index > 0 ? segments[index - 1] : null;
113
+ }
114
+ createCombobox(containerElement) {
115
+ const ui5combobox = document.createElement('ui5-combobox');
116
+ ui5combobox.setAttribute('placeholder', 'Namespaces');
117
+ containerElement.appendChild(ui5combobox);
118
+ const allResourceOption = document.createElement('ui5-cb-item');
119
+ allResourceOption.setAttribute('text', '-all-');
120
+ ui5combobox.appendChild(allResourceOption);
121
+ return ui5combobox;
122
+ }
123
+ addComboboxItems(portalConfig, ui5combobox, namespaceName) {
124
+ if (!this.namespaceResources$) {
125
+ this.namespaceResources$ = this.getNamespaceResources(portalConfig).pipe(shareReplay(1), takeUntilDestroyed(this.destroyRef));
126
+ }
127
+ this.namespaceResources$.subscribe((resources) => {
128
+ resources.forEach((resource) => {
129
+ const name = resource.metadata?.name;
130
+ if (!name) {
131
+ return;
132
+ }
133
+ const existingItem = Array.from(ui5combobox.children).find((child) => child.getAttribute('text') === name);
134
+ if (existingItem) {
135
+ return;
136
+ }
137
+ const resourceOption = document.createElement('ui5-cb-item');
138
+ resourceOption.setAttribute('text', name);
139
+ if (name === namespaceName) {
140
+ ui5combobox.setAttribute('value', name);
141
+ }
142
+ ui5combobox.appendChild(resourceOption);
143
+ });
144
+ });
145
+ }
146
+ getNamespaceResources(portalConfig) {
147
+ const operation = 'core_namespaces';
148
+ const fields = generateGraphQLFields(defaultColumns);
149
+ try {
150
+ return this.resourceService.list(operation, fields, {
151
+ portalContext: {
152
+ crdGatewayApiUrl: portalConfig.portalContext['crdGatewayApiUrl'],
153
+ },
154
+ token: this.authService.getToken(),
155
+ });
156
+ }
157
+ catch (e) {
158
+ console.error(`Failed to read entities from ${operation}`, e);
159
+ return of([]);
160
+ }
161
+ }
162
+ replacePathSegment(name, newValue) {
163
+ if (!name || !newValue) {
164
+ return;
165
+ }
166
+ const segments = window.location.pathname.split('/').filter(Boolean);
167
+ const index = segments.indexOf(name);
168
+ if (index !== -1) {
169
+ segments[index] = newValue;
170
+ const newPath = `/${segments.join('/')}`;
171
+ this.luigiCoreService.navigation().navigate(newPath);
172
+ }
173
+ else {
174
+ console.warn(`Segment "${name}" not found in path.`);
175
+ }
176
+ }
177
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NamespaceSelectionRendererService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
178
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NamespaceSelectionRendererService, providedIn: 'root' }); }
179
+ }
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NamespaceSelectionRendererService, decorators: [{
181
+ type: Injectable,
182
+ args: [{ providedIn: 'root' }]
183
+ }] });
184
+
185
+ const breadcrumbRenderer = (containerElement, nodeItems, clickHandler) => {
186
+ containerElement.style.width = '100%';
187
+ const ui5breadcrumbs = document.createElement('ui5-breadcrumbs');
188
+ ui5breadcrumbs.setAttribute('separators', 'Slash');
189
+ containerElement.appendChild(ui5breadcrumbs);
190
+ nodeItems.forEach((item) => {
191
+ if (item.node?.hideFromBreadcrumb) {
192
+ return;
193
+ }
194
+ const itemCmp = document.createElement('ui5-breadcrumbs-item');
195
+ itemCmp.textContent = item.label ?? '';
196
+ itemCmp._item = item;
197
+ ui5breadcrumbs.appendChild(itemCmp);
198
+ });
199
+ ui5breadcrumbs.addEventListener('item-click', (event) => {
200
+ if (!(event.detail.ctrlKey ||
201
+ event.detail.altKey ||
202
+ event.detail.shiftKey ||
203
+ event.detail.metaKey)) {
204
+ event.preventDefault();
205
+ clickHandler(event.detail.item._item);
206
+ }
207
+ });
208
+ return ui5breadcrumbs;
209
+ };
210
+
211
+ class HeaderBarConfigServiceImpl {
212
+ constructor() {
213
+ this.configService = inject(ConfigService);
214
+ this.namespaceSelectionRendererService = inject(NamespaceSelectionRendererService);
215
+ }
216
+ async getConfig() {
217
+ const portalConfig = await this.configService.getPortalConfig();
218
+ return {
219
+ pendingItemLabel: '...',
220
+ omitRoot: false,
221
+ clearBeforeRender: true,
222
+ autoHide: true,
223
+ leftRenderers: [breadcrumbRenderer],
224
+ rightRenderers: [this.namespaceSelectionRendererService.create(portalConfig)],
225
+ };
226
+ }
227
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: HeaderBarConfigServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
228
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: HeaderBarConfigServiceImpl, providedIn: 'root' }); }
229
+ }
230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: HeaderBarConfigServiceImpl, decorators: [{
231
+ type: Injectable,
232
+ args: [{
233
+ providedIn: 'root',
234
+ }]
235
+ }] });
236
+
237
+ class LuigiExtendedGlobalContextConfigServiceImpl {
238
+ constructor() {
239
+ this.resourceService = inject(ResourceService);
240
+ this.envConfigService = inject(EnvConfigService);
241
+ this.configService = inject(ConfigService);
242
+ this.authService = inject(AuthService);
243
+ }
244
+ async createLuigiExtendedGlobalContext() {
245
+ const portalConfig = await this.configService.getPortalConfig();
246
+ const entityId = (await this.envConfigService.getEnvConfig()).idpName;
247
+ const operation = 'core_platform_mesh_io';
248
+ if (entityId === 'welcome') {
249
+ return {};
250
+ }
251
+ try {
252
+ const accountInfo = await firstValueFrom(this.resourceService.readAccountInfo({
253
+ portalContext: {
254
+ crdGatewayApiUrl: portalConfig.portalContext['crdGatewayApiUrl'],
255
+ },
256
+ token: this.authService.getToken(),
257
+ accountId: entityId,
258
+ }));
259
+ const organizationOriginClusterId = accountInfo?.spec?.organization?.originClusterId;
260
+ if (!organizationOriginClusterId) {
261
+ console.error(`AccountInfo organization id missing for: ${entityId}`);
262
+ return {};
263
+ }
264
+ return {
265
+ organization: entityId,
266
+ organizationId: `${organizationOriginClusterId}/${entityId}`,
267
+ kcpCA: btoa(accountInfo?.spec?.clusterInfo?.ca),
268
+ entityId: `${organizationOriginClusterId}/${entityId}`, // if no entity selected the entityId is the same as the organizationId
269
+ };
270
+ }
271
+ catch (e) {
272
+ console.error(`Failed to read entity ${entityId} from ${operation}`, e);
273
+ }
274
+ return {};
275
+ }
276
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: LuigiExtendedGlobalContextConfigServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
277
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: LuigiExtendedGlobalContextConfigServiceImpl, providedIn: 'root' }); }
278
+ }
279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: LuigiExtendedGlobalContextConfigServiceImpl, decorators: [{
280
+ type: Injectable,
281
+ args: [{ providedIn: 'root' }]
282
+ }] });
283
+
284
+ class CrdGatewayKcpPatchResolver {
285
+ constructor() {
286
+ this.gatewayService = inject(GatewayService);
287
+ this.envConfigService = inject(EnvConfigService);
288
+ }
289
+ async resolveCrdGatewayKcpPathForNextAccountEntity(entityId, kind, nextNode) {
290
+ if (kind !== 'Account' || !entityId) {
291
+ return;
292
+ }
293
+ let entityKcpPath = `:${entityId}`;
294
+ let node = nextNode.parent;
295
+ do {
296
+ const entity = node?.context?.entity;
297
+ if (entity?.metadata?.name && entity['__typename'] === 'Account') {
298
+ entityKcpPath = `:${entity.metadata.name}${entityKcpPath}`;
299
+ }
300
+ node = node?.parent;
301
+ } while (node);
302
+ const org = (await this.envConfigService.getEnvConfig()).idpName;
303
+ const kcpPath = nextNode.context?.kcpPath || `${kcpRootOrgsPath}:${org}${entityKcpPath}`;
304
+ this.gatewayService.updateCrdGatewayUrlWithEntityPath(kcpPath);
305
+ }
306
+ async resolveCrdGatewayKcpPath(nextNode) {
307
+ let entityKcpPath = '';
308
+ let node = nextNode;
309
+ do {
310
+ const entity = node.context?.entity;
311
+ if (entity?.metadata?.name && entity['__typename'] === 'Account') {
312
+ entityKcpPath = `:${entity.metadata.name}${entityKcpPath}`;
313
+ }
314
+ node = node.parent;
315
+ } while (node);
316
+ const org = (await this.envConfigService.getEnvConfig()).idpName;
317
+ const kcpPath = nextNode.context?.kcpPath || `${kcpRootOrgsPath}:${org}${entityKcpPath}`;
318
+ this.gatewayService.updateCrdGatewayUrlWithEntityPath(kcpPath);
319
+ }
320
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CrdGatewayKcpPatchResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
321
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CrdGatewayKcpPatchResolver, providedIn: 'root' }); }
322
+ }
323
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CrdGatewayKcpPatchResolver, decorators: [{
324
+ type: Injectable,
325
+ args: [{ providedIn: 'root' }]
326
+ }] });
327
+
328
+ class NodeChangeHookConfigServiceImpl {
329
+ constructor() {
330
+ this.luigiCoreService = inject(LuigiCoreService);
331
+ this.crdGatewayKcpPatchResolver = inject(CrdGatewayKcpPatchResolver);
332
+ }
333
+ nodeChangeHook(prevNode, nextNode) {
334
+ if (nextNode.initialRoute &&
335
+ nextNode.virtualTree &&
336
+ !nextNode._virtualTree) {
337
+ this.luigiCoreService.navigation().navigate(nextNode.initialRoute);
338
+ }
339
+ this.crdGatewayKcpPatchResolver.resolveCrdGatewayKcpPath(nextNode);
340
+ }
341
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NodeChangeHookConfigServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
342
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NodeChangeHookConfigServiceImpl, providedIn: 'root' }); }
343
+ }
344
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NodeChangeHookConfigServiceImpl, decorators: [{
345
+ type: Injectable,
346
+ args: [{ providedIn: 'root' }]
347
+ }] });
348
+
349
+ class NodeContextProcessingServiceImpl {
350
+ constructor() {
351
+ this.resourceService = inject(ResourceService);
352
+ this.crdGatewayKcpPatchResolver = inject(CrdGatewayKcpPatchResolver);
353
+ }
354
+ async processNodeContext(entityId, entityNode, ctx) {
355
+ const group = entityNode.defineEntity?.graphqlEntity?.group;
356
+ const kind = entityNode.defineEntity?.graphqlEntity?.kind;
357
+ const queryPart = entityNode.defineEntity?.graphqlEntity?.query;
358
+ if (!entityId || !group || !kind || !queryPart) {
359
+ return;
360
+ }
361
+ await this.crdGatewayKcpPatchResolver.resolveCrdGatewayKcpPathForNextAccountEntity(entityId, kind, entityNode);
362
+ const operation = replaceDotsAndHyphensWithUnderscores(group);
363
+ const namespaceId = ctx.resourceDefinition?.scope === 'Namespaced'
364
+ ? ctx.namespaceId
365
+ : undefined;
366
+ let query = `query ($name: String!) { ${operation} { ${kind}(name: $name) ${queryPart} }}`;
367
+ if (namespaceId) {
368
+ query = `query ($name: String!, $namespace: String!) { ${operation} { ${kind}(name: $name, namespace: $namespace) ${queryPart} }}`;
369
+ }
370
+ try {
371
+ const entity = await firstValueFrom(this.resourceService.read(entityId, operation, kind, query, {
372
+ resourceDefinition: ctx.resourceDefinition,
373
+ portalContext: {
374
+ crdGatewayApiUrl: ctx.portalContext.crdGatewayApiUrl,
375
+ },
376
+ token: ctx.token,
377
+ namespaceId,
378
+ }, kind.toLowerCase() === 'account'));
379
+ // update the current already calculated by Luigi context for a node
380
+ ctx.entity = entity;
381
+ ctx.entityId = `${entity.metadata?.annotations?.['kcp.io/cluster']}/${entityId}`;
382
+ // update the node context of sa node to contain the entity for future context calculations
383
+ if (entityNode.context) {
384
+ entityNode.context.entity = entity;
385
+ entityNode.context.entityId = ctx.entityId;
386
+ }
387
+ }
388
+ catch (e) {
389
+ console.error(`Not able to read entity ${entityId} from ${operation}`);
390
+ }
391
+ }
392
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NodeContextProcessingServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
393
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NodeContextProcessingServiceImpl, providedIn: 'root' }); }
394
+ }
395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NodeContextProcessingServiceImpl, decorators: [{
396
+ type: Injectable,
397
+ args: [{
398
+ providedIn: 'root',
399
+ }]
400
+ }] });
401
+
402
+ class CustomRoutingConfigServiceImpl {
403
+ constructor() {
404
+ this.envConfigService = inject(EnvConfigService);
405
+ this.envConfig = null;
406
+ this.getEnvConfig();
407
+ }
408
+ async getEnvConfig() {
409
+ this.envConfig = await this.envConfigService.getEnvConfig();
410
+ }
411
+ getRoutingConfig() {
412
+ return {
413
+ pageNotFoundHandler: async () => {
414
+ if (!this.envConfig?.baseDomain) {
415
+ return this.redirectTo('error/404');
416
+ }
417
+ if (window.location.hostname !== this.envConfig.baseDomain) {
418
+ return this.redirectTo('welcome');
419
+ }
420
+ return this.redirectTo('error/404');
421
+ },
422
+ };
423
+ }
424
+ redirectTo(path) {
425
+ return {
426
+ redirectTo: path,
427
+ keepURL: true,
428
+ };
429
+ }
430
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomRoutingConfigServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
431
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomRoutingConfigServiceImpl }); }
432
+ }
433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomRoutingConfigServiceImpl, decorators: [{
434
+ type: Injectable
435
+ }], ctorParameters: () => [] });
436
+
437
+ class UserProfileConfigServiceImpl {
438
+ constructor() {
439
+ this.authService = inject(AuthService);
440
+ }
441
+ async getProfile() {
442
+ const { userId } = this.authService.getUserInfo();
443
+ return {
444
+ items: [
445
+ {
446
+ label: 'PROFILE_PROFILE',
447
+ icon: 'customer',
448
+ link: `/users/${userId}/overview`,
449
+ },
450
+ {
451
+ label: 'PROFILE_ORGANIZATION',
452
+ icon: 'building',
453
+ link: '/organization-management',
454
+ openNodeInModal: {
455
+ width: '360px',
456
+ height: '260px',
457
+ },
458
+ },
459
+ ],
460
+ };
461
+ }
462
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: UserProfileConfigServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
463
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: UserProfileConfigServiceImpl, providedIn: 'root' }); }
464
+ }
465
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: UserProfileConfigServiceImpl, decorators: [{
466
+ type: Injectable,
467
+ args: [{ providedIn: 'root' }]
468
+ }] });
469
+
470
+ /**
471
+ * Generated bundle index. Do not edit.
472
+ */
473
+
474
+ export { CustomGlobalNodesServiceImpl, CustomRoutingConfigServiceImpl, HeaderBarConfigServiceImpl, LuigiExtendedGlobalContextConfigServiceImpl, NodeChangeHookConfigServiceImpl, NodeContextProcessingServiceImpl, UserProfileConfigServiceImpl };
475
+ //# sourceMappingURL=platform-mesh-portal-ui-lib-portal-options.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-mesh-portal-ui-lib-portal-options.mjs","sources":["../../projects/lib/portal-options/models/constants.ts","../../projects/lib/portal-options/services/custom-global-nodes.service.ts","../../projects/lib/portal-options/services/header-bar-renderers/namespace-selection-renderer.service.ts","../../projects/lib/portal-options/services/header-bar-renderers/breadcrumb-renderer.ts","../../projects/lib/portal-options/services/header-bar-config.service.ts","../../projects/lib/portal-options/services/luigi-extended-global-context-config.service.ts","../../projects/lib/portal-options/services/crd-gateway-kcp-patch-resolver.service.ts","../../projects/lib/portal-options/services/node-change-hook-config.service.ts","../../projects/lib/portal-options/services/node-context-processing.service.ts","../../projects/lib/portal-options/services/router-config.service.ts","../../projects/lib/portal-options/services/user-profile-config.service.ts","../../projects/lib/portal-options/platform-mesh-portal-ui-lib-portal-options.ts"],"sourcesContent":["export const kcpRootOrgsPath = 'root:orgs';\n","import { kcpRootOrgsPath } from '../models/constants';\nimport { PortalNodeContext } from '../models/luigi-context';\nimport { PortalLuigiNode } from '../models/luigi-node';\nimport { inject } from '@angular/core';\nimport { CustomGlobalNodesService, I18nService } from '@openmfp/portal-ui-lib';\n\nexport class CustomGlobalNodesServiceImpl implements CustomGlobalNodesService {\n private i18nService = inject(I18nService);\n\n async getCustomGlobalNodes(): Promise<PortalLuigiNode[]> {\n return [\n {\n label: 'PROFILE_ORGANIZATION_MANAGEMENT',\n pathSegment: 'organization-management',\n hideFromNav: true,\n hideSideNav: true,\n order: '1001',\n viewUrl:\n '/assets/platform-mesh-portal-ui-wc.js#organization-management',\n webcomponent: {\n selfRegistered: true,\n },\n context: {\n translationTable: this.i18nService.translationTable,\n kcpPath: kcpRootOrgsPath,\n } as PortalNodeContext,\n },\n {\n pathSegment: 'users',\n showBreadcrumbs: false,\n hideSideNav: true,\n hideFromNav: true,\n entityType: 'global',\n children: [\n {\n context: {\n profileUserId: ':profileUserId',\n } as unknown as PortalNodeContext,\n defineEntity: {\n id: 'user',\n contextKey: 'profileUserId',\n },\n pathSegment: ':profileUserId',\n hideSideNav: true,\n hideFromNav: true,\n children: [\n {\n pathSegment: 'overview',\n hideSideNav: true,\n hideFromNav: true,\n defineEntity: {\n id: 'overview',\n },\n compound: {\n children: [],\n },\n },\n ],\n },\n ],\n },\n ];\n }\n}\n","import { DestroyRef, Injectable, inject } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n AuthService,\n LuigiCoreService,\n LuigiNode,\n PortalConfig,\n} from '@openmfp/portal-ui-lib';\nimport { FieldDefinition, Resource } from '@platform-mesh/portal-ui-lib/models';\nimport {\n ResourceNodeContext,\n ResourceService,\n} from '@platform-mesh/portal-ui-lib/services';\nimport { generateGraphQLFields } from '@platform-mesh/portal-ui-lib/utils';\nimport '@ui5/webcomponents/dist/ComboBox.js';\nimport { Observable, of } from 'rxjs';\nimport { shareReplay } from 'rxjs/operators';\n\n\nconst defaultColumns: FieldDefinition[] = [\n {\n label: 'Name',\n property: 'metadata.name',\n },\n];\n\n@Injectable({ providedIn: 'root' })\nexport class NamespaceSelectionRendererService {\n private namespaceResources$?: Observable<Resource[]>;\n\n private resourceService = inject(ResourceService);\n private authService = inject(AuthService);\n private luigiCoreService = inject(LuigiCoreService);\n private destroyRef = inject(DestroyRef);\n\n public create(portalConfig: PortalConfig) {\n return (containerElement: HTMLElement, nodeItems: any[], _clickHandler: any) => {\n containerElement.style.paddingBottom = '0.5rem';\n\n const lastNode = nodeItems.at(-1)?.node as LuigiNode | undefined;\n\n if (!this.isNamespacedNode(lastNode)) {\n return containerElement;\n }\n\n const ui5combobox = this.createCombobox(containerElement);\n const namespaceName = this.getNamespaceNodeName(lastNode);\n this.addComboboxItems(portalConfig, ui5combobox, namespaceName);\n\n ui5combobox.addEventListener('change', (event: any) => {\n const value = (event?.target as any)?.value ?? '';\n const selected = (value || '').trim();\n this.replacePathSegment(namespaceName, selected);\n });\n\n return ui5combobox as HTMLElement;\n };\n }\n\n private isNamespacedNode(node: LuigiNode | undefined) {\n return node?.context?.resourceDefinition?.scope === 'Namespaced';\n }\n\n private getNamespaceNodeName(node?: LuigiNode) {\n const namespacedNodeName = node?.navigationContext || '';\n const segments = window.location.pathname.split('/').filter(Boolean);\n const index = segments.indexOf(namespacedNodeName);\n\n return index > 0 ? segments[index - 1] : null;\n }\n\n private createCombobox(containerElement: HTMLElement) {\n const ui5combobox = document.createElement('ui5-combobox');\n ui5combobox.setAttribute('placeholder', 'Namespaces');\n containerElement.appendChild(ui5combobox);\n\n const allResourceOption = document.createElement('ui5-cb-item');\n allResourceOption.setAttribute('text', '-all-');\n ui5combobox.appendChild(allResourceOption);\n\n return ui5combobox;\n }\n\n private addComboboxItems(\n portalConfig: PortalConfig,\n ui5combobox: HTMLElement,\n namespaceName: string | null,\n ) {\n if (!this.namespaceResources$) {\n this.namespaceResources$ = this.getNamespaceResources(portalConfig).pipe(\n shareReplay(1),\n takeUntilDestroyed(this.destroyRef),\n );\n }\n\n this.namespaceResources$.subscribe((resources) => {\n resources.forEach((resource) => {\n const name = resource.metadata?.name;\n if (!name) {\n return;\n }\n const existingItem = Array.from(ui5combobox.children).find(\n (child) => (child as Element).getAttribute('text') === name,\n );\n\n if (existingItem) {\n return;\n }\n const resourceOption = document.createElement('ui5-cb-item');\n resourceOption.setAttribute('text', name);\n if (name === namespaceName) {\n ui5combobox.setAttribute('value', name);\n }\n ui5combobox.appendChild(resourceOption);\n });\n });\n }\n\n private getNamespaceResources(\n portalConfig: PortalConfig,\n ): Observable<Resource[]> {\n const operation = 'core_namespaces';\n const fields = generateGraphQLFields(defaultColumns);\n\n try {\n return this.resourceService.list(operation, fields, {\n portalContext: {\n crdGatewayApiUrl: portalConfig.portalContext['crdGatewayApiUrl'],\n },\n token: this.authService.getToken(),\n } as ResourceNodeContext);\n } catch (e) {\n console.error(`Failed to read entities from ${operation}`, e);\n return of([]);\n }\n }\n\n private replacePathSegment(name: string | null, newValue: string): void {\n if (!name || !newValue) {\n return;\n }\n const segments = window.location.pathname.split('/').filter(Boolean);\n const index = segments.indexOf(name);\n\n if (index !== -1) {\n segments[index] = newValue;\n const newPath = `/${segments.join('/')}`;\n\n this.luigiCoreService.navigation().navigate(newPath);\n } else {\n console.warn(`Segment \"${name}\" not found in path.`);\n }\n }\n}","import '@ui5/webcomponents/dist/Breadcrumbs.js';\nimport '@ui5/webcomponents/dist/BreadcrumbsItem.js';\n\nexport const breadcrumbRenderer = (\n containerElement: HTMLElement,\n nodeItems: any[],\n clickHandler: (item: any) => void,\n): HTMLElement => {\n containerElement.style.width = '100%';\n\n const ui5breadcrumbs = document.createElement('ui5-breadcrumbs');\n ui5breadcrumbs.setAttribute('separators', 'Slash');\n containerElement.appendChild(ui5breadcrumbs);\n\n nodeItems.forEach((item) => {\n if (item.node?.hideFromBreadcrumb) {\n return;\n }\n\n const itemCmp = document.createElement('ui5-breadcrumbs-item');\n itemCmp.textContent = item.label ?? '';\n (itemCmp as any)._item = item;\n ui5breadcrumbs.appendChild(itemCmp);\n });\n\n ui5breadcrumbs.addEventListener('item-click', (event: any) => {\n if (\n !(\n event.detail.ctrlKey ||\n event.detail.altKey ||\n event.detail.shiftKey ||\n event.detail.metaKey\n )\n ) {\n event.preventDefault();\n clickHandler(event.detail.item._item);\n }\n });\n\n return ui5breadcrumbs;\n};\n","import { Injectable, inject } from '@angular/core';\nimport {\n ConfigService,\n HeaderBarConfig,\n HeaderBarConfigService,\n} from '@openmfp/portal-ui-lib';\nimport { NamespaceSelectionRendererService } from './header-bar-renderers/namespace-selection-renderer.service';\nimport { breadcrumbRenderer } from './header-bar-renderers/breadcrumb-renderer';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class HeaderBarConfigServiceImpl implements HeaderBarConfigService {\n private configService = inject(ConfigService);\n private namespaceSelectionRendererService = inject(NamespaceSelectionRendererService);\n\n public async getConfig(): Promise<HeaderBarConfig> {\n const portalConfig = await this.configService.getPortalConfig();\n\n return {\n pendingItemLabel: '...',\n omitRoot: false,\n clearBeforeRender: true,\n autoHide: true,\n leftRenderers: [breadcrumbRenderer],\n rightRenderers: [this.namespaceSelectionRendererService.create(portalConfig)],\n };\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport {\n AuthService,\n ConfigService,\n EnvConfigService,\n LuigiExtendedGlobalContextConfigService,\n} from '@openmfp/portal-ui-lib';\nimport { ResourceService } from '@platform-mesh/portal-ui-lib/services';\nimport { firstValueFrom } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class LuigiExtendedGlobalContextConfigServiceImpl\n implements LuigiExtendedGlobalContextConfigService\n{\n private resourceService = inject(ResourceService);\n private envConfigService = inject(EnvConfigService);\n private configService = inject(ConfigService);\n private authService = inject(AuthService);\n\n async createLuigiExtendedGlobalContext(): Promise<Record<string, any>> {\n const portalConfig = await this.configService.getPortalConfig();\n const entityId = (await this.envConfigService.getEnvConfig()).idpName;\n const operation = 'core_platform_mesh_io';\n\n if (entityId === 'welcome') {\n return {};\n }\n\n try {\n const accountInfo = await firstValueFrom(\n this.resourceService.readAccountInfo({\n portalContext: {\n crdGatewayApiUrl: portalConfig.portalContext['crdGatewayApiUrl'],\n },\n token: this.authService.getToken(),\n accountId: entityId,\n }),\n );\n\n const organizationOriginClusterId =\n accountInfo?.spec?.organization?.originClusterId;\n if (!organizationOriginClusterId) {\n console.error(`AccountInfo organization id missing for: ${entityId}`);\n return {};\n }\n\n return {\n organization: entityId,\n organizationId: `${organizationOriginClusterId}/${entityId}`,\n kcpCA: btoa(accountInfo?.spec?.clusterInfo?.ca),\n entityId: `${organizationOriginClusterId}/${entityId}`, // if no entity selected the entityId is the same as the organizationId\n };\n } catch (e) {\n console.error(`Failed to read entity ${entityId} from ${operation}`, e);\n }\n return {};\n }\n}\n","import { kcpRootOrgsPath } from '../models/constants';\nimport { PortalLuigiNode } from '../models/luigi-node';\nimport { Injectable, inject } from '@angular/core';\nimport { EnvConfigService } from '@openmfp/portal-ui-lib';\nimport { GatewayService } from '@platform-mesh/portal-ui-lib/services';\n\n@Injectable({ providedIn: 'root' })\nexport class CrdGatewayKcpPatchResolver {\n private gatewayService = inject(GatewayService);\n private envConfigService = inject(EnvConfigService);\n\n public async resolveCrdGatewayKcpPathForNextAccountEntity(\n entityId: string,\n kind: string,\n nextNode: PortalLuigiNode,\n ) {\n if (kind !== 'Account' || !entityId) {\n return;\n }\n\n let entityKcpPath = `:${entityId}`;\n let node: PortalLuigiNode | undefined = nextNode.parent;\n\n do {\n const entity = node?.context?.entity;\n if (entity?.metadata?.name && entity['__typename'] === 'Account') {\n entityKcpPath = `:${entity.metadata.name}${entityKcpPath}`;\n }\n node = node?.parent;\n } while (node);\n\n const org = (await this.envConfigService.getEnvConfig()).idpName;\n const kcpPath =\n nextNode.context?.kcpPath || `${kcpRootOrgsPath}:${org}${entityKcpPath}`;\n this.gatewayService.updateCrdGatewayUrlWithEntityPath(kcpPath);\n }\n\n public async resolveCrdGatewayKcpPath(nextNode: PortalLuigiNode) {\n let entityKcpPath = '';\n let node: PortalLuigiNode | undefined = nextNode;\n do {\n const entity = node.context?.entity;\n if (entity?.metadata?.name && entity['__typename'] === 'Account') {\n entityKcpPath = `:${entity.metadata.name}${entityKcpPath}`;\n }\n node = node.parent;\n } while (node);\n\n const org = (await this.envConfigService.getEnvConfig()).idpName;\n const kcpPath =\n nextNode.context?.kcpPath || `${kcpRootOrgsPath}:${org}${entityKcpPath}`;\n this.gatewayService.updateCrdGatewayUrlWithEntityPath(kcpPath);\n }\n}\n","import { PortalLuigiNode } from '../models/luigi-node';\nimport { CrdGatewayKcpPatchResolver } from './crd-gateway-kcp-patch-resolver.service';\nimport { Injectable, inject } from '@angular/core';\nimport {\n LuigiCoreService,\n NodeChangeHookConfigService,\n} from '@openmfp/portal-ui-lib';\n\n@Injectable({ providedIn: 'root' })\nexport class NodeChangeHookConfigServiceImpl\n implements NodeChangeHookConfigService\n{\n private luigiCoreService = inject(LuigiCoreService);\n private crdGatewayKcpPatchResolver = inject(CrdGatewayKcpPatchResolver);\n\n nodeChangeHook(prevNode: PortalLuigiNode, nextNode: PortalLuigiNode) {\n if (\n nextNode.initialRoute &&\n nextNode.virtualTree &&\n !(nextNode as any)._virtualTree\n ) {\n this.luigiCoreService.navigation().navigate(nextNode.initialRoute);\n }\n\n this.crdGatewayKcpPatchResolver.resolveCrdGatewayKcpPath(nextNode);\n }\n}\n","import { PortalNodeContext } from '../models/luigi-context';\nimport { PortalLuigiNode } from '../models/luigi-node';\nimport { CrdGatewayKcpPatchResolver } from './crd-gateway-kcp-patch-resolver.service';\nimport { Injectable, inject } from '@angular/core';\nimport { NodeContextProcessingService } from '@openmfp/portal-ui-lib';\nimport { ResourceService } from '@platform-mesh/portal-ui-lib/services';\nimport { replaceDotsAndHyphensWithUnderscores } from '@platform-mesh/portal-ui-lib/utils';\nimport { firstValueFrom } from 'rxjs';\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NodeContextProcessingServiceImpl\n implements NodeContextProcessingService\n{\n private resourceService = inject(ResourceService);\n private crdGatewayKcpPatchResolver = inject(CrdGatewayKcpPatchResolver);\n\n public async processNodeContext(\n entityId: string,\n entityNode: PortalLuigiNode,\n ctx: PortalNodeContext,\n ) {\n const group = entityNode.defineEntity?.graphqlEntity?.group;\n const kind = entityNode.defineEntity?.graphqlEntity?.kind;\n const queryPart = entityNode.defineEntity?.graphqlEntity?.query;\n\n if (!entityId || !group || !kind || !queryPart) {\n return;\n }\n\n await this.crdGatewayKcpPatchResolver.resolveCrdGatewayKcpPathForNextAccountEntity(\n entityId,\n kind,\n entityNode,\n );\n\n const operation = replaceDotsAndHyphensWithUnderscores(group);\n const namespaceId =\n ctx.resourceDefinition?.scope === 'Namespaced'\n ? ctx.namespaceId\n : undefined;\n let query = `query ($name: String!) { ${operation} { ${kind}(name: $name) ${queryPart} }}`;\n if (namespaceId) {\n query = `query ($name: String!, $namespace: String!) { ${operation} { ${kind}(name: $name, namespace: $namespace) ${queryPart} }}`;\n }\n\n try {\n const entity = await firstValueFrom(\n this.resourceService.read(\n entityId,\n operation,\n kind,\n query,\n {\n resourceDefinition: ctx.resourceDefinition,\n portalContext: {\n crdGatewayApiUrl: ctx.portalContext.crdGatewayApiUrl,\n },\n token: ctx.token,\n namespaceId,\n },\n kind.toLowerCase() === 'account',\n ),\n );\n\n // update the current already calculated by Luigi context for a node\n ctx.entity = entity;\n ctx.entityId = `${entity.metadata?.annotations?.['kcp.io/cluster']}/${entityId}`;\n // update the node context of sa node to contain the entity for future context calculations\n if (entityNode.context) {\n entityNode.context.entity = entity;\n entityNode.context.entityId = ctx.entityId;\n }\n } catch (e) {\n console.error(`Not able to read entity ${entityId} from ${operation}`);\n }\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport {\n ClientEnvironment,\n EnvConfigService,\n RoutingConfigService,\n} from '@openmfp/portal-ui-lib';\n\n@Injectable()\nexport class CustomRoutingConfigServiceImpl implements RoutingConfigService {\n private envConfigService = inject(EnvConfigService);\n private envConfig: ClientEnvironment | null = null;\n\n constructor() {\n this.getEnvConfig();\n }\n\n async getEnvConfig(): Promise<void> {\n this.envConfig = await this.envConfigService.getEnvConfig();\n }\n\n getRoutingConfig(): any {\n return {\n pageNotFoundHandler: async () => {\n if (!this.envConfig?.baseDomain) {\n return this.redirectTo('error/404');\n }\n\n if (window.location.hostname !== this.envConfig.baseDomain) {\n return this.redirectTo('welcome');\n }\n\n return this.redirectTo('error/404');\n },\n };\n }\n\n public redirectTo(path: string): any {\n return {\n redirectTo: path,\n keepURL: true,\n };\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport {\n AuthService,\n UserProfile,\n UserProfileConfigService,\n} from '@openmfp/portal-ui-lib';\n\n@Injectable({ providedIn: 'root' })\nexport class UserProfileConfigServiceImpl implements UserProfileConfigService {\n private authService = inject(AuthService);\n async getProfile(): Promise<UserProfile> {\n const { userId } = this.authService.getUserInfo();\n\n return {\n items: [\n {\n label: 'PROFILE_PROFILE',\n icon: 'customer',\n link: `/users/${userId}/overview`,\n },\n {\n label: 'PROFILE_ORGANIZATION',\n icon: 'building',\n link: '/organization-management',\n openNodeInModal: {\n width: '360px',\n height: '260px',\n },\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAO,MAAM,eAAe,GAAG,WAAW;;MCM7B,4BAA4B,CAAA;AAAzC,IAAA,WAAA,GAAA;AACU,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAwD3C;AAtDE,IAAA,MAAM,oBAAoB,GAAA;QACxB,OAAO;AACL,YAAA;AACE,gBAAA,KAAK,EAAE,iCAAiC;AACxC,gBAAA,WAAW,EAAE,yBAAyB;AACtC,gBAAA,WAAW,EAAE,IAAI;AACjB,gBAAA,WAAW,EAAE,IAAI;AACjB,gBAAA,KAAK,EAAE,MAAM;AACb,gBAAA,OAAO,EACL,+DAA+D;AACjE,gBAAA,YAAY,EAAE;AACZ,oBAAA,cAAc,EAAE,IAAI;AACrB,iBAAA;AACD,gBAAA,OAAO,EAAE;AACP,oBAAA,gBAAgB,EAAE,IAAI,CAAC,WAAW,CAAC,gBAAgB;AACnD,oBAAA,OAAO,EAAE,eAAe;AACJ,iBAAA;AACvB,aAAA;AACD,YAAA;AACE,gBAAA,WAAW,EAAE,OAAO;AACpB,gBAAA,eAAe,EAAE,KAAK;AACtB,gBAAA,WAAW,EAAE,IAAI;AACjB,gBAAA,WAAW,EAAE,IAAI;AACjB,gBAAA,UAAU,EAAE,QAAQ;AACpB,gBAAA,QAAQ,EAAE;AACR,oBAAA;AACE,wBAAA,OAAO,EAAE;AACP,4BAAA,aAAa,EAAE,gBAAgB;AACA,yBAAA;AACjC,wBAAA,YAAY,EAAE;AACZ,4BAAA,EAAE,EAAE,MAAM;AACV,4BAAA,UAAU,EAAE,eAAe;AAC5B,yBAAA;AACD,wBAAA,WAAW,EAAE,gBAAgB;A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