@openmfp/portal-ui-lib 0.194.22 → 0.194.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,18 +3,18 @@
3
3
  <!-- CI trigger -->
4
4
 
5
5
  ![Build Status](https://github.com/openmfp/portal-ui-lib/actions/workflows/pipeline.yaml/badge.svg)
6
- [![REUSE status](
7
- https://api.reuse.software/badge/github.com/openmfp/portal-ui-lib)](https://api.reuse.software/info/github.com/openmfp/portal-ui-lib)
6
+ [![REUSE status](https://api.reuse.software/badge/github.com/openmfp/portal-ui-lib)](https://api.reuse.software/info/github.com/openmfp/portal-ui-lib)
8
7
 
9
8
  This library helps you to set up your angular project consuming [Luigi](https://luigi-project.io/) configuration.
10
9
 
11
10
  The main features of this library are:
12
11
 
13
- * Enable dynamic Luigi configuration consumption in a microfrontend.
14
- * Provide authentication capabilities with Auth Server
15
- * Dynamic development capabilities by embedding your locally running microfrontend into a Luigi frame.
12
+ - Enable dynamic Luigi configuration consumption in a microfrontend.
13
+ - Provide authentication capabilities with Auth Server
14
+ - Dynamic development capabilities by embedding your locally running microfrontend into a Luigi frame.
16
15
 
17
16
  ## Table of Contents
17
+
18
18
  - [Portal UI Library](#portal-ui-library)
19
19
  - [Table of Contents](#table-of-contents)
20
20
  - [Getting Started](#getting-started)
@@ -31,7 +31,6 @@ The main features of this library are:
31
31
  - [Code of Conduct](#code-of-conduct)
32
32
  - [Licensing](#licensing)
33
33
 
34
-
35
34
  ## Getting Started
36
35
 
37
36
  ### Dependencies
@@ -41,13 +40,13 @@ and `@luigi-project/plugin-auth-oauth2` in proper versions (along with any other
41
40
 
42
41
  ### Angular Configuration
43
42
 
44
- Configure the angular build process (in the `angular.json` file) to include the content of the Luigi core project and assets
43
+ Configure the angular build process (in the `angular.json` file) to include the content of the Luigi core project and assets
45
44
  from `@openmfp/portal-ui-lib` library into the project assets, as shown below:
46
45
 
47
46
  ```
48
47
  {
49
48
  // ... the rest of the angular.json configuration
50
-
49
+
51
50
  "assets": [
52
51
  {
53
52
  "glob": "**",
@@ -62,7 +61,7 @@ from `@openmfp/portal-ui-lib` library into the project assets, as shown below:
62
61
  ]
63
62
  // ... other configured assets
64
63
  ]
65
-
64
+
66
65
  }
67
66
  ```
68
67
 
@@ -76,71 +75,69 @@ routing providers (e.g. `provideRouter(appRoutes)`).
76
75
  The result may look like this:
77
76
 
78
77
  ```ts
78
+ import { appRoutes } from './app/app-routes';
79
79
  import { importProvidersFrom } from '@angular/core';
80
80
  import { bootstrapApplication } from '@angular/platform-browser';
81
81
  import { provideRouter } from '@angular/router';
82
82
  import {
83
- providePortal,
84
83
  PortalComponent,
85
84
  PortalOptions,
85
+ providePortal,
86
86
  } from '@openmfp/portal-ui-lib';
87
- import { appRoutes } from './app/app-routes';
88
87
 
89
88
  const portalOptions: PortalOptions = {
90
- // ... portal options
91
- }
89
+ // ... portal options
90
+ };
92
91
 
93
92
  bootstrapApplication(PortalComponent, {
94
93
  providers: [
95
- provideRouter(appRoutes),
96
- importProvidersFrom(AnyRequiredModule),
97
- providePortal(portalOptions),
98
-
99
- // ... any other providers imports
100
- ]
101
- }
102
- );
94
+ provideRouter(appRoutes),
95
+ importProvidersFrom(AnyRequiredModule),
96
+ providePortal(portalOptions),
97
+
98
+ // ... any other providers imports
99
+ ],
100
+ });
103
101
  ```
104
102
 
105
103
  ## Update index html file of the project
106
104
 
107
105
  The next step in order to have the portal working is to update the `index.html` file with the inclusion of:
106
+
108
107
  - the `/luigi-core/luigi.js` script,
109
108
  - the `/luigi-core/luigi_horizon.css` styles,
110
- - and placing the `<app-portal></app-portal>` html tag inside the html body.
109
+ - and placing the `<app-portal></app-portal>` html tag inside the html body.
111
110
 
112
111
  Below is an example:
113
112
 
114
113
  ```html
115
114
  <!DOCTYPE html>
116
115
  <html lang="en">
117
- <head>
118
- <meta charset="utf-8">
119
- <title>App</title>
120
- <base href="/">
121
- <meta name="viewport" content="width=device-width, initial-scale=1">
122
- <link rel="stylesheet" href="/luigi-core/luigi_horizon.css" />
123
- </head>
124
- <body>
125
- <noscript>You need to enable JavaScript to run this app.</noscript>
126
- <script src="/luigi-core/luigi.js"></script>
127
- <app-portal></app-portal>
128
- </body>
116
+ <head>
117
+ <meta charset="utf-8" />
118
+ <title>App</title>
119
+ <base href="/" />
120
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
121
+ <link rel="stylesheet" href="/luigi-core/luigi_horizon.css" />
122
+ </head>
123
+ <body>
124
+ <noscript>You need to enable JavaScript to run this app.</noscript>
125
+ <script src="/luigi-core/luigi.js"></script>
126
+ <app-portal></app-portal>
127
+ </body>
129
128
  </html>
130
129
  ```
131
130
 
132
-
133
131
  ### Implement the Custom Services
134
132
 
135
133
  The library comes with a set of services that can be used to customize the portal behavior.
136
134
  Please visit the [Frontend configuration - Extended Guide](https://openmfp.org/documentation/extended-guide/frontend-configuration/)
137
135
  to get familiar with the configuration options and how to use them.
138
136
 
139
-
140
137
  ### Configure Proxy for Backend REST Calls
141
138
 
142
139
  The library executes rest calls `"/rest/**"` against backend running with the library [portal-server-lib](https://github.com/openmfp/portal-server-lib?tab=readme-ov-file#portal-server-library).
143
- In order for the calls to reach your backend the `proxy.config.json` needs to be provided,
140
+ In order for the calls to reach your backend the `proxy.config.json` needs to be provided,
144
141
  with the target reaching the place where and on what port the backend is running `"target": "http://localhost:3000"`.
145
142
 
146
143
  ```json
@@ -157,27 +154,25 @@ with the target reaching the place where and on what port the backend is running
157
154
  The proxy file needs to be indicated in the file `angular.json` section `serve`:
158
155
 
159
156
  ```json
160
- {
161
- "serve": {
162
- "builder": "@angular-devkit/build-angular:dev-server",
163
- "options": {
164
- "proxyConfig": "proxy.config.json"
165
- },
166
- "configurations": {
167
- "production": {
168
- "browserTarget": "build:production"
169
- },
170
- "development": {
171
- "browserTarget": "build:development"
172
- }
173
- },
174
- "defaultConfiguration": "development"
175
- }
176
-
157
+ {
158
+ "serve": {
159
+ "builder": "@angular-devkit/build-angular:dev-server",
160
+ "options": {
161
+ "proxyConfig": "proxy.config.json"
162
+ },
163
+ "configurations": {
164
+ "production": {
165
+ "browserTarget": "build:production"
166
+ },
167
+ "development": {
168
+ "browserTarget": "build:development"
169
+ }
170
+ },
171
+ "defaultConfiguration": "development"
172
+ }
177
173
  }
178
174
  ```
179
175
 
180
-
181
176
  ### Start your Project
182
177
 
183
178
  After finishing all the required steps you might want to check your integration with the library and run your local application.
@@ -194,7 +189,7 @@ Please follow our [local setup guide](./docs/readme-local-setup.md) for this tas
194
189
 
195
190
  ## Requirements
196
191
 
197
- The portal requires a installation of node.js and npm.
192
+ The portal requires a installation of node.js and npm.
198
193
  Checkout the [package.json](package.json) for the required node version and dependencies.
199
194
 
200
195
  ## Contributing
@@ -209,5 +204,4 @@ Please refer to the [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) file in this reposi
209
204
 
210
205
  Copyright 2025 SAP SE or an SAP affiliate company and openMFP contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/openmfp/portal-ui-lib).
211
206
 
212
-
213
207
  <p align="center"><img alt="Bundesministerium für Wirtschaft und Energie (BMWE)-EU funding logo" src="https://apeirora.eu/assets/img/BMWK-EU.png" width="400"/></p>