@progress/kendo-angular-layout
Version:
Kendo UI for Angular Layout Package - a collection of components to create professional application layoyts
229 lines (228 loc) • 8.13 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { ElementRef, EventEmitter, QueryList, Renderer2, OnDestroy, AfterViewInit, NgZone, SimpleChanges } from '@angular/core';
import { LocalizationService } from '@progress/kendo-angular-l10n';
import { TabStripTabComponent } from './models/tabstrip-tab.component';
import { SelectEvent, TabCloseEvent } from './events';
import { TabStripService } from './tabstrip.service';
import { ScrollService } from './tabstrip-scroll.service';
import { TabPosition } from './models/tab-position';
import { TabAlignment } from './models/tab-alignment';
import { Subscription } from 'rxjs';
import { TabStripScrollableSettings, TabStripScrollButtonsPosition } from './models/scrollable-settings';
import { TabScrollEvent } from './events/tabscroll-event';
import { TabStripScrollableButtonComponent } from './scrollable-button.component';
import { ScrollButtonType } from './models/scroll-button-type';
import { SVGIcon } from '@progress/kendo-svg-icons';
import { TabStripSize } from './models/size';
import * as i0 from "@angular/core";
/**
* Represents the [Kendo UI TabStrip component for Angular]({% slug overview_tabstrip %}).
*/
export declare class TabStripComponent implements AfterViewInit, OnDestroy {
localization: LocalizationService;
private renderer;
wrapper: ElementRef;
private tabstripService;
private scrollService;
private ngZone;
/**
* Sets the height of the TabStrip.
*/
set height(value: string | null | undefined);
get height(): string | null | undefined;
/**
* Enables the tab animation.
*
* @default true
*/
animate: boolean;
/**
* Sets the alignment of the tabs.
*
* @default: 'start'
*/
tabAlignment: TabAlignment;
/**
* Sets the position of the tabs. Defaults to `top`.
*
* @default 'top'
*/
tabPosition: TabPosition;
/**
* When set to `true`, the component renders all tabs and they are persisted in the DOM.
* By default, `keepTabContent` is `false`.
*
* @default false
*/
keepTabContent: boolean;
/**
* When set to `true`, a close button will be rendered inside each tab.
* By default, `closable` is `false`.
*
* @default false
*/
closable: boolean;
/**
* Enables the scrolling of the tab list. When set to `true` and the total size of all tabs
* is greater than the size of the TabStrip container, scroll buttons will be rendered on each end of the tab list.
*
* By default, `scrollable` is `false`.
*
* @default false
*/
set scrollable(value: boolean | TabStripScrollableSettings);
get scrollable(): boolean | TabStripScrollableSettings;
/**
* Specifies the size of the TabStrip.
* ([see example](slug:api_layout_tabstripcomponent#toc-size).
*
* The possible values are:
* * `small`
* * `medium` (Default)
* * `large`
* * `none`
*/
set size(value: TabStripSize);
get size(): TabStripSize;
/**
* Defines the name for an existing font icon in the Kendo UI theme for the close icon.
*/
closeIcon: string;
/**
* Allows defining a custom CSS class, or multiple classes separated by spaces, which will be applied to the close button.
*/
closeIconClass: string;
/**
* Defines an SVGIcon to be rendered for the close icon.
* The input can take either an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
*/
set closeSVGIcon(icon: SVGIcon);
get closeSVGIcon(): SVGIcon;
/**
* Determines whether the content associated with each tab will be rendered.
*
* @default true
*/
showContentArea: boolean;
/**
* Fires each time the user selects a tab ([see example](slug:events_tabstrip)).
* The event data contains the index of the selected tab and its title.
*/
tabSelect: EventEmitter<SelectEvent>;
/**
* Fires each time the user closes a tab.
* The event data contains the index of the closed tab and its instance.
*/
tabClose: EventEmitter<TabCloseEvent>;
/**
* Fires each time the user scrolls the TabStrip list.
* The event is preventable.
*/
tabScroll: EventEmitter<TabScrollEvent>;
hostClasses: boolean;
get tabsAtTop(): boolean;
get tabsAtRight(): boolean;
get tabsAtBottom(): boolean;
get tabsAtLeft(): boolean;
get dir(): string;
get tabStripScrollable(): boolean;
get tabStripScrollableOverlay(): boolean;
/**
* A query list of all declared tabs.
*/
tabs: QueryList<TabStripTabComponent>;
/**
* @hidden
*/
tablist: ElementRef;
/**
* @hidden
*/
tabHeaderContainers: QueryList<ElementRef<HTMLLIElement>>;
/**
* @hidden
*/
prevScrollButton: TabStripScrollableButtonComponent;
/**
* @hidden
*/
nextScrollButton: TabStripScrollableButtonComponent;
/**
* @hidden
*/
localizationChangeSubscription: Subscription;
/**
* @hidden
*/
showLicenseWatermark: boolean;
private _height;
private _scrollableSettings;
private subscriptions;
private subscriptionsArePresent;
private _closeSVGIcon;
private tabStripId;
private tabsChangesSub;
private activeStateChangeSub;
private _size;
constructor(localization: LocalizationService, renderer: Renderer2, wrapper: ElementRef, tabstripService: TabStripService, scrollService: ScrollService, ngZone: NgZone);
ngAfterViewInit(): void;
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
/**
* @hidden
*/
get isScrollable(): boolean;
/**
* @hidden
*/
get hasScrollButtons(): {
visible: boolean;
position: TabStripScrollButtonsPosition;
};
/**
* @hidden
*/
get mouseScrollEnabled(): boolean;
/**
* @hidden
*/
get itemsWrapperClass(): string;
/**
* Allows the user to select a tab programmatically.
* @param {number} index - The index of the tab that will be selected.
*/
selectTab(index: number): void;
/**
* @hidden
*/
getTabId(idx: number): string;
/**
* @hidden
*/
getTabPanelId(idx: number): string;
/**
* @hidden
*/
onTabClick(originalEvent: MouseEvent, tabIndex: number): void;
/**
* @hidden
*/
onResize(): void;
/**
* @hidden
*/
scrollToSelectedTab(): void;
/**
* @hidden
*/
onScrollButtonClick(buttonType: ScrollButtonType): void;
private initDomEvents;
private toggleScrollButtons;
private attachTablistScrollHandler;
private setScrollableOverlayClasses;
static ɵfac: i0.ɵɵFactoryDeclaration<TabStripComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TabStripComponent, "kendo-tabstrip", ["kendoTabStrip"], { "height": { "alias": "height"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; "tabAlignment": { "alias": "tabAlignment"; "required": false; }; "tabPosition": { "alias": "tabPosition"; "required": false; }; "keepTabContent": { "alias": "keepTabContent"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "scrollable": { "alias": "scrollable"; "required": false; }; "size": { "alias": "size"; "required": false; }; "closeIcon": { "alias": "closeIcon"; "required": false; }; "closeIconClass": { "alias": "closeIconClass"; "required": false; }; "closeSVGIcon": { "alias": "closeSVGIcon"; "required": false; }; "showContentArea": { "alias": "showContentArea"; "required": false; }; }, { "tabSelect": "tabSelect"; "tabClose": "tabClose"; "tabScroll": "tabScroll"; }, ["tabs"], never, true, never>;
}