@equinor/fusion-framework-dev-portal 8.0.2 → 9.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 +41 -0
- package/README.md +4 -3
- package/dist/main.js +15741 -16017
- package/package.json +33 -29
- package/src/Router.tsx +6 -6
- package/src/configure.ts +60 -19
- package/src/version.ts +1 -1
- package/tsconfig.json +3 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/src/useAppContextNavigation.ts +0 -153
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-dev-portal",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/main.js",
|
|
@@ -28,54 +28,58 @@
|
|
|
28
28
|
"@equinor/fusion-wc-person": "^3.5.5",
|
|
29
29
|
"@types/react": "^19.2.7",
|
|
30
30
|
"@types/react-dom": "^19.2.3",
|
|
31
|
+
"@types/semver": "^7.7.1",
|
|
31
32
|
"@vitejs/plugin-react": "^6.0.1",
|
|
32
33
|
"dotenv": "^17.3.1",
|
|
33
34
|
"react": "^19.2.1",
|
|
34
35
|
"react-dom": "^19.2.1",
|
|
35
36
|
"rxjs": "^7.8.1",
|
|
36
37
|
"styled-components": "^6.3.11",
|
|
38
|
+
"semver": "^7.7.2",
|
|
37
39
|
"tsx": "^4.19.3",
|
|
38
40
|
"typescript": "^7.0.2",
|
|
39
41
|
"vite": "^8.0.0",
|
|
40
|
-
"@equinor/fusion-framework": "
|
|
41
|
-
"@equinor/fusion-framework-dev-server": "2.0.
|
|
42
|
-
"@equinor/fusion-framework
|
|
42
|
+
"@equinor/fusion-framework-app": "12.0.0",
|
|
43
|
+
"@equinor/fusion-framework-dev-server": "2.0.18",
|
|
44
|
+
"@equinor/fusion-framework": "8.0.13",
|
|
45
|
+
"@equinor/fusion-framework-module-app": "8.0.4",
|
|
46
|
+
"@equinor/fusion-framework-module-bookmark": "4.0.4",
|
|
43
47
|
"@equinor/fusion-framework-module-ag-grid": "37.0.1",
|
|
44
|
-
"@equinor/fusion-framework-module-
|
|
45
|
-
"@equinor/fusion-framework-module-
|
|
46
|
-
"@equinor/fusion-framework-
|
|
47
|
-
"@equinor/fusion-framework-module-feature-flag": "2.0.
|
|
48
|
-
"@equinor/fusion-framework-module-navigation": "7.0.
|
|
49
|
-
"@equinor/fusion-framework-module-telemetry": "7.0.
|
|
50
|
-
"@equinor/fusion-framework-module-context": "8.0.1",
|
|
48
|
+
"@equinor/fusion-framework-module-context": "8.0.2",
|
|
49
|
+
"@equinor/fusion-framework-module-analytics": "3.0.5",
|
|
50
|
+
"@equinor/fusion-framework-plugin-context-navigation": "0.1.0",
|
|
51
|
+
"@equinor/fusion-framework-module-feature-flag": "2.0.3",
|
|
52
|
+
"@equinor/fusion-framework-module-navigation": "7.0.7",
|
|
53
|
+
"@equinor/fusion-framework-module-telemetry": "7.0.2",
|
|
51
54
|
"@equinor/fusion-framework-react": "8.0.1",
|
|
52
|
-
"@equinor/fusion-framework-module-services": "8.0.
|
|
55
|
+
"@equinor/fusion-framework-module-services": "8.0.3",
|
|
53
56
|
"@equinor/fusion-framework-react-components-bookmark": "2.0.3",
|
|
54
|
-
"@equinor/fusion-framework-react-components-people-provider": "2.0.4",
|
|
55
57
|
"@equinor/fusion-framework-react-router": "2.4.0",
|
|
56
58
|
"@equinor/fusion-observable": "9.1.1",
|
|
57
|
-
"@equinor/fusion-
|
|
58
|
-
"@equinor/fusion-
|
|
59
|
+
"@equinor/fusion-query": "7.0.3",
|
|
60
|
+
"@equinor/fusion-framework-react-components-people-provider": "2.0.4",
|
|
61
|
+
"@equinor/fusion-framework-react-module-bookmark": "6.0.1"
|
|
59
62
|
},
|
|
60
63
|
"peerDependencies": {
|
|
61
|
-
"@equinor/fusion-framework": "8.0.
|
|
62
|
-
"@equinor/fusion-framework-app": "
|
|
63
|
-
"@equinor/fusion-framework-dev-server": "2.0.16",
|
|
64
|
+
"@equinor/fusion-framework": "8.0.13",
|
|
65
|
+
"@equinor/fusion-framework-app": "12.0.0",
|
|
64
66
|
"@equinor/fusion-framework-module-ag-grid": "37.0.1",
|
|
65
|
-
"@equinor/fusion-framework-
|
|
66
|
-
"@equinor/fusion-framework-module-app": "8.0.
|
|
67
|
-
"@equinor/fusion-framework-module-
|
|
68
|
-
"@equinor/fusion-framework-module-
|
|
69
|
-
"@equinor/fusion-framework-module-
|
|
70
|
-
"@equinor/fusion-framework-
|
|
71
|
-
"@equinor/fusion-framework-module-
|
|
72
|
-
"@equinor/fusion-framework-module-navigation": "7.0.
|
|
73
|
-
"@equinor/fusion-framework-
|
|
67
|
+
"@equinor/fusion-framework-dev-server": "2.0.18",
|
|
68
|
+
"@equinor/fusion-framework-module-app": "8.0.4",
|
|
69
|
+
"@equinor/fusion-framework-module-analytics": "3.0.5",
|
|
70
|
+
"@equinor/fusion-framework-module-bookmark": "4.0.4",
|
|
71
|
+
"@equinor/fusion-framework-module-context": "8.0.2",
|
|
72
|
+
"@equinor/fusion-framework-plugin-context-navigation": "0.1.0",
|
|
73
|
+
"@equinor/fusion-framework-module-feature-flag": "2.0.3",
|
|
74
|
+
"@equinor/fusion-framework-module-navigation": "7.0.7",
|
|
75
|
+
"@equinor/fusion-framework-module-services": "8.0.3",
|
|
74
76
|
"@equinor/fusion-framework-react-components-bookmark": "2.0.3",
|
|
77
|
+
"@equinor/fusion-framework-module-telemetry": "7.0.2",
|
|
75
78
|
"@equinor/fusion-framework-react-components-people-provider": "2.0.4",
|
|
76
|
-
"@equinor/fusion-
|
|
79
|
+
"@equinor/fusion-framework-react": "8.0.1",
|
|
80
|
+
"@equinor/fusion-framework-react-module-bookmark": "6.0.1",
|
|
77
81
|
"@equinor/fusion-observable": "9.1.1",
|
|
78
|
-
"@equinor/fusion-
|
|
82
|
+
"@equinor/fusion-query": "7.0.3"
|
|
79
83
|
},
|
|
80
84
|
"peerDependenciesMeta": {
|
|
81
85
|
"@equinor/fusion-framework": {
|
package/src/Router.tsx
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useBookmarkNavigate } from '@equinor/fusion-framework-react-module-bookmark/portal';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Router as FusionRouter, Outlet, useParams } from '@equinor/fusion-framework-react-router';
|
|
4
4
|
import AppLoader from './AppLoader';
|
|
5
5
|
import { Header } from './Header';
|
|
6
6
|
|
|
7
7
|
import { styled } from 'styled-components';
|
|
8
|
-
import { useAppContextNavigation } from './useAppContextNavigation';
|
|
9
8
|
|
|
10
9
|
const Styled = {
|
|
11
10
|
ContentContainer: styled.div`
|
|
@@ -18,11 +17,14 @@ const Styled = {
|
|
|
18
17
|
`,
|
|
19
18
|
Head: styled.section`
|
|
20
19
|
grid-area: head;
|
|
20
|
+
z-index: 2;
|
|
21
21
|
`,
|
|
22
22
|
Main: styled.section`
|
|
23
23
|
grid-area: main;
|
|
24
|
+
--header-height: 48px;
|
|
24
25
|
overflow: auto;
|
|
25
26
|
position: relative;
|
|
27
|
+
z-index: 1;
|
|
26
28
|
max-width: 100%;
|
|
27
29
|
display: grid;
|
|
28
30
|
`,
|
|
@@ -73,11 +75,9 @@ const routes = [
|
|
|
73
75
|
/**
|
|
74
76
|
* Top-level router for the Fusion Dev Portal.
|
|
75
77
|
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
+
* Uses `@equinor/fusion-framework-react-router` which automatically connects
|
|
79
|
+
* to the framework's navigation module for history and basename.
|
|
78
80
|
*/
|
|
79
81
|
export const Router = () => {
|
|
80
|
-
// observe the context changes and navigate when the context changes
|
|
81
|
-
useAppContextNavigation();
|
|
82
82
|
return <FusionRouter routes={routes} />;
|
|
83
83
|
};
|
package/src/configure.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { enableAppModule } from '@equinor/fusion-framework-module-app';
|
|
1
|
+
import { enableAppModule, type AppModule } from '@equinor/fusion-framework-module-app';
|
|
2
2
|
import { enableBookmark } from '@equinor/fusion-framework-react-module-bookmark';
|
|
3
3
|
import type { FrameworkConfigurator } from '@equinor/fusion-framework';
|
|
4
4
|
import { enableAnalytics } from '@equinor/fusion-framework-module-analytics';
|
|
5
5
|
import { ConsoleAnalyticsAdapter } from '@equinor/fusion-framework-module-analytics/adapters';
|
|
6
|
-
import {
|
|
6
|
+
import { enableContext } from '@equinor/fusion-framework-module-context';
|
|
7
|
+
import {
|
|
8
|
+
enableNavigation,
|
|
9
|
+
type NavigationModule,
|
|
10
|
+
} from '@equinor/fusion-framework-module-navigation';
|
|
7
11
|
import { enableServices } from '@equinor/fusion-framework-module-services';
|
|
8
12
|
import { enableFeatureFlagging } from '@equinor/fusion-framework-module-feature-flag';
|
|
9
13
|
import {
|
|
@@ -11,15 +15,22 @@ import {
|
|
|
11
15
|
createUrlPlugin,
|
|
12
16
|
} from '@equinor/fusion-framework-module-feature-flag/plugins';
|
|
13
17
|
import { enableAgGrid } from '@equinor/fusion-framework-module-ag-grid';
|
|
14
|
-
|
|
15
18
|
import { enableTelemetry } from '@equinor/fusion-framework-module-telemetry';
|
|
19
|
+
import {
|
|
20
|
+
enableContextNavigation,
|
|
21
|
+
legacyAppNavigationFix,
|
|
22
|
+
} from '@equinor/fusion-framework-plugin-context-navigation';
|
|
23
|
+
import {
|
|
24
|
+
buildContextUrlForStrategy,
|
|
25
|
+
resolveContextIdFromUrl,
|
|
26
|
+
} from '@equinor/fusion-framework-plugin-context-navigation/utils';
|
|
16
27
|
import { version } from './version';
|
|
17
28
|
|
|
18
29
|
declare global {
|
|
19
30
|
interface Window {
|
|
20
31
|
/**
|
|
21
|
-
* AG Grid license key for enabling enterprise features
|
|
22
|
-
* @remarks
|
|
32
|
+
* AG Grid license key for enabling enterprise features.
|
|
33
|
+
* @remarks Typically set via environment variables during build time.
|
|
23
34
|
*/
|
|
24
35
|
FUSION_AG_GRID_KEY?: string;
|
|
25
36
|
}
|
|
@@ -28,10 +39,15 @@ declare global {
|
|
|
28
39
|
/**
|
|
29
40
|
* Configures the Fusion Dev Portal framework with all required modules.
|
|
30
41
|
*
|
|
31
|
-
*
|
|
42
|
+
* Modules enabled:
|
|
32
43
|
* - **Telemetry** — portal-scoped usage analytics with version metadata.
|
|
33
|
-
* - **App
|
|
34
|
-
* - **
|
|
44
|
+
* - **App** — application manifest loading and lifecycle.
|
|
45
|
+
* - **Context** — context routing URL hooks (path generator + extractor) wired to the shared context-navigation URL utilities.
|
|
46
|
+
* - **Context Navigation plugin** — keeps the browser URL in sync with the
|
|
47
|
+
* active context, handles app-switch carry-over, and guards against
|
|
48
|
+
* accidental context loss. Telemetry is auto-resolved from the framework
|
|
49
|
+
* telemetry module.
|
|
50
|
+
* - **Navigation** — router integration with telemetry.
|
|
35
51
|
* - **Services** — standard Fusion service integrations.
|
|
36
52
|
* - **AG Grid** — enterprise license key from `window.FUSION_AG_GRID_KEY`.
|
|
37
53
|
* - **Analytics** — console adapter gated by the `fusionLogAnalytics` feature flag.
|
|
@@ -51,10 +67,7 @@ export const configure = async (config: FrameworkConfigurator) => {
|
|
|
51
67
|
builder.setMetadata(() => ({
|
|
52
68
|
fusion: {
|
|
53
69
|
type: 'portal-telemetry',
|
|
54
|
-
portal: {
|
|
55
|
-
version,
|
|
56
|
-
name: 'Fusion Dev Portal',
|
|
57
|
-
},
|
|
70
|
+
portal: { version, name: 'Fusion Dev Portal' },
|
|
58
71
|
},
|
|
59
72
|
}));
|
|
60
73
|
// Scope telemetry events to portal-specific tracking
|
|
@@ -66,8 +79,26 @@ export const configure = async (config: FrameworkConfigurator) => {
|
|
|
66
79
|
|
|
67
80
|
enableAppModule(config);
|
|
68
81
|
|
|
82
|
+
/**
|
|
83
|
+
* Configure context module with dev-portal URL conventions.
|
|
84
|
+
*
|
|
85
|
+
* This wires the context module's URL hooks — the path generator
|
|
86
|
+
* and path extractor — to the dev-portal's URL routing strategy.
|
|
87
|
+
*
|
|
88
|
+
* The context-navigation plugin keeps the browser URL in sync with the
|
|
89
|
+
* active context as it changes at runtime.
|
|
90
|
+
*/
|
|
91
|
+
enableContext(config, (builder) => {
|
|
92
|
+
builder.setContextPathGenerator((context, path) =>
|
|
93
|
+
buildContextUrlForStrategy(context?.id, path),
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
builder.setContextPathExtractor((path) => resolveContextIdFromUrl(path));
|
|
97
|
+
});
|
|
98
|
+
|
|
69
99
|
enableNavigation(config, {
|
|
70
100
|
configure: (config) => {
|
|
101
|
+
config.setBasename('/');
|
|
71
102
|
config.setTelemetry(async (args) => {
|
|
72
103
|
// Only provide telemetry when the telemetry module was actually enabled
|
|
73
104
|
if (args.hasModule('telemetry')) {
|
|
@@ -133,13 +164,23 @@ export const configure = async (config: FrameworkConfigurator) => {
|
|
|
133
164
|
builder.addPlugin(createUrlPlugin(['fusionDebug']));
|
|
134
165
|
});
|
|
135
166
|
|
|
136
|
-
//
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
167
|
+
// Keep portal URLs aligned with the active app/context combination by using
|
|
168
|
+
// the shared context-navigation plugin and the dev-portal URL helpers.
|
|
169
|
+
enableContextNavigation(config, (builder) => {
|
|
170
|
+
builder.setPortalName('dev-portal');
|
|
171
|
+
builder.setDebug(true);
|
|
172
|
+
builder.setUrlGuard(true);
|
|
173
|
+
builder.setNavigationOptions({
|
|
174
|
+
replace: false, // Use pushState for navigation to allow back button support
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
config.onInitialized<[AppModule, NavigationModule]>((modules) => {
|
|
179
|
+
// Reset legacy app routers on context navigation for apps with navigation <v7.
|
|
180
|
+
legacyAppNavigationFix({ event: modules.event });
|
|
181
|
+
|
|
182
|
+
// Expose framework modules globally for development debugging and inspection.
|
|
183
|
+
// @ts-expect-error — `window` is not typed with `Fusion`
|
|
141
184
|
window.Fusion = { modules };
|
|
142
185
|
});
|
|
143
186
|
};
|
|
144
|
-
|
|
145
|
-
export default configure;
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '
|
|
2
|
+
export const version = '9.0.0';
|