@equinor/fusion-framework-react-app 6.2.5 → 6.2.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.
- package/CHANGELOG.md +27 -0
- package/dist/esm/apploader/useApploader.js +2 -1
- package/dist/esm/apploader/useApploader.js.map +1 -1
- package/dist/esm/msal/useToken.js +1 -0
- package/dist/esm/msal/useToken.js.map +1 -1
- package/dist/esm/settings/useAppSettings.js +1 -1
- package/dist/esm/useAppEnvironmentVariables.js +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/settings/useAppSettings.d.ts +1 -1
- package/dist/types/useAppEnvironmentVariables.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +15 -15
- package/src/apploader/useApploader.ts +3 -1
- package/src/msal/useToken.ts +2 -1
- package/src/settings/useAppSettings.ts +1 -1
- package/src/useAppEnvironmentVariables.ts +1 -1
- package/src/version.ts +1 -1
- package/tsconfig.json +1 -4
|
@@ -9,7 +9,7 @@ type UpdateSettingsFunction<T, O = T> = (currentSettings: T | undefined) => O;
|
|
|
9
9
|
* @param {TSettings} [defaultValue] - The default value for the settings.
|
|
10
10
|
* @param hooks - Optional hooks to handle the status changes and errors.
|
|
11
11
|
*
|
|
12
|
-
* @
|
|
12
|
+
* @remarks
|
|
13
13
|
* `defaultValue` will only be used on the first render.
|
|
14
14
|
* `hooks`must be memoized to avoid unnecessary re-renders.
|
|
15
15
|
*
|
|
@@ -6,7 +6,7 @@ import { type ObservableStateReturnType } from '@equinor/fusion-observable/react
|
|
|
6
6
|
* This hook returns an observable state object that represents the current environment configuration.
|
|
7
7
|
* The environment configuration is retrieved from the app module provided by the framework.
|
|
8
8
|
*
|
|
9
|
-
* @
|
|
9
|
+
* @remarks This hook is only available when the app module is loaded (should be always for applications).
|
|
10
10
|
* This hook in theory should always have a value if config was provided for the application, but is async by nature, hence the `complete` and `error` properties.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.2.
|
|
1
|
+
export declare const version = "6.2.6";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-react-app",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -106,13 +106,13 @@
|
|
|
106
106
|
"directory": "packages/react"
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
|
-
"@equinor/fusion-framework-
|
|
110
|
-
"@equinor/fusion-framework-
|
|
111
|
-
"@equinor/fusion-framework-module-
|
|
112
|
-
"@equinor/fusion-framework-
|
|
113
|
-
"@equinor/fusion-framework-react
|
|
114
|
-
"@equinor/fusion-framework-react-module
|
|
115
|
-
"@equinor/fusion-framework-module-
|
|
109
|
+
"@equinor/fusion-framework-module": "^5.0.0",
|
|
110
|
+
"@equinor/fusion-framework-app": "^9.3.22",
|
|
111
|
+
"@equinor/fusion-framework-module-app": "^6.1.17",
|
|
112
|
+
"@equinor/fusion-framework-module-navigation": "^6.0.0",
|
|
113
|
+
"@equinor/fusion-framework-react": "^7.4.17",
|
|
114
|
+
"@equinor/fusion-framework-react-module": "^3.1.13",
|
|
115
|
+
"@equinor/fusion-framework-react-module-http": "^9.0.3"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
118
|
"@types/react": "^18.2.50",
|
|
@@ -121,12 +121,12 @@
|
|
|
121
121
|
"react-dom": "^18.2.0",
|
|
122
122
|
"rxjs": "^7.8.1",
|
|
123
123
|
"typescript": "^5.8.2",
|
|
124
|
-
"@equinor/fusion-framework-module-ag-grid": "^34.
|
|
125
|
-
"@equinor/fusion-framework-module-event": "^4.3.
|
|
126
|
-
"@equinor/fusion-framework-module-feature-flag": "^1.1.
|
|
127
|
-
"@equinor/fusion-framework-module-msal": "^4.0.
|
|
128
|
-
"@equinor/fusion-framework-react-module-
|
|
129
|
-
"@equinor/fusion-framework-react-module-
|
|
124
|
+
"@equinor/fusion-framework-module-ag-grid": "^34.1.1",
|
|
125
|
+
"@equinor/fusion-framework-module-event": "^4.3.7",
|
|
126
|
+
"@equinor/fusion-framework-module-feature-flag": "^1.1.22",
|
|
127
|
+
"@equinor/fusion-framework-module-msal": "^4.0.8",
|
|
128
|
+
"@equinor/fusion-framework-react-module-bookmark": "^5.0.0",
|
|
129
|
+
"@equinor/fusion-framework-react-module-context": "^6.2.32",
|
|
130
130
|
"@equinor/fusion-observable": "^8.5.1"
|
|
131
131
|
},
|
|
132
132
|
"peerDependencies": {
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"react": "^17.0.0 || ^18.0.0",
|
|
135
135
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
136
136
|
"rxjs": "^7.8.1",
|
|
137
|
-
"@equinor/fusion-framework-module-msal": "^4.0.
|
|
137
|
+
"@equinor/fusion-framework-module-msal": "^4.0.8"
|
|
138
138
|
},
|
|
139
139
|
"peerDependenciesMeta": {
|
|
140
140
|
"@equinor/fusion-framework-react-module-ag-grid": {
|
|
@@ -4,6 +4,7 @@ import { useFramework } from '@equinor/fusion-framework-react';
|
|
|
4
4
|
import type { AppModule } from '@equinor/fusion-framework-module-app';
|
|
5
5
|
|
|
6
6
|
import type { ApploaderProps } from './Apploader';
|
|
7
|
+
import type { AppInitializeResult } from '@equinor/fusion-framework-module-app/app';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* React hook for dynamically loading and mounting a Fusion child app inside a parent Fusion app.
|
|
@@ -60,7 +61,8 @@ export const useApploader = ({
|
|
|
60
61
|
setLoading(true);
|
|
61
62
|
setError(undefined);
|
|
62
63
|
const subscription$ = loadedApp?.initialize().subscribe({
|
|
63
|
-
next: (
|
|
64
|
+
next: (instance: AppInitializeResult) => {
|
|
65
|
+
const { manifest, script, config } = instance;
|
|
64
66
|
/* Application Element for mounting */
|
|
65
67
|
appRef.current = document.createElement('div');
|
|
66
68
|
appRef.current.id = manifest.appKey;
|
package/src/msal/useToken.ts
CHANGED
|
@@ -21,7 +21,8 @@ export const useToken = (req: {
|
|
|
21
21
|
setToken(undefined);
|
|
22
22
|
msalProvider
|
|
23
23
|
.acquireToken(req)
|
|
24
|
-
|
|
24
|
+
// biome-ignore lint/suspicious/noConfusingVoidType: this method returns a void type when no token is acquired
|
|
25
|
+
.then((token: AuthenticationResult | void) => token && setToken(token))
|
|
25
26
|
.catch(setError)
|
|
26
27
|
.finally(() => setPending(false));
|
|
27
28
|
}, [msalProvider, req]);
|
|
@@ -18,7 +18,7 @@ type UpdateSettingsFunction<T, O = T> = (currentSettings: T | undefined) => O;
|
|
|
18
18
|
* @param {TSettings} [defaultValue] - The default value for the settings.
|
|
19
19
|
* @param hooks - Optional hooks to handle the status changes and errors.
|
|
20
20
|
*
|
|
21
|
-
* @
|
|
21
|
+
* @remarks
|
|
22
22
|
* `defaultValue` will only be used on the first render.
|
|
23
23
|
* `hooks`must be memoized to avoid unnecessary re-renders.
|
|
24
24
|
*
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
* This hook returns an observable state object that represents the current environment configuration.
|
|
13
13
|
* The environment configuration is retrieved from the app module provided by the framework.
|
|
14
14
|
*
|
|
15
|
-
* @
|
|
15
|
+
* @remarks This hook is only available when the app module is loaded (should be always for applications).
|
|
16
16
|
* This hook in theory should always have a value if config was provided for the application, but is async by nature, hence the `complete` and `error` properties.
|
|
17
17
|
*
|
|
18
18
|
* @example
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '6.2.
|
|
2
|
+
export const version = '6.2.6';
|