@equinor/fusion-framework-react 7.4.4 → 7.4.5
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 +12 -0
- package/dist/esm/Framework.js +2 -2
- package/dist/esm/Framework.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/Framework.d.ts +2 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +8 -8
- package/src/Framework.tsx +8 -2
- package/src/version.ts +1 -1
- package/tsconfig.json +6 -11
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { FrameworkConfigurator } from '@equinor/fusion-framework';
|
|
2
2
|
import { type PropsWithChildren, type ReactNode } from 'react';
|
|
3
|
+
import type { ModulesInstance } from '@equinor/fusion-framework-module';
|
|
3
4
|
type ConfigureCallback = (configurator: FrameworkConfigurator) => void;
|
|
4
5
|
export declare const Framework: (props: PropsWithChildren<{
|
|
5
6
|
readonly configure: ConfigureCallback;
|
|
6
7
|
readonly fallback: NonNullable<ReactNode> | null;
|
|
8
|
+
readonly parent?: ModulesInstance<any>;
|
|
7
9
|
}>) => import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
export default Framework;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "7.4.
|
|
1
|
+
export declare const version = "7.4.5";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-react",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"rxjs": "^7.8.1",
|
|
72
|
-
"@equinor/fusion-framework": "^7.3.
|
|
72
|
+
"@equinor/fusion-framework": "^7.3.5",
|
|
73
|
+
"@equinor/fusion-framework-react-module-http": "^8.0.4",
|
|
73
74
|
"@equinor/fusion-framework-module": "^4.3.7",
|
|
74
|
-
"@equinor/fusion-
|
|
75
|
-
"@equinor/fusion-framework-react-module
|
|
76
|
-
"@equinor/fusion-observable": "^8.4.6"
|
|
75
|
+
"@equinor/fusion-observable": "^8.4.6",
|
|
76
|
+
"@equinor/fusion-framework-react-module": "^3.1.8"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@types/react": "^18.2.50",
|
|
@@ -82,17 +82,17 @@
|
|
|
82
82
|
"react-dom": "^18.2.0",
|
|
83
83
|
"typescript": "^5.8.2",
|
|
84
84
|
"@equinor/fusion-framework-module-app": "^6.1.8",
|
|
85
|
-
"@equinor/fusion-framework-
|
|
85
|
+
"@equinor/fusion-framework-module-feature-flag": "^1.1.14",
|
|
86
86
|
"@equinor/fusion-framework-module-event": "^4.3.2",
|
|
87
87
|
"@equinor/fusion-framework-module-msal": "^4.0.2",
|
|
88
|
-
"@equinor/fusion-framework-module-
|
|
88
|
+
"@equinor/fusion-framework-react-module-context": "^6.2.21"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"@types/react": "^17.0.0 || ^18.0.0",
|
|
92
92
|
"react": "^17.0.0 || ^18.0.0",
|
|
93
93
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
94
94
|
"@equinor/fusion-framework-module-feature-flag": "^1.1.14",
|
|
95
|
-
"@equinor/fusion-framework-react-module-signalr": "^3.0.
|
|
95
|
+
"@equinor/fusion-framework-react-module-signalr": "^3.0.24"
|
|
96
96
|
},
|
|
97
97
|
"peerDependenciesMeta": {
|
|
98
98
|
"@equinor/fusion-framework-module-event": {
|
package/src/Framework.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import type { FrameworkConfigurator } from '@equinor/fusion-framework';
|
|
|
2
2
|
import { createFrameworkProvider } from './create-framework-provider';
|
|
3
3
|
import { type PropsWithChildren, type ReactNode, Suspense, useMemo } from 'react';
|
|
4
4
|
import { useModules } from '@equinor/fusion-framework-react-module';
|
|
5
|
+
import type { ModulesInstance } from '@equinor/fusion-framework-module';
|
|
5
6
|
|
|
6
7
|
type ConfigureCallback = (configurator: FrameworkConfigurator) => void;
|
|
7
8
|
|
|
@@ -9,12 +10,17 @@ export const Framework = (
|
|
|
9
10
|
props: PropsWithChildren<{
|
|
10
11
|
readonly configure: ConfigureCallback;
|
|
11
12
|
readonly fallback: NonNullable<ReactNode> | null;
|
|
13
|
+
// biome-ignore lint/suspicious/noExplicitAny: should allow any
|
|
14
|
+
readonly parent?: ModulesInstance<any>;
|
|
12
15
|
}>,
|
|
13
16
|
) => {
|
|
14
|
-
const { configure, fallback, children } = props;
|
|
17
|
+
const { configure, fallback, parent, children } = props;
|
|
15
18
|
//import modules from parent context
|
|
16
19
|
const ref = useModules<[]>();
|
|
17
|
-
const Component = useMemo(
|
|
20
|
+
const Component = useMemo(
|
|
21
|
+
() => createFrameworkProvider(configure, parent ?? ref),
|
|
22
|
+
[configure, ref, parent],
|
|
23
|
+
);
|
|
18
24
|
return (
|
|
19
25
|
<Suspense fallback={fallback}>
|
|
20
26
|
<Component>{children}</Component>
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '7.4.
|
|
2
|
+
export const version = '7.4.5';
|
package/tsconfig.json
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"rootDir": "src",
|
|
6
6
|
"declarationDir": "./dist/types",
|
|
7
7
|
"paths": {
|
|
8
|
-
"react": [
|
|
9
|
-
}
|
|
8
|
+
"react": ["./node_modules/@types/react"]
|
|
9
|
+
}
|
|
10
10
|
},
|
|
11
11
|
"references": [
|
|
12
12
|
{
|
|
@@ -32,13 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"path": "../modules/signalr"
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
"include": [
|
|
38
|
-
"src/**/*",
|
|
35
|
+
}
|
|
39
36
|
],
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
]
|
|
44
|
-
}
|
|
37
|
+
"include": ["src/**/*"],
|
|
38
|
+
"exclude": ["node_modules", "lib"]
|
|
39
|
+
}
|