@equinor/fusion-framework-dev-portal 4.0.4 → 5.0.0
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 +96 -31
- package/README.md +61 -55
- package/dist/lib-D7s4zR0Q.js +6058 -0
- package/dist/main.js +73023 -90431
- package/package.json +53 -37
- package/src/AppLoader.tsx +18 -9
- package/src/BookMarkSideSheet.tsx +11 -0
- package/src/ContextSelector/ContextSelector.tsx +11 -5
- package/src/ContextSelector/useContextResolver.ts +41 -11
- package/src/EquinorLoader.tsx +10 -1
- package/src/ErrorViewer.tsx +9 -0
- package/src/FusionLogo.tsx +12 -0
- package/src/Header.Actions.tsx +12 -0
- package/src/Header.tsx +7 -0
- package/src/PersonSideSheet/index.tsx +10 -2
- package/src/PersonSideSheet/sheets/FeatureSheetContent.tsx +6 -2
- package/src/PersonSideSheet/sheets/FeatureTogglerApp.tsx +4 -1
- package/src/PersonSideSheet/sheets/FeatureTogglerPortal.tsx +4 -1
- package/src/PersonSideSheet/sheets/LandingSheetContent.tsx +7 -1
- package/src/PersonSideSheet/sheets/Styled.tsx +4 -0
- package/src/PersonSideSheet/sheets/types.ts +9 -0
- package/src/Router.tsx +17 -0
- package/src/config.ts +23 -10
- package/src/main.tsx +11 -0
- package/src/resources/fallback-photo.svg.ts +5 -0
- package/src/useAppContextNavigation.ts +19 -10
- package/src/version.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline SVG string used as a generic person-avatar placeholder.
|
|
3
|
+
*
|
|
4
|
+
* Rendered when the person photo cannot be loaded from the people service.
|
|
5
|
+
*/
|
|
1
6
|
export const svg = `<svg height="24px" width="24px" fill="#999" viewBox="0 0 24 24" title="person" role="img" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="#eee" /><path d="M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4Zm2 4c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2Zm4 10c-.2-.71-3.3-2-6-2-2.69 0-5.77 1.28-6 2h12ZM4 18c0-2.66 5.33-4 8-4s8 1.34 8 4v2H4v-2Z" fill-rule="evenodd" clip-rule="evenodd" class="sc-dmqHEX eydzYY"></path></svg>`;
|
|
2
7
|
export default svg;
|
|
@@ -18,16 +18,18 @@ import { useFrameworkModule } from '@equinor/fusion-framework-react';
|
|
|
18
18
|
type CurrentAppModules = [ContextModule, NavigationModule];
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
21
|
+
* Builds the navigation pathname when the context changes.
|
|
22
|
+
*
|
|
23
|
+
* If a context ID already exists in the current pathname (`pathContextId`),
|
|
24
|
+
* it is replaced with the new context item's ID. Otherwise a new path
|
|
25
|
+
* segment is appended. Falls back to the context provider's
|
|
26
|
+
* `generatePathFromContext` when available.
|
|
25
27
|
*
|
|
26
28
|
* @param currentPathname - The current URL pathname.
|
|
27
|
-
* @param item - The context item
|
|
28
|
-
* @param context -
|
|
29
|
-
* @param pathContextId -
|
|
30
|
-
* @returns The generated pathname for navigation.
|
|
29
|
+
* @param item - The newly selected context item.
|
|
30
|
+
* @param context - Optional context provider with a custom path generator.
|
|
31
|
+
* @param pathContextId - Existing context ID found in the current URL, if any.
|
|
32
|
+
* @returns The generated pathname string for navigation.
|
|
31
33
|
*/
|
|
32
34
|
const generatePathname = (
|
|
33
35
|
currentPathname: string,
|
|
@@ -60,8 +62,15 @@ const generatePathname = (
|
|
|
60
62
|
};
|
|
61
63
|
|
|
62
64
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
+
* Observes the current application's context changes and synchronizes the URL.
|
|
66
|
+
*
|
|
67
|
+
* When the loaded app exposes both a context and navigation module, this hook
|
|
68
|
+
* subscribes to `currentContext$`. On context change it updates the URL
|
|
69
|
+
* pathname — either replacing an existing context ID segment or appending one.
|
|
70
|
+
* When context is cleared, navigation resets to the root path.
|
|
71
|
+
*
|
|
72
|
+
* Uses the app's own navigation instance when available, falling back to the
|
|
73
|
+
* portal-level navigation module.
|
|
65
74
|
*/
|
|
66
75
|
export const useAppContextNavigation = () => {
|
|
67
76
|
// use the framework navigation instance
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '
|
|
2
|
+
export const version = '5.0.0';
|