@equinor/cpl-top-bar-react 0.5.0 → 0.5.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.
- package/dist/index.d.mts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +4 -2
- package/dist/index.mjs +2 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -29,7 +29,6 @@ type AppUrls = {
|
|
|
29
29
|
prod: string;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
|
|
33
32
|
type MenuItems = MenuItem | MenuItemGroup;
|
|
34
33
|
type MenuItem = {
|
|
35
34
|
name: string;
|
|
@@ -60,6 +59,15 @@ type SideMenuProps = {
|
|
|
60
59
|
};
|
|
61
60
|
declare function SideMenu({ isOpen, onToggle, mainMenuItems, logoElement, versionInfo, currentEnvironment, titleOtherMenuItems, otherMenuItems, appUrls, linkComponent, }: SideMenuProps): react_jsx_runtime.JSX.Element;
|
|
62
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Gets the url by app name and current environment
|
|
64
|
+
* @param appName
|
|
65
|
+
* @param currentEnvironment needs to match a key in the appUrls
|
|
66
|
+
* @param appUrls
|
|
67
|
+
* @returns a string url
|
|
68
|
+
*/
|
|
69
|
+
declare function useAppUrlByNameAndEnvironment(appName: string | undefined, currentEnvironment: string, appUrls: AppUrls): string;
|
|
70
|
+
|
|
63
71
|
interface TopBarProps {
|
|
64
72
|
appName: string;
|
|
65
73
|
logoLink: string;
|
|
@@ -92,4 +100,4 @@ interface UserMenuProps {
|
|
|
92
100
|
}
|
|
93
101
|
declare function UserMenu({ user, logout, settingsLink, children }: UserMenuProps): react_jsx_runtime.JSX.Element;
|
|
94
102
|
|
|
95
|
-
export { type AppUrls, FeedbackLink, MenuHeader, SideMenu, StyledLink, TopBar, UserMenu };
|
|
103
|
+
export { type AppUrls, FeedbackLink, MenuHeader, type MenuItem, type MenuItemGroup, type MenuItems, SideMenu, StyledLink, TopBar, UserMenu, useAppUrlByNameAndEnvironment };
|
package/dist/index.d.ts
CHANGED
|
@@ -29,7 +29,6 @@ type AppUrls = {
|
|
|
29
29
|
prod: string;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
|
|
33
32
|
type MenuItems = MenuItem | MenuItemGroup;
|
|
34
33
|
type MenuItem = {
|
|
35
34
|
name: string;
|
|
@@ -60,6 +59,15 @@ type SideMenuProps = {
|
|
|
60
59
|
};
|
|
61
60
|
declare function SideMenu({ isOpen, onToggle, mainMenuItems, logoElement, versionInfo, currentEnvironment, titleOtherMenuItems, otherMenuItems, appUrls, linkComponent, }: SideMenuProps): react_jsx_runtime.JSX.Element;
|
|
62
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Gets the url by app name and current environment
|
|
64
|
+
* @param appName
|
|
65
|
+
* @param currentEnvironment needs to match a key in the appUrls
|
|
66
|
+
* @param appUrls
|
|
67
|
+
* @returns a string url
|
|
68
|
+
*/
|
|
69
|
+
declare function useAppUrlByNameAndEnvironment(appName: string | undefined, currentEnvironment: string, appUrls: AppUrls): string;
|
|
70
|
+
|
|
63
71
|
interface TopBarProps {
|
|
64
72
|
appName: string;
|
|
65
73
|
logoLink: string;
|
|
@@ -92,4 +100,4 @@ interface UserMenuProps {
|
|
|
92
100
|
}
|
|
93
101
|
declare function UserMenu({ user, logout, settingsLink, children }: UserMenuProps): react_jsx_runtime.JSX.Element;
|
|
94
102
|
|
|
95
|
-
export { type AppUrls, FeedbackLink, MenuHeader, SideMenu, StyledLink, TopBar, UserMenu };
|
|
103
|
+
export { type AppUrls, FeedbackLink, MenuHeader, type MenuItem, type MenuItemGroup, type MenuItems, SideMenu, StyledLink, TopBar, UserMenu, useAppUrlByNameAndEnvironment };
|
package/dist/index.js
CHANGED
|
@@ -35,7 +35,8 @@ __export(index_exports, {
|
|
|
35
35
|
SideMenu: () => SideMenu,
|
|
36
36
|
StyledLink: () => StyledLink,
|
|
37
37
|
TopBar: () => TopBar,
|
|
38
|
-
UserMenu: () => UserMenu
|
|
38
|
+
UserMenu: () => UserMenu,
|
|
39
|
+
useAppUrlByNameAndEnvironment: () => useAppUrlByNameAndEnvironment
|
|
39
40
|
});
|
|
40
41
|
module.exports = __toCommonJS(index_exports);
|
|
41
42
|
|
|
@@ -642,5 +643,6 @@ var IconAndTextWrapper = (0, import_styled_components6.default)(import_eds_core_
|
|
|
642
643
|
SideMenu,
|
|
643
644
|
StyledLink,
|
|
644
645
|
TopBar,
|
|
645
|
-
UserMenu
|
|
646
|
+
UserMenu,
|
|
647
|
+
useAppUrlByNameAndEnvironment
|
|
646
648
|
});
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/cpl-top-bar-react",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"react-dom": "^18.2.0",
|
|
25
25
|
"styled-components": "^6.1.14",
|
|
26
26
|
"tsup": "^8.3.6",
|
|
27
|
-
"@equinor/cpl-
|
|
28
|
-
"@equinor/cpl-
|
|
27
|
+
"@equinor/cpl-typescript-config": "0.0.2",
|
|
28
|
+
"@equinor/cpl-eslint-config": "0.0.8"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@equinor/eds-core-react": ">=0.42.1",
|