ng-zorro-antd-yj
Version:
An enterprise-class UI components based on Ant Design and Angular
67 lines (66 loc) • 2.88 kB
TypeScript
/** code from https://github.com/angular/material2 */
import { Direction, Directionality } from '@angular/cdk/bidi';
import { AfterContentChecked, AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, QueryList, Renderer2, TemplateRef } from '@angular/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 {
elementRef: ElementRef;
private ngZone;
private renderer;
private cdr;
private dir;
private _tabPositionMode;
private _scrollDistance;
private _selectedIndex;
/** Cached text content of the header. */
private currentTextContent;
showPaginationControls: boolean;
disableScrollAfter: boolean;
disableScrollBefore: boolean;
selectedIndexChanged: boolean;
realignInkBar: Subscription | null;
tabLabelCount: number;
scrollDistanceChanged: boolean;
listOfNzTabLabelDirective: QueryList<NzTabLabelDirective>;
nzTabsInkBarDirective: NzTabsInkBarDirective;
navContainerElement: ElementRef;
navListElement: ElementRef;
scrollListElement: ElementRef;
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, dir: Directionality);
onContentChanges(): void;
scrollHeader(scrollDir: ScrollDirection): void;
ngAfterContentChecked(): void;
ngAfterContentInit(): 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 tabListScrollWidthHeightPix: number;
readonly tabListScrollOffSetWidthHeight: number;
getLayoutDirection(): Direction;
alignInkBarToSelectedTab(): void;
}