@equinor/fusion-framework-react-app 12.0.0 → 12.0.2
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/useAppEnvironmentVariables.js +9 -4
- package/dist/esm/useAppEnvironmentVariables.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +14 -14
- package/src/useAppEnvironmentVariables.ts +10 -7
- package/src/version.ts +1 -1
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "12.0.
|
|
1
|
+
export declare const version = "12.0.2";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-react-app",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.2",
|
|
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.
|
|
128
|
-
"@equinor/fusion-framework-module-app": "8.0.2",
|
|
127
|
+
"@equinor/fusion-framework-app": "11.0.10",
|
|
129
128
|
"@equinor/fusion-framework-module": "6.1.0",
|
|
130
|
-
"@equinor/fusion-framework-module-
|
|
131
|
-
"@equinor/fusion-framework-react": "8.0.0",
|
|
129
|
+
"@equinor/fusion-framework-module-app": "8.0.2",
|
|
132
130
|
"@equinor/fusion-framework-module-navigation": "7.0.4",
|
|
131
|
+
"@equinor/fusion-framework-module-http": "8.0.3",
|
|
133
132
|
"@equinor/fusion-framework-react-module": "4.0.1",
|
|
134
|
-
"@equinor/fusion-framework-react-module-http": "11.0.0"
|
|
133
|
+
"@equinor/fusion-framework-react-module-http": "11.0.0",
|
|
134
|
+
"@equinor/fusion-framework-react": "8.0.0"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
137
|
"@types/react": "^19.2.7",
|
|
@@ -142,23 +142,23 @@
|
|
|
142
142
|
"rxjs": "^7.8.1",
|
|
143
143
|
"typescript": "^6.0.3",
|
|
144
144
|
"vitest": "^4.1.0",
|
|
145
|
-
"@equinor/fusion-framework-module-ag-grid": "
|
|
146
|
-
"@equinor/fusion-framework-module-analytics": "3.0.
|
|
145
|
+
"@equinor/fusion-framework-module-ag-grid": "37.0.0",
|
|
146
|
+
"@equinor/fusion-framework-module-analytics": "3.0.1",
|
|
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.
|
|
150
|
-
"@equinor/fusion-framework-react-
|
|
149
|
+
"@equinor/fusion-framework-module-msal": "10.0.1",
|
|
150
|
+
"@equinor/fusion-framework-react-module-bookmark": "6.0.0",
|
|
151
151
|
"@equinor/fusion-framework-react-module-context": "7.0.1",
|
|
152
|
-
"@equinor/fusion-
|
|
153
|
-
"@equinor/fusion-
|
|
152
|
+
"@equinor/fusion-framework-react-router": "2.2.0",
|
|
153
|
+
"@equinor/fusion-observable": "9.1.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-
|
|
161
|
-
"@equinor/fusion-framework-
|
|
160
|
+
"@equinor/fusion-framework-react-router": "^2.2.0",
|
|
161
|
+
"@equinor/fusion-framework-module-msal": "^10.0.1"
|
|
162
162
|
},
|
|
163
163
|
"peerDependenciesMeta": {
|
|
164
164
|
"@equinor/fusion-framework-react-module-ag-grid": {
|
|
@@ -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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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 = '12.0.
|
|
2
|
+
export const version = '12.0.2';
|