@financial-times/dotcom-server-navigation 7.3.0 → 7.3.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.
@@ -0,0 +1,2 @@
1
+ import { TNavAction } from '@financial-times/dotcom-types-navigation';
2
+ export declare function getSubscribeAction(): TNavAction;
@@ -0,0 +1 @@
1
+ export declare function decorateMenuData<Type>(menuData: Type, currentUrl: string): Type;
@@ -0,0 +1,3 @@
1
+ import { TNavEditions } from '@financial-times/dotcom-types-navigation';
2
+ export declare function isEdition(editionID: string): boolean;
3
+ export declare function getEditions(currentEdition: string): TNavEditions;
@@ -0,0 +1,3 @@
1
+ export * from './editions';
2
+ export * from './actions';
3
+ export * from './navigation';
@@ -0,0 +1,19 @@
1
+ import Poller from 'ft-poller';
2
+ import { TNavMenus, TNavMenusForEdition, TNavSubNavigation, TNavEditions, TNavAction } from '@financial-times/dotcom-types-navigation';
3
+ export declare type TNavOptions = {
4
+ menuUrl?: string;
5
+ subNavigationUrl?: string;
6
+ interval?: number;
7
+ };
8
+ export declare class Navigation {
9
+ options: TNavOptions;
10
+ poller: Poller;
11
+ initialPromise: Promise<void>;
12
+ private menuData;
13
+ constructor(options?: TNavOptions);
14
+ getMenusData(): Promise<TNavMenus>;
15
+ getMenusFor(currentPath: string, currentEdition?: string): Promise<TNavMenusForEdition>;
16
+ getSubNavigationFor(path: string): Promise<TNavSubNavigation>;
17
+ getEditionsFor(currentEdition?: string): TNavEditions;
18
+ getSubscribeAction(): TNavAction;
19
+ }
@@ -0,0 +1,2 @@
1
+ import { TNavMenus, TNavMenusForEdition } from '@financial-times/dotcom-types-navigation';
2
+ export declare function selectMenuDataForEdition(menuData: TNavMenus, currentEdition: string): TNavMenusForEdition;