@equinor/fusion-framework-react-app 11.0.0 → 12.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.
@@ -1 +1 @@
1
- export declare const version = "11.0.0";
1
+ export declare const version = "12.0.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-react-app",
3
- "version": "11.0.0",
3
+ "version": "12.0.1",
4
4
  "description": "",
5
5
  "main": "./dist/esm/index.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -124,14 +124,14 @@
124
124
  "directory": "packages/react"
125
125
  },
126
126
  "dependencies": {
127
- "@equinor/fusion-framework-app": "11.0.7",
128
- "@equinor/fusion-framework-module": "6.1.0",
127
+ "@equinor/fusion-framework-app": "11.0.9",
129
128
  "@equinor/fusion-framework-module-app": "8.0.2",
129
+ "@equinor/fusion-framework-module": "6.1.0",
130
130
  "@equinor/fusion-framework-module-navigation": "7.0.4",
131
- "@equinor/fusion-framework-module-http": "8.0.2",
131
+ "@equinor/fusion-framework-react-module": "4.0.1",
132
132
  "@equinor/fusion-framework-react": "8.0.0",
133
133
  "@equinor/fusion-framework-react-module-http": "11.0.0",
134
- "@equinor/fusion-framework-react-module": "4.0.1"
134
+ "@equinor/fusion-framework-module-http": "8.0.3"
135
135
  },
136
136
  "devDependencies": {
137
137
  "@types/react": "^19.2.7",
@@ -142,22 +142,22 @@
142
142
  "rxjs": "^7.8.1",
143
143
  "typescript": "^6.0.3",
144
144
  "vitest": "^4.1.0",
145
- "@equinor/fusion-framework-module-analytics": "2.0.6",
146
145
  "@equinor/fusion-framework-module-ag-grid": "36.0.1",
146
+ "@equinor/fusion-framework-module-analytics": "3.0.0",
147
147
  "@equinor/fusion-framework-module-event": "6.0.0",
148
148
  "@equinor/fusion-framework-module-feature-flag": "2.0.1",
149
+ "@equinor/fusion-framework-module-msal": "10.0.0",
149
150
  "@equinor/fusion-framework-react-module-bookmark": "6.0.0",
150
151
  "@equinor/fusion-framework-react-module-context": "7.0.1",
151
- "@equinor/fusion-framework-module-msal": "9.0.0",
152
- "@equinor/fusion-framework-react-router": "2.2.0",
153
- "@equinor/fusion-observable": "9.0.2"
152
+ "@equinor/fusion-observable": "9.1.0",
153
+ "@equinor/fusion-framework-react-router": "2.2.0"
154
154
  },
155
155
  "peerDependencies": {
156
156
  "@types/react": "^18.0.0 || ^19.0.0",
157
157
  "react": "^18.0.0 || ^19.0.0",
158
158
  "react-dom": "^18.0.0 || ^19.0.0",
159
159
  "rxjs": "^7.0.0",
160
- "@equinor/fusion-framework-module-msal": "^9.0.0",
160
+ "@equinor/fusion-framework-module-msal": "^10.0.0",
161
161
  "@equinor/fusion-framework-react-router": "^2.2.0"
162
162
  },
163
163
  "peerDependenciesMeta": {
@@ -1,8 +1,9 @@
1
+ import { useMemo } from 'react';
2
+ import { map } from 'rxjs/operators';
1
3
  import type { ConfigEnvironment } from '@equinor/fusion-framework-module-app';
2
4
  import { useCurrentApp } from '@equinor/fusion-framework-react/app';
3
5
  import {
4
6
  type ObservableStateReturnType,
5
- useObservableSelector,
6
7
  useObservableState,
7
8
  } from '@equinor/fusion-observable/react';
8
9
 
@@ -42,14 +43,16 @@ export const useAppEnvironmentVariables = <
42
43
  throw Error('Framework is missing app module');
43
44
  }
44
45
 
45
- // Get the environment configuration observable from the app module
46
- const env$ = useObservableSelector(
47
- app.getConfig(),
48
- (config) => config.environment as TEnvironmentVariables,
49
- );
46
+ const env$ = useMemo(() => {
47
+ return app.getConfig().pipe(
48
+ map((config) => {
49
+ return config.environment as TEnvironmentVariables;
50
+ }),
51
+ );
52
+ }, [app]);
50
53
 
51
54
  // Return the observable state of the environment configuration
52
55
  return useObservableState(env$, {
53
- initial: app.config?.environment,
56
+ initial: app.config?.environment || ({} as TEnvironmentVariables),
54
57
  });
55
58
  };
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '11.0.0';
2
+ export const version = '12.0.1';
package/tsconfig.json CHANGED
@@ -15,6 +15,9 @@
15
15
  {
16
16
  "path": "../framework"
17
17
  },
18
+ {
19
+ "path": "../router"
20
+ },
18
21
  {
19
22
  "path": "../../modules/analytics"
20
23
  },