Skip to content

Commit b973e42

Browse files
Add Types [ci skip]
1 parent a341afe commit b973e42

12 files changed

+56
-7
lines changed

types/src/lib/app-context/app-context.functions.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export declare const buildContext: (newConfig: Partial<NavigationAppProps>, prev
1313
toolConfig: {
1414
name: any;
1515
root: any;
16+
fullFooter: any;
1617
};
1718
supportMeta: any;
1819
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export interface ToolConfig {
22
name: string;
33
root: string;
4+
fullFooter?: boolean;
45
}

types/src/lib/config/nav-menu/footer-nav-items.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ export declare const footerNavItems: {
1313
icon?: string;
1414
action?: string;
1515
url?: string;
16+
authenticatedPath?: string;
17+
groupOrder?: number;
1618
}[];
1719
};

types/src/lib/config/nav-menu/marketing-nav-items.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ export declare const marketingNavItems: {
1111
icon?: string;
1212
action?: string;
1313
url?: string;
14+
authenticatedPath?: string;
15+
groupOrder?: number;
1416
})[];
1517
description?: string;
1618
host?: string;
@@ -20,6 +22,8 @@ export declare const marketingNavItems: {
2022
icon?: string;
2123
action?: string;
2224
url?: string;
25+
authenticatedPath?: string;
26+
groupOrder?: number;
2327
})[];
2428
description?: string;
2529
host?: string;
@@ -29,5 +33,7 @@ export declare const marketingNavItems: {
2933
icon?: string;
3034
action?: string;
3135
url?: string;
36+
authenticatedPath?: string;
37+
groupOrder?: number;
3238
}[];
3339
};

types/src/lib/config/nav-menu/tool-selector-nav-items.d.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export declare const toolSelectorNavItems: {
2-
children: {
2+
children: ({
33
label: string;
44
children: ({
55
label: string;
@@ -17,5 +17,17 @@ export declare const toolSelectorNavItems: {
1717
type: string;
1818
}[];
1919
})[];
20-
}[];
20+
} | {
21+
label: string;
22+
children: {
23+
label: string;
24+
groupOrder: number;
25+
children: {
26+
label: string;
27+
url: string;
28+
icon: string;
29+
description: string;
30+
}[];
31+
}[];
32+
})[];
2133
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
import type { NavMenuItem } from './nav-menu-item.model';
2-
export declare function getFooterNavItems(): NavMenuItem[];
2+
export declare function getFooterNavItems(isAuthenticated: boolean): NavMenuItem[];
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import type { NavMenuItem } from './nav-menu-item.model';
2-
export declare function getMainNavItems(): NavMenuItem[];
3-
export declare function getActiveRoute(index?: number): NavMenuItem[];
2+
export declare function getMainNavItems(isAuthenticated: boolean): NavMenuItem[];
3+
export declare function getActiveRoute(navItems: NavMenuItem[], index?: number): NavMenuItem[];

types/src/lib/functions/nav-menu-item.model.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ export interface NavMenuItem {
88
icon?: string;
99
action?: string;
1010
url?: string;
11+
authenticatedPath?: string;
12+
groupOrder?: number;
1113
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
import type { NavMenuItem } from './nav-menu-item.model';
2-
export declare function getMainNavItems(): NavMenuItem[];
2+
export declare function getMainNavItems(isAuthenticated: boolean): NavMenuItem[];

types/src/lib/utils/routes.d.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
import type { NavMenuItem } from 'lib/functions/nav-menu-item.model';
2+
/**
3+
* Parses the passed nav menu items and
4+
* based on the `isAuthenticated` param
5+
* activates the `authenticatedPath` for a nav menu item
6+
* @param isAuthenticated
7+
* @param navigationItem
8+
* @param depth
9+
* @returns NavMenuItem.children
10+
*/
11+
export declare const activateAuthenticatedRoutes: (isAuthenticated: boolean, { children }: NavMenuItem, depth?: number) => NavMenuItem[];
212
/**
313
* Matches the current route to a navigation menu item
414
* and returns the full trail to the matched route (eg. [parent, matchedRoute])
@@ -13,4 +23,4 @@ export declare const matchRoutes: (navMenu: NavMenuItem, path: string) => NavMen
1323
* @param trailLevel The trail level of the active route to return
1424
* @returns
1525
*/
16-
export declare function getActiveRoute(navMenu: NavMenuItem, trailLevel?: number): NavMenuItem[];
26+
export declare function getActiveRoute(navMenuItems: NavMenuItem[], trailLevel?: number): NavMenuItem[];

0 commit comments

Comments
 (0)