@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.
package/package.json CHANGED
@@ -1,4 +1,60 @@
1
1
  {
2
2
  "name": "@platform-mesh/portal-ui-lib",
3
- "version": "0.0.0"
4
- }
3
+ "version": "0.17.4",
4
+ "repository": {
5
+ "url": "git+https://github.com/platform-mesh/portal-ui-lib.git"
6
+ },
7
+ "description": "This library helps you to set up the front end application using `@openmfp/portal-ui-lib` by providing the set of required implementations \nin the scope of the Platform Mesh functionalities.",
8
+ "author": "Platform Mesh",
9
+ "license": "Apache-2.0",
10
+ "dependencies": {
11
+ "tslib": "2.8.1"
12
+ },
13
+ "peerDependencies": {
14
+ "@openmfp/portal-ui-lib": "0.182.1",
15
+ "@angular/common": "^19.0.0 || ^20.0.0",
16
+ "@angular/compiler": "^19.0.0 || ^20.0.0",
17
+ "@angular/core": "^19.0.0 || ^20.0.0",
18
+ "@angular/elements": "^19.0.0 || ^20.0.0",
19
+ "@angular/forms": "^19.0.0 || ^20.0.0",
20
+ "@angular/platform-browser": "^19.0.0 || ^20.0.0",
21
+ "@angular/platform-browser-dynamic": "^19.0.0 || ^20.0.0",
22
+ "@angular/router": "^19.0.0 || ^20.0.0",
23
+ "@ui5/webcomponents-ngx": "0.5.6",
24
+ "apollo-angular": "^10.0.0 || ^11.0.0",
25
+ "gql-query-builder": "3.8.0",
26
+ "graphql": "16.11.0",
27
+ "graphql-sse": "2.6.0",
28
+ "rxjs": "~7.8.0",
29
+ "zone.js": "~0.15.1",
30
+ "jsonpath": "1.1.1"
31
+ },
32
+ "module": "fesm2022/platform-mesh-portal-ui-lib.mjs",
33
+ "typings": "index.d.ts",
34
+ "exports": {
35
+ "./package.json": {
36
+ "default": "./package.json"
37
+ },
38
+ ".": {
39
+ "types": "./index.d.ts",
40
+ "default": "./fesm2022/platform-mesh-portal-ui-lib.mjs"
41
+ },
42
+ "./models": {
43
+ "types": "./models/index.d.ts",
44
+ "default": "./fesm2022/platform-mesh-portal-ui-lib-models.mjs"
45
+ },
46
+ "./portal-options": {
47
+ "types": "./portal-options/index.d.ts",
48
+ "default": "./fesm2022/platform-mesh-portal-ui-lib-portal-options.mjs"
49
+ },
50
+ "./services": {
51
+ "types": "./services/index.d.ts",
52
+ "default": "./fesm2022/platform-mesh-portal-ui-lib-services.mjs"
53
+ },
54
+ "./utils": {
55
+ "types": "./utils/index.d.ts",
56
+ "default": "./fesm2022/platform-mesh-portal-ui-lib-utils.mjs"
57
+ }
58
+ },
59
+ "sideEffects": false
60
+ }
@@ -0,0 +1,85 @@
1
+ import { NodeContext, LuigiNode, CustomGlobalNodesService, HeaderBarConfigService, HeaderBarConfig, LuigiExtendedGlobalContextConfigService, NodeChangeHookConfigService, NodeContextProcessingService, RoutingConfigService, UserProfileConfigService, UserProfile } from '@openmfp/portal-ui-lib';
2
+ import { Resource } from '@platform-mesh/portal-ui-lib/models';
3
+ import * as i0 from '@angular/core';
4
+
5
+ interface PortalContext extends Record<string, any> {
6
+ crdGatewayApiUrl: string;
7
+ }
8
+ interface PortalEntityContext {
9
+ account: {
10
+ id: string;
11
+ };
12
+ }
13
+ interface PortalNodeContext extends NodeContext {
14
+ portalContext: PortalContext;
15
+ kcpPath?: string;
16
+ translationTable?: any;
17
+ namespaceId?: string;
18
+ entity?: Resource;
19
+ entityId?: string;
20
+ entityContext?: PortalEntityContext;
21
+ }
22
+
23
+ interface PortalLuigiNode extends LuigiNode {
24
+ context?: PortalNodeContext;
25
+ parent?: PortalLuigiNode;
26
+ }
27
+
28
+ declare class CustomGlobalNodesServiceImpl implements CustomGlobalNodesService {
29
+ private i18nService;
30
+ getCustomGlobalNodes(): Promise<PortalLuigiNode[]>;
31
+ }
32
+
33
+ declare class HeaderBarConfigServiceImpl implements HeaderBarConfigService {
34
+ private configService;
35
+ private namespaceSelectionRendererService;
36
+ getConfig(): Promise<HeaderBarConfig>;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<HeaderBarConfigServiceImpl, never>;
38
+ static ɵprov: i0.ɵɵInjectableDeclaration<HeaderBarConfigServiceImpl>;
39
+ }
40
+
41
+ declare class LuigiExtendedGlobalContextConfigServiceImpl implements LuigiExtendedGlobalContextConfigService {
42
+ private resourceService;
43
+ private envConfigService;
44
+ private configService;
45
+ private authService;
46
+ createLuigiExtendedGlobalContext(): Promise<Record<string, any>>;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuigiExtendedGlobalContextConfigServiceImpl, never>;
48
+ static ɵprov: i0.ɵɵInjectableDeclaration<LuigiExtendedGlobalContextConfigServiceImpl>;
49
+ }
50
+
51
+ declare class NodeChangeHookConfigServiceImpl implements NodeChangeHookConfigService {
52
+ private luigiCoreService;
53
+ private crdGatewayKcpPatchResolver;
54
+ nodeChangeHook(prevNode: PortalLuigiNode, nextNode: PortalLuigiNode): void;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<NodeChangeHookConfigServiceImpl, never>;
56
+ static ɵprov: i0.ɵɵInjectableDeclaration<NodeChangeHookConfigServiceImpl>;
57
+ }
58
+
59
+ declare class NodeContextProcessingServiceImpl implements NodeContextProcessingService {
60
+ private resourceService;
61
+ private crdGatewayKcpPatchResolver;
62
+ processNodeContext(entityId: string, entityNode: PortalLuigiNode, ctx: PortalNodeContext): Promise<void>;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<NodeContextProcessingServiceImpl, never>;
64
+ static ɵprov: i0.ɵɵInjectableDeclaration<NodeContextProcessingServiceImpl>;
65
+ }
66
+
67
+ declare class CustomRoutingConfigServiceImpl implements RoutingConfigService {
68
+ private envConfigService;
69
+ private envConfig;
70
+ constructor();
71
+ getEnvConfig(): Promise<void>;
72
+ getRoutingConfig(): any;
73
+ redirectTo(path: string): any;
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomRoutingConfigServiceImpl, never>;
75
+ static ɵprov: i0.ɵɵInjectableDeclaration<CustomRoutingConfigServiceImpl>;
76
+ }
77
+
78
+ declare class UserProfileConfigServiceImpl implements UserProfileConfigService {
79
+ private authService;
80
+ getProfile(): Promise<UserProfile>;
81
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserProfileConfigServiceImpl, never>;
82
+ static ɵprov: i0.ɵɵInjectableDeclaration<UserProfileConfigServiceImpl>;
83
+ }
84
+
85
+ export { CustomGlobalNodesServiceImpl, CustomRoutingConfigServiceImpl, HeaderBarConfigServiceImpl, LuigiExtendedGlobalContextConfigServiceImpl, NodeChangeHookConfigServiceImpl, NodeContextProcessingServiceImpl, UserProfileConfigServiceImpl };
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../fesm2022/platform-mesh-portal-ui-lib-portal-options.mjs"
3
+ }
@@ -0,0 +1,63 @@
1
+ import { NodeContext } from '@openmfp/portal-ui-lib';
2
+ import { ResourceDefinition, Resource, AccountInfo } from '@platform-mesh/portal-ui-lib/models';
3
+ import { Apollo } from 'apollo-angular';
4
+ import * as i0 from '@angular/core';
5
+ import { Observable } from 'rxjs';
6
+
7
+ interface ResourceNodeContext extends Partial<NodeContext> {
8
+ resourceDefinition?: ResourceDefinition;
9
+ organization?: string;
10
+ accountId?: string;
11
+ kcpCA?: string;
12
+ entity?: {
13
+ metadata: {
14
+ name: string;
15
+ namespace?: string;
16
+ };
17
+ };
18
+ namespaceId?: string;
19
+ portalContext: {
20
+ crdGatewayApiUrl: string;
21
+ kcpWorkspaceUrl?: string;
22
+ };
23
+ }
24
+
25
+ declare class ApolloFactory {
26
+ private httpLink;
27
+ private ngZone;
28
+ private gatewayService;
29
+ readonly apollo: (nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean) => Apollo;
30
+ private createApolloOptions;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApolloFactory, never>;
32
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApolloFactory>;
33
+ }
34
+
35
+ declare class GatewayService {
36
+ private luigiCoreService;
37
+ getGatewayUrl(nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean): string;
38
+ updateCrdGatewayUrlWithEntityPath(kcpPath: string): void;
39
+ resolveKcpPath(nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean): any;
40
+ private getCurrentKcpPath;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<GatewayService, never>;
42
+ static ɵprov: i0.ɵɵInjectableDeclaration<GatewayService>;
43
+ }
44
+
45
+ declare class ResourceService {
46
+ private apolloFactory;
47
+ private luigiCoreService;
48
+ read(resourceId: string, operation: string, kind: string, fieldsOrRawQuery: any[] | string, nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean): Observable<Resource>;
49
+ private resolveReadQuery;
50
+ list(operation: string, fieldsOrRawQuery: any[] | string, nodeContext: ResourceNodeContext): Observable<Resource[] | any>;
51
+ private alertErrors;
52
+ delete(resource: Resource, resourceDefinition: ResourceDefinition, nodeContext: ResourceNodeContext): Observable<unknown>;
53
+ create(resource: Resource, resourceDefinition: ResourceDefinition, nodeContext: ResourceNodeContext): Observable<unknown>;
54
+ update(resource: Resource, resourceDefinition: ResourceDefinition, nodeContext: ResourceNodeContext): Observable<unknown>;
55
+ readAccountInfo(nodeContext: ResourceNodeContext): Observable<AccountInfo>;
56
+ private isNamespacedResource;
57
+ private normalizeGqlBuilderVariables;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<ResourceService, never>;
59
+ static ɵprov: i0.ɵɵInjectableDeclaration<ResourceService>;
60
+ }
61
+
62
+ export { ApolloFactory, GatewayService, ResourceService };
63
+ export type { ResourceNodeContext };
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../fesm2022/platform-mesh-portal-ui-lib-services.mjs"
3
+ }
@@ -0,0 +1,23 @@
1
+ import { FieldDefinition, Resource } from '@platform-mesh/portal-ui-lib/models';
2
+
3
+ declare const generateGraphQLFields: (uiFields: FieldDefinition[]) => any[];
4
+
5
+ declare const getValueByPath: <T extends object, R = unknown>(obj: T, path: string) => R | undefined;
6
+
7
+ /**
8
+ * Utility function to replace all occurrences of dots (.) and hyphens (-) with underscores (_)
9
+ * @param input - The input string to process
10
+ * @returns The processed string with dots and hyphens replaced by underscores
11
+ */
12
+ declare function replaceDotsAndHyphensWithUnderscores(input: string): string;
13
+
14
+ declare const isLocalSetup: () => boolean;
15
+
16
+ declare const getResourceValueByJsonPath: (resource: Resource, field: {
17
+ jsonPathExpression?: string;
18
+ property?: string | string[];
19
+ }) => any;
20
+
21
+ declare function stripTypename<T>(value: T): T;
22
+
23
+ export { generateGraphQLFields, getResourceValueByJsonPath, getValueByPath, isLocalSetup, replaceDotsAndHyphensWithUnderscores, stripTypename };
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../fesm2022/platform-mesh-portal-ui-lib-utils.mjs"
3
+ }