@equinor/fusion-framework-dev-portal 5.0.0-next.0 → 5.0.0
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 +87 -23
- package/README.md +61 -55
- package/dist/lib-D7s4zR0Q.js +6058 -0
- package/dist/main.js +73001 -98509
- package/package.json +48 -49
- package/src/AppLoader.tsx +18 -9
- package/src/BookMarkSideSheet.tsx +11 -0
- package/src/ContextSelector/ContextSelector.tsx +9 -3
- package/src/ContextSelector/useContextResolver.ts +41 -11
- package/src/EquinorLoader.tsx +9 -0
- package/src/ErrorViewer.tsx +9 -0
- package/src/FusionLogo.tsx +12 -0
- package/src/Header.Actions.tsx +12 -0
- package/src/Header.tsx +7 -0
- package/src/PersonSideSheet/index.tsx +10 -2
- package/src/PersonSideSheet/sheets/FeatureSheetContent.tsx +6 -2
- package/src/PersonSideSheet/sheets/FeatureTogglerApp.tsx +4 -1
- package/src/PersonSideSheet/sheets/FeatureTogglerPortal.tsx +4 -1
- package/src/PersonSideSheet/sheets/LandingSheetContent.tsx +7 -1
- package/src/PersonSideSheet/sheets/Styled.tsx +4 -0
- package/src/PersonSideSheet/sheets/types.ts +9 -0
- package/src/Router.tsx +17 -0
- package/src/config.ts +13 -8
- package/src/main.tsx +11 -0
- package/src/resources/fallback-photo.svg.ts +5 -0
- package/src/useAppContextNavigation.ts +19 -10
- package/src/version.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,36 +1,100 @@
|
|
|
1
1
|
# @equinor/fusion-framework-dev-portal
|
|
2
2
|
|
|
3
|
-
## 5.0.0
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- abffa53: Major version bump for Fusion Framework React 19 release.
|
|
8
|
+
|
|
9
|
+
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.
|
|
10
|
+
|
|
11
|
+
**Breaking changes:**
|
|
12
|
+
- Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
|
|
13
|
+
- React Router upgraded from v6 to v7
|
|
14
|
+
- Navigation module refactored with new history API
|
|
15
|
+
- `renderComponent` and `renderApp` now use `createRoot` API
|
|
16
|
+
|
|
17
|
+
**Migration:**
|
|
18
|
+
- Update your React version to 18.0.0 or higher before upgrading
|
|
19
|
+
- Replace `NavigationProvider.createRouter()` with `@equinor/fusion-framework-react-router`
|
|
20
|
+
- See individual package changelogs for package-specific migration steps
|
|
21
|
+
|
|
22
|
+
- abffa53: Upgrade to React 19 and remove support for React versions lower than 18.
|
|
23
|
+
|
|
24
|
+
**Breaking changes:**
|
|
25
|
+
- Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
|
|
26
|
+
- React 16 and 17 are no longer supported
|
|
27
|
+
- Dev dependencies upgraded to React 19.2.1 and @types/react 19.2.7
|
|
28
|
+
|
|
29
|
+
**Migration:**
|
|
30
|
+
- Update your React version to 18.0.0 or higher before upgrading these packages
|
|
31
|
+
- If using React 16 or 17, upgrade to React 18 or 19 first
|
|
32
|
+
|
|
33
|
+
Closes https://github.com/equinor/fusion-framework/issues/3504
|
|
4
34
|
|
|
5
35
|
### Minor Changes
|
|
6
36
|
|
|
7
|
-
-
|
|
37
|
+
- 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
38
|
|
|
9
39
|
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
40
|
|
|
11
41
|
### Patch Changes
|
|
12
42
|
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
43
|
+
- abffa53: Render application content inside a stable `#app-section` container so browser-driven evaluation tools can target the app surface consistently.
|
|
44
|
+
|
|
45
|
+
This makes automated cookbook and dev-portal validation more reliable when using `agent-browser` and Copilot-based evaluation flows.
|
|
46
|
+
|
|
47
|
+
Refs https://github.com/equinor/fusion-core-tasks/issues/724
|
|
48
|
+
|
|
49
|
+
- abffa53: Upgrade dev-portal dependencies for React 19 compatibility.
|
|
50
|
+
- Upgrade `react-router` from v6 to v7.13 (backward-compatible, no code changes required)
|
|
51
|
+
- Upgrade `@equinor/fusion-react-styles` to 2.0.0 (removes `@material-ui/styles` dependency)
|
|
52
|
+
- Upgrade `@equinor/fusion-react-context-selector` to 2.0.1
|
|
53
|
+
|
|
54
|
+
This resolves the React 19 blocker identified in https://github.com/equinor/fusion-framework/issues/3698
|
|
55
|
+
|
|
56
|
+
- abffa53: Upgrade `react-router-dom` from v6 to v7.9.5 for React 19 compatibility.
|
|
57
|
+
|
|
58
|
+
This is a backward-compatible upgrade - all existing Router 6 patterns continue to work with Router 7. No code changes required.
|
|
59
|
+
|
|
60
|
+
- aa35c46: chore: bump @vitejs/plugin-react from 5.1.4 to 6.0.1
|
|
61
|
+
- 32bcf83: Bump `vite` from `7.3.1` to `8.0.0`.
|
|
62
|
+
|
|
63
|
+
Vite 8 replaces Rollup with Rolldown and esbuild with Oxc for faster builds.
|
|
64
|
+
No breaking API changes affect this codebase. The `dev-server` peerDependency
|
|
65
|
+
is widened to accept both Vite 7 and Vite 8.
|
|
66
|
+
|
|
67
|
+
- Updated dependencies [abffa53]
|
|
68
|
+
- Updated dependencies [abffa53]
|
|
69
|
+
- Updated dependencies [abffa53]
|
|
70
|
+
- Updated dependencies [abffa53]
|
|
71
|
+
- Updated dependencies [abffa53]
|
|
72
|
+
- Updated dependencies [aa35c46]
|
|
73
|
+
- Updated dependencies [abffa53]
|
|
74
|
+
- Updated dependencies [abffa53]
|
|
75
|
+
- Updated dependencies [abffa53]
|
|
76
|
+
- Updated dependencies [aaa3f74]
|
|
77
|
+
- Updated dependencies [abffa53]
|
|
78
|
+
- Updated dependencies [abffa53]
|
|
79
|
+
- Updated dependencies [32bcf83]
|
|
80
|
+
- @equinor/fusion-framework@8.0.0
|
|
81
|
+
- @equinor/fusion-framework-app@11.0.0
|
|
82
|
+
- @equinor/fusion-framework-dev-server@2.0.0
|
|
83
|
+
- @equinor/fusion-framework-module-ag-grid@36.0.0
|
|
84
|
+
- @equinor/fusion-framework-module-analytics@2.0.0
|
|
85
|
+
- @equinor/fusion-framework-module-app@8.0.0
|
|
86
|
+
- @equinor/fusion-framework-module-bookmark@4.0.0
|
|
87
|
+
- @equinor/fusion-framework-module-context@8.0.0
|
|
88
|
+
- @equinor/fusion-framework-module-feature-flag@2.0.0
|
|
89
|
+
- @equinor/fusion-framework-module-navigation@7.0.0
|
|
90
|
+
- @equinor/fusion-framework-module-services@8.0.0
|
|
91
|
+
- @equinor/fusion-framework-module-telemetry@5.0.0
|
|
92
|
+
- @equinor/fusion-framework-react@8.0.0
|
|
93
|
+
- @equinor/fusion-framework-react-components-bookmark@2.0.0
|
|
94
|
+
- @equinor/fusion-framework-react-components-people-provider@2.0.0
|
|
95
|
+
- @equinor/fusion-framework-react-module-bookmark@6.0.0
|
|
96
|
+
- @equinor/fusion-observable@9.0.0
|
|
97
|
+
- @equinor/fusion-query@7.0.0
|
|
34
98
|
|
|
35
99
|
## 4.0.4
|
|
36
100
|
|
package/README.md
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
# @equinor/fusion-framework-dev-portal
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Minimal development portal for building and testing Fusion Framework applications locally.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## What Is It?
|
|
6
6
|
|
|
7
|
-
It is
|
|
8
|
-
|
|
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
|
-
|
|
26
|
+
Set these in a `.env` file or in your server environment:
|
|
19
27
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
###
|
|
36
|
+
### AG Grid License
|
|
27
37
|
|
|
28
|
-
To
|
|
38
|
+
To suppress AG Grid Enterprise license warnings during local development:
|
|
29
39
|
|
|
30
|
-
1.
|
|
31
|
-
2.
|
|
32
|
-
|
|
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
|
-
|
|
44
|
+
The license key is only used locally and must not be committed to the repository.
|
|
42
45
|
|
|
43
|
-
##
|
|
46
|
+
## Quick Start
|
|
44
47
|
|
|
45
48
|
```sh
|
|
46
49
|
pnpm start
|
|
47
50
|
```
|
|
48
51
|
|
|
49
|
-
|
|
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
|
|
59
|
+
import { render } from '@equinor/fusion-framework-dev-portal';
|
|
53
60
|
|
|
54
|
-
const el = document.createElement(
|
|
55
|
-
el.id =
|
|
61
|
+
const el = document.createElement('div');
|
|
62
|
+
el.id = 'dev-portal';
|
|
56
63
|
document.body.appendChild(el);
|
|
57
64
|
|
|
58
|
-
|
|
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
|
|
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:
|
|
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
|
|