@equinor/fusion-framework-dev-portal 5.0.0-next.0 → 5.0.1

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/CHANGELOG.md CHANGED
@@ -1,36 +1,108 @@
1
1
  # @equinor/fusion-framework-dev-portal
2
2
 
3
- ## 5.0.0-next.0
3
+ ## 5.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - ed3786d: Internal: update `@equinor/fusion-wc-person` from `^3.4.0` to `^3.4.1` for the development and people provider packages; no public API changes.
8
+ - Updated dependencies [ed3786d]
9
+ - @equinor/fusion-framework-react-components-people-provider@2.0.1
10
+
11
+ ## 5.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - abffa53: Major version bump for Fusion Framework React 19 release.
16
+
17
+ All packages are bumped to the next major version as part of the React 19 upgrade. This release drops support for React versions below 18 and includes breaking changes across the framework.
18
+
19
+ **Breaking changes:**
20
+ - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
21
+ - React Router upgraded from v6 to v7
22
+ - Navigation module refactored with new history API
23
+ - `renderComponent` and `renderApp` now use `createRoot` API
24
+
25
+ **Migration:**
26
+ - Update your React version to 18.0.0 or higher before upgrading
27
+ - Replace `NavigationProvider.createRouter()` with `@equinor/fusion-framework-react-router`
28
+ - See individual package changelogs for package-specific migration steps
29
+
30
+ - abffa53: Upgrade to React 19 and remove support for React versions lower than 18.
31
+
32
+ **Breaking changes:**
33
+ - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
34
+ - React 16 and 17 are no longer supported
35
+ - Dev dependencies upgraded to React 19.2.1 and @types/react 19.2.7
36
+
37
+ **Migration:**
38
+ - Update your React version to 18.0.0 or higher before upgrading these packages
39
+ - If using React 16 or 17, upgrade to React 18 or 19 first
40
+
41
+ Closes https://github.com/equinor/fusion-framework/issues/3504
4
42
 
5
43
  ### Minor Changes
6
44
 
