@equinor/fusion-framework-react 7.4.4 → 7.4.6

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.
@@ -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;
@@ -1,5 +1,5 @@
1
1
  export declare const useCurrentContext: () => {
2
- currentContext: import("@equinor/fusion-framework-react-module-context").ContextItem | null | undefined;
3
- setCurrentContext: (entry?: import("@equinor/fusion-framework-react-module-context").ContextItem | string | null) => void | Promise<import("@equinor/fusion-framework-react-module-context").ContextItem<Record<string, unknown>> | null>;
2
+ currentContext: import("@equinor/fusion-framework-module-context").ContextItem | null | undefined;
3
+ setCurrentContext: (entry?: import("@equinor/fusion-framework-module-context").ContextItem | string | null) => void | Promise<import("@equinor/fusion-framework-module-context").ContextItem<Record<string, unknown>> | null>;
4
4
  };
5
5
  export default useCurrentContext;
@@ -1 +1 @@
1
- export declare const version = "7.4.4";
1
+ export declare const version = "7.4.6";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-react",
3
- "version": "7.4.4",
3
+ "version": "7.4.6",
4
4
  "description": "",
5
5
  "main": "dist/esm/index.js",
6
6
  "exports": {
@@ -69,10 +69,10 @@
69
69
  },
70
70
  "dependencies": {
71
71
  "rxjs": "^7.8.1",
72
- "@equinor/fusion-framework": "^7.3.4",
72
+ "@equinor/fusion-framework": "^7.3.6",
73
73
  "@equinor/fusion-framework-module": "^4.3.7",
74
74
  "@equinor/fusion-framework-react-module": "^3.1.8",
75
- "@equinor/fusion-framework-react-module-http": "^8.0.3",
75
+ "@equinor/fusion-framework-react-module-http": "^8.0.4",
76
76
  "@equinor/fusion-observable": "^8.4.6"
77
77
  },
78
78
  "devDependencies": {
@@ -81,18 +81,18 @@
81
81
  "react": "^18.2.0",
82
82
  "react-dom": "^18.2.0",
83
83
  "typescript": "^5.8.2",
84
- "@equinor/fusion-framework-module-app": "^6.1.8",
85
- "@equinor/fusion-framework-react-module-context": "^6.2.21",
84
+ "@equinor/fusion-framework-module-app": "^6.1.9",
86
85
  "@equinor/fusion-framework-module-event": "^4.3.2",
87
- "@equinor/fusion-framework-module-msal": "^4.0.2",
88
- "@equinor/fusion-framework-module-feature-flag": "^1.1.14"
86
+ "@equinor/fusion-framework-module-feature-flag": "^1.1.14",
87
+ "@equinor/fusion-framework-react-module-context": "^6.2.22",
88
+ "@equinor/fusion-framework-module-msal": "^4.0.2"
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.23"
95
+ "@equinor/fusion-framework-react-module-signalr": "^3.0.25"
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(() => createFrameworkProvider(configure, ref), [configure, ref]);
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.4';
2
+ export const version = '7.4.6';
package/tsconfig.json CHANGED
@@ -5,8 +5,8 @@
5
5
  "rootDir": "src",
6
6
  "declarationDir": "./dist/types",
7
7
  "paths": {
8
- "react": [ "./node_modules/@types/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
- "exclude": [
41
- "node_modules",
42
- "lib"
43
- ]
44
- }
37
+ "include": ["src/**/*"],
38
+ "exclude": ["node_modules", "lib"]
39
+ }