primeng
Version:
PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB
137 lines (136 loc) • 5.41 kB
TypeScript
import { AfterContentInit, AfterViewChecked, AfterViewInit, ElementRef, EventEmitter, OnDestroy, QueryList, TemplateRef } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { MenuItem, PrimeTemplate } from 'primeng/api';
import { BaseComponent } from 'primeng/basecomponent';
import { Nullable } from 'primeng/ts-helpers';
import { TabMenuStyle } from './style/tabmenustyle';
import * as i0 from "@angular/core";
import * as i1 from "primeng/api";
/**
* TabMenu is a navigation component that displays items as tab headers.
* @group Components
*/
export declare class TabMenu extends BaseComponent implements AfterViewInit, AfterContentInit, AfterViewChecked, OnDestroy {
/**
* An array of menuitems.
* @group Props
*/
set model(value: MenuItem[] | undefined);
get model(): MenuItem[] | undefined;
/**
* Defines the default active menuitem
* @group Props
*/
set activeItem(value: MenuItem | undefined);
get activeItem(): MenuItem | undefined;
/**
* When enabled displays buttons at each side of the tab headers to scroll the tab list.
* @group Props
*/
scrollable: boolean | undefined;
/**
* Defines if popup mode enabled.
*/
popup: boolean | undefined;
/**
* Inline style of the element.
* @group Props
*/
style: {
[klass: string]: any;
} | null | undefined;
/**
* Class of the element.
* @group Props
*/
styleClass: string | undefined;
/**
* Defines a string value that labels an interactive element.
* @group Props
*/
ariaLabel: string | undefined;
/**
* Identifier of the underlying input element.
* @group Props
*/
ariaLabelledBy: string | undefined;
/**
* Event fired when a tab is selected.
* @param {MenuItem} item - Menu item.
* @group Emits
*/
activeItemChange: EventEmitter<MenuItem>;
content: Nullable<ElementRef>;
navbar: Nullable<ElementRef>;
inkbar: Nullable<ElementRef>;
prevBtn: Nullable<ElementRef>;
nextBtn: Nullable<ElementRef>;
tabLink: Nullable<QueryList<ElementRef>>;
tab: Nullable<QueryList<ElementRef>>;
/**
* Template of the menu item.
* @group Templates
*/
itemTemplate: Nullable<TemplateRef<any>>;
/**
* Template of the previous icon.
* @group Templates
*/
previousIconTemplate: Nullable<TemplateRef<any>>;
/**
* Template of the next icon.
* @group Templates
*/
nextIconTemplate: Nullable<TemplateRef<any>>;
templates: QueryList<PrimeTemplate> | undefined;
_itemTemplate: TemplateRef<any> | undefined;
_nextIconTemplate: TemplateRef<any> | undefined;
_previousIconTemplate: TemplateRef<any> | undefined;
tabChanged: boolean | undefined;
backwardIsDisabled: boolean;
forwardIsDisabled: boolean;
private timerIdForInitialAutoScroll;
_focusableItems: MenuItem[] | undefined | any;
_model: MenuItem[] | undefined;
_activeItem: MenuItem | undefined;
focusedItemInfo: import("@angular/core").WritableSignal<any>;
router: Router;
route: ActivatedRoute;
_componentStyle: TabMenuStyle;
get focusableItems(): any;
constructor();
ngAfterViewInit(): void;
ngAfterViewChecked(): void;
ngAfterContentInit(): void;
ngOnDestroy(): void;
isActive(item: MenuItem): boolean;
getItemProp(item: any, name: string): string;
visible(item: any): any;
disabled(item: any): any;
onMenuItemFocus(item: any): void;
itemClick(event: Event, item: MenuItem): void;
onKeydownItem(event: any, index: any, item: any): void;
onTabKeyDown(tabLinks: any): void;
changeFocusedTab(event: KeyboardEvent, element: HTMLLIElement, index: number): void;
findNextItem(items: any, index: any): any;
findPrevItem(items: any, index: any): any;
updateInkBar(): void;
getVisibleButtonWidths(): any;
updateButtonState(): void;
updateScrollBar(index: number): void;
onScroll(event: Event): void;
navBackward(): void;
navForward(): void;
private initAutoScrollForActiveItem;
private clearAutoScrollHandler;
private initButtonState;
static ɵfac: i0.ɵɵFactoryDeclaration<TabMenu, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TabMenu, "p-tabMenu, p-tabmenu", never, { "model": { "alias": "model"; "required": false; }; "activeItem": { "alias": "activeItem"; "required": false; }; "scrollable": { "alias": "scrollable"; "required": false; }; "popup": { "alias": "popup"; "required": false; }; "style": { "alias": "style"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; }, { "activeItemChange": "activeItemChange"; }, ["itemTemplate", "previousIconTemplate", "nextIconTemplate", "templates"], never, true, never>;
static ngAcceptInputType_scrollable: unknown;
static ngAcceptInputType_popup: unknown;
}
export declare class TabMenuModule {
static ɵfac: i0.ɵɵFactoryDeclaration<TabMenuModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<TabMenuModule, never, [typeof TabMenu, typeof i1.SharedModule], [typeof TabMenu, typeof i1.SharedModule]>;
static ɵinj: i0.ɵɵInjectorDeclaration<TabMenuModule>;
}