UNPKG

ng-zorro-antd

Version:

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

2 lines 22.6 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/cdk/observers"),require("@angular/common"),require("ng-zorro-antd/icon"),require("@angular/cdk/bidi"),require("rxjs/operators"),require("@angular/core"),require("rxjs"),require("ng-zorro-antd/core")):"function"==typeof define&&define.amd?define("ng-zorro-antd/tabs",["exports","@angular/cdk/observers","@angular/common","ng-zorro-antd/icon","@angular/cdk/bidi","rxjs/operators","@angular/core","rxjs","ng-zorro-antd/core"],e):e((t["ng-zorro-antd"]=t["ng-zorro-antd"]||{},t["ng-zorro-antd"].tabs={}),t.ng.cdk.observers,t.ng.common,t["ng-zorro-antd"].icon,t.ng.cdk.bidi,t.rxjs.operators,t.ng.core,t.rxjs,t["ng-zorro-antd"].core)}(this,function(t,e,n,i,a,o,s,r,l){"use strict";var c=(h.decorators=[{type:s.Component,args:[{selector:"[nz-tab-body]",exportAs:"nzTabBody",preserveWhitespaces:!1,encapsulation:s.ViewEncapsulation.None,changeDetection:s.ChangeDetectionStrategy.OnPush,template:'<ng-container *ngIf="active || forceRender">\n <ng-template [ngTemplateOutlet]="content"></ng-template>\n</ng-container>',host:{"[class.ant-tabs-tabpane-active]":"active","[class.ant-tabs-tabpane-inactive]":"!active"}}]}],h.propDecorators={content:[{type:s.Input}],active:[{type:s.Input}],forceRender:[{type:s.Input}]},h);function h(){this.active=!1,this.forceRender=!1}function p(t,e,n,i){var a,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var r=t.length-1;0<=r;r--)(a=t[r])&&(s=(o<3?a(s):3<o?a(e,n,s):a(e,n))||s);return 3<o&&s&&Object.defineProperty(e,n,s),s}function d(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function b(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,a,o=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(i=o.next()).done;)s.push(i.value)}catch(r){a={error:r}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(a)throw a.error}}return s}var u=(f.prototype.getOffsetLeft=function(){return this.elementRef.nativeElement.offsetLeft},f.prototype.getOffsetWidth=function(){return this.elementRef.nativeElement.offsetWidth},f.prototype.getOffsetTop=function(){return this.elementRef.nativeElement.offsetTop},f.prototype.getOffsetHeight=function(){return this.elementRef.nativeElement.offsetHeight},f.decorators=[{type:s.Directive,args:[{selector:"[nz-tab-label]",exportAs:"nzTabLabel",host:{"[class.ant-tabs-tab-disabled]":"disabled"}}]}],f.ctorParameters=function(){return[{type:s.ElementRef},{type:s.Renderer2}]},f.propDecorators={disabled:[{type:s.Input}]},p([l.InputBoolean(),d("design:type",Object)],f.prototype,"disabled",void 0),f);function f(t,e){this.elementRef=t,this.disabled=!1,e.addClass(t.nativeElement,"ant-tabs-tab")}var g=(z.decorators=[{type:s.Directive,args:[{selector:"[nz-tab]",exportAs:"nzTab"}]}],z);function z(){}var m=(y.prototype.ngOnChanges=function(t){(t.nzTitle||t.nzForceRender||t.nzDisabled)&&this.stateChanges.next()},y.prototype.ngOnDestroy=function(){this.stateChanges.complete()},y.decorators=[{type:s.Component,args:[{selector:"nz-tab",exportAs:"nzTab",preserveWhitespaces:!1,encapsulation:s.ViewEncapsulation.None,changeDetection:s.ChangeDetectionStrategy.OnPush,template:"<ng-template>\n <ng-content></ng-content>\n</ng-template>"}]}],y.ctorParameters=function(){return[{type:s.ElementRef},{type:s.Renderer2}]},y.propDecorators={content:[{type:s.ViewChild,args:[s.TemplateRef]}],template:[{type:s.ContentChild,args:[g,{read:s.TemplateRef}]}],nzTitle:[{type:s.Input}],nzForceRender:[{type:s.Input}],nzDisabled:[{type:s.Input}],nzClick:[{type:s.Output}],nzSelect:[{type:s.Output}],nzDeselect:[{type:s.Output}]},p([l.InputBoolean(),d("design:type",Object)],y.prototype,"nzForceRender",void 0),p([l.InputBoolean(),d("design:type",Object)],y.prototype,"nzDisabled",void 0),y);function y(t,e){this.elementRef=t,this.renderer=e,this.position=null,this.origin=null,this.isActive=!1,this.stateChanges=new r.Subject,this.nzForceRender=!1,this.nzDisabled=!1,this.nzClick=new s.EventEmitter,this.nzSelect=new s.EventEmitter,this.nzDeselect=new s.EventEmitter,this.renderer.addClass(t.nativeElement,"ant-tabs-tabpane")}var v=(C.prototype.alignToElement=function(t){var e=this;"undefined"!=typeof requestAnimationFrame?this.ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){return e.setStyles(t)})}):this.setStyles(t)},C.prototype.setStyles=function(t){"horizontal"===this.nzPositionMode?(this.renderer.removeStyle(this.elementRef.nativeElement,"height"),this.renderer.setStyle(this.elementRef.nativeElement,"transform","translate3d("+this.getLeftPosition(t)+", 0px, 0px)"),this.renderer.setStyle(this.elementRef.nativeElement,"width",this.getElementWidth(t))):(this.renderer.removeStyle(this.elementRef.nativeElement,"width"),this.renderer.setStyle(this.elementRef.nativeElement,"transform","translate3d(0px, "+this.getTopPosition(t)+", 0px)"),this.renderer.setStyle(this.elementRef.nativeElement,"height",this.getElementHeight(t)))},C.prototype.getLeftPosition=function(t){return t?t.offsetLeft+"px":"0"},C.prototype.getElementWidth=function(t){return t?t.offsetWidth+"px":"0"},C.prototype.getTopPosition=function(t){return t?t.offsetTop+"px":"0"},C.prototype.getElementHeight=function(t){return t?t.offsetHeight+"px":"0"},C.decorators=[{type:s.Directive,args:[{selector:"[nz-tabs-ink-bar]",exportAs:"nzTabsInkBar",host:{"[class.ant-tabs-ink-bar-animated]":"nzAnimated","[class.ant-tabs-ink-bar-no-animated]":"!nzAnimated"}}]}],C.ctorParameters=function(){return[{type:s.Renderer2},{type:s.ElementRef},{type:s.NgZone}]},C.propDecorators={nzAnimated:[{type:s.Input}],nzPositionMode:[{type:s.Input}]},p([l.InputBoolean(),d("design:type",Object)],C.prototype,"nzAnimated",void 0),C);function C(t,e,n){this.renderer=t,this.elementRef=e,this.ngZone=n,this.nzAnimated=!1,this.nzPositionMode="horizontal",t.addClass(e.nativeElement,"ant-tabs-ink-bar")}var T=(Object.defineProperty(P.prototype,"nzPositionMode",{get:function(){return this._tabPositionMode},set:function(t){var e=this;this._tabPositionMode=t,this.alignInkBarToSelectedTab(),this.nzShowPagination&&Promise.resolve().then(function(){e.updatePagination()})},enumerable:!0,configurable:!0}),Object.defineProperty(P.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(t){this.selectedIndexChanged=this._selectedIndex!==t,this._selectedIndex=t},enumerable:!0,configurable:!0}),P.prototype.onContentChanges=function(){var t=this;this.elementRef.nativeElement.textContent!==this.currentTextContent&&this.ngZone.run(function(){t.nzShowPagination&&t.updatePagination(),t.alignInkBarToSelectedTab(),t.cdr.markForCheck()})},P.prototype.scrollHeader=function(t){"before"!==t||this.disableScrollBefore?"after"!==t||this.disableScrollAfter||this.nzOnNextClick.emit():this.nzOnPrevClick.emit(),this.scrollDistance+=("before"===t?-1:1)*this.viewWidthHeightPix/3},P.prototype.ngAfterContentChecked=function(){this.tabLabelCount!==this.listOfNzTabLabelDirective.length&&(this.nzShowPagination&&this.updatePagination(),this.tabLabelCount=this.listOfNzTabLabelDirective.length,this.cdr.markForCheck()),this.selectedIndexChanged&&(this.scrollToLabel(this._selectedIndex),this.nzShowPagination&&this.checkScrollingControls(),this.alignInkBarToSelectedTab(),this.selectedIndexChanged=!1,this.cdr.markForCheck()),this.scrollDistanceChanged&&(this.nzShowPagination&&this.updateTabScrollPosition(),this.scrollDistanceChanged=!1,this.cdr.markForCheck())},P.prototype.ngAfterContentInit=function(){var n=this;this.realignInkBar=this.ngZone.runOutsideAngular(function(){var t=n.dir?n.dir.change:r.of(null),e="undefined"!=typeof window?r.fromEvent(window,"resize").pipe(o.auditTime(10)):r.of(null);return r.merge(t,e).pipe(o.startWith(null)).subscribe(function(){n.nzShowPagination&&n.updatePagination(),n.alignInkBarToSelectedTab()})})},P.prototype.ngOnDestroy=function(){this.realignInkBar&&this.realignInkBar.unsubscribe()},P.prototype.updateTabScrollPosition=function(){var t=this.scrollDistance;if("horizontal"===this.nzPositionMode){var e="ltr"===this.getLayoutDirection()?-t:t;this.renderer.setStyle(this.navListElement.nativeElement,"transform","translate3d("+e+"px, 0, 0)")}else this.renderer.setStyle(this.navListElement.nativeElement,"transform","translate3d(0,"+-t+"px, 0)")},P.prototype.updatePagination=function(){this.checkPaginationEnabled(),this.checkScrollingControls(),this.updateTabScrollPosition()},P.prototype.checkPaginationEnabled=function(){var t=this.tabListScrollWidthHeightPix>this.tabListScrollOffSetWidthHeight;t||(this.scrollDistance=0),t!==this.showPaginationControls&&this.cdr.markForCheck(),this.showPaginationControls=t},P.prototype.scrollToLabel=function(t){var e=this.listOfNzTabLabelDirective?this.listOfNzTabLabelDirective.toArray()[t]:null;if(e){var n=void 0,i=void 0;"horizontal"===this.nzPositionMode?"ltr"===this.getLayoutDirection()?i=(n=e.getOffsetLeft())+e.getOffsetWidth():n=(i=this.navListElement.nativeElement.offsetWidth-e.getOffsetLeft())-e.getOffsetWidth():i=(n=e.getOffsetTop())+e.getOffsetHeight();var a=this.scrollDistance,o=this.scrollDistance+this.viewWidthHeightPix;n<a?this.scrollDistance-=a-n+64:o<i&&(this.scrollDistance+=i-o+64)}},P.prototype.checkScrollingControls=function(){this.disableScrollBefore=0===this.scrollDistance,this.disableScrollAfter=this.scrollDistance===this.getMaxScrollDistance(),this.cdr.markForCheck()},P.prototype.getMaxScrollDistance=function(){return this.tabListScrollWidthHeightPix-this.viewWidthHeightPix||0},Object.defineProperty(P.prototype,"scrollDistance",{get:function(){return this._scrollDistance},set:function(t){this._scrollDistance=Math.max(0,Math.min(this.getMaxScrollDistance(),t)),this.scrollDistanceChanged=!0,this.checkScrollingControls()},enumerable:!0,configurable:!0}),Object.defineProperty(P.prototype,"viewWidthHeightPix",{get:function(){var t=0;return this.showPaginationControls&&(t=64),"horizontal"===this.nzPositionMode?this.navContainerElement.nativeElement.offsetWidth-t:this.navContainerElement.nativeElement.offsetHeight-t},enumerable:!0,configurable:!0}),Object.defineProperty(P.prototype,"tabListScrollWidthHeightPix",{get:function(){return"horizontal"===this.nzPositionMode?this.navListElement.nativeElement.scrollWidth:this.navListElement.nativeElement.scrollHeight},enumerable:!0,configurable:!0}),Object.defineProperty(P.prototype,"tabListScrollOffSetWidthHeight",{get:function(){return"horizontal"===this.nzPositionMode?this.scrollListElement.nativeElement.offsetWidth:this.elementRef.nativeElement.offsetHeight},enumerable:!0,configurable:!0}),P.prototype.getLayoutDirection=function(){return this.dir&&"rtl"===this.dir.value?"rtl":"ltr"},P.prototype.alignInkBarToSelectedTab=function(){if("line"===this.nzType){var t=this.listOfNzTabLabelDirective&&this.listOfNzTabLabelDirective.length?this.listOfNzTabLabelDirective.toArray()[this.selectedIndex].elementRef.nativeElement:null;this.nzTabsInkBarDirective&&this.nzTabsInkBarDirective.alignToElement(t)}},P.decorators=[{type:s.Component,args:[{selector:"[nz-tabs-nav]",exportAs:"nzTabsNav",preserveWhitespaces:!1,changeDetection:s.ChangeDetectionStrategy.OnPush,encapsulation:s.ViewEncapsulation.None,template:'<div style="float:right;" *ngIf="nzTabBarExtraContent" class="ant-tabs-extra-content">\n <ng-template [ngTemplateOutlet]="nzTabBarExtraContent"></ng-template>\n</div>\n<div class="ant-tabs-nav-container"\n [class.ant-tabs-nav-container-scrolling]="showPaginationControls"\n #navContainerElement>\n <span class="ant-tabs-tab-prev"\n (click)="scrollHeader(\'before\')"\n [class.ant-tabs-tab-btn-disabled]="disableScrollBefore"\n [class.ant-tabs-tab-arrow-show]="showPaginationControls">\n <span class="ant-tabs-tab-prev-icon">\n <i nz-icon [type]="nzPositionMode === \'horizontal\' ? \'left\' : \'up\'" class="ant-tabs-tab-prev-icon-target"></i>\n </span>\n </span>\n <span class="ant-tabs-tab-next"\n (click)="scrollHeader(\'after\')"\n [class.ant-tabs-tab-btn-disabled]="disableScrollAfter"\n [class.ant-tabs-tab-arrow-show]="showPaginationControls">\n <span class="ant-tabs-tab-next-icon">\n <i nz-icon [type]="nzPositionMode === \'horizontal\' ? \'right\' : \'down\'" class="ant-tabs-tab-next-icon-target"></i>\n </span>\n </span>\n <div class="ant-tabs-nav-wrap">\n <div class="ant-tabs-nav-scroll" #scrollListElement>\n <div class="ant-tabs-nav"\n [class.ant-tabs-nav-animated]="nzAnimated"\n #navListElement\n (cdkObserveContent)="onContentChanges()">\n <div>\n <ng-content></ng-content>\n </div>\n <div nz-tabs-ink-bar [hidden]="nzHideBar" [nzAnimated]="nzAnimated" [nzPositionMode]="nzPositionMode" style="display: block;"></div>\n </div>\n </div>\n </div>\n</div>'}]}],P.ctorParameters=function(){return[{type:s.ElementRef},{type:s.NgZone},{type:s.Renderer2},{type:s.ChangeDetectorRef},{type:a.Directionality,decorators:[{type:s.Optional}]}]},P.propDecorators={listOfNzTabLabelDirective:[{type:s.ContentChildren,args:[u]}],nzTabsInkBarDirective:[{type:s.ViewChild,args:[v]}],navContainerElement:[{type:s.ViewChild,args:["navContainerElement"]}],navListElement:[{type:s.ViewChild,args:["navListElement"]}],scrollListElement:[{type:s.ViewChild,args:["scrollListElement"]}],nzOnNextClick:[{type:s.Output}],nzOnPrevClick:[{type:s.Output}],nzTabBarExtraContent:[{type:s.Input}],nzAnimated:[{type:s.Input}],nzHideBar:[{type:s.Input}],nzShowPagination:[{type:s.Input}],nzType:[{type:s.Input}],nzPositionMode:[{type:s.Input}],selectedIndex:[{type:s.Input}]},p([l.InputBoolean(),d("design:type",Object)],P.prototype,"nzAnimated",void 0),p([l.InputBoolean(),d("design:type",Object)],P.prototype,"nzHideBar",void 0),p([l.InputBoolean(),d("design:type",Object)],P.prototype,"nzShowPagination",void 0),P);function P(t,e,n,i,a){this.elementRef=t,this.ngZone=e,this.renderer=n,this.cdr=i,this.dir=a,this._tabPositionMode="horizontal",this._scrollDistance=0,this._selectedIndex=0,this.showPaginationControls=!1,this.disableScrollAfter=!0,this.disableScrollBefore=!0,this.selectedIndexChanged=!1,this.realignInkBar=null,this.nzOnNextClick=new s.EventEmitter,this.nzOnPrevClick=new s.EventEmitter,this.nzAnimated=!0,this.nzHideBar=!1,this.nzShowPagination=!0,this.nzType="line"}var S=function k(){},x=(Object.defineProperty(O.prototype,"nzSelectedIndex",{get:function(){return this._selectedIndex},set:function(t){this.indexToSelect=t?l.toNumber(t,null):null},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"inkBarAnimated",{get:function(){return!0===this.nzAnimated||!0===this.nzAnimated.inkBar},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"tabPaneAnimated",{get:function(){return!0===this.nzAnimated||!0===this.nzAnimated.tabPane},enumerable:!0,configurable:!0}),O.prototype.setPosition=function(t){this.tabContent&&("bottom"===t?this.renderer.insertBefore(this.el,this.tabContent.nativeElement,this.nzTabsNavComponent.elementRef.nativeElement):this.renderer.insertBefore(this.el,this.nzTabsNavComponent.elementRef.nativeElement,this.tabContent.nativeElement))},O.prototype.setClassMap=function(){var t;this.nzUpdateHostClassService.updateHostClass(this.el,((t={})["ant-tabs"]=!0,t["ant-tabs-vertical"]="left"===this.nzTabPosition||"right"===this.nzTabPosition,t["ant-tabs-"+this.nzTabPosition]=this.nzTabPosition,t["ant-tabs-no-animation"]=!1===this.nzAnimated||!1===this.nzAnimated.tabPane,t["ant-tabs-"+this.nzType]=this.nzType,t["ant-tabs-large"]="large"===this.nzSize,t["ant-tabs-small"]="small"===this.nzSize,t))},O.prototype.clickLabel=function(t,e){e||(this.nzSelectedIndex=t,this.listOfNzTabComponent.toArray()[t].nzClick.emit())},O.prototype.createChangeEvent=function(n){var t=new S;return t.index=n,this.listOfNzTabComponent&&this.listOfNzTabComponent.length&&(t.tab=this.listOfNzTabComponent.toArray()[n],this.listOfNzTabComponent.forEach(function(t,e){e!==n&&t.nzDeselect.emit()}),t.tab.nzSelect.emit()),t},O.prototype.clampTabIndex=function(t){return Math.min(this.listOfNzTabComponent.length-1,Math.max(t||0,0))},O.prototype.subscribeToTabLabels=function(){var t=this;this.tabLabelSubscription&&this.tabLabelSubscription.unsubscribe(),this.tabLabelSubscription=r.merge.apply(void 0,function n(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(b(arguments[e]));return t}(this.listOfNzTabComponent.map(function(t){return t.stateChanges}))).subscribe(function(){return t.cdr.markForCheck()})},O.prototype.ngOnChanges=function(t){t.nzTabPosition&&("top"===this.nzTabPosition||"bottom"===this.nzTabPosition?this.tabPositionMode="horizontal":this.tabPositionMode="vertical",this.setPosition(this.nzTabPosition)),t.nzType&&"card"===this.nzType&&(this.nzAnimated=!1),(t.nzSize||t.nzAnimated||t.nzTabPosition||t.nzType)&&this.setClassMap()},O.prototype.ngOnInit=function(){this.setClassMap()},O.prototype.ngAfterContentChecked=function(){var n=this;if(this.listOfNzTabComponent&&this.listOfNzTabComponent.length){var i=this.indexToSelect=this.clampTabIndex(this.indexToSelect);if(this._selectedIndex!==i){var t=null==this._selectedIndex;t||this.nzSelectChange.emit(this.createChangeEvent(i)),Promise.resolve().then(function(){n.listOfNzTabComponent.forEach(function(t,e){return t.isActive=e===i}),t||n.nzSelectedIndexChange.emit(i)})}this.listOfNzTabComponent.forEach(function(t,e){t.position=e-i,null==n._selectedIndex||0!==t.position||t.origin||(t.origin=i-n._selectedIndex)}),this._selectedIndex!==i&&(this._selectedIndex=i,this.cdr.markForCheck())}},O.prototype.ngAfterContentInit=function(){var n=this;this.subscribeToTabLabels(),this.tabsSubscription=this.listOfNzTabComponent.changes.subscribe(function(){if(n.clampTabIndex(n.indexToSelect)===n._selectedIndex)for(var t=n.listOfNzTabComponent.toArray(),e=0;e<t.length;e++)if(t[e].isActive){n.indexToSelect=n._selectedIndex=e;break}n.subscribeToTabLabels(),n.cdr.markForCheck()})},O.prototype.ngOnDestroy=function(){this.tabsSubscription.unsubscribe(),this.tabLabelSubscription.unsubscribe()},O.prototype.ngAfterViewInit=function(){this.setPosition(this.nzTabPosition)},O.decorators=[{type:s.Component,args:[{selector:"nz-tabset",exportAs:"nzTabset",preserveWhitespaces:!1,encapsulation:s.ViewEncapsulation.None,changeDetection:s.ChangeDetectionStrategy.OnPush,providers:[l.NzUpdateHostClassService],template:'<ng-container *ngIf="listOfNzTabComponent">\n <div nz-tabs-nav\n role="tablist"\n tabindex="0"\n class="ant-tabs-bar"\n [class.ant-tabs-card-bar]="nzType === \'card\'"\n [class.ant-tabs-top-bar]="nzTabPosition === \'top\'"\n [class.ant-tabs-bottom-bar]="nzTabPosition === \'bottom\'"\n [class.ant-tabs-left-bar]="nzTabPosition === \'left\'"\n [class.ant-tabs-right-bar]="nzTabPosition === \'right\'"\n [class.ant-tabs-small-bar]="nzSize === \'small\'"\n [class.ant-tabs-default-bar]="nzSize === \'default\'"\n [class.ant-tabs-large-bar]="nzSize === \'large\'"\n [nzType]="nzType"\n [nzShowPagination]="nzShowPagination"\n [nzPositionMode]="tabPositionMode"\n [nzAnimated]="inkBarAnimated"\n [ngStyle]="nzTabBarStyle"\n [nzHideBar]="nzHideAll"\n [nzTabBarExtraContent]="nzTabBarExtraContent"\n [selectedIndex]="nzSelectedIndex"\n (nzOnNextClick)="nzOnNextClick.emit()"\n (nzOnPrevClick)="nzOnPrevClick.emit()">\n <div nz-tab-label\n role="tab"\n [style.margin-right.px]="nzTabBarGutter"\n [class.ant-tabs-tab-active]="(nzSelectedIndex == i) && !nzHideAll"\n [disabled]="tab.nzDisabled"\n (click)="clickLabel(i,tab.nzDisabled)"\n *ngFor="let tab of listOfNzTabComponent; let i = index">\n <ng-container *nzStringTemplateOutlet="tab.nzTitle">{{ tab.nzTitle }}</ng-container>\n </div>\n </div>\n <div #tabContent\n class="ant-tabs-content"\n [class.ant-tabs-top-content]="nzTabPosition === \'top\'"\n [class.ant-tabs-bottom-content]="nzTabPosition === \'bottom\'"\n [class.ant-tabs-left-content]="nzTabPosition === \'left\'"\n [class.ant-tabs-right-content]="nzTabPosition === \'right\'"\n [class.ant-tabs-content-animated]="tabPaneAnimated"\n [class.ant-tabs-content-no-animated]="!tabPaneAnimated"\n [style.margin-left.%]="(tabPositionMode === \'horizontal\') && tabPaneAnimated && (-(nzSelectedIndex || 0 ) * 100)">\n <div nz-tab-body\n class="ant-tabs-tabpane"\n *ngFor="let tab of listOfNzTabComponent; let i = index"\n [active]="(nzSelectedIndex == i) && !nzHideAll"\n [forceRender]="tab.nzForceRender"\n [content]="tab.template || tab.content">\n </div>\n </div>\n</ng-container>',styles:["\n nz-tabset {\n display: block;\n }\n "]}]}],O.ctorParameters=function(){return[{type:s.Renderer2},{type:l.NzUpdateHostClassService},{type:s.ElementRef},{type:s.ChangeDetectorRef}]},O.propDecorators={listOfNzTabComponent:[{type:s.ContentChildren,args:[m]}],nzTabsNavComponent:[{type:s.ViewChild,args:[T]}],tabContent:[{type:s.ViewChild,args:["tabContent"]}],nzTabBarExtraContent:[{type:s.Input}],nzShowPagination:[{type:s.Input}],nzAnimated:[{type:s.Input}],nzHideAll:[{type:s.Input}],nzTabPosition:[{type:s.Input}],nzSize:[{type:s.Input}],nzTabBarGutter:[{type:s.Input}],nzTabBarStyle:[{type:s.Input}],nzType:[{type:s.Input}],nzOnNextClick:[{type:s.Output}],nzOnPrevClick:[{type:s.Output}],nzSelectChange:[{type:s.Output}],nzSelectedIndexChange:[{type:s.Output}],nzSelectedIndex:[{type:s.Input}]},O);function O(t,e,n,i){this.renderer=t,this.nzUpdateHostClassService=e,this.elementRef=n,this.cdr=i,this.indexToSelect=0,this.el=this.elementRef.nativeElement,this._selectedIndex=null,this.tabsSubscription=r.Subscription.EMPTY,this.tabLabelSubscription=r.Subscription.EMPTY,this.tabPositionMode="horizontal",this.nzShowPagination=!0,this.nzAnimated=!0,this.nzHideAll=!1,this.nzTabPosition="top",this.nzSize="default",this.nzType="line",this.nzOnNextClick=new s.EventEmitter,this.nzOnPrevClick=new s.EventEmitter,this.nzSelectChange=new s.EventEmitter(!0),this.nzSelectedIndexChange=new s.EventEmitter}var E=(I.decorators=[{type:s.NgModule,args:[{declarations:[m,g,x,T,u,v,c],exports:[m,g,x,T,u,v,c],imports:[n.CommonModule,e.ObserversModule,i.NzIconModule,l.NzAddOnModule]}]}],I);function I(){}t.NzTabBodyComponent=c,t.NzTabLabelDirective=u,t.NzTabComponent=m,t.NzTabsInkBarDirective=v,t.NzTabsModule=E,t.NzTabsNavComponent=T,t.NzTabChangeEvent=S,t.NzTabSetComponent=x,t.NzTabDirective=g,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=ng-zorro-antd-tabs.umd.min.js.map