@wallarm-org/design-system 0.50.2-rc-feature-shell.1 → 0.50.2-rc-feature-shell.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/dist/components/AppShell/story-content/_storyNavConfigs.js +5 -0
- package/dist/components/RemoteShell/NavPanelContent.js +3 -2
- package/dist/components/RemoteShell/RemoteShell.js +2 -5
- package/dist/components/RemoteShell/model/matchNav.js +1 -1
- package/dist/components/RemoteShell/model/types.d.ts +1 -0
- package/dist/metadata/components.json +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CircleDashed, Filter, Plus } from "../../../icons/index.js";
|
|
2
2
|
const edgeNavConfig = {
|
|
3
3
|
productLabel: 'Edge',
|
|
4
|
+
productPath: '/edge',
|
|
4
5
|
headerActions: [
|
|
5
6
|
{
|
|
6
7
|
icon: Filter,
|
|
@@ -340,6 +341,7 @@ const edgeNavConfig = {
|
|
|
340
341
|
};
|
|
341
342
|
const aiHypervisorNavConfig = {
|
|
342
343
|
productLabel: 'AI Hypervisor',
|
|
344
|
+
productPath: '/ai-hypervisor',
|
|
343
345
|
items: [
|
|
344
346
|
{
|
|
345
347
|
type: 'link',
|
|
@@ -454,6 +456,7 @@ const aiHypervisorNavConfig = {
|
|
|
454
456
|
};
|
|
455
457
|
const infraDiscoveryNavConfig = {
|
|
456
458
|
productLabel: 'Infra Discovery',
|
|
459
|
+
productPath: '/infra-discovery',
|
|
457
460
|
headerActions: [
|
|
458
461
|
{
|
|
459
462
|
icon: Filter,
|
|
@@ -554,6 +557,7 @@ const infraDiscoveryNavConfig = {
|
|
|
554
557
|
};
|
|
555
558
|
const securityTestingNavConfig = {
|
|
556
559
|
productLabel: 'Security Testing',
|
|
560
|
+
productPath: '/security-testing',
|
|
557
561
|
items: [
|
|
558
562
|
{
|
|
559
563
|
type: 'link',
|
|
@@ -627,6 +631,7 @@ const securityTestingNavConfig = {
|
|
|
627
631
|
};
|
|
628
632
|
const settingsNavConfig = {
|
|
629
633
|
productLabel: 'Settings',
|
|
634
|
+
productPath: '/settings',
|
|
630
635
|
items: [
|
|
631
636
|
{
|
|
632
637
|
type: 'link',
|
|
@@ -4,9 +4,10 @@ import { Text } from "../Text/index.js";
|
|
|
4
4
|
import { HeaderActions } from "./HeaderActions.js";
|
|
5
5
|
import { findDrillNode, useRemoteShellContext } from "./model/index.js";
|
|
6
6
|
import { NavItemsList } from "./NavItemsList.js";
|
|
7
|
-
const NavPanelContent = ({ level })=>{
|
|
7
|
+
const NavPanelContent = ({ level: rawLevel })=>{
|
|
8
8
|
const { config, navStack, effectiveActiveItemId, navigate, drillInto, goBack } = useRemoteShellContext();
|
|
9
|
-
const
|
|
9
|
+
const level = Math.min(rawLevel, navStack.length - 1);
|
|
10
|
+
const entry = navStack[level];
|
|
10
11
|
const hasHeaderActions = !!config.headerActions?.length;
|
|
11
12
|
if (0 === level) return /*#__PURE__*/ jsxs(Fragment, {
|
|
12
13
|
children: [
|
|
@@ -67,12 +67,9 @@ const RemoteShell = ({ ref, className, children, config, basePath, onNavigate, '
|
|
|
67
67
|
]);
|
|
68
68
|
const navigateTo = useCallback((href)=>{
|
|
69
69
|
setVisualDrillLevel(null);
|
|
70
|
-
|
|
71
|
-
const firstPath = findFirstLinkPath(config.items) ?? '';
|
|
72
|
-
setPathname(`/${firstPath}`);
|
|
73
|
-
} else setPathname(href);
|
|
70
|
+
href === config.productPath ? setPathname('/') : setPathname(href);
|
|
74
71
|
}, [
|
|
75
|
-
config.
|
|
72
|
+
config.productPath,
|
|
76
73
|
setPathname
|
|
77
74
|
]);
|
|
78
75
|
const navCtxValue = useMemo(()=>({
|
package/package.json
CHANGED