@trycourier/courier-ui-inbox
Version:
Inbox components for the Courier web UI
51 lines (50 loc) • 2.12 kB
TypeScript
import { CourierFactoryElement } from '@trycourier/courier-ui-core';
import { CourierInboxHeaderFactoryProps } from '../types/factories';
import { CourierInboxThemeManager } from '../types/courier-inbox-theme-manager';
import { CourierInboxTheme } from '../types/courier-inbox-theme';
import { CourierInboxFeed, CourierInboxTab } from '../types/inbox-data-set';
import { CourierInboxTabs } from './courier-inbox-tabs';
import { CourierInboxHeaderAction } from '../types/inbox-defaults';
export declare class CourierInboxHeader extends CourierFactoryElement {
static get id(): string;
private _themeSubscription;
private _feeds;
private _currentFeedId?;
private _actions;
private _feedButton?;
private _feedMenu?;
private _actionMenuButton?;
private _actionMenu?;
tabs?: CourierInboxTabs;
private _style?;
private _feedButtonClickHandler?;
private _onFeedChange;
private _onFeedReselected;
private _onTabChange;
private _onTabReselected;
private get theme();
/** Returns whether the tabs are currently visible based on the current feed having more than 1 tab. */
get showTabs(): boolean;
constructor(props: {
themeManager: CourierInboxThemeManager;
actions?: CourierInboxHeaderAction[];
onFeedChange: (feed: CourierInboxFeed) => void;
onFeedReselected: (feed: CourierInboxFeed) => void;
onTabChange: (tab: CourierInboxTab) => void;
onTabReselected: (tab: CourierInboxTab) => void;
});
onComponentMounted(): void;
onComponentUmounted(): void;
private getActionOptions;
private refreshTheme;
private getFeedMenuOptions;
render(props: CourierInboxHeaderFactoryProps): void;
build(newElement: HTMLElement | undefined | null): void;
defaultElement(): HTMLElement;
private refreshActionMenuButton;
private updateFeedButtonInteraction;
setFeeds(feeds: CourierInboxFeed[]): void;
setActions(actions: CourierInboxHeaderAction[]): void;
selectFeed(feedId: string, tabId: string): void;
static getStyles(theme: CourierInboxTheme): string;
}