UNPKG

ng-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

81 lines (80 loc) 3.51 kB
/** * @license * Copyright Alibaba.com All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ /** code from https://github.com/angular/material2 */ import { Direction, Directionality } from '@angular/cdk/bidi'; import { Platform } from '@angular/cdk/platform'; import { AfterContentChecked, AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, QueryList, Renderer2, TemplateRef } from '@angular/core'; import { NzDomEventService } from 'ng-zorro-antd/core'; import { Subscription } from 'rxjs'; import { NzTabLabelDirective } from './nz-tab-label.directive'; import { NzTabsInkBarDirective } from './nz-tabs-ink-bar.directive'; import { NzTabPositionMode } from './nz-tabset.component'; export declare type ScrollDirection = 'after' | 'before'; export declare class NzTabsNavComponent implements AfterContentChecked, AfterContentInit, OnDestroy { elementRef: ElementRef; private ngZone; private renderer; private cdr; private platform; private nzDomEventService; private dir; private _tabPositionMode; private _scrollDistance; private _selectedIndex; /** Cached text content of the header. */ private currentTextContent; private destroy$; showPaginationControls: boolean; disableScrollAfter: boolean; disableScrollBefore: boolean; selectedIndexChanged: boolean; realignInkBar: Subscription | null; tabLabelCount: number; scrollDistanceChanged: boolean; listOfNzTabLabelDirective: QueryList<NzTabLabelDirective>; nzTabsInkBarDirective: NzTabsInkBarDirective; navContainerElement: ElementRef<HTMLDivElement>; navListElement: ElementRef<HTMLDivElement>; scrollListElement: ElementRef<HTMLDivElement>; readonly nzOnNextClick: EventEmitter<void>; readonly nzOnPrevClick: EventEmitter<void>; nzTabBarExtraContent: TemplateRef<void>; nzAnimated: boolean; nzHideBar: boolean; nzShowPagination: boolean; nzType: string; nzPositionMode: NzTabPositionMode; selectedIndex: number; constructor(elementRef: ElementRef, ngZone: NgZone, renderer: Renderer2, cdr: ChangeDetectorRef, platform: Platform, nzDomEventService: NzDomEventService, dir: Directionality); onContentChanges(): void; scrollHeader(scrollDir: ScrollDirection): void; ngAfterContentChecked(): void; ngAfterContentInit(): void; ngOnDestroy(): void; updateTabScrollPosition(): void; updatePagination(): void; checkPaginationEnabled(): void; scrollToLabel(labelIndex: number): void; checkScrollingControls(): void; /** * Determines what is the maximum length in pixels that can be set for the scroll distance. This * is equal to the difference in width between the tab list container and tab header container. * * This is an expensive call that forces a layout reflow to compute box and scroll metrics and * should be called sparingly. */ getMaxScrollDistance(): number; /** Sets the distance in pixels that the tab header should be transformed in the X-axis. */ scrollDistance: number; readonly viewWidthHeightPix: number; readonly navContainerScrollPaddingPix: number; readonly tabListScrollWidthHeightPix: number; readonly tabListScrollOffSetWidthHeight: number; getLayoutDirection(): Direction; alignInkBarToSelectedTab(): void; }