7
- - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`fa89ed8`](https://github.com/equinor/fusion-framework/commit/fa89ed8aeed919950ef6a6775e60eb6904ec7946) Thanks [@odinr](https://github.com/odinr)! - Update EDS (Equinor Design System) packages to latest versions: `@equinor/eds-core-react` to ^2.2.0, `@equinor/eds-icons` to ^1.1.0, `@equinor/eds-tokens` to ^2.1.1, and `@equinor/eds-utils` to ^2.0.0.
45
+ - abffa53: Update EDS (Equinor Design System) packages to latest versions: `@equinor/eds-core-react` to ^2.2.0, `@equinor/eds-icons` to ^1.1.0, `@equinor/eds-tokens` to ^2.1.1, and `@equinor/eds-utils` to ^2.0.0.
8
46
 
9
47
  These are major version updates from the 0.x series. Consumers should verify compatibility with their applications, particularly if using `@equinor/fusion-react-side-sheet` which may require updates to support the new EDS versions.
10
48
 
11
49
  ### Patch Changes
12
50
 
13
- - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`f647825`](https://github.com/equinor/fusion-framework/commit/f647825cb5712763b09dafda21fd996211c78b78) Thanks [@odinr](https://github.com/odinr)! - relase next
14
-
15
- - Updated dependencies [[`f647825`](https://github.com/equinor/fusion-framework/commit/f647825cb5712763b09dafda21fd996211c78b78), [`fa89ed8`](https://github.com/equinor/fusion-framework/commit/fa89ed8aeed919950ef6a6775e60eb6904ec7946)]:
16
- - @equinor/fusion-framework-react-components-people-provider@1.6.4-next.0
17
- - @equinor/fusion-framework-react-components-bookmark@1.2.0-next.0
18
- - @equinor/fusion-framework-react-module-bookmark@5.0.3-next.0
19
- - @equinor/fusion-framework-module-feature-flag@1.1.29-next.0
20
- - @equinor/fusion-framework-module-navigation@7.0.0-next.2
21
- - @equinor/fusion-framework-module-telemetry@4.6.5-next.0
22
- - @equinor/fusion-observable@8.5.9-next.0
23
- - @equinor/fusion-framework-react@7.4.21-next.0
24
- - @equinor/fusion-framework-module-app@7.4.2-next.0
25
- - @equinor/fusion-query@6.0.5-next.0
26
- - @equinor/fusion-framework-app@10.4.10-next.0
27
- - @equinor/fusion-framework-dev-server@1.1.32-next.0
28
- - @equinor/fusion-framework@7.4.14-next.0
29
- - @equinor/fusion-framework-module-ag-grid@35.1.0-next.0
30
- - @equinor/fusion-framework-module-bookmark@3.0.7-next.0
31
- - @equinor/fusion-framework-module-context@7.0.4-next.0
32
- - @equinor/fusion-framework-module-services@7.2.2-next.0
33
- - @equinor/fusion-framework-module-analytics@1.0.3-next.0
51
+ - abffa53: Render application content inside a stable `#app-section` container so browser-driven evaluation tools can target the app surface consistently.
52
+
53
+ This makes automated cookbook and dev-portal validation more reliable when using `agent-browser` and Copilot-based evaluation flows.
54
+
55
+ Refs https://github.com/equinor/fusion-core-tasks/issues/724
56
+
57
+ - abffa53: Upgrade dev-portal dependencies for React 19 compatibility.
58
+ - Upgrade `react-router` from v6 to v7.13 (backward-compatible, no code changes required)
59
+ - Upgrade `@equinor/fusion-react-styles` to 2.0.0 (removes `@material-ui/styles` dependency)
60
+ - Upgrade `@equinor/fusion-react-context-selector` to 2.0.1
61
+
62
+ This resolves the React 19 blocker identified in https://github.com/equinor/fusion-framework/issues/3698
63
+
64
+ - abffa53: Upgrade `react-router-dom` from v6 to v7.9.5 for React 19 compatibility.
65
+
66
+ This is a backward-compatible upgrade - all existing Router 6 patterns continue to work with Router 7. No code changes required.
67
+
68
+ - aa35c46: chore: bump @vitejs/plugin-react from 5.1.4 to 6.0.1
69
+ - 32bcf83: Bump `vite` from `7.3.1` to `8.0.0`.
70
+
71
+ Vite 8 replaces Rollup with Rolldown and esbuild with Oxc for faster builds.
72
+ No breaking API changes affect this codebase. The `dev-server` peerDependency
73
+ is widened to accept both Vite 7 and Vite 8.
74
+
75
+ - Updated dependencies [abffa53]
76
+ - Updated dependencies [abffa53]
77
+ - Updated dependencies [abffa53]
78
+ - Updated dependencies [abffa53]
79
+ - Updated dependencies [abffa53]
80
+ - Updated dependencies [aa35c46]
81
+ - Updated dependencies [abffa53]
82
+ - Updated dependencies [abffa53]
83
+ - Updated dependencies [abffa53]
84
+ - Updated dependencies [aaa3f74]
85
+ - Updated dependencies [abffa53]
86
+ - Updated dependencies [abffa53]
87
+ - Updated dependencies [32bcf83]
88
+ - @equinor/fusion-framework@8.0.0
89
+ - @equinor/fusion-framework-app@11.0.0
90
+ - @equinor/fusion-framework-dev-server@2.0.0
91
+ - @equinor/fusion-framework-module-ag-grid@36.0.0
92
+ - @equinor/fusion-framework-module-analytics@2.0.0
93
+ - @equinor/fusion-framework-module-app@8.0.0
94
+ - @equinor/fusion-framework-module-bookmark@4.0.0
95
+ - @equinor/fusion-framework-module-context@8.0.0
96
+ - @equinor/fusion-framework-module-feature-flag@2.0.0
97
+ - @equinor/fusion-framework-module-navigation@7.0.0
98
+ - @equinor/fusion-framework-module-services@8.0.0
99
+ - @equinor/fusion-framework-module-telemetry@5.0.0
100
+ - @equinor/fusion-framework-react@8.0.0
101
+ - @equinor/fusion-framework-react-components-bookmark@2.0.0
102
+ - @equinor/fusion-framework-react-components-people-provider@2.0.0
103
+ - @equinor/fusion-framework-react-module-bookmark@6.0.0
104
+ - @equinor/fusion-observable@9.0.0
105
+ - @equinor/fusion-query@7.0.0
34
106
 
35
107
  ## 4.0.4
36
108
 
package/README.md CHANGED
@@ -1,11 +1,19 @@
1
- ## Dev Portal
1
+ # @equinor/fusion-framework-dev-portal
2
2
 
3
- This package provides a development portal for the Fusion framework.
3
+ Minimal development portal for building and testing Fusion Framework applications locally.
4
4
 
5
- This Portal only contains the bare minimum to get started with the Fusion Application development. Visuals might differ from the production portal.
5
+ ## What Is It?
6
6
 
7
- It is recommended to use the `@equinor/fusion-framework-dev-server` package for a more complete development experience.
8
- This package is a small part of the refactoring of the `@equinor/fusion-framework-cli` and is not intended for direct use in production.
7
+ `@equinor/fusion-framework-dev-portal` provides a lightweight portal shell that mirrors the production Fusion portal layout — header, context selector, bookmark side sheet, person settings, and application routing — without the full production overhead. It is the portal component loaded by `@equinor/fusion-framework-dev-server` and `@equinor/fusion-framework-cli` when running apps locally.
8
+
9
+ Use this package when you need a portal host for local app development. For the recommended development workflow, pair it with `@equinor/fusion-framework-dev-server`.
10
+
11
+ ## Key Concepts
12
+
13
+ - **Portal shell**: A React application that renders the top bar, context selector, and an app mounting area.
14
+ - **Application loader**: Dynamically initializes and mounts a Fusion app by its `appKey`, handling manifest resolution, script loading, and teardown.
15
+ - **Framework modules**: The portal pre-configures telemetry, navigation, bookmarks, feature flags, analytics, AG Grid, and service integrations so loaded apps inherit a realistic environment.
16
+ - **Context navigation**: When an app uses the context module, the portal synchronizes URL navigation with context changes automatically.
9
17
 
10
18
  ## Installation
11
19
 
@@ -15,55 +23,55 @@ pnpm add @equinor/fusion-framework-dev-portal
15
23
 
16
24
  ## Environment Variables
17
25
 
18
- The following environment variables must be set in `.env` or in the environment variables of the server:
26
+ Set these in a `.env` file or in your server environment:
19
27
 
20
- - FUSION_MSAL_CLIENT_ID: The client ID for MSAL authentication.
21
- - FUSION_MSAL_TENANT_ID: The tenant ID for MSAL authentication.
22
- - FUSION_SERVICE_DISCOVERY_URL: The URL for service discovery.
23
- - FUSION_SERVICE_SCOPE: The scopes for the service.
24
- - FUSION_SPA_AG_GRID_KEY: (Optional) AG Grid Enterprise license key for local development. When provided, this eliminates AG Grid license console warnings when running the portal locally with AG Grid-enabled features.
28
+ | Variable | Required | Description |
29
+ |---|---|---|
30
+ | `FUSION_MSAL_CLIENT_ID` | Yes | MSAL application client ID for authentication |
31
+ | `FUSION_MSAL_TENANT_ID` | Yes | Azure AD tenant ID for authentication |
32
+ | `FUSION_SERVICE_DISCOVERY_URL` | Yes | URL for the Fusion service discovery endpoint |
33
+ | `FUSION_SERVICE_SCOPE` | Yes | OAuth scopes for service requests |
34
+ | `FUSION_SPA_AG_GRID_KEY` | No | AG Grid Enterprise license key — silences console warnings locally |
25
35
 
26
- ### Local AG Grid Configuration
36
+ ### AG Grid License
27
37
 
28
- To use AG Grid Enterprise features without console warnings during local development:
38
+ To suppress AG Grid Enterprise license warnings during local development:
29
39
 
30
- 1. Obtain an AG Grid Enterprise license key from your organization
31
- 2. Add the key to your `.env` file:
32
- ```sh
33
- FUSION_SPA_AG_GRID_KEY=your-license-key-here
34
- ```
35
- 3. Start the dev portal:
36
- ```sh
37
- pnpm start
38
- ```
39
- 4. Verify the configuration by opening the portal and checking the browser console - there should be no AG Grid license warnings
40
+ 1. Add `FUSION_SPA_AG_GRID_KEY=<your-key>` to your `.env` file.
41
+ 2. Start the dev portal with `pnpm start`.
42
+ 3. Verify the browser console shows no AG Grid license warnings.
40
43
 
41
- **Note**: The license key is only used for local development and is never committed to the repository or deployed to production.
44
+ The license key is only used locally and must not be committed to the repository.
42
45
 
43
- ## Development
46
+ ## Quick Start
44
47
 
45
48
  ```sh
46
49
  pnpm start
47
50
  ```
48
51
 
49
- ## Usage
52
+ This launches the dev server with the portal loaded.
53
+
54
+ ## Public API
55
+
56
+ The package exports a single `render` function that mounts the portal into a DOM element:
50
57
 
51
58
  ```ts
52
- import { render } from "@equinor/fusion-framework-dev-portal";
59
+ import { render } from '@equinor/fusion-framework-dev-portal';
53
60
 
54
- const el = document.createElement("div");
55
- el.id = "dev-portal";
61
+ const el = document.createElement('div');
62
+ el.id = 'dev-portal';
56
63
  document.body.appendChild(el);
57
64
 
58
- const framework = /** Fusion Framework, [Service Discovery, MSAL] */;
59
-
60
- render(el, {ref: framework});
65
+ // `framework` is a pre-configured Fusion Framework instance with Service Discovery and MSAL
66
+ render(el, { ref: framework });
61
67
  ```
62
68
 
63
69
  ### Usage with `@equinor/fusion-framework-dev-server`
64
70
 
71
+ The dev server loads this portal automatically. A typical integration looks like:
72
+
65
73
  ```ts
66
- import { createDevServer } from "@equinor/fusion-framework-dev-server";
74
+ import { createDevServer } from '@equinor/fusion-framework-dev-server';
67
75
 
68
76
  const portalId = '@equinor/fusion-framework-dev-portal';
69
77
  const devServer = await createDevServer({
@@ -72,33 +80,31 @@ const devServer = await createDevServer({
72
80
  portal: {
73
81
  id: portalId,
74
82
  tag: 'latest',
75
- }
76
- /** --- Add any other environment variables you need here --- */
83
+ },
77
84
  },
78
85
  },
79
86
  api: {
80
- serviceDiscoveryUrl: "https://location.of.your.service.discovery",
81
- processServices: /** generate proxy routes */
82
- routes: [
83
- {
84
- // intercept for the dev-portal manifest
85
- match: `/PROXY_SERVICE_KEY/PROXY_PATH/${options.portal}{@:tag}`,
86
- middleware: async (req, res) => {
87
- res.writeHead(200, { 'content-type': 'application/json' });
88
- // resolve the local path to the dev-portal
89
- // __CWD__/node_modules/@equinor/fusion-framework-dev-portal/dist/main.js
90
- const path = fileURLToPath('/@fs' + import.meta.resolve(portalId));
91
- const manifest = {
92
- build: {
93
- entrypoint: new URL(path, req.headers.referer),
94
- }
95
- }
96
- res.end(JSON.stringify(manifest));
97
- },
98
- }
99
- ]
87
+ serviceDiscoveryUrl: 'https://location.of.your.service.discovery',
100
88
  },
101
89
  });
102
90
  ```
103
91
 
92
+ ## Architecture
93
+
94
+ The portal is composed of these internal parts:
95
+
96
+ - **`render`** — Entry point; creates a React root with theme, framework, and people-resolver providers.
97
+ - **`configure`** — Configures all framework modules (telemetry, navigation, bookmarks, feature flags, analytics, AG Grid, services).
98
+ - **`Router`** — Sets up routes with `react-router` via the navigation module; routes `/apps/:appKey/*` to the app loader.
99
+ - **`AppLoader`** — Resolves, initializes, and mounts a Fusion app by key; handles loading states and errors.
100
+ - **`Header`** — Top bar with the Fusion logo, context selector, bookmark toggle, and person settings.
101
+ - **`ContextSelector`** — Wired to the current app's context module for searching and selecting context items.
102
+ - **`useAppContextNavigation`** — Synchronizes URL pathname with context changes for apps that use the context module.
103
+
104
+ ## Constraints
105
+
106
+ - This portal is for **local development only** and is not intended for production deployment.
107
+ - Visuals may differ from the production Fusion portal.
108
+ - The portal assumes MSAL and service discovery are configured in the parent framework instance.
109
+
104
110