@servicetitan/navigation 12.0.3 → 13.0.0-canary.256.b43c6d7.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/dist/components/profile-dropdown/{profile-dropdown-tiny.stories.d.ts → profile-dropdown-legacy.stories.d.ts} +1 -1
- package/dist/components/profile-dropdown/profile-dropdown-legacy.stories.d.ts.map +1 -0
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.d.ts.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.d.ts.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.js +5 -8
- package/dist/components/profile-dropdown/profile-dropdown.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.stories.d.ts.map +1 -1
- package/dist/components/titan-layout/interface.d.ts +14 -12
- package/dist/components/titan-layout/interface.d.ts.map +1 -1
- package/dist/components/titan-layout/interface.js.map +1 -1
- package/dist/components/titan-layout/layout-header-links.d.ts +3 -3
- package/dist/components/titan-layout/layout-header-links.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-header-links.js.map +1 -1
- package/dist/components/titan-layout/layout-header.d.ts +2 -2
- package/dist/components/titan-layout/layout-header.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-header.js.map +1 -1
- package/dist/components/titan-layout/layout-profile.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-profile.js +1 -7
- package/dist/components/titan-layout/layout-profile.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar-links-internal.d.ts +10 -17
- package/dist/components/titan-layout/layout-sidebar-links-internal.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-sidebar-links-internal.js +34 -41
- package/dist/components/titan-layout/layout-sidebar-links-internal.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar-links.d.ts +3 -3
- package/dist/components/titan-layout/layout-sidebar-links.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-sidebar-links.js +13 -13
- package/dist/components/titan-layout/layout-sidebar-links.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar.js +5 -3
- package/dist/components/titan-layout/layout-sidebar.js.map +1 -1
- package/dist/components/titan-layout/titan-layout-links.d.ts +5 -0
- package/dist/components/titan-layout/titan-layout-links.d.ts.map +1 -0
- package/dist/components/titan-layout/titan-layout-links.js +34 -0
- package/dist/components/titan-layout/titan-layout-links.js.map +1 -0
- package/dist/components/titan-layout/titan-layout.d.ts +2 -3
- package/dist/components/titan-layout/titan-layout.d.ts.map +1 -1
- package/dist/components/titan-layout/titan-layout.js +3 -3
- package/dist/components/titan-layout/titan-layout.js.map +1 -1
- package/dist/components/titan-layout/titan-layout.stories.d.ts.map +1 -1
- package/dist/index.d.ts +1 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/test/data.d.ts +27 -2
- package/dist/test/data.d.ts.map +1 -1
- package/dist/test/data.js +181 -27
- package/dist/test/data.js.map +1 -1
- package/dist/utils/navigation-context.d.ts +3 -22
- package/dist/utils/navigation-context.d.ts.map +1 -1
- package/dist/utils/navigation-context.js +2 -10
- package/dist/utils/navigation-context.js.map +1 -1
- package/dist/utils/navigation.d.ts +2 -5
- package/dist/utils/navigation.d.ts.map +1 -1
- package/dist/utils/navigation.js.map +1 -1
- package/package.json +2 -2
- package/src/components/profile-dropdown/{profile-dropdown-tiny.stories.tsx → profile-dropdown-legacy.stories.tsx} +6 -6
- package/src/components/profile-dropdown/profile-dropdown-stacked.stories.tsx +12 -4
- package/src/components/profile-dropdown/profile-dropdown.stories.tsx +16 -9
- package/src/components/profile-dropdown/profile-dropdown.tsx +2 -11
- package/src/components/titan-layout/interface.ts +19 -15
- package/src/components/titan-layout/layout-header-links.tsx +3 -6
- package/src/components/titan-layout/layout-header.tsx +2 -2
- package/src/components/titan-layout/layout-profile.tsx +2 -6
- package/src/components/titan-layout/layout-sidebar-links-internal.tsx +69 -81
- package/src/components/titan-layout/layout-sidebar-links.tsx +38 -24
- package/src/components/titan-layout/layout-sidebar.tsx +1 -1
- package/src/components/titan-layout/titan-layout-links.tsx +34 -0
- package/src/components/titan-layout/titan-layout.stories.tsx +34 -33
- package/src/components/titan-layout/titan-layout.tsx +5 -4
- package/src/index.ts +1 -11
- package/src/test/data.tsx +152 -39
- package/src/utils/navigation-context.tsx +9 -35
- package/src/utils/navigation.ts +3 -7
- package/dist/components/header-navigation/header-navigation-content.d.ts +0 -30
- package/dist/components/header-navigation/header-navigation-content.d.ts.map +0 -1
- package/dist/components/header-navigation/header-navigation-content.js +0 -58
- package/dist/components/header-navigation/header-navigation-content.js.map +0 -1
- package/dist/components/header-navigation/header-navigation-extra-stacked.stories.d.ts +0 -9
- package/dist/components/header-navigation/header-navigation-extra-stacked.stories.d.ts.map +0 -1
- package/dist/components/header-navigation/header-navigation-extra.stories.d.ts +0 -12
- package/dist/components/header-navigation/header-navigation-extra.stories.d.ts.map +0 -1
- package/dist/components/header-navigation/header-navigation-links.d.ts +0 -11
- package/dist/components/header-navigation/header-navigation-links.d.ts.map +0 -1
- package/dist/components/header-navigation/header-navigation-links.js +0 -62
- package/dist/components/header-navigation/header-navigation-links.js.map +0 -1
- package/dist/components/header-navigation/header-navigation-stacked.stories.d.ts +0 -12
- package/dist/components/header-navigation/header-navigation-stacked.stories.d.ts.map +0 -1
- package/dist/components/header-navigation/header-navigation-stories.module.less +0 -6
- package/dist/components/header-navigation/header-navigation-stories.module.less.d.ts +0 -3
- package/dist/components/header-navigation/header-navigation.d.ts +0 -59
- package/dist/components/header-navigation/header-navigation.d.ts.map +0 -1
- package/dist/components/header-navigation/header-navigation.js +0 -228
- package/dist/components/header-navigation/header-navigation.js.map +0 -1
- package/dist/components/header-navigation/header-navigation.module.less +0 -260
- package/dist/components/header-navigation/header-navigation.module.less.d.ts +0 -22
- package/dist/components/header-navigation/header-navigation.stories.d.ts +0 -12
- package/dist/components/header-navigation/header-navigation.stories.d.ts.map +0 -1
- package/dist/components/header-navigation/index.d.ts +0 -2
- package/dist/components/header-navigation/index.d.ts.map +0 -1
- package/dist/components/header-navigation/index.js +0 -3
- package/dist/components/header-navigation/index.js.map +0 -1
- package/dist/components/header-navigation/with-tooltip.d.ts +0 -4
- package/dist/components/header-navigation/with-tooltip.d.ts.map +0 -1
- package/dist/components/header-navigation/with-tooltip.js +0 -10
- package/dist/components/header-navigation/with-tooltip.js.map +0 -1
- package/dist/components/layout.stories.d.ts +0 -13
- package/dist/components/layout.stories.d.ts.map +0 -1
- package/dist/components/left-navigation/header-navigation-extra-tiny.stories.d.ts +0 -9
- package/dist/components/left-navigation/header-navigation-extra-tiny.stories.d.ts.map +0 -1
- package/dist/components/left-navigation/header-navigation-tiny-links.d.ts +0 -18
- package/dist/components/left-navigation/header-navigation-tiny-links.d.ts.map +0 -1
- package/dist/components/left-navigation/header-navigation-tiny-links.js +0 -79
- package/dist/components/left-navigation/header-navigation-tiny-links.js.map +0 -1
- package/dist/components/left-navigation/header-navigation-tiny.d.ts +0 -23
- package/dist/components/left-navigation/header-navigation-tiny.d.ts.map +0 -1
- package/dist/components/left-navigation/header-navigation-tiny.js +0 -32
- package/dist/components/left-navigation/header-navigation-tiny.js.map +0 -1
- package/dist/components/left-navigation/header-navigation-tiny.module.less +0 -117
- package/dist/components/left-navigation/header-navigation-tiny.module.less.d.ts +0 -15
- package/dist/components/left-navigation/header-navigation-tiny.stories.d.ts +0 -12
- package/dist/components/left-navigation/header-navigation-tiny.stories.d.ts.map +0 -1
- package/dist/components/left-navigation/index.d.ts +0 -5
- package/dist/components/left-navigation/index.d.ts.map +0 -1
- package/dist/components/left-navigation/index.js +0 -5
- package/dist/components/left-navigation/index.js.map +0 -1
- package/dist/components/left-navigation/interface-internal.d.ts +0 -10
- package/dist/components/left-navigation/interface-internal.d.ts.map +0 -1
- package/dist/components/left-navigation/interface-internal.js +0 -3
- package/dist/components/left-navigation/interface-internal.js.map +0 -1
- package/dist/components/left-navigation/interface.d.ts +0 -20
- package/dist/components/left-navigation/interface.d.ts.map +0 -1
- package/dist/components/left-navigation/interface.js +0 -3
- package/dist/components/left-navigation/interface.js.map +0 -1
- package/dist/components/left-navigation/side-navigation-context.d.ts +0 -8
- package/dist/components/left-navigation/side-navigation-context.d.ts.map +0 -1
- package/dist/components/left-navigation/side-navigation-context.js +0 -8
- package/dist/components/left-navigation/side-navigation-context.js.map +0 -1
- package/dist/components/left-navigation/side-navigation-links-internal.d.ts +0 -28
- package/dist/components/left-navigation/side-navigation-links-internal.d.ts.map +0 -1
- package/dist/components/left-navigation/side-navigation-links-internal.js +0 -89
- package/dist/components/left-navigation/side-navigation-links-internal.js.map +0 -1
- package/dist/components/left-navigation/side-navigation-links.d.ts +0 -6
- package/dist/components/left-navigation/side-navigation-links.d.ts.map +0 -1
- package/dist/components/left-navigation/side-navigation-links.js +0 -48
- package/dist/components/left-navigation/side-navigation-links.js.map +0 -1
- package/dist/components/left-navigation/side-navigation.d.ts +0 -29
- package/dist/components/left-navigation/side-navigation.d.ts.map +0 -1
- package/dist/components/left-navigation/side-navigation.js +0 -411
- package/dist/components/left-navigation/side-navigation.js.map +0 -1
- package/dist/components/left-navigation/side-navigation.module.less +0 -530
- package/dist/components/left-navigation/side-navigation.module.less.d.ts +0 -48
- package/dist/components/left-navigation/side-navigation.stories.d.ts +0 -17
- package/dist/components/left-navigation/side-navigation.stories.d.ts.map +0 -1
- package/dist/components/left-navigation/with-tooltip.d.ts +0 -4
- package/dist/components/left-navigation/with-tooltip.d.ts.map +0 -1
- package/dist/components/left-navigation/with-tooltip.js +0 -15
- package/dist/components/left-navigation/with-tooltip.js.map +0 -1
- package/dist/components/links.d.ts +0 -5
- package/dist/components/links.d.ts.map +0 -1
- package/dist/components/links.js +0 -35
- package/dist/components/links.js.map +0 -1
- package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.d.ts.map +0 -1
- package/dist/components/titan-layout/layout-profile.stories.d.ts +0 -13
- package/dist/components/titan-layout/layout-profile.stories.d.ts.map +0 -1
- package/src/components/header-navigation/header-navigation-content.tsx +0 -120
- package/src/components/header-navigation/header-navigation-extra-stacked.stories.tsx +0 -19
- package/src/components/header-navigation/header-navigation-extra.stories.tsx +0 -142
- package/src/components/header-navigation/header-navigation-links.tsx +0 -141
- package/src/components/header-navigation/header-navigation-stacked.stories.tsx +0 -146
- package/src/components/header-navigation/header-navigation-stories.module.less +0 -6
- package/src/components/header-navigation/header-navigation-stories.module.less.d.ts +0 -3
- package/src/components/header-navigation/header-navigation.module.less +0 -260
- package/src/components/header-navigation/header-navigation.module.less.d.ts +0 -22
- package/src/components/header-navigation/header-navigation.stories.tsx +0 -165
- package/src/components/header-navigation/header-navigation.tsx +0 -327
- package/src/components/header-navigation/index.ts +0 -1
- package/src/components/header-navigation/with-tooltip.tsx +0 -15
- package/src/components/layout.stories.tsx +0 -103
- package/src/components/left-navigation/header-navigation-extra-tiny.stories.tsx +0 -21
- package/src/components/left-navigation/header-navigation-tiny-links.tsx +0 -145
- package/src/components/left-navigation/header-navigation-tiny.module.less +0 -117
- package/src/components/left-navigation/header-navigation-tiny.module.less.d.ts +0 -15
- package/src/components/left-navigation/header-navigation-tiny.stories.tsx +0 -178
- package/src/components/left-navigation/header-navigation-tiny.tsx +0 -65
- package/src/components/left-navigation/index.ts +0 -4
- package/src/components/left-navigation/interface-internal.ts +0 -11
- package/src/components/left-navigation/interface.ts +0 -26
- package/src/components/left-navigation/side-navigation-context.tsx +0 -13
- package/src/components/left-navigation/side-navigation-links-internal.tsx +0 -151
- package/src/components/left-navigation/side-navigation-links.tsx +0 -57
- package/src/components/left-navigation/side-navigation.module.less +0 -530
- package/src/components/left-navigation/side-navigation.module.less.d.ts +0 -48
- package/src/components/left-navigation/side-navigation.stories.tsx +0 -226
- package/src/components/left-navigation/side-navigation.tsx +0 -543
- package/src/components/left-navigation/with-tooltip.tsx +0 -16
- package/src/components/links.tsx +0 -54
- package/src/components/titan-layout/layout-profile.stories.tsx +0 -46
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC, ReactElement } from 'react';
|
|
2
2
|
import { getCounterTag } from '../../utils/side-nav';
|
|
3
|
-
import {
|
|
3
|
+
import { TitanLayoutLinkProps, TitanLayoutTriggerProps } from './interface';
|
|
4
4
|
import { useTitanLayoutContext } from './layout-context';
|
|
5
5
|
import {
|
|
6
6
|
InternalSideNavigationLink,
|
|
@@ -10,62 +10,76 @@ import { useNotificationsContext } from './notifications-context';
|
|
|
10
10
|
|
|
11
11
|
const WrappedLink: FC<{
|
|
12
12
|
children: ReactElement<any>;
|
|
13
|
-
wrapper: NonNullable<
|
|
14
|
-
|
|
13
|
+
wrapper: NonNullable<TitanLayoutLinkProps['wrapper']>;
|
|
14
|
+
isMobile: boolean;
|
|
15
|
+
}> = ({ children, isMobile, wrapper: WrapperComponent }) => {
|
|
15
16
|
const { sidebar } = useTitanLayoutContext();
|
|
16
|
-
return
|
|
17
|
+
return (
|
|
18
|
+
<WrapperComponent isMobile={isMobile} context={sidebar}>
|
|
19
|
+
{children}
|
|
20
|
+
</WrapperComponent>
|
|
21
|
+
);
|
|
17
22
|
};
|
|
18
23
|
|
|
19
24
|
/** Side Navigation menu link */
|
|
20
|
-
export function
|
|
25
|
+
export function LayoutSidebarLink({
|
|
26
|
+
counter,
|
|
27
|
+
tag,
|
|
28
|
+
tooltip,
|
|
29
|
+
wrapper,
|
|
30
|
+
...props
|
|
31
|
+
}: TitanLayoutLinkProps) {
|
|
21
32
|
const {
|
|
22
33
|
NavigationComponent,
|
|
23
34
|
breakpoint: { isMobile },
|
|
24
35
|
} = useTitanLayoutContext();
|
|
25
36
|
const { onNotificationsUpdate } = useNotificationsContext();
|
|
26
|
-
const
|
|
37
|
+
const tagData = getCounterTag(counter, tag);
|
|
27
38
|
|
|
28
|
-
onNotificationsUpdate(props.id, !!
|
|
39
|
+
onNotificationsUpdate(props.id, !!tagData);
|
|
29
40
|
|
|
30
41
|
const element = (
|
|
31
42
|
<InternalSideNavigationLink
|
|
32
43
|
{...props}
|
|
33
44
|
navigationComponent={NavigationComponent}
|
|
34
45
|
submenuExpanded={undefined}
|
|
35
|
-
|
|
36
|
-
tag={tag}
|
|
46
|
+
tag={tagData}
|
|
37
47
|
/>
|
|
38
48
|
);
|
|
39
49
|
|
|
40
|
-
return wrapper && !isMobile ?
|
|
50
|
+
return wrapper && !isMobile ? (
|
|
51
|
+
<WrappedLink isMobile={isMobile} wrapper={wrapper}>
|
|
52
|
+
{element}
|
|
53
|
+
</WrappedLink>
|
|
54
|
+
) : (
|
|
55
|
+
element
|
|
56
|
+
);
|
|
41
57
|
}
|
|
42
58
|
|
|
43
59
|
/** Side Navigation menu trigger */
|
|
44
|
-
export function
|
|
60
|
+
export function LayoutSidebarTrigger({
|
|
61
|
+
counter,
|
|
62
|
+
tag,
|
|
63
|
+
tooltip,
|
|
45
64
|
wrapper,
|
|
46
|
-
onMobileClick,
|
|
47
65
|
onClick,
|
|
48
66
|
...props
|
|
49
|
-
}:
|
|
67
|
+
}: TitanLayoutTriggerProps) {
|
|
50
68
|
const {
|
|
51
69
|
breakpoint: { isMobile },
|
|
52
70
|
} = useTitanLayoutContext();
|
|
53
71
|
const { onNotificationsUpdate } = useNotificationsContext();
|
|
54
|
-
const
|
|
72
|
+
const tagData = getCounterTag(counter, tag);
|
|
55
73
|
|
|
56
|
-
onNotificationsUpdate(props.id, !!
|
|
74
|
+
onNotificationsUpdate(props.id, !!tagData);
|
|
57
75
|
|
|
58
76
|
const element = (
|
|
59
|
-
<InternalSideNavigationTrigger
|
|
60
|
-
{...props}
|
|
61
|
-
submenuExpanded={undefined}
|
|
62
|
-
dataPrefix="navigation-trigger"
|
|
63
|
-
tag={tag}
|
|
64
|
-
onClick={isMobile && !!onMobileClick ? onMobileClick : onClick}
|
|
65
|
-
/>
|
|
77
|
+
<InternalSideNavigationTrigger {...props} submenuExpanded={undefined} tag={tagData} />
|
|
66
78
|
);
|
|
67
|
-
return wrapper
|
|
68
|
-
<WrappedLink wrapper={wrapper}>
|
|
79
|
+
return wrapper ? (
|
|
80
|
+
<WrappedLink isMobile={isMobile} wrapper={wrapper}>
|
|
81
|
+
{element}
|
|
82
|
+
</WrappedLink>
|
|
69
83
|
) : (
|
|
70
84
|
element
|
|
71
85
|
);
|
|
@@ -103,10 +103,10 @@ export const LayoutSidebar: FC<LayoutSidebarProps> = ({
|
|
|
103
103
|
/>
|
|
104
104
|
) : (
|
|
105
105
|
<InternalSideNavigationLink
|
|
106
|
+
{...item}
|
|
106
107
|
key={item.id}
|
|
107
108
|
submenuExpanded={undefined}
|
|
108
109
|
navigationComponent={navigationComponent}
|
|
109
|
-
{...item}
|
|
110
110
|
tag={getSubmenuGroupTag(
|
|
111
111
|
item.submenu,
|
|
112
112
|
getCounterTag(item.counter, item.tag)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
import { TitanLayoutLinkProps, TitanLayoutTriggerProps } from './interface';
|
|
4
|
+
import { useTitanLayoutPlacementContext } from './layout-context';
|
|
5
|
+
import { LayoutHeaderNavigationLink, LayoutHeaderNavigationTrigger } from './layout-header-links';
|
|
6
|
+
import { LayoutSidebarLink, LayoutSidebarTrigger } from './layout-sidebar-links';
|
|
7
|
+
|
|
8
|
+
export const TitanLayoutLink: FC<TitanLayoutLinkProps> = props => {
|
|
9
|
+
const placement = useTitanLayoutPlacementContext();
|
|
10
|
+
|
|
11
|
+
if (placement === 'top') {
|
|
12
|
+
return <LayoutHeaderNavigationLink {...props} />;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (placement === 'side') {
|
|
16
|
+
return <LayoutSidebarLink {...props} />;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return null;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const TitanLayoutTrigger: FC<TitanLayoutTriggerProps> = props => {
|
|
23
|
+
const placement = useTitanLayoutPlacementContext();
|
|
24
|
+
|
|
25
|
+
if (placement === 'top') {
|
|
26
|
+
return <LayoutHeaderNavigationTrigger {...props} />;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (placement === 'side') {
|
|
30
|
+
return <LayoutSidebarTrigger {...props} />;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return null;
|
|
34
|
+
};
|
|
@@ -6,19 +6,23 @@ import SvgSettings from '@servicetitan/anvil2/assets/icons/st/gnav_settings_inac
|
|
|
6
6
|
import SvgRocketActive from '@servicetitan/anvil2/assets/icons/st/gnav_titan_advisor_active.svg';
|
|
7
7
|
import SvgRocket from '@servicetitan/anvil2/assets/icons/st/gnav_titan_advisor_inactive.svg';
|
|
8
8
|
import { Page as Anvil1Page } from '@servicetitan/design-system';
|
|
9
|
-
import {
|
|
9
|
+
import { Fragment, useState } from 'react';
|
|
10
10
|
import {
|
|
11
11
|
CallsNavigationTrigger,
|
|
12
12
|
LocationInfo,
|
|
13
13
|
NavLinkMock,
|
|
14
|
-
|
|
14
|
+
navItems,
|
|
15
15
|
withAnvil,
|
|
16
16
|
withDefaultRedirects,
|
|
17
17
|
withMemoryRouter,
|
|
18
18
|
} from '../../test/data';
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
import {
|
|
20
|
+
ProfileDropdown,
|
|
21
|
+
TitanLayout,
|
|
22
|
+
TitanLayoutLinkWrapper,
|
|
23
|
+
TitanLayoutProps,
|
|
24
|
+
TitanLayoutState,
|
|
25
|
+
} from './';
|
|
22
26
|
|
|
23
27
|
interface LayoutContentArgs {
|
|
24
28
|
header: boolean;
|
|
@@ -49,25 +53,25 @@ export default {
|
|
|
49
53
|
};
|
|
50
54
|
|
|
51
55
|
const mainNavItems = [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
navItems.dashboard,
|
|
57
|
+
navItems.calendar,
|
|
58
|
+
navItems.calls,
|
|
59
|
+
navItems.accountingWithSubmenu,
|
|
60
|
+
navItems.dispatch,
|
|
61
|
+
|
|
62
|
+
navItems.fleet,
|
|
63
|
+
navItems.followUps,
|
|
64
|
+
navItems.inventory,
|
|
65
|
+
|
|
66
|
+
navItems.marketing,
|
|
67
|
+
navItems.priceBook,
|
|
68
|
+
navItems.pointOfSale,
|
|
69
|
+
navItems.reports,
|
|
66
70
|
];
|
|
67
71
|
|
|
68
72
|
const overflowNavItems = [
|
|
69
|
-
{ ...
|
|
70
|
-
{ ...
|
|
73
|
+
{ ...navItems.accounting, id: 'accounting-overflow', title: 'Other Accounting' },
|
|
74
|
+
{ ...navItems.reports, id: 'reports-overflow', title: 'Other Reports' },
|
|
71
75
|
];
|
|
72
76
|
|
|
73
77
|
const profile = (
|
|
@@ -103,12 +107,11 @@ const profile = (
|
|
|
103
107
|
|
|
104
108
|
const extraLinks = (
|
|
105
109
|
<Fragment>
|
|
106
|
-
<
|
|
110
|
+
<TitanLayout.Link
|
|
107
111
|
id="search"
|
|
108
112
|
to="https://google.com"
|
|
109
113
|
target="_blank"
|
|
110
114
|
title="Search"
|
|
111
|
-
hint="Search: for all the questions"
|
|
112
115
|
tooltip="Search"
|
|
113
116
|
icon={SvgSearch}
|
|
114
117
|
iconActive={SvgSearch}
|
|
@@ -116,7 +119,7 @@ const extraLinks = (
|
|
|
116
119
|
|
|
117
120
|
<CallsNavigationTrigger />
|
|
118
121
|
|
|
119
|
-
<
|
|
122
|
+
<TitanLayout.Link
|
|
120
123
|
id="titanAdvisor"
|
|
121
124
|
to="/titanAdvisor"
|
|
122
125
|
title="Titan Advisor"
|
|
@@ -124,13 +127,12 @@ const extraLinks = (
|
|
|
124
127
|
iconActive={SvgRocketActive}
|
|
125
128
|
/>
|
|
126
129
|
|
|
127
|
-
<
|
|
130
|
+
<TitanLayout.Link
|
|
128
131
|
id="settings"
|
|
129
132
|
to="/settings"
|
|
130
133
|
title="Settings"
|
|
131
134
|
target="_blank"
|
|
132
|
-
aria-label="
|
|
133
|
-
hint="Settings"
|
|
135
|
+
aria-label="settings"
|
|
134
136
|
icon={SvgSettings}
|
|
135
137
|
iconActive={SvgSettingsActive}
|
|
136
138
|
/>
|
|
@@ -138,7 +140,7 @@ const extraLinks = (
|
|
|
138
140
|
);
|
|
139
141
|
|
|
140
142
|
const extraLinksTop = (
|
|
141
|
-
<
|
|
143
|
+
<TitanLayout.Trigger
|
|
142
144
|
id="atlas"
|
|
143
145
|
title="Atlas"
|
|
144
146
|
icon={SvgAtlas}
|
|
@@ -149,7 +151,7 @@ const extraLinksTop = (
|
|
|
149
151
|
/>
|
|
150
152
|
);
|
|
151
153
|
|
|
152
|
-
const SideLinkPopoverWrapper:
|
|
154
|
+
const SideLinkPopoverWrapper: TitanLayoutLinkWrapper = ({ children, context }) => {
|
|
153
155
|
return (
|
|
154
156
|
<Popover placement="right" openOnHover>
|
|
155
157
|
<Popover.Trigger>{(props: any) => <div {...props}>{children}</div>}</Popover.Trigger>
|
|
@@ -159,14 +161,13 @@ const SideLinkPopoverWrapper: FC<SideNavigationLinkWrapperProps> = ({ children,
|
|
|
159
161
|
};
|
|
160
162
|
|
|
161
163
|
const sidebarTop = () => [
|
|
162
|
-
<TitanLayout.Link key="tasks" {...
|
|
163
|
-
<TitanLayout.Link key="calls" {...
|
|
164
|
+
<TitanLayout.Link key="tasks" {...navItems.tasks} />,
|
|
165
|
+
<TitanLayout.Link key="calls" {...navItems.calls} />,
|
|
164
166
|
<TitanLayout.Trigger
|
|
165
167
|
key="marketing"
|
|
166
|
-
{...
|
|
168
|
+
{...navItems.marketing}
|
|
167
169
|
isActive={false}
|
|
168
170
|
wrapper={SideLinkPopoverWrapper}
|
|
169
|
-
onMobileClick={() => alert('clicked')}
|
|
170
171
|
counter={50}
|
|
171
172
|
/>,
|
|
172
173
|
];
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
ComponentPropsWithoutRef,
|
|
5
5
|
FC,
|
|
6
6
|
Fragment,
|
|
7
|
+
MouseEvent,
|
|
7
8
|
ReactElement,
|
|
8
9
|
ReactNode,
|
|
9
10
|
useCallback,
|
|
@@ -26,9 +27,9 @@ import { LayoutHeader } from './layout-header';
|
|
|
26
27
|
import { LayoutHeaderDark } from './layout-header-dark';
|
|
27
28
|
import { TitanLayoutLogoProps } from './layout-logo';
|
|
28
29
|
import { LayoutSidebar } from './layout-sidebar';
|
|
29
|
-
import { TitanLayoutSidebarLink, TitanLayoutSidebarTrigger } from './layout-sidebar-links';
|
|
30
30
|
import { InternalSideNavigationTrigger } from './layout-sidebar-links-internal';
|
|
31
31
|
import { useNotificationsState } from './notifications-context';
|
|
32
|
+
import { TitanLayoutLink, TitanLayoutTrigger } from './titan-layout-links';
|
|
32
33
|
import * as Styles from './titan-layout.module.less';
|
|
33
34
|
|
|
34
35
|
export type TitanLayoutProps = Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'style'> & {
|
|
@@ -148,7 +149,7 @@ const TitanLayoutComponent: FC<TitanLayoutProps> = ({
|
|
|
148
149
|
}
|
|
149
150
|
}, [view.isAnvil1]);
|
|
150
151
|
|
|
151
|
-
const onBurgerClick = useCallback((e: MouseEvent) => {
|
|
152
|
+
const onBurgerClick = useCallback((e: MouseEvent<never>) => {
|
|
152
153
|
setMobileDrawerOpened(true);
|
|
153
154
|
e.stopPropagation();
|
|
154
155
|
}, []);
|
|
@@ -445,6 +446,6 @@ const LayoutContentLegacy: FC<{
|
|
|
445
446
|
};
|
|
446
447
|
|
|
447
448
|
export const TitanLayout = Object.assign(TitanLayoutComponent, {
|
|
448
|
-
Link:
|
|
449
|
-
Trigger:
|
|
449
|
+
Link: TitanLayoutLink,
|
|
450
|
+
Trigger: TitanLayoutTrigger,
|
|
450
451
|
});
|
package/src/index.ts
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
export * from './components/header-navigation';
|
|
2
1
|
export * from './components/logo/logo-company-title';
|
|
3
2
|
export * from './components/logo/logo-titan';
|
|
4
3
|
export * from './components/logo/logo-titan-text';
|
|
5
4
|
export * from './components/counter-tag';
|
|
6
|
-
export * from './components/left-navigation';
|
|
7
5
|
export * from './components/titan-layout';
|
|
8
|
-
export * from './components/links';
|
|
9
6
|
export type * from './utils/navigation';
|
|
10
|
-
export type {
|
|
11
|
-
NavLinkComponentPropsStrict,
|
|
12
|
-
NavLinkComponentProps,
|
|
13
|
-
NavigationLocationContextType,
|
|
14
|
-
NavigationLocationInfo,
|
|
15
|
-
NavigationActiveLinkMatcher,
|
|
16
|
-
} from './utils/navigation-context';
|
|
17
|
-
export { NavigationComponentContext, NavigationLocationContext } from './utils/navigation-context';
|
|
7
|
+
export type { NavLinkComponentProps } from './utils/navigation-context';
|
|
18
8
|
export type * from './utils/navigation-legacy';
|
|
19
9
|
export * from './utils/use-breakpoint';
|
package/src/test/data.tsx
CHANGED
|
@@ -33,25 +33,17 @@ import SvgTasks from '@servicetitan/anvil2/assets/icons/st/gnav_tasks_inactive.s
|
|
|
33
33
|
import { BodyText, Popover } from '@servicetitan/design-system';
|
|
34
34
|
|
|
35
35
|
import classNames from 'classnames';
|
|
36
|
-
import { FC, Fragment, forwardRef,
|
|
36
|
+
import { FC, Fragment, forwardRef, useState } from 'react';
|
|
37
37
|
// needed only for storybook and added in root dependencies
|
|
38
38
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
39
|
+
import { MemoryRouter, Redirect, Switch, useHistory, useLocation } from 'react-router-dom';
|
|
40
|
+
import { TitanLayout } from '../components/titan-layout';
|
|
39
41
|
import {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
useLocation,
|
|
46
|
-
} from 'react-router-dom';
|
|
47
|
-
import { HeaderNavigationTrigger } from '../components/links';
|
|
48
|
-
import { NavigationSubmenuGroupData, NavigationSubmenuItemData } from '../utils/navigation';
|
|
49
|
-
import {
|
|
50
|
-
NavLinkComponentProps,
|
|
51
|
-
NavigationComponentContext,
|
|
52
|
-
NavigationLocationContext,
|
|
53
|
-
NavigationLocationContextType,
|
|
54
|
-
} from '../utils/navigation-context';
|
|
42
|
+
NavigationItemData,
|
|
43
|
+
NavigationSubmenuGroupData,
|
|
44
|
+
NavigationSubmenuItemData,
|
|
45
|
+
} from '../utils/navigation';
|
|
46
|
+
import { NavLinkComponentProps } from '../utils/navigation-context';
|
|
55
47
|
import { HeaderNavigationItemData } from '../utils/navigation-legacy';
|
|
56
48
|
import * as Styles from './data-stories.module.less';
|
|
57
49
|
|
|
@@ -87,29 +79,9 @@ export const LocationInfo: FC<{ className?: string }> = ({ className }) => {
|
|
|
87
79
|
return <BodyText className={className}>current location - {location.pathname}</BodyText>;
|
|
88
80
|
};
|
|
89
81
|
|
|
90
|
-
const LocationProvider: FC<{ children: any }> = ({ children }) => {
|
|
91
|
-
const location = useLocation();
|
|
92
|
-
const context: NavigationLocationContextType = useMemo(
|
|
93
|
-
() => ({
|
|
94
|
-
location: { pathname: location.pathname },
|
|
95
|
-
isLinkActive: (location, item) => !!matchPath(location.pathname, item.to),
|
|
96
|
-
}),
|
|
97
|
-
[location.pathname]
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<NavigationLocationContext.Provider value={context}>
|
|
102
|
-
{children}
|
|
103
|
-
</NavigationLocationContext.Provider>
|
|
104
|
-
);
|
|
105
|
-
};
|
|
106
82
|
export const withMemoryRouter = (Story: any) => (
|
|
107
83
|
<MemoryRouter>
|
|
108
|
-
<
|
|
109
|
-
<LocationProvider>
|
|
110
|
-
<Story />
|
|
111
|
-
</LocationProvider>
|
|
112
|
-
</NavigationComponentContext.Provider>
|
|
84
|
+
<Story />
|
|
113
85
|
</MemoryRouter>
|
|
114
86
|
);
|
|
115
87
|
|
|
@@ -168,6 +140,27 @@ const getItem = (
|
|
|
168
140
|
: undefined,
|
|
169
141
|
});
|
|
170
142
|
|
|
143
|
+
const getNavItem = (id: string, data: Partial<NavigationItemData>): NavigationItemData => ({
|
|
144
|
+
id,
|
|
145
|
+
to: '/' + id,
|
|
146
|
+
title: id[0].toUpperCase() + id.substring(1),
|
|
147
|
+
icon: undefined,
|
|
148
|
+
iconActive: undefined,
|
|
149
|
+
...data,
|
|
150
|
+
submenu: data.submenu
|
|
151
|
+
? {
|
|
152
|
+
...data.submenu,
|
|
153
|
+
groups: data.submenu.groups.map(group => ({
|
|
154
|
+
...group,
|
|
155
|
+
links: group.links.map(link => ({
|
|
156
|
+
...link,
|
|
157
|
+
to: `/${id}/${link.to}`,
|
|
158
|
+
})),
|
|
159
|
+
})),
|
|
160
|
+
}
|
|
161
|
+
: undefined,
|
|
162
|
+
});
|
|
163
|
+
|
|
171
164
|
const getSubItem = (
|
|
172
165
|
id: string,
|
|
173
166
|
data: Partial<NavigationSubmenuItemData>
|
|
@@ -325,6 +318,127 @@ export const items = {
|
|
|
325
318
|
}),
|
|
326
319
|
};
|
|
327
320
|
|
|
321
|
+
export const navItems = {
|
|
322
|
+
calendar: getNavItem('calendar', {
|
|
323
|
+
icon: SvgSchedule,
|
|
324
|
+
iconActive: SvgScheduleActive,
|
|
325
|
+
}),
|
|
326
|
+
schedule: getNavItem('schedule', {
|
|
327
|
+
icon: SvgSchedule,
|
|
328
|
+
iconActive: SvgScheduleActive,
|
|
329
|
+
}),
|
|
330
|
+
calls: getNavItem('calls', {
|
|
331
|
+
icon: SvgCalls,
|
|
332
|
+
iconActive: SvgCallsActive,
|
|
333
|
+
counter: 1234,
|
|
334
|
+
}),
|
|
335
|
+
dashboard: getNavItem('dashboard', {
|
|
336
|
+
icon: SvgDashboard,
|
|
337
|
+
iconActive: SvgDashboardActive,
|
|
338
|
+
}),
|
|
339
|
+
dispatch: getNavItem('dispatch', {
|
|
340
|
+
icon: SvgDispatch,
|
|
341
|
+
iconActive: SvgDispatchActive,
|
|
342
|
+
tag: { value: 3 },
|
|
343
|
+
}),
|
|
344
|
+
fleet: getNavItem('fleet', {
|
|
345
|
+
icon: SvgFleetPro,
|
|
346
|
+
iconActive: SvgFleetProActive,
|
|
347
|
+
title: 'Fleet Pro',
|
|
348
|
+
}),
|
|
349
|
+
followUps: getNavItem('followUps', {
|
|
350
|
+
icon: SvgFollowUp,
|
|
351
|
+
iconActive: SvgFollowUpActive,
|
|
352
|
+
title: 'Follow Up',
|
|
353
|
+
}),
|
|
354
|
+
followUpsWithSubmenu: getNavItem('followUps', {
|
|
355
|
+
icon: SvgFollowUp,
|
|
356
|
+
iconActive: SvgFollowUpActive,
|
|
357
|
+
title: 'Follow Up',
|
|
358
|
+
submenu: {
|
|
359
|
+
groups: [
|
|
360
|
+
getGroup('', [
|
|
361
|
+
getSubItem('estimates', { title: 'Unsold Estimates' }),
|
|
362
|
+
getSubItem('sold', { title: 'Sold Estimates' }),
|
|
363
|
+
getSubItem('surveys', { title: 'Surveys' }),
|
|
364
|
+
]),
|
|
365
|
+
],
|
|
366
|
+
},
|
|
367
|
+
}),
|
|
368
|
+
inventory: getNavItem('inventory', {
|
|
369
|
+
icon: SvgInventory,
|
|
370
|
+
iconActive: SvgInventoryActive,
|
|
371
|
+
}),
|
|
372
|
+
purchasing: getNavItem('purchasing', {}),
|
|
373
|
+
purchasingWithSubmenu: getNavItem('purchasing', {
|
|
374
|
+
icon: SvgInventory,
|
|
375
|
+
iconActive: SvgInventoryActive,
|
|
376
|
+
counter: true,
|
|
377
|
+
submenu: {
|
|
378
|
+
groups: [
|
|
379
|
+
getGroup('Purchase', [
|
|
380
|
+
getSubItem('repl', { title: 'Replenishment' }),
|
|
381
|
+
getSubItem('orders', { title: 'Purchase Orders' }),
|
|
382
|
+
getSubItem('receipts', { title: 'Receipts' }),
|
|
383
|
+
getSubItem('returns', { title: 'Returns' }),
|
|
384
|
+
]),
|
|
385
|
+
],
|
|
386
|
+
},
|
|
387
|
+
}),
|
|
388
|
+
accounting: getNavItem('accounting', {
|
|
389
|
+
icon: SvgAccounting,
|
|
390
|
+
iconActive: SvgAccountingActive,
|
|
391
|
+
counter: true,
|
|
392
|
+
}),
|
|
393
|
+
accountingWithSubmenu: getNavItem('accounting', {
|
|
394
|
+
icon: SvgAccounting,
|
|
395
|
+
iconActive: SvgAccountingActive,
|
|
396
|
+
counter: 1,
|
|
397
|
+
submenu: {
|
|
398
|
+
groups: [
|
|
399
|
+
getGroup('Accounts Receivable', [
|
|
400
|
+
getSubItem('export', {
|
|
401
|
+
title: 'Batch/Export Transactions',
|
|
402
|
+
counter: true,
|
|
403
|
+
}),
|
|
404
|
+
getSubItem('ar', { title: 'AR Management' }),
|
|
405
|
+
getSubItem('invoices', { title: 'Invoices', counter: 3 }),
|
|
406
|
+
getSubItem('payments', { title: 'Customer Payments', counter: 2 }),
|
|
407
|
+
getSubItem('deposits', { title: 'Bank Deposits' }),
|
|
408
|
+
]),
|
|
409
|
+
getGroup('Accounts Payable', [getSubItem('bills', { title: 'Bills' })]),
|
|
410
|
+
getGroup('Financing', [getSubItem('dashboard', { title: 'Dashboard' })]),
|
|
411
|
+
getGroup('Others', [getSubItem('at', { title: 'Accounting Audit Trail' })]),
|
|
412
|
+
],
|
|
413
|
+
},
|
|
414
|
+
}),
|
|
415
|
+
marketing: getNavItem('marketing', {
|
|
416
|
+
icon: SvgMarketing,
|
|
417
|
+
iconActive: SvgMarketingActive,
|
|
418
|
+
}),
|
|
419
|
+
priceBook: getNavItem('pricebook', {
|
|
420
|
+
icon: SvgPriceBook,
|
|
421
|
+
iconActive: SvgPriceBookActive,
|
|
422
|
+
}),
|
|
423
|
+
pointOfSale: getNavItem('pointOfSale', {
|
|
424
|
+
icon: SvgPos,
|
|
425
|
+
iconActive: SvgPosActive,
|
|
426
|
+
title: 'Point Of Sale',
|
|
427
|
+
}),
|
|
428
|
+
projects: getNavItem('projects', {
|
|
429
|
+
icon: SvgProjects,
|
|
430
|
+
iconActive: SvgProjectsActive,
|
|
431
|
+
}),
|
|
432
|
+
reports: getNavItem('reports', {
|
|
433
|
+
icon: SvgReports,
|
|
434
|
+
iconActive: SvgReportsActive,
|
|
435
|
+
}),
|
|
436
|
+
tasks: getNavItem('tasks', {
|
|
437
|
+
icon: SvgTasks,
|
|
438
|
+
iconActive: SvgTasksActive,
|
|
439
|
+
}),
|
|
440
|
+
};
|
|
441
|
+
|
|
328
442
|
export const CallsNavigationTrigger = () => {
|
|
329
443
|
const [open, setOpen] = useState(false);
|
|
330
444
|
|
|
@@ -334,9 +448,8 @@ export const CallsNavigationTrigger = () => {
|
|
|
334
448
|
onClickOutside={() => setOpen(false)}
|
|
335
449
|
direction="bl"
|
|
336
450
|
trigger={
|
|
337
|
-
<
|
|
451
|
+
<TitanLayout.Trigger
|
|
338
452
|
id="dialpad"
|
|
339
|
-
iconName="phone"
|
|
340
453
|
counter={2}
|
|
341
454
|
title="Calls"
|
|
342
455
|
icon={SvgPhone}
|
|
@@ -1,45 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { NavigationLinkData } from './navigation';
|
|
1
|
+
import { ComponentPropsWithoutRef, FC } from 'react';
|
|
3
2
|
|
|
4
|
-
export
|
|
3
|
+
export type NavLinkComponentProps = ComponentPropsWithoutRef<'a'> & {
|
|
5
4
|
to: string;
|
|
6
|
-
title?: string;
|
|
7
|
-
className?: string;
|
|
8
5
|
activeClassName?: string;
|
|
9
|
-
children: ReactNode;
|
|
10
6
|
isActive?: (pathname: string) => boolean;
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface NavLinkComponentProps extends NavLinkComponentPropsStrict {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
}
|
|
7
|
+
};
|
|
17
8
|
|
|
18
9
|
export const DefaultNavLinkComponent: FC<NavLinkComponentProps> = ({
|
|
19
10
|
children,
|
|
11
|
+
to,
|
|
20
12
|
activeClassName,
|
|
21
13
|
isActive,
|
|
22
14
|
...props
|
|
23
|
-
}) =>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export type NavigationActiveLinkMatcher = (
|
|
30
|
-
location: NavigationLocationInfo,
|
|
31
|
-
link: NavigationLinkData
|
|
32
|
-
) => boolean;
|
|
33
|
-
|
|
34
|
-
export interface NavigationLocationContextType {
|
|
35
|
-
location: NavigationLocationInfo;
|
|
36
|
-
isLinkActive: NavigationActiveLinkMatcher;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export const NavigationComponentContext =
|
|
40
|
-
createContext<FC<NavLinkComponentProps>>(DefaultNavLinkComponent);
|
|
41
|
-
export const NavigationLegacyContext = createContext(false);
|
|
42
|
-
export const NavigationLocationContext = createContext<NavigationLocationContextType>({
|
|
43
|
-
location: { pathname: '' },
|
|
44
|
-
isLinkActive: () => false,
|
|
45
|
-
});
|
|
15
|
+
}) => (
|
|
16
|
+
<a href={to} {...props}>
|
|
17
|
+
{children}
|
|
18
|
+
</a>
|
|
19
|
+
);
|
package/src/utils/navigation.ts
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { IconProps } from '@servicetitan/anvil2';
|
|
2
|
-
import { FC } from 'react';
|
|
3
2
|
import { CounterTagData, CounterTagValue } from './counter-tag';
|
|
4
3
|
|
|
5
4
|
export interface NavigationItemData extends NavigationLinkData {
|
|
6
5
|
/** flag if the link is not shown (based on FG and/or user permissions) */
|
|
7
6
|
isHidden?: boolean;
|
|
8
7
|
|
|
9
|
-
/** custom className (can be used for mdi icons) */
|
|
10
|
-
iconClassName?: string;
|
|
11
|
-
|
|
12
8
|
/** svg icon (anvil2) of inactive item */
|
|
13
9
|
icon: IconProps['svg'] | undefined;
|
|
14
10
|
|
|
15
11
|
/** svg icon (anvil2) of active item */
|
|
16
12
|
iconActive: IconProps['svg'] | undefined;
|
|
17
13
|
|
|
18
|
-
/** icon component of item (<svg />) */
|
|
19
|
-
iconComponent?: FC;
|
|
20
|
-
|
|
21
14
|
/** item tag (optional). shown if it is set and true or greater than 0 */
|
|
22
15
|
counter?: CounterTagValue;
|
|
23
16
|
tag?: CounterTagData;
|
|
@@ -27,6 +20,9 @@ export interface NavigationItemData extends NavigationLinkData {
|
|
|
27
20
|
|
|
28
21
|
/** optional submenu of link item */
|
|
29
22
|
submenu?: NavigationSubmenuData;
|
|
23
|
+
|
|
24
|
+
iconClassName?: never;
|
|
25
|
+
iconComponent?: never;
|
|
30
26
|
}
|
|
31
27
|
|
|
32
28
|
export interface NavigationLinkData {
|