UNPKG

1.32 kBTypeScriptView Raw
1import { AgPromise } from '../utils';
2import { IAfterGuiAttachedParams } from '../interfaces/iAfterGuiAttachedParams';
3import { Component } from '../widgets/component';
4export declare class TabbedLayout extends Component {
5 private focusService;
6 private readonly eHeader;
7 private readonly eBody;
8 private params;
9 private afterAttachedParams;
10 private items;
11 private activeItem;
12 private lastScrollListener;
13 private readonly tabbedItemScrollMap;
14 constructor(params: TabbedLayoutParams);
15 private postConstruct;
16 private static getTemplate;
17 protected handleKeyDown(e: KeyboardEvent): void;
18 protected onTabKeyDown(e: KeyboardEvent): void;
19 setAfterAttachedParams(params: IAfterGuiAttachedParams): void;
20 showFirstItem(): void;
21 private addItem;
22 showItem(tabbedItem: TabbedItem): void;
23 private showItemWrapper;
24}
25export interface TabbedLayoutParams {
26 items: TabbedItem[];
27 cssClass?: string;
28 keepScrollPosition?: boolean;
29 onItemClicked?: Function;
30 onActiveItemClicked?: Function;
31}
32export interface TabbedItem {
33 title: Element;
34 titleLabel: string;
35 bodyPromise: AgPromise<HTMLElement>;
36 name: string;
37 getScrollableContainer?: () => HTMLElement;
38 afterAttachedCallback?: (params: IAfterGuiAttachedParams) => void;
39